Is it possible to support iPhoneX for some view controllers in the app? - ios

I have an application which developed before iPhone X release. My question is the following, can I add iPhoneX support for only newly created view controllers? I mean some view controllers will have iPhoneX friendly UI some not in the same app. For my new view controllers I'm using safe area but UI is broken for iPhoneX.
For the app I guess Apple will not allow partial support for iPhoneX.
Just wondering is it possible or not and how if answer is yes.

It's either all or none. If your app uses a Launch Screen storyboard and is built with a Base SDK of iOS 11 or if your app uses launch images and includes an iPhone X launch image then your whole app is presumed to work on an iPhone X. You will need to make sure all screens work correctly.
Think about what a terrible user experience it would be to use an app on an iPhone X where some views use the whole screen and some views only use part of the screen.

Related

IB Storyboard for App Extensions: iPad Icons Not Present, Sizes Don't Change, Orientation Not Working

I need to update a 3 year old iPhone-only, portrait only (NOT universal) camera/photo app that worked with iOS 8 that contains a Share extension that now (with 10.0???) crashes at times (but works many other times), and I'm trying to debug the issues and update to iOS 9.0.
The first issue I found and fixed was the lack of Privacy strings for access to the camera and photo library.
But I also found that the extension does not work with Photos on an iPad with layout issues (in the Simulator so far). As the docs say, extension targets must be made for iPhone/iPad and my build setting for the target extension are set to 1,2, and I use Auto Layout.
The storyboard, the Extension scene, a View Controller Scene, all view controllers, views and subviews all are set for Auto Layout as well as Safe Area Layout Guides, but the only devices shown in IB are iPhones with no iPads available, when selecting other devices no change is seen in size, and the iPhone is constrained to portrait mode.
I've tried setting the main app as Universal, allowing every orientation, building, and still no iPad icons in IB to test the UI for the extension (and trying to get Landscape mode in IB doesn't work either).
Is there a way to get IB to show and allow iPads/iPhones, particularly iPads, and change orientation during development for app extensions?
Selecting "Use Trait Variations" made the iPad icons appear.

iPhone X scaling issue, can we scale existing apps to fullscreen mode without an app update

All my existing apps are not scaled to iPhone X, is there any way to make them to full screen without an update.
It will be really helpful if we don't have to go to the hassle of upgrading all the apps again.
And if not what are the options of doing it.
It is reminding me of days back to iPhone 6.
No, you can’t get your app out of letterboxed mode without at the very least updating your app to use a launch storyboard (and building it against the iOS 11 SDK).
Also, just doing that might not make your app work right on iPhone X — unless all your UI is built from only basic uses of system view controllers, you’re likely to have at least a few issues where you need to tweak your layout to respect safe areas. (Otherwise you end up with UI hiding under the notch or rounded corners.)

Embed iPhone xib in iPad UIView?

I'm developing 2 iOS apps; a iPhone app and an iPad app. Both have different purposes and functions, but I'd like to (once it's complete) embed the iPhone views into the iPad app as a preview.
(in the iPad app) I have a tab view controller, it loads various controllers and the last one will be a Preview. I'd use half (landscape mode) of the screen for some final settings and the other half to preview what will be produced.
My questions are:
Is this doable?
Is it allowed by Apple?
I've seen other discussions where people want to embed other, App Store apps from other developers. I'm not trying to do this; I only intend to embed the app I have the code for.
I'm just not sure the direction to look in to get this answer.
You should put both of them in the same project, and use a simple iPhone/iPad in AppDelegate.m to start the app with the appropriate View Controller.
That way you can present the iPhone app within iPad app by simply showing a view controller. Apple won't reject since technically it's still only 1 app.
To produce and submit 2 apps from the same project, create another Target. You can set bundle identifier / device type / etc per Target.

Create universal app using iOS StoryBoard that have different UI

I'm new with iOS and yesterday i learnt about storyboard. it works great. i refer to this link. I tried to create iPhone apps with a storyboard.
But now i want to create an universal apps, that means for iPhone and iPad. but also using the storyboard. lets say if i have the same UI, that wont be an issue. Same UI means, my iPhone UI using tab bar controller, my iPad also use a tab bar controller. I just need to point to the same class, and the result will be the same. Now, i want have a different UI. my iPhone will use a tab bar, but my iPad will use a split view.
here is my question :
is that possible to do that with device target universal? i mean iPhone with tab bar, iPad with split view.
if yes, how can i know which device is running? either i choose iPad or iPhone. How can i know i run on iPhone/iPad? what should I validate in the appdelegate?
For ipad storyboard, i drag a split view controller but i can't see any master detail whenever i run the apps. how can it be like that?
thanks. :)
If you create a Universal application (an application that supports both iPhone and iPad), Xcode will by default give you two Storyboards - one for iPhone, one for iPad. Under your target's settings you'll see a place where you can configure which Storyboard presents the main interface - you can set this separately for iPhone and iPad:
The OS will take care of loading the correct Storyboard for you.
If you want to detect in code whether you're running on an iPhone or iPad, you can use USER_INTERFACE_IDIOM(). For example:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
There's also UIUserInterfaceIdiomPad for iPad.

Displaying different Launch Images based on IOS Version

I have a situation causing me to have a need to support two different launch images for Portrait orientation on iPads as the views will be different depending on the IOS version.
I'm developing iPad/iPhone app that supports a UISplitViewController as the root window when the device is an iPad. In IOS 5.0, supports the master view controller being displayed in split view while in portrait mode by responding "NO" in the shouldHideViewController UISplitViewControllerDelegate method. In IOS 4.2, this method is not called and thus the Master View Controller is not displayed in Portrait orientation. Instead, it is a popover presented when a Nav button is pressed.
Is there a way to create a single version of the application (from an iTunes customer perspective) that includes the appropriate launch image based on IOS version?
The iPhone App Programming Guide within the Advanced Tips and Tricks section describes how different launch images can be specified based on platform and device, but no IOS version as so: key_root-platform~device
Another post's answer indicated that I may be able to solve a similar problem by creating multiple targets to support multiple versions. Is it possible to create multiple targets and upload them to Apple as a single application and have them distribute the appropriate binaries based on version? Any tips on how would be greatly appreciated.
No, there is no way to do what you are asking for. Your best bet is to come up with some launch image that's not trying to be a faithful reproduction of what your home screen is.
Could you not just show the split view with the popover/sidebar closed in landscape view? That way it will look much the same for iOS4 and iO5.
I think you can accomplish this by creating a custom splash screen. Then you can perform a runtime check and load the appropriate image based on the iOS version. I have seen custom splash screens before (eg animated splash screens).
I think you would overide startupImageWithOrientation:, see this post more for info.
As for your question about having multiple targets be one app, the answer is no.

Resources