Unknown padding when using tablet simulator - ios

Why is there a black padding around when running on a tablet simulator? It works fine on iPhones, though.

I think you have made a small mistake. Your project's deployment device is set to iPhone. Just Go to your project's General tab and in Deployment info change device to Universal. Thats it.

It works in iPhone-Mode. You can use iPhone apps on iPad. It just scales to fill screen. If you want your app universal. You should make sure that your layouts work in Any,Any size class. And as #Bhavin Ramani answered, you should set it universal.

Related

UIView shows perfect on iPhone but not on iPad

I am pretty new to iOS development and I am able to create views and controllers. I have been testing using my iPhone and other sizes of iPhone and they look great. I tried once on an iPad but it was a border around the screen like in this image.
I constrained to margins and I did not give any height or width constraints so it could stretch properly. It also looks good on the storyboard viewing so what could I be doing wrong? Can't seem to find any resource online to help.
This is default behaviour when you run iphone app in ipad
This happened because your app is supported iphone only .
Tap on your project and select universal if you want to add support for both iphone and ipad.
Other option is you can check requires full screen check box but it will still show black bar
Note: However you are developing iPhone Only app but it is compulsory to check that everything works fine in ipad because apple review team will also check that in ipad and your app may be rejected if something is not proper
May be you have made an iPhone app. Try to change the setting to Universal app in the xcode settings. Normally iPhone app shows scaled on iPad, which is same as in your case.
Select Projet in xcode -> General Setting

iPhone app does not work correctly on iPad after change from universal to iphone only

How can I run iPhone apps on iPad after changing the target from an initial 'Universal' to 'iPhone'?
I'm working on a game for iOS (iPhone) using Swift and SpriteKit. The game got rejected today for this reason:
Reasons for Rejection: 2.10: iPhone apps must also run on iPad without
modification, at iPhone resolution, and at 2X iPhone 3GS resolution
After searching on StackOverflow I found out that it might have something to do with my info.plist file because at first my app was 'universal' and later I've changed it to iPhone-only.
It seems like there's something wrong with the aspect ratio of all the nodes. Take a look at the screenshots below. At the left side is the iPad-simulator and on the right there's the iPhone-simulator.
Maybe the game still thinks it is running on iPad because the nodes appear in 4:3 ratio?
How can I run iPhone apps on iPad after changing the target from an initial 'Universal' to 'iPhone'?
Please help. Thanks!
I've also added a screenshot of my info.plist file.
Apple requires that each app targeted on iPhone should run on iPad in the specific manner.
This usually looks like the app on iPad is not full-screen, it's surrounded by black frame that resembles the situation that the iPad is simulating iPhone.
My suggestion is to use size class now to make the app run full-screen on iPad and this should fix your issue with Apple.
Simply choose in your storyboard Regular Width and Regular Height, delete the existing constraints and set new ones.
More help here and apple docs also might come in handy
Darvydas' comment solved my problem.
What size does your background node have? Also if you whant your app
run only on Landscape delete those 2 (Item 0, Item 1 PORTRAIT)

How to fit the screen to the window in IOS Simulator

I would like to make screenshots of my app in IOS-Simulator. This works fine with CMD-S, but I have always black parts in my screen, because the windows is not autosized to the simulated devices screensize.
Is there a way to autosize the window to fit with the screensize of the simulator ?
Screenshot:
The white part is the content of the device. The black is obsolete and is a window from the MAC. When taking the screenshot from this, I still have to cut out the content to have a good screenshot.
This used to happen in earlier to iOS SDKS when you don't set a launch images for all devices.
In your case, I think you don't have the launch screen file set. this can be solved by setting that file at general section in the target's settings.
Alternatively, set launch screen images for all devices.
Check my answer here.
One more thing to try: At the top bar in simulator. choose the
Window menu then Scale and play with those values.
I solved it the following way, but I don't know what was the reason.
I removed the launchscreen as hasan83 suggested. This did not the trick yet.
I restarted the MAC
I started XCode ("Xcode"->"Open Developer Tools"->"IOS Simulator")
I started the ios simulator without starting my app. -> MAC-Windows fit with the simulated device screen
I started my app and now it looks as intended.
Thanks for helping to all involved people !

iOS8 view is fine but is smaller on iOS7

I am currently working on an iOS application with a Deployment Target of 7.1. Most of my testing has been performed in an iOS8 environment with no issues. I hooked up an iOS7 (5s) test device and found that the view is showing itself as through the phone is a 3.5 (4). I'm not sure what the difference is between iOS7 and iOS8 that would cause this but I can't seem to find a solution. I have rebooted the device, reinstalled the app, and made sure all constraints were set properly in the dev environment. Any ideas?
Thank you in advance.
Use splash screen images not splash screen xib. In my case I have the same problem iOS7 device has black stripe at top and bottom. So I change the settings for splash screen and used images as a splash screen instead of xib and it solved my problem.
Make sure your app has a launch screen for 4" devices. Otherwise it will default to 3.5" devices.
You have to create a LaunchImage in the xcassets file. That will solve your problem.

Black Frame Around iPad Build

I made an iPhone app under universal applications. Deleted the iPad storyboard at the start and added it back in using this answer: Converting Storyboard from iPhone to iPad at a later stage.
Now when I run my iPad build, there seems to be a black border around it.
I've made sure my .plist is using Main_iPad for Main storyboard file base name (iPad).
Found my bug: this is because under Deployment Info in the General tab, I selected only iPhone as my Devices. Changing it to Universal fixed it.
Frankly speaking, this looks like just a scaled-up version of iPhone app. Anyways, to make it work in a better shape you may have to tweak here :
Make sure you have added constraints that actually meeting the iPad size requirements as well. The width & the Heights.
Please provide a launchImage for iPad size. That should solve your problem.
Hope that helps.

Resources