iOS Simulator appears half of desired size - ios

Not sure what happened, but I recently updated Xcode 6, and now the iOS Simulator contents does not fill the whole screen. And yes, I checked window -> scale options.

Click iOS Simulator in the menu bar, then select Reset Content and Settings. I often find that when I update Xcode this is a good idea as problems like yours arise.

Related

iOS app not taking up entire screen in iOS 12 or 13

I have an old iOS app last built on iOS 8. When the app runs on iOS 10 or higher on larger phones the view doesn't take up the entire screen, there is a black bar on the top and bottom of the screen. In the past, Apple would just expand the app so it was stretched a little.
Not sure how to fix this? I am sure there has to be an expand setting or something? I believe it has to do with setting a Launch Screen, but not sure where to set that or how to? I do have a LaunchScreen.storyboard in my files.
I have tried multiple things to fix the issue, but nothing seems to work?
Also, not sure if it is related, but the Navigation Item (deprecated?) was once sticking to the top and now just randomly floats.
I have solved this problem on my older project by adding launch screen.
Try this if you are missing launch screen:
Add a new launch screen by going to File -> New -> File... -> Launch
Screen
Make sure the newly added LaunchScreen.storyboard is selected as
the launch screen file under project settings.
to check this follow this steps:
1)Choose your project name in Xcode. 2)Select your project target. 3)Then select app icons and launch images and choose your newly added LaunchScreen.storyboard.
Given the age of the app I suspect it uses fixed sizes or size classes for its layout?
You will need to update the code that controls the layout. If the design is simple and vertical based, you may be able to a 'quick and dirty" solution by embedding everything in a stack view. However you should really update your code and/or storyboard to use Autolayout. This will fix the current problem and ensure it will work with future devices of different sizes.

Swift 3 App has black frame on Ipad 3 [duplicate]

I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
Is this a known issue? Do I need to add something to prevent this border from happening?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
Thanks in advance!
Jeroen
Go to Build Settings
Type Targeted Device Family in search bar
Select 1,2
Run the project it should resolve your issue.
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
How to change iPhone/iPad app to iPhone only?
Now with newer version of XCode. Build Settings -> Targeted Device Family -> Select Universal.
I had this issues and solved it with this way,
Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up
will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
Go to Build Settings Type Targeted Device Family in search bar Select 1,2
I had this issues after updating assets for AppIcons and SplashScreen
Hope it helps!

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 !

React Native: Unwanted Black border on ipad 2 simulation

I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
Is this a known issue? Do I need to add something to prevent this border from happening?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
Thanks in advance!
Jeroen
Go to Build Settings
Type Targeted Device Family in search bar
Select 1,2
Run the project it should resolve your issue.
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
How to change iPhone/iPad app to iPhone only?
Now with newer version of XCode. Build Settings -> Targeted Device Family -> Select Universal.
I had this issues and solved it with this way,
Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up
will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
Go to Build Settings Type Targeted Device Family in search bar Select 1,2
I had this issues after updating assets for AppIcons and SplashScreen
Hope it helps!

Screen content is only shown in a part of screen in iOS Simulator

My iOS Simulator only show the content as a part of the screen. How can I fix it? I'm using XCode 6.3.1. Thanks
You just need to restart it. It can happen sometimes.
Force close simulator and start it again!
I am including this response for those, who like me, are seeking an solution for this problem after upgrading to Xcode 8.
The simulator began using only a portion of the display, as described in the question, when testing against iOS 8.x. The symptoms were that 1/4 of the display was showing if the window scale was set to 50%, 1/9 would show if the scale was set to 33%, etc. The entire display would show only if the scale was set to 100%, which is a real pain when using an iPad simulator.
The solution for me was to turn off "Optimize Rendering for Window Scale" under the "Debug" menu, which first seems to have appeared in Xcode 8. The 8.x simulators displayed properly after that.
Looking at the image..
I think it has something to do with the resolution/scale of the simulator.. I dont use Xcode 6.3.1 though...
since it's 5s the screen resolution/scale is x2.. so instead of 320x568 it must be 640x1136..
why dont you use the device frame rect to fill the screen? something like self.view.frame ?
its hard to guess what causing your problem,show us something that may help.. :)
Visit for more details:
iPhone Simulator Quarter or Top Left part of the screen[Fixed]
Watch the video from this link: iPhone Simulator - Quarter of the screen [Fix]
Step 1: “Force Quit” the iOS Simulator
Step 2: Open “Spotlight Search” and type “Chameleon Wizard” (if you installed Chameleon Bootloader)
Step 3: In that popup window, click on “org.chameleon.Boot”
Step 4: Uncheck display_0, Graphics Mode(Clear that Dropbox also), cpus=1, npci=0x3000, dart=0. Below shows an image with checked items those mentioned here. Just uncheck it all.
Step 5: Restart your Mac and try.

Resources