Black bars on all sides when running iPhone app on iPad - ios

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.

Related

Apple Rejection App: We also noticed that your app did not run at iPhone resolution when reviewed on iPad running iOS 10.2.1 [duplicate]

I made an iPhone App with Xcode. The devices setting is set to "iPhone". But in iTunes Connect it is rejected because it doesn't run on the iPad.
That is weird because it is an iPhone app, but when I checked it in Xcode, I can run it with the iPad simulator,however I think that normally this is not possible with an iPhone app.
I have added pictures to make my question clearer:
So what is gone wrong and how can I fix it?
EDIT:
Picture from resolution center:
Thanks all, I Found the problem/solution:
In my info.plist there was an extra row called supported interface orientations(iPad) where the portrait mode was added.
I have no idea how this got added here but when I removed it, the problem was solved.
From the Apple iOS App Store Review Guidelines (https://developer.apple.com/app-store/review/guidelines/):
2.10 iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
Basically, if you set an app to "Universal" it will have iPad and iPhone versions of the UI and will appear in the search results for both. If you set it to iPhone only, it will still be installable on iPads, but it doesn't appear in the search results by default. Additionally when a user does install it on an iPad it will just scale up the UI to best fit the screen. You cannot prevent your app from running on iPads.
Every app can run on the iPad no matter if it is supported or not. The option you have in Xcode is if you want to configure it to look good on the iPad using it's own storyboard. If you configure it for both iPad and iPhone your app fill get a + in the right corner of the price on the App Store and show up on iPad searches. However if you don't configure it to support iPads it'll not show up on searches of the Apple App Store, unless osmose selects iPhone only. You can easily submit your app to the App Store, without it being rejected my friend.
Hope that helps. Keep coding.
Nothing is wrong here , you can do this in debug mode for development purpose. Even you can run it on your iPad device from xCode. Don't worry about it, nothing wrong here.

Problems with device target for iOS app

)
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.

iOS simulator change devices not working

So I'm working through the BNR iOS objective c book, and I want to run a project on the iPad simulator. according to the book, I change the deployment device in the general settings for the project target as "universal," which I did.
However when I run and switch to any iPad on the simulator I get drawn back to the main method of my project. The iPad does appear after a delay, but without the app I built. I've set all the views in my xibs to "inferred" but I still can't run my project on iPad.
Any help would be appreciated, thanks.
This is probably because the app is crashing. it's possible if you created the app without setting it to universal it is missing a storyboard for iPad which would cause a crash and take you to that area. You should look at the console logs and see what is happening. There should be good information in there as to what is missing or why it's crashing right away.

How to set app-icons in XCode 5?

I am using XCode 5.
I am properly setting up all app-icons in proper size and resolution.
When I run the app in iPhone Simulator, the app-icon displays correctly. But, when I change the simulator from iPhone to iPad, then the app-icons does not appear.
What could be the root cause of issue ?
Few Tests
Make sure you have set the icons for iPad as well.
If you have, you can probably stop the project, quit the simulator manually, clean, build and run the project by selecting iPad Simulator.
Make sure you have all the icons set -ie- iPhone and iPad specific. Following is the checklist for the same:
App Icons
Splash Screens
Hope this helps !!!
Icon size for iphone and ipad differs. Check here for apple's documentation
Click on project name.On the right side click General Tab and check whether you have added icons of correct resolution or not.
Icons for Universal Apps
Universal applications use the following icons. Items marked with "Required" must be included.
In addition to the above icons, universal applications with a deployment target of iOS 6.1 or earlier use the following icons. Items marked with "Required" must be included if the application's deployment target is iOS 6.1 or earlier.
more detail https://developer.apple.com/LIBRARY/IOS/qa/qa1686/_index.html

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