UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Running Simulator makes the resolution and window size look like an old iOS. How do I fix this?

Forums > SwiftUI

Hi Everyone,

I have no idea why this has happened (though it's obviously my fault), but whenever I run my app in simulator mode, it looks like an old iOS phone. It doesn't look like an iPhone 12 or anything more current. When I set the simulator it's iPhone 12.

I'm pretty sure this is an easy fix, but I can't figure it out. What have I broke? And how do I fix it?

This is what I'm talking about: https://i.imgur.com/yinfyk7.png So that even though I've set my simulator to iPhone 12, it looks really old.

Any thoughs?

Thanks gang!

3      

I recognized this yesterday on my installation as well. But it did work before. I didn't change anything, so perhaps it's a bug in Xcode.

3      

Go to (I think sorry do not have my Mac with me) Windows>Devices and Simulator then delete the incorrect ones and then Add New Simulator with which every iPhone and iOS version you want.

3      

I think its due to splash screen. if we havent set splash then it shrink all screen. this is one of the scenario. other we have to check configuration of project. check your info.plist into swiftui project And in UIkit is launch.storyboard.

Add this code into plist for SwiftUI if you dont have:

<dict>
    <key>UILaunchScreen</key>
    <dict/>
</dict>

@tylerlw82

3      

Hi everyone,

Thanks for the replies. I should have been more clear. This is a project done in swiftUI.

I'll try these out and report back!

Cheers.

3      

Did you create the project in Xcode 13? This would mean that it doesn't have an Info.plist file by default and it generates one while building. If you modify entries in the projects "General" and "Info" section (which normally reside in the Info.plist file), it will create an Info.plist file with just your custom amendments. All the basic setup (from "General") will still be enriched in the file by the build & package process depending on the project configuration in the "General", "Info" and "Build Settings" tab.

If you delete for example the "Build Setting" "Launch Screen (Generation)" you will end-up in an invalid setup showing exactly the sympoms you've shown in your screenshot (and mentionned by @vishalkalola1 above). You can simply set the value back to "Yes" and then it should work again.

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.