Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1.5: setting ios preferences no longer works #14

Closed
jopelkey opened this issue Nov 10, 2015 · 4 comments
Closed

Version 1.1.5: setting ios preferences no longer works #14

jopelkey opened this issue Nov 10, 2015 · 4 comments

Comments

@jopelkey
Copy link

I have been successfully using version 1.1.4 of this plugin to set the 2 ios preferences as shown below.
I just tried to update to the 1.1.5 version of the plugin and now neither of my preference settings are taking place (they don't end up in the platforms/ios/*.xcodeproj/project.pbxproject file).

<platform name="ios">
    <preference
        name="ios-XCBuildConfiguration-PRODUCT_NAME" value="'Mobile App'" />

    <preference
        name="ios-XCBuildConfiguration-IPHONEOS_DEPLOYMENT_TARGET" value="9.0" />

</platform>
@dpa99c
Copy link
Owner

dpa99c commented Nov 10, 2015

As of version 1.1.5 (commit 00391ef), the plugin will escape the values that are inserted into the .pbxproject file, so remove the single quotes:

<preference
    name="ios-XCBuildConfiguration-PRODUCT_NAME" value="Mobile App" />

Although 9.0 will now be inserted as "9.0", XCode is happy with this and will unescape the number. Run cordova prepare ios --verbose to see the plugin output.

@jopelkey
Copy link
Author

Thanks for the clarification about taking the single quotes out.
However, just changing that did not fix my issue.

It turns out that I think it is the removal of read-package-json from your dependencies list that is causing my issue. It looks like the cordova plugin add is actually failing without that dependency in place in your module. If I add read-package-json to my own list of dependencies, then the 1.1.5 plugin works ok for me.

Interesting to note that my npm install does indeed have a read-package-json inside itself as a dependency, but that does not appear to make it accessible to the plugins (i.e. it is in /usr/local/lib/node_modules/npm/node_modules/read-package-json).

@dpa99c
Copy link
Owner

dpa99c commented Nov 11, 2015

yes, I see, seems that my fix for #10 broke this. I'm in the process of reworking the dependency resolution to be more robust, which should address this issue as well as #11. I'll let you know when a fix for this is in place.

@dpa99c
Copy link
Owner

dpa99c commented Nov 12, 2015

Commit 95cc8e2 should resolve the read-package-json issue

@dpa99c dpa99c closed this as completed Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants