iPhone app on iPad without compatibility mode - ios

I've developed an iphone only app (so 'Targeted Device Family' is set to iPhone since the beginning of the project) and when I finished I've tried to run it on the iPad just to check if the compatibility mode was working correctly but surprisingly it loads a full screen, without any compatibility mode!
Of course since it's an iphone app it doesn't look good at all. Can you think of the reason why the targeted device family = iPhone doesn't fire the compatibility mode on the iPad? (I tried on real device and simulators as well).

In iOS 8, there is an issue that when you use the new Launch Screen File, your app will automatically become universal. This issue is solved in iOS 8.1 beta, and therefore this is not a real solution.
For now, you are better off using Launch images in the asset catalog.
Also add the device modifier ~iphone to the launch file will make sure that the app is not see as an universal app.

Related

How do I make my app scale properly on 13-inch iOS tablets?

We finally got a 12.9-inch iPad Pro in the office! However, when putting our app on it, it's just stretched to fit the screen. Looking at the project file, I don't see any settings that would change this. How do I make our app properly scale on these large iPads?
I already tried Googling this, but I keep getting reviews and people begging for Xcode on iOS:
How do i make my app work on iPad Pro?
Make Xcode project iPad Pro compatible
iPad Pro .xcodeproj
Making your app work in iPad Pro
How to optimize app for iPad Pro
etc.
If you build with the iOS 9 SDK, then your app is expected to support all resolutions. Same if you use iOS 8 SDK and use a launch storyboard. Without that, iOS assumes that you don't support the resolution, but scales an iPad app. So that's what you need to do: iOS 9 SDK, and/or launch storyboard.

iPad Pro. Disable native 2732‑by‑2048 resolution

Need to disable the iPad Pro native 2732‑by‑2048 resolution for my app.
I found that it was auto activated if the app use a Launch Screen(LaunchScreen.storyboard).
Is there a way to disable iPad Pro and continue to use Launch Screen.
(I'm surprise that even with no icon for iPad Pro, the native mode was activated, i'm sure a lot of dev don't have the app ready for this)
Thanks
Are you using LaunchScreen.xib or LaunchScreen.storyboard? If so, if the version of Xcode you use supports the iPad Pro, it will compile the LaunchScreen for everything Xcode supports.
You could use an older version of Xcode which does not recognise the iPad Pro as you don't need it.
Or you could use Images.xcassets and not provide an iPad Pro launch image, though according to what you're asking, this doesn't seem that suitable. You could always use the LaunchScreen.xib/storyboard as the initial storyboard, so as far as the app is concerned, you're using LaunchScreen.storyboard instead of Main.storyboard. Though not providing an app icon should hold all this back, as it does with my current apps. Perhaps file a bug report with Apple? Hope this helps!
Official answer from Apple:
If an application includes a launch storyboard and is built with Xcode 7.1 or later, that application will run at native resolution on the iPad Pro regardless of whether the application includes a 167x167 icon.
If you would like to see this behavior changed in a future version of iOS, I suggest you file a bug report. Bug reports can be filled by visiting http://bugreport.apple.com.

Cordova 3.6.0: add only iphone support, no ipad at all

when i create a new cordova project using the cordova cli, it creates a clean project presetting the target device to iphone, but still adding ipad resources.
I can also install the app on iPad, even if i select iPhone on the Device select box.
I compared the cordova project with a new project i created in xCode6 selecting iPhone. I see differences, for example in cordova i can still see "Supported interfaces orientations (iPad)" and also the icons and splash screens for iPad. But in my new default xCode6 project, i can only see iphone related stuff.
How can i make cordova created ONLY for iPhone, no ipad files at all?
UPDATE: The reason is NOT to disable iPad support, i know it has to run fine on iPads compatible mode, but i have scaling issues, because the project seems to have iPads related resources and settings i dont see because its set to iPhone only. I had to switch to iPad and untick the unwanted orientations because on iPad it was allowing landscape even if i build for iPhone only. Very strange.
When you launch the app, just launch it for iPhone alone if you don't want to support iPads.
Go through this thread.
Here's the final accepted answer there:
The final answer is:
Once you added iPad support in App submission, there is no way to
remove it.
You have to block the access in iPad during App launch by checking
UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad
Other then that every iPhone app will always launch on iPad even without support but will open in an smaller window.

Converting iPhone app to Universal Retaining Emulator Mode - Xcode 5.1.1

I have an older nib-based iPhone project that I would like to make universal. To save time, since a redesign is approaching, I would like it to run as an iPhone app running on an iPad (emulation mode) but still be available on the app store as a universal binary.
I can easily generate an iPad-only binary that runs in emulation by right-clicking my iPhone target -> "duplicate target" -> "Duplicate and Transition to iPad". That's how I get an iPad target that runs in emulation mode (along with a folder full of iPad compatible nibs that are not used by the app - the new target uses the original iPhone nibs).
But how to submit this as a universal app? When I switch the target to universal it stops using emulation mode and looks for it's own set of nibs (which need considerable UI tweaking - even the auto-generated ones)
Anybody know any workarounds?
I'm afraid that can't be done. Apple's definition of a Universal App is one that runs on both devices WITHOUT emulator mode on the iPad.
You can however duplicate your iPhone storyboard into an iPad storyboard and tweak your UI so that it resembles what you see in iPhone Emulator Mode. I've explained how to do this here: http://pinkstone.co.uk/how-to-convert-your-iphone-storyboard-into-an-ipad-storyboard/

Which Xcode build settings for iPhone app so it can run on ipad as well?

I have written an app intended for the iphone. Obviously it is ok if it used on the ipad in the iphone mode, but it is an iphone app.
My app got rejected by Apple, I received a mail with a screenshot named Screen_shot_0.png as attachment, that was empty with in the middle the text "My Universal App on iPad" (which you if you open in Xcode the file MainWindow_iPad.xib).
Probably the app was uploaded with the Universal setting, not sure.
I did add icons, launch images etc. for both iphone and ipad.
Now I am confused about the following settings (click on Xcode project file): I will give my settings:
Project "appname"
iOS Deployment Target: 6.1 (should I take an older one?)
Targeted Device Family: iPhone (should this be iPhone/iPad?)
Targets "appname"
Targeted Device Family: iPhone (should this be iPhone/iPad?)
Everything works on iPhone4, iPod, iPad3.
The only thing is that the launch image of the iPad is cut off a bit at the right side, which causes me to think that some iPhone splashscreen is used instead. Would this be an issue for Apple?
If you want an app written for iPhone to run on iPad in iPhone mode, then you've actually done too much.
Just write it as a an iPhone-only app, and the iPad will automatically support it in iPhone mode. iPhone mode on the iPad offers users a chance to zoom to 2x resolution, but everything is "as if" it's running on an iPhone. Be sure NOT to upload as (or set attributes to claim it is) Universal. Don't provide multiple versions of screenshots, only provide iPhone screenshots. Think of "iPhone mode" as an iPhone emulator that runs on the iPad.
Only use "Universal" if you want to package both iPhone and iPad apps (typically with separate storyboards and definitely with distinct screenshots) in a single package that can run on either device. Upload as iPhone only and it will run on iPad in iPhone mode. Good luck!

Resources