I have a phonegap ios app that I used to build with phonegaps remote services. https://build.phonegap.com/
I have a few settings in config.xml that works just perfekt there. For example:
<preference name="orientation" value="landscape" />
<preference name="target-device" value="tablet" />
<preference name="webviewbounce" value="false" />
Now I want to build is locally on my Mac but can't get the settings to work.
I have phonegap 3.3.0 and run the following: phonegap build ios phonegap install ios
The app now opens in an iPhone emulator in portrait mode. Can't figure out why my settings isn't working.
This fix should ideally be in 3.4 release as per this : https://issues.apache.org/jira/browse/CB-5634
But people have reported problems with this after the issue was marked as resolved. So try out the latest patch release of 3.4 and see if it works.
The code to handle this preference simply did not exist prior to 3.4 althouth the docs generously mentioned about it.
I just had the same problem with Cordova version 3.5.0-0.2.1 on iOS using XCode 5. Not sure how this happened - but when I looked in my -info.plist file there were two entries for "Supported interface orientations". One was limited to landscape only (what I wanted) and the other contained both landscape and portrait. Deleting the portrait entries made this work.
I had already updated config.xml and verified from the app's package that the correct info was included in the compiled app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With