-
Notifications
You must be signed in to change notification settings - Fork 187
Rounded edges of the iPhone X on ionic #317
Comments
These suggestions from Stack Overflow seemed to help: Still got a whole lot of Ionic v1 absolute positioning styles to override, but it's something at least. Best of luck! |
We recently went through and cleaned up this experience for Ionic v3. See this post for details https://blog.ionic.io/ios-11-checklist/ Some (but not all) of that is also applicable to v1. Next week, we will be going through v1 and making adjustments there for iOS 11 and the iPhone X. I will keep you posted on that progress. |
Thanks! That's awesome!! |
Just added the |
We are working on a long term fix, but for those needing a solution today, here is what you should do (for tabbed apps in portrait mode): First, read our iOS 11 blog and follow the steps on installing WKWebView, the updated status bar plugin, and the viewport fit meta tag change. WKWebView is required, but be mindful of the new CORS enforcement. Next, add this CSS in your <style>
.platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) {
height: calc(44px + constant(safe-area-inset-top));
}
.platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) > * {
margin-top: constant(safe-area-inset-top);
}
div.tab-nav.tabs {
height: calc(49px + constant(safe-area-inset-bottom));
}
ion-content.padding.scroll-content.ionic-scroll.has-header.has-tabs {
top: calc(64px + constant(safe-area-inset-top));
}
</style> With these changes my starter tabs app looks like this now: NoteThis is not an official fix and is only a workaround. We will have an official fix for all apps very soon, but this might help some that need something today for one reason or another |
Thanks! I needed to make a few tweaks to make this work for me. There was a 20px white bar at the top of the ion-content, and the bottom of the ion-content was partially-covered by the tabs.
I just locked down the app to portrait mode so I wouldn't need to worry about the notch in landscape mode |
@mlynch When will there be the official update on v1? |
Coming soon I guess: https://twitter.com/mhartington/status/920070473609830401 |
Yep, release incoming very soon (this week) |
Hi everyone! 1.3.4 has been released with the necessary iPhoneX updates. Please update your bower package to
|
Great. Can you publish it to npm? At least v1.3.2 is available at the ionic-angular package |
@mobidev111 sure thing!
UPDATE:
|
That's awesome! By the way, I've forked cordova-plugin-migrate-localstorage so that it works with ionic's webview you can download it here. https://github.com/kas84/cordova-plugin-migrate-localstorage And also recently moved to https://github.com/ionic-team/cordova-plugin-localstorage-backup so that when iOS resets localStorage, you can rely on it anyway, I encourage those using localStorage to use this plugin too since it backups localStorage in iOS prefs. |
Please also update the changelog here: https://github.com/ionic-team/ionic-v1/blob/master/CHANGELOG.md |
@geshub I've seen the same thing with the bigger header but title and buttons in the header do not respect the safe areas after updating to the newest version. |
Hmm, Im not able to replicate with a fresh project created from the CLI. And Im certain that the correct CSS is in place Lines 21 to 25 in fc404f9
|
@geshub It looks like your CSS is missing a line. I don't think iOS 11.0 understands the env() notation, so a |
@stripathix you're probably missing the "viewport-fit=cover" in your tag in index.html. Make sure the tag looks something like: |
@revie I do have that tag in the meta tag. My issue is exactly same as this: |
I had the same problem with @stripathix and after updating |
Hi. Please provide detailed steps on how to reproduce. I cannot duplicate this issue at all, so a sample project on github would be great. |
@marioshtika to what version you updated your cordova-plugin-statusbar plugin? In npm latest is 2.2.3 and it's like that since 23 April. I have this in my config.xml |
I see there is an unmerged PR for cordova-plugin-statusbar . I am updating my plugin to that PR and also I need to update my xCode to 9.1, maybe that will solve the issue. |
@mhartington absolutely it must be some of my CSS that's messing up. I am updating my xCode to the latest and will test in that. If it fails there I will provide sample app in which issue can be replicated. |
Your css output file is missing the Lines 21 to 25 in fc404f9
|
To update my application to Ionic@1.3.4. I did following steps:
|
Yes, I am having my own build code in nodeJS. I am working on posting sample project. Will push it soon. |
You are totally awesome @mhartington . But I have found that ionic.min.css is also missing the constant. If I use ionic.min.css then it looks like this: But if I use ionic.css then it works perfectly :-) You can easily reproduce this issue in default Ionic project also If in index.html you use ionic.min.css instead of ionic.css |
Ahh, alright, I know whats up there. Give me 15mins to finish lunch and I'll publish something |
related when you're on this: there's a scss syntax error in _platform.scss (missing closing brackets), see #328 |
Hi @mhartington , I see a new version is released here: But when I do this command I am still getting "version": "1.3.4", Maybe new version is still not live on npm/bower/ioniccli |
Few more issues regarding the iPhoneX notch with different orientation.
Just in case if need test application: |
The screen orientation change issue is a known UIWebview bug. You need to update to WKWebview, as there is not way to solve this in native for UIWebview. And that was just the commit, i haven't released anything yet. |
Thanks for the update. Actually, I am not able to run the application with WkWebview enabled in the simulator, that's why I was running the app under UIWebView. Good to know that it will be fine on real device :-) . Though application works on a real device with wkwebview but does not work in the simulator. I see this screen always If I add wkwebview pluign in default ionic project. Not sure what's going there :-( . Don't have iPhoneX and no plans to buy it also lolz... |
I think you might have something wonky in the setup.
is working fine on my end. |
|
please publish this version to npm as well - sorry for bugging.. |
|
I used WKWebView on Ionic v1 project. It won't let me connect to my web services even with ATS Transport set to Arbitrary Yes. Ended up uninstalling it. I have installed the ionic bower 1.3.5 in my project. I have the latest version of ionic 3.16 on my machine. May be downgrading it to ionic 1.78 would have helped. But when I tried downgrading by removing Ionic 3 and installing ionic1 - the ionic 1 would not show up in my /usr/local/bin. I am on Mac OSX. Any tips? |
Is it possible to disable Landscape mode for iPhoneX only? |
@stripathix, yes. You can use cordova-plugin-screen-orientation to set the orientation to portrait. For example something like this in app.js:
|
@sbasi5576 that's due to WKWebView enforcing CORS (like a normal browser). To get around that, add |
@josandretto I guess that will not handle landscape mode splash screen or will it? |
Orientation can be locked via the config.xml http://cordova.apache.org/docs/en/latest/config_ref/index.html |
@stripathix, I would guess not since the splash screen probably shows up before app.js executes. You might be able to do that with cordova-plugin-splashscreen and then define the splash screen for landscape iPhone X in config.xml. |
@josandretto thanks for the help. Anyways now I am doing this by a shell script to manipulate .plist file.
|
Hey folk! Since the original issue posted here has been solved, I'm going to lock this issue. If you have questions regarding anything WKWebview related, please post them on the Forum! Thanks! |
Hi,
Are we going to have support for iPhone X UI on ionic V1?

I guess it also needs some kind of support from Cordova!
The text was updated successfully, but these errors were encountered: