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

    https://github.com/apache/cordova-lib/pull/151#discussion_r23238546
  
    --- Diff: cordova-lib/src/plugman/platforms/ios.js ---
    @@ -184,22 +184,16 @@ module.exports = {
             var xcodeproj = xcode.project(pbxPath);
             xcodeproj.parseSync();
     
    -        // grab and parse plist file or config.xml
    -        var config_files = (glob.sync(path.join(project_dir, '**', 
'{PhoneGap,Cordova}.plist')).length === 0 ?
    -                            glob.sync(path.join(project_dir, '**', 
'config.xml')) :
    -                            glob.sync(path.join(project_dir, '**', 
'{PhoneGap,Cordova}.plist'))
    -                           );
    -
    -        config_files = config_files.filter(function (val) {
    -            return !(/^build\//.test(val)) && 
!(/\/www\/config.xml$/.test(val));
    -        });
    +        var xcBuildConfiguration = 
xcodeproj['hash']['project']['objects']['XCBuildConfiguration'];
    +        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"));
    +        var config_file = path.join(path.dirname(plist_file), 
'config.xml');
     
    -        if (config_files.length === 0) {
    -            throw new Error('could not find PhoneGap/Cordova plist file, 
or config.xml file.');
    +        if (!fs.existsSync(plist_file) || !fs.existsSync(config_file)) {
    +            throw new Error("could not find -Info.plist file, or 
config.xml file.");
    --- End diff --
    
    Should we throw `CordovaError` here?


---
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