Github user ogoguel commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/219#discussion_r31520090
  
    --- Diff: cordova-lib/src/plugman/platforms/ios.js ---
    @@ -184,13 +192,76 @@ module.exports = {
     
     
             var xcBuildConfiguration = 
xcodeproj.pbxXCBuildConfigurationSection();
    -        var plist_file_entry = _.find(xcBuildConfiguration, function 
(entry) { return entry.buildSettings && entry.buildSettings.INFOPLIST_FILE; });
    -        var plist_file = path.join(project_dir, 
plist_file_entry.buildSettings.INFOPLIST_FILE.replace(/^"(.*)"$/g, 
'$1').replace(/\\&/g, '&'));
    -        var config_file = path.join(path.dirname(plist_file), 
'config.xml');
     
    -        if (!fs.existsSync(plist_file) || !fs.existsSync(config_file)) {
    +        // CB-9033
    +        var plist_file_index;
    +        var plist_file_entry = _.find(xcBuildConfiguration, function 
(entry,index) { 
    +            if (entry.buildSettings && entry.buildSettings.INFOPLIST_FILE) 
{ 
    +
    +                var plist_file = path.join(project_dir, 
entry.buildSettings.INFOPLIST_FILE.replace(/^"(.*)"$/g, '$1').replace(/\\&/g, 
'&'));
    +                 if (!fs.existsSync(plist_file)) 
    +                    return false; 
    +                
    +                var config_file = path.join(path.dirname(plist_file), 
'config.xml'); 
    +                  if (!fs.existsSync(config_file)) 
    +                    return false; 
    +
    +                // only return project that contains both a plist and a 
config.xml (especially to discard apple watch extension/app)
    +                plist_file_index = index;
    --- End diff --
    
    I did not know about the SKIP_INSTALL but that would be a good additional
    check : thanks for the pointer.
    Nevertheless, you still need to check that both the .PLIST and the
    CONFIG.XML files exist eventually, so it won't totally replace the test.
    I will upgrade my code anyway
    Olivier
    
    2015-06-02 11:49 GMT+02:00 Georgi Alexandrov <notificati...@github.com>:
    
    > In cordova-lib/src/plugman/platforms/ios.js
    > <https://github.com/apache/cordova-lib/pull/219#discussion_r31507207>:
    >
    > > -        if (!fs.existsSync(plist_file) || !fs.existsSync(config_file)) 
{
    > > +        // CB-9033
    > > +        var plist_file_index;
    > > +        var plist_file_entry = _.find(xcBuildConfiguration, function 
(entry,index) {
    > > +            if (entry.buildSettings && 
entry.buildSettings.INFOPLIST_FILE) {
    > > +
    > > +                var plist_file = path.join(project_dir, 
entry.buildSettings.INFOPLIST_FILE.replace(/^"(.*)"$/g, '$1').replace(/\\&/g, 
'&'));
    > > +                 if (!fs.existsSync(plist_file))
    > > +                    return false;
    > > +
    > > +                var config_file = path.join(path.dirname(plist_file), 
'config.xml');
    > > +                  if (!fs.existsSync(config_file))
    > > +                    return false;
    > > +
    > > +                // only return project that contains both a plist and 
a config.xml (especially to discard apple watch extension/app)
    > > +                plist_file_index = index;
    >
    > Instead of checking for config.xml can we check for SKIP_INSTALL property
    > in BuildSettings. SKIP_INSTALL property should be missing or equals to NO
    > for the iPhone app target and should equals to YES for WatchKit Extension
    > and WatchKit App.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/cordova-lib/pull/219/files#r31507207>.
    >
    
    
    
    -- 
    ıllıllı ɹǝ!ʌ!ןo ıllıllı



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to