Potential problem with IoS Orientation change
Its fine when the app is running but when the app is loading (and the splashscreen is shown) it seems that PhoneGap is forcing landscape in some way.
What we get is:
1) Hold phone in portrait position
2) Start app
3) The phone status bar moves to left side (i.e. as though phone had been rotated even though it hasn't) and the splash screen shows correctly in portrait.
4) Then the status bar goes back to its proper position as app shows its home page.
Note I have not specified any of the new configuration so I'm running with the "defaults" - so could be I've not understood the docs correctly.
Its fine when the app is running but when the app is loading (and the splashscreen is shown) it seems that PhoneGap is forcing landscape in some way.
What we get is:
1) Hold phone in portrait position
2) Start app
3) The phone status bar moves to left side (i.e. as though phone had been rotated even though it hasn't) and the splash screen shows correctly in portrait.
4) Then the status bar goes back to its proper position as app shows its home page.
Note I have not specified any of the new configuration so I'm running with the "defaults" - so could be I've not understood the docs correctly.
- 54 Posts
- 1 Reply Like
Posted 9 years ago
- 139 Posts
- 15 Reply Likes
Brian,
PhoneGap Build is a service that compiles your app using the open-source PhoneGap project and gives you back binaries. Build is completely reliant on PhoneGap as the actual framework creating your application. Outside of PhoneGap, Build is really only a web front-end around the open source PhoneGap project.
This issue was filed on the PhoneGap-iOS project in mid July, just around the time this thread was created too. You can check out this thread here: https://github.com/phonegap/phonegap-.... As you can see, in mid-August it was deemed invalid and closed.
To go into more detail, if you open Mobile Safari on your iPhone, it exhibits identical behaviour. I do not see it as far-fetched to label the issue as invalid. If you have a different opinion, please, pipe up and let your voice be heard. Better yet, fork the code and help the free and open source project out by contributing a fix for it.
If you feel passionately about this issue, please file it again on the Apache Callback repository (link here: https://github.com/callback/callback-.... PhoneGap is in the process of becoming Callback, governed by the not-for-profit Apache Software Foundation. Have others voice their opinions as well if you feel you are not alone.
And trust me when I say, we do care. If we didn't care, we wouldn't spend time working on this open source project on our own time as well as company time.
PhoneGap Build is a service that compiles your app using the open-source PhoneGap project and gives you back binaries. Build is completely reliant on PhoneGap as the actual framework creating your application. Outside of PhoneGap, Build is really only a web front-end around the open source PhoneGap project.
This issue was filed on the PhoneGap-iOS project in mid July, just around the time this thread was created too. You can check out this thread here: https://github.com/phonegap/phonegap-.... As you can see, in mid-August it was deemed invalid and closed.
To go into more detail, if you open Mobile Safari on your iPhone, it exhibits identical behaviour. I do not see it as far-fetched to label the issue as invalid. If you have a different opinion, please, pipe up and let your voice be heard. Better yet, fork the code and help the free and open source project out by contributing a fix for it.
If you feel passionately about this issue, please file it again on the Apache Callback repository (link here: https://github.com/callback/callback-.... PhoneGap is in the process of becoming Callback, governed by the not-for-profit Apache Software Foundation. Have others voice their opinions as well if you feel you are not alone.
And trust me when I say, we do care. If we didn't care, we wouldn't spend time working on this open source project on our own time as well as company time.
- 6 Posts
- 0 Reply Likes
Fil Maj,
A few things:
1.) Mobile Safari most certainly does not open in landscape mode on my iPhone.
2.) When I build the application with XCode on my machine this issue does not exist. When I build it with build.phonegap.com the issue exists. Either build.phonegap.com is using an outdated version of Phonegap itself or there is something else wrong.
3.) I appreciate taking the time to get back on this problem but as evidenced by the number of people on this thread it is a real problem that has not be properly addressed.
A few things:
1.) Mobile Safari most certainly does not open in landscape mode on my iPhone.
2.) When I build the application with XCode on my machine this issue does not exist. When I build it with build.phonegap.com the issue exists. Either build.phonegap.com is using an outdated version of Phonegap itself or there is something else wrong.
3.) I appreciate taking the time to get back on this problem but as evidenced by the number of people on this thread it is a real problem that has not be properly addressed.
- 6 Posts
- 0 Reply Likes
Also, this is marked as "Not a problem" so I guess it will never get fixed. There are other reasons not to use build.phonegap.com. It is a great idea but the resulting performance is terrible.
- 139 Posts
- 15 Reply Likes
Sorry to hear you are not happy with PhoneGap. Perhaps using PhoneGap Build is not the best idea in your case.
- 63 Posts
- 4 Reply Likes
I just tried this and mobile Safari starts in Portrait mode, which is the way springboard is. And I feel this is the correct behavior.
Any iOS app (compiled on PhoneGap:Build) starts in landscape mode, then switches to portrait. And in my opinion, and the opinion of my beta testers, this looks bad. I've started compiling my apps in xcode partly because of this, but mainly so I can disable the Webui bounce which should be built in to phonegap. I might just fork Phonegap and fix this myself. As it is a super easy fix.
Anyway back on subject, I understand where y'all are coming from. In theory this isn't an issue with PhoneGap:Build but with the actual framework. But when I build with Xcode this doesn't happen.
Please let me know if I can do anything to help. I LOVE the service and I'm working on a crossplatform app to make the whole process more automated. (I currently use it internally)
Any iOS app (compiled on PhoneGap:Build) starts in landscape mode, then switches to portrait. And in my opinion, and the opinion of my beta testers, this looks bad. I've started compiling my apps in xcode partly because of this, but mainly so I can disable the Webui bounce which should be built in to phonegap. I might just fork Phonegap and fix this myself. As it is a super easy fix.
Anyway back on subject, I understand where y'all are coming from. In theory this isn't an issue with PhoneGap:Build but with the actual framework. But when I build with Xcode this doesn't happen.
Please let me know if I can do anything to help. I LOVE the service and I'm working on a crossplatform app to make the whole process more automated. (I currently use it internally)
- 1941 Posts
- 89 Reply Likes
Hey Jason and Brian,
Thanks for your concern, the main reason why we try to push this on to PhoneGap (Framework) is because we do not want to deviate the build service from the upstream code base. If we did do this the inconsistencies would be an issue for both you the developer and us, mostly related to application maintenance.
The issue lies with the splash screen, the reason why mobile safari appears to not have this issue is because it does not have a splash screen.
If you notice when opening the application (for the first time, when it is not running in the background) the application will start in portrait mode and then make a switch to landscape. This is exactly what the phonegap application does however it is overlayed by the portrait splash screen.
As for it not occuring with xcode, I sat down with the IOS lead developer (Shaz) and we both found a consistent behaviour with build and xcode.
What I can do is hide the status bar during the splash screen and then expose it once the application has loaded.
Hardeep Shoker
Thanks for your concern, the main reason why we try to push this on to PhoneGap (Framework) is because we do not want to deviate the build service from the upstream code base. If we did do this the inconsistencies would be an issue for both you the developer and us, mostly related to application maintenance.
The issue lies with the splash screen, the reason why mobile safari appears to not have this issue is because it does not have a splash screen.
If you notice when opening the application (for the first time, when it is not running in the background) the application will start in portrait mode and then make a switch to landscape. This is exactly what the phonegap application does however it is overlayed by the portrait splash screen.
As for it not occuring with xcode, I sat down with the IOS lead developer (Shaz) and we both found a consistent behaviour with build and xcode.
What I can do is hide the status bar during the splash screen and then expose it once the application has loaded.
Hardeep Shoker
- 63 Posts
- 4 Reply Likes
I'd like the ability to hide the status bar completely though.
- 63 Posts
- 4 Reply Likes
Also the ability to not have a splashscreen, I believe the default action on iOS is to show a screenshot? I've seen many apps do this.
- 63 Posts
- 4 Reply Likes
I think you might be misunderstanding the issue. The problem is when an app is suppose to be displayed in portrait, it starts in landscape. No matter what.
Here's a video of what I mean.
https://www.youtube.com/watch?v=2QRmxw...
Here's a video of what I mean.
https://www.youtube.com/watch?v=2QRmxw...
- 6 Posts
- 0 Reply Likes
Yes, this is the exact behavior that I am also seeing. Hopefully this video helps clear up any confusion.
Jason, out of curiosity how did you capture the video?
Jason, out of curiosity how did you capture the video?
- 63 Posts
- 4 Reply Likes
Its a Cydia app called Display Recorder. It's the best method I've found for recording video on the iPhone.
http://rpetri.ch/cydia/displayrecorder/
http://rpetri.ch/cydia/displayrecorder/
- 63 Posts
- 4 Reply Likes
- 1941 Posts
- 89 Reply Likes
Yikes. That's nothing like I had in mind; I will need some further information on how to produce this. Does it occur with all applications, on devices or simulators, also any information that you deem necessary. (What IOS version are you running, is it jailbroken, etc).
Also if you could provide me with application ids. I find this very strange as I'm an iPhone user myself and any testing I do for build is with IOS. To be honest I have never had this happen before, however the possibility of it occurring is not out of the question as demonstrated by the video (thanks Jason).
Thanks,
Hardeep Shoker
Also if you could provide me with application ids. I find this very strange as I'm an iPhone user myself and any testing I do for build is with IOS. To be honest I have never had this happen before, however the possibility of it occurring is not out of the question as demonstrated by the video (thanks Jason).
Thanks,
Hardeep Shoker
- 63 Posts
- 4 Reply Likes
Here is my app id.
36209
Im running iOS 4.3.3, but it happens to all of my beta testers as well.
My device is jail broken, but the other aren't.
Thanks,
Jason
36209
Im running iOS 4.3.3, but it happens to all of my beta testers as well.
My device is jail broken, but the other aren't.
Thanks,
Jason
- 63 Posts
- 4 Reply Likes
- 1941 Posts
- 89 Reply Likes
Hey Jason,
I will be looking into this today. I'm just in the process of adding some changes to IOS to make it more stable.
Thanks for waiting,
Hardeep Shoker
I will be looking into this today. I'm just in the process of adding some changes to IOS to make it more stable.
Thanks for waiting,
Hardeep Shoker
- 31 Posts
- 1 Reply Like
I experience the same behaviour on my app (24160).
Splash screen shows, status bar is on the left hand side, then slides up to the top when app is done loading.
Tested on iOS5 with a 3GS.
Splash screen shows, status bar is on the left hand side, then slides up to the top when app is done loading.
Tested on iOS5 with a 3GS.
- 57 Posts
- 3 Reply Likes
I wanted to have app portrait mode only anyway however the pref
preference name="orientation" value="portrait"
Seems to have no effect for iOS but is ok on Android
preference name="orientation" value="portrait"
Seems to have no effect for iOS but is ok on Android
- 1941 Posts
- 89 Reply Likes
Thanks for your patience,
I was able to produce the same result that the thread explains. I will get a fix for this out hopefully soon.
Hardeep Shoker
I was able to produce the same result that the thread explains. I will get a fix for this out hopefully soon.
Hardeep Shoker
- 6 Posts
- 0 Reply Likes
- 63 Posts
- 4 Reply Likes
Awesome. and If you could also look into adding a preference to hide the status bar completly. that would be amazing. And the ability to lock th web bounce.
- 63 Posts
- 4 Reply Likes
Awesome. and If you could also look into adding a preference to hide the status bar completly. that would be amazing. And the ability to lock th web bounce.
- 1941 Posts
- 89 Reply Likes
I was actually going to hide the status bar during the splash all together (It's current implementation creates an inconsistency with the orientation of the splash and phone).
Is the web bounce the effect of scrolling past the application's vertical borders?
Hardeep Shoker
Is the web bounce the effect of scrolling past the application's vertical borders?
Hardeep Shoker
- 63 Posts
- 4 Reply Likes
I agree the splash screen should be hidden, but the ability to hide the status bar while the app is running. For fullscreeen apps like games. Would be cool.
Correct, It completely destroys the illusion of the app being native.
This page here describes the issue very well, and the solution is a perfect fix.
I realize THIS might actually be on the PhoneGap side, and not yours. But if you add this code
for (id subview in theWebView.subviews){
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).bounces = NO;
}
In AppDelegate.m after (void)webViewDidFinishLoad:(UIWebView *)theWebView"
It prevents the bouncing, but still allows the pages to scroll.
http://groups.google.com/group/phoneg...
Thanks,
Jason Stallings
Correct, It completely destroys the illusion of the app being native.
This page here describes the issue very well, and the solution is a perfect fix.
I realize THIS might actually be on the PhoneGap side, and not yours. But if you add this code
for (id subview in theWebView.subviews){
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).bounces = NO;
}
In AppDelegate.m after (void)webViewDidFinishLoad:(UIWebView *)theWebView"
It prevents the bouncing, but still allows the pages to scroll.
http://groups.google.com/group/phoneg...
Thanks,
Jason Stallings
- 63 Posts
- 4 Reply Likes
Is the iOS build having issues? or being worked on? All of my apps remain queued.
- 1941 Posts
- 89 Reply Likes
Hey Jason,
It seems to have built already. Are you still seeing it as queued?
Hardeep Shoker
It seems to have built already. Are you still seeing it as queued?
Hardeep Shoker
- 8 Posts
- 0 Reply Likes
I'm really excited to have this issue fixed.
Can't wait for the solution. Hardeep, thanks for your work!
Can't wait for the solution. Hardeep, thanks for your work!
- 1941 Posts
- 89 Reply Likes
As a temporary fix I've fixed it so it starts in portrait mode. The reason this issue occurs is because the PG project currently takes the first orientation specified in the project plist file. I'm going to add the fix of removing the bar from the splash screen into the PG project and pull the changes into Build (we are trying to keep it as consistent as possible with the PG project).
The timeline for the fix is as soon as my changes get pulled into the main project we will pick up the patch.
Thanks for your patience,
Hardeep
*note that now if you hold it in landscape the bar is in portrait mode.
The timeline for the fix is as soon as my changes get pulled into the main project we will pick up the patch.
Thanks for your patience,
Hardeep
*note that now if you hold it in landscape the bar is in portrait mode.
- 1 Post
- 0 Reply Likes
I am still having this problem with phonegap 2.7.0. I'm using that version because I am using phonegap build.
Any idea on how to fix this temporarily or am I doing something wrong since this thread is a year old?
Any idea on how to fix this temporarily or am I doing something wrong since this thread is a year old?
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers







