Problems with device target for iOS app - ios

)
Hello all :-)
I want to release an iPhone/iPod Touch only app. However, I know iPad users can still download the app from the app store, which is fine by me. I was simulating my app on simulator to see how it would look like on an iPad. When I simulated it, the app looked terrible: the layout was not the same as the iPhone version, some labels were colliding and buttons were "cut" out of the screen.
I want iPad users to have the same view as an iPhone. I believe a 1x/2x button would appear on the screen in that case. How can I do that?
Any help/advice would be really appreciated!
Thank you :-)

When you upload your app to the App Store it will also allow iPad users to download the iPhone version of the app. This will have the 1x/2x button you are looking for.
However if you test your project on the iPad simulator before you upload the app, it will not be the same iPhone version of the app that the iPad users will see. Instead the simulator will run an actual iPad version of the app which is not what your looking for.
In your project settings, set your target device to iPhone only. Upload the app. When iPad users download the app they will get the iPhone only version with the 1x/2x button for the iPad.

In your project settings, make sure the "Devices" settings is "Universal" (this is under "Deployment Info"). If it was not before, you may have to make some layout adjustments.

Use Autolayout for fixing the design issues
in storyboard right pane -> attribute inspector -> simulated metrics-> select inferred in size for all controllers

You should be seeing this in the simulator (note the letterboxing on all sides):
And your build settings should show 1 as the target device family:
If not, you are iPad-native and that's the source of the trouble.

Related

Display iPad screen as iPhone?

I have searched through the web and I did not get clues.
Is there a way to display iPad screen as an iPhone like this app does it?
The iPad displays an iPhone screen. Is there some configuration to display this behavior?
What you are seeing is the default behavior of running an iPhone-only app on an iPad. You don't have to do anything other than declare your iOS app as an iPhone-only app.
Of course it would be better for your users if your app properly worked on and took advantage of the iPad's screen but that's up to you.
If the supported devices, that appear under Project > Target > General Tab > Deployment Info
is selected to be "iPhone" and you run this version of app on an iPad, it will appear as the example you shared.

Black bars on all sides when running iPhone app on iPad

I have an iPhone app and I am trying to run it on iPad. But when I run I see black bars on all the sides as shown below:
I am using a LaunchScreen.storyboard file. The LaunchScreen.storyboard is set as launch screen (checkmark is checked). In the target settings I have the following settings:
Any ideas?
Screenshot:
Edit: That apple tester got it wrong. your app is good !!!
I created a new project that only support an iphone and ran it on the ipad simulator. I calculated the ratio of the screen inside it is equal to 0.69. the same as the ratio of the screen inside the screen shot sent to you by apple.
Apple tester got it wrong. looks like that is the new behaviour on the
iOS 10 and that apple test does not know it. reply to them with this
they should accept your app without resubmitting new binary.
Original Answer:
Deleting DerivedData, Clean and remove app from simultator should solve the problem. Or maybe you didn't support iPad:
Its because of app is only for iphone, thats why if you are run in iPad it shows actually iphone's view, Enable for ipad and then check.
The Apple tester did not likely get it wrong. Check the following:
Go to your app's target. In the General tab, look at the Deployment section. What is listed for Devices? If it says Universal, change it to iPhone.
Go to your info.plist. Remove any keys pertaining to the iPad. (Supported interface orientations (iPad) may be there, for example.)
Now, your app should run correctly on an iPad, even though it was made for iPhone only.

How to stop support for ipad

My game is build specifically for iPhone and not larger screens like iPad retina. In Xcode, how do I stop my app from being considered as an iPad game.
I tried choosing iPhone under deployment info section in Xcode, but it didn't help.
Any help pls.
Here is the Xcode screenshot
I have also set the Target Device Family as iPhone
The solution involves
1) In Xcode, under Build Settings->Targeted Device Family->Choose iPhone
2) Check that when you run the app on iPad it shows 1x/2x in bottom right corner
If apple rejects the app, tell them it is not built for iPad.

iPhone simulator not working since xcode5 upgrade

Ever since i upgraded to xcode5, the iOS simulator only displays as an iPad even though the project is targeted for iPhone. The Run button also shows it's set to iPhone and I've tried switching between the different iPhone types in simulator. But no matter what, my iPhone project opens as an iPad simulation. Anybody encounter this problem or know how to fix it?
I believe I've downloaded all the relevant libraries and tools from apple as well. I'll double check that now but I'm pretty sure I have all the accessory downloads up to date.
Edit
I found the answer! Due to the changes with resolution of the retina display, the simulator was loading without the bezel. Turns out the best way to solve this problem without a large screen or retina display is to deploy target in navigator=>General menu=> to iOS 6.1 and make sure iOS simulator=>Hardware=>Devices=>is set to iOS 6.1 as well.
Have you tried changing the simulator device? Go to iOS Simulaotr.app -> hardware -> devices?
Download the extra components/simulators..
If you find your iOS simulator is showing a large iPad like display since upgrading, it's because of the change in resolution for the retina display. In order to view the simulator as a regular looking iPhone follow these steps:
Deploy your project target for iOS 6.1 or earlier. In the navigator menu (far left), top folder (your project folder), click it. Make sure "General" is selected in the menu in the centre of the screen. In 'deployment Info' set it to iOS 6.1 and 'devices' to iPhone.
Open iOS simulator: Click 'XCODE' in the top left of the screen => Open Developer Tools => iOS Simulator.
In iOS simulator, go to => Hardware => Devices => select iPhone => iOS 6.1. Make sure not to select any of the hardware devices that are listed as retina displays, thats the major key.
Finally, make sure the deployment next to the run button is also showing 'iPhone iOS 6.1' AND NOT 'iPhone Retina...'
And enjoy seeing the iPhone simulator properly again! :)

how to make Universal application, if i have mistakenly deleted MainStoryboard_iPad

I made iOS application first as universal , then some how i deleted MainStoryBoard_iPad because the client said that application required is only for iphone not for ipad. Now client asked me that he wants to run the same app on iPad with 2x button at the right bottom of the screen. Now when i run on iPad it crashes. What are the possible solutions to run the application smoothly on iPad.
If your client want the app to run on the iPad with a 2x button, they do not want a universal app; they want an iPhone app.
You do this in your project properties. Switch the type from "Universal" to "iPhone". You'll probably also want to remove some of the extra lines in the Info.plist that refer to the iPad version.
1) Even when you're the only person doing the development, always, ALWAYS use source control.
2) Go to your target, Summary tab, change the Devices to Universal, XCode should if you want to generate the iPad files - then modify the new files to fit your needs.

Resources