Intel XDK screen orientation!!!! help!!!!

Get help using Construct 2

Post » Wed Nov 25, 2015 1:51 pm

hello,
Iw been poking arround this for days... :(
I had it working some time ago but now it just dont work anymore... (recently updated XDK to latest version and also iOS to latest) i dont know whats the problem!?
Iw installed cordova-plugin-screen-orientation, set portrait in project setings in C2 and in XDK i even set browser object orientation lock as first event (that worked before) and nothing... screen still rotates! :(

Does anyone know how to sucessfilly lock to portrait?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Nov 25, 2015 3:39 pm

Hello irinia, for your problem so :
- in c2 put orientation : "any" in project properties.

after in xdk :
- import your html5 page

- click project (right top btn)

-in cordava hybrid mobile app settings you are 4 btn in blue color, choose what type of build do you want (clic case what you don't want)

- build setting after and + btn, choose orientation portrait (look the window name just bottom build setting is type of build do you want)

- build and ok

I hope is clear, sorry for my bad english.
B
7
S
1
Posts: 44
Reputation: 487

Post » Wed Nov 25, 2015 4:37 pm

@fred37000

Thanks!

I am still in test phase so i am previewing in intel xdk app on ios but as soon as im ready for build ill try your solution.
Meanwhile i am still looking for a way to lock screen on test app.
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Nov 26, 2015 7:18 pm

irina wrote:@fred37000

Thanks!

I am still in test phase so i am previewing in intel xdk app on ios but as soon as im ready for build ill try your solution.
Meanwhile i am still looking for a way to lock screen on test app.

If you are testing in Intel App Preview on iOS, orientation lock doesn't work. It doesn't work for me there, either. But when published, it works for me.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Thu Nov 26, 2015 9:17 pm

@grigrizljac

Oh, thank you for this information!!!!!
Very, very helpfull... i may resume my work after days of headache and torture... :)
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Nov 30, 2015 10:48 am

ok sorry, it's work for me for android, this help me for ios version. Thanks
B
7
S
1
Posts: 44
Reputation: 487

Post » Mon Nov 30, 2015 7:52 pm

no one help me here but just follow fred37000 instruction. As grigrizljac state i wont lock during simulation in intel XDK but after publish to you phone it lock.
B
9
S
2
Posts: 66
Reputation: 717

Post » Mon Dec 07, 2015 12:37 pm

So. I used that plugin for the previous version of my app but now it stopped working.

I want my app to work in landscape only. Android worked fine, but ios did not.

After hours of tinkering with XDK and plugins (and C2's lock orientation action) the best I managed was that the app started in portrait and then after I changed to landscape, it locked correctly. It was clearly unacceptable though.

So, I just abandonded XDK and did ios version through phonegap cli + xcode (also installed admob as a plugin). It worked fine and locked correctly.

I just can't recommend XDK for ios builds.
B
7
S
2
Posts: 68
Reputation: 645

Post » Tue Dec 15, 2015 12:34 pm

@tavi

Very useful information. Could you tell me the procedures to generate ipa from xcode with phonegap cli? And about the performance?

Thanks in advance.
B
74
S
13
G
4
Posts: 1,000
Reputation: 8,041

Post » Tue Dec 15, 2015 4:29 pm

Hey guys

If you intend to build using CLI 5, include this lines on top of the intelxdk.config.additions.xml

Code: Select all
<platform name="ios">
    <preference name="Orientation" value="landscape" />
</platform>


It works very well.
B
74
S
13
G
4
Posts: 1,000
Reputation: 8,041

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 49 guests