- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using Construct2 and i just cant make mine screen stop in portrait only mode when testing on iphone.
this is in my config.xml
<preference name="Orientation" value="portrait" />
but still on device screen rotates.
anyone can help?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As listed in this thread: https://software.intel.com/en-us/forums/intel-xdk/topic/583932#comment-1842741, it looks like the "cordova-plugin-screen-orientation-master" plugin works.
There is a workaround for orientation issues on iPad here: https://software.intel.com/en-us/xdk/faqs/cordova. Check out Question 1.
Here is the documentation for the cordova-plugin-screen-orientation-master plugin: https://github.com/gbenvenuti/cordova-plugin-screen-orientation. You can import it via the Plugin Manager in Projects Tab.
Plugin Management -> Add plugins to this project -> Third party plugins (from left list) -> Leave it at the default plugin source (Cordova plugin registry) and include this under plugin ID: cordova-plugin-screen-orientation
That is about it. Import and you are done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anusha Muthiah (Intel)
This solution is not working anymore... i have iOS 9 on device and its not working.
Is there a proper way to lock orientation that works? ...and perhaps if its not too much to ask that intel can confirm as oficial?
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sinisa -- please see this FAQ for some help: https://software.intel.com/en-us/xdk/faqs/cordova#app-orientation -- also, make sure you are using CLI 5.1.1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have CLI 511 and i have cordova-plugin-screen-orientation installed and i'w set portrait mode in project build settings.
I use iPhone 6 for testing (this worked before, then i updated XDK to latest and iPhone to version 9.1) and in your intel XDK app for iphone my screen is still rotating.
Is there a something special that i need to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you include the appropriate calls to the orientation plugin? You need to do this in order to make that plugin do what you want. See the documentation for that plugin: https://www.npmjs.com/package/cordova-plugin-screen-orientation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, i'w set: screen.lockOrientation('portrait');
As it was required but screen still rotates.
Here's the link where people say that they all have the same issue:
In preview app it's not working but in build it does!? ...looks like app has a bug!
BR
S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't work on App Preview because third-party plugins cannot be utilized in App Preview... See these doc pages > https://software.intel.com/en-us/xdk/docs/lp-debugging

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page