iOS 5 iPhone Simulator - ios

My app is crashing on iOS 5, but I have no idea what's causing this. All my devices are updated to iOS 6 (I cannot downgrade) and the issue is on iPad 1 which cannot be updated to iOS 6.
I am wondering if there's a way I can use the simulator with iOS 5 to test/debug this? Is this possible?
Thanks

Yes you probably can (it's possible that the problem only appears on a device, not in the simulator).
To download the iOS 5 simulator (iPhone & iPad), go to the settings in Xcode, in the "Downloads" section, and install iOS 5.0 and/or iOS 5.1 simulators. Then select the appropriate simulator on the upper left corner of the main window of Xcode before running your app. Also make sure the deployment target of your app is set to iOS 5.0 (first item on the list of the left panel in the main window, select your target and in the "Summary" tab, set your deployment target).

Related

Xcode 14 and iOS 5.5 simulators

After updating to Xcode 14 with iOS 16, I'm not seeing any 5.5 devices - makes sense, as Xcode simulators only seem to support one iOS, and none of the 5.5 devices (for instance iPhone 8 Plus) run iOS 16.
However, 5.5 screenshots are still mandatory for the App store. So how do I create these screenshots? The solutions I can think of are these
Using physical 5.5 device like iPhone 8 Plus (I don't have one)
Downgrade Xcode to version 13 in order to support iOS 15. I would very much like to avoid this, besides some of my Mac setup is Virtual and I am not in control of the Xcode version)
Download simulators
Go to Window
Select `Devices and Simulators
Click on the plus button in the bottom left corner.
Click on OS Version dropdown
Select Download more simulator runtimes
Click on the plus button in the bottom left corner.
Select iOS
Select the desired iOS version and wait for the download.
Now, you can create a desired simulator with the desired iOS.
Remember, you can generate your screenshots based on the device size! and no need for specific simulator by the way.

How to set default simulator device in Xcode 10 which is used for new projects [duplicate]

I've been making a ton of new projects as I'm learning Swift. My development is all on my laptop, so I hate using the default 6s Plus simulator, since the window is too big to easily see. Is there a way to change the default simulator to be a different one for new projects?
No need to delete simulators!
Product → Destination → Add Additional Simulators...
In the sidebar, select the simulator you want to hide
Uncheck "Show as run destination"
Edit: Updated for Xcode 10
You can select the desired simulator via the Hardware > Device > [OS] menu (Xcode 9):
While unchecking "Show as run destination" hides the simulator, this will also change the default value.
Updated image for Xcode 11.5
Xcode 9 UPDATE:
In Xcode 9, no need to delete simulators, and the way to turn them on/off is to go in Product/Destination/Add Additional Simulators... select the simulator you want to turn off, then uncheck the box: 'Show as run destination'
No. But...
If you don't like the size of the 6s plus simulator, make it smaller with the simulator Window Scale menu.
If you don't like the 6s plus simulator at all, delete it with the Xcode Window Devices menu.
Xcode 12.5
In Xcode, go to Product -> Destination -> Choose Destination menu and selecting the device you'd like to be your default.
The original answer could be found in apple support forum here: Apple support forum,
In addition if you want to make the device smaller just hover over bottom right corner of the simulator and you will see the resize option
Deleting the simulators you don't want will default you to the simulator you do want. I also develop on my laptop and the biggest simulator I can see w/o scaling down is the 4S, so I deleted simulators for iPhone 5 and above and now every project I create defaults to 4S simulator. If I ever need the newer simulators, I will just re-download.
In my case, just select the device in Product → Destination, Xcode 12.4
Xcode version 11.5
On Simulator > File > Open Device > iOS 13.5 > Change the default Simulator
Xcode(v11.5)
open your simulator, choose **File/Open Device/iOS 13.5/iPhone8 ** will change your simulator device to iPhone 8.
When you reopen your simulator, iPhone 8 will be your device simulator.

how to deploy and debug an iOS app on iPhone 4 using Xcode 6

I have an app which is crashing on iPhone 4 having 7.1 installed , i want to debug app on phone using xcode 6, is it possible(as it shows unavailable currently) ? if not what are the options I am left with ?
There is no option for an "iPhone 4 Simulator" in Xcode 6. But, if you use an iPhone 4S simulator with iOS 7.1, you can achieve the same effect, because with the same screen size and OS they are essentially the same for testing on the simulator. Also see this question for reference.
Of course, if you have a physical iPhone 4, you can also test on the actual device. Make sure that your Deployment Target under TARGETS AND the iOS Deployment Target under PROJECT are set to 7.1 or below. Your Base SDK can be set higher, but this means you will have to make sure that you are either not using features or classes that are unavailable in earlier versions of iOS, or do a version check and adapt your program accordingly. For example, UIAlertController was introduced in iOS 8, and will crash a device below that if it is invoked. So you might want to do a version check and use good old UIAlertView if the iOS device version is below 8. An issue like this is the most probable cause of your crash.
Also, if it's the first time you're using this device for development, don't forget to set it up by going to Window -> Devices, selecting your connected device, and pressing Use for development.
If you don't have the iOS 7.1 SDK and don't see it as a iPhone 4S (7.1) in the simulator selection, you need to download it by going to Preferences -> Downloads.

Choose a different simulator in Xcode 6

How to choose a different simulator(other than iOS 8) in Xcode 6?. I have successfully installed the iOS 7 simulator from Xcode->Preference->Downloads
But it is not listing in the available simulators for running
Any one know how can i install iOS7 simulator in Xcode 6?
Once installed iOS 7 simulator, in Xcode 6 go Window > Devices, click on bottom left corner + button and add iOS 7 simulator. Then you can choose it in your Archive Scheme.
Also make sure your deployment target is set to at least <= 7.0 or else you'll only see the iOS 8 simulators

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! :)

Resources