iOS simulator only list the latest iOS version. How can I set earlier versions - iphone

According to the documentation should be able to choose which iOS version the simulator should run, however only the latest 4.3.2 is listed under "Hardware/Version".
The helps says:
"To set the iOS release used in the simulation environment, choose Hardware > Version, and choose the version you want to test on."
I don't want to support 3.x (although it would be nice) but at least I want to simulate my app on 4.2, 4.1 and 4.0.
What's going on? Why aren't they listed?
UPDATE:
I'm on Lion so I cannot install an earlier version of Xcode. Before my Upgrade I could test different versions easily.

the problem is that you have no other Simulator SDK installed which can be used. As #dorada has mentioned you have to install an older Xcode which in fact doesn't work because you're using Lion. I haven't tried it with Lion but principally it should work like before with Snow Leopard.
I'm referencing to my other answer how to get an older Xcode (don't know if it's still working)
After you have an older Xcode version, mount the image an navigate with terminal to that volume. There should be a hidden folder Packages. open that folder with open . and locate the two .pkg files you need (e.g. iPhoneSDK4_0.pkg and iPhoneSimulatorSDK4_0.pkg) and install both.
They will appear in your root directory and you have to move them to your Developer dir (don't simply overwrite, it will delete all other SDKs. go to the last different folder it should be iPhoneSimulator4.0.sdk\ and copy that one)
DONE (and at that point I have verified it: it works on my Lion. I used the dvd image which I have started backup'ing since 3.2.1)

Although iPortable has the correct answer I decided to post a step-by-step guide which is easer to follow:
Download Xcode 3.1
Mount the dmg file
In Finder menu select "Go\Go to folder" and enter "/Volumes/Xcode and iOS SDK/Packages"
Install the simulators you need (Double click)
Copy the simulation folders from /Platforms/iPhoneSimulator.platform/Developer/SDKs/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
If your have some SDK missing Install the missing SDK from "/Volumes/Xcode and iOS SDK/Packages" and copy subfolders from /Platforms/iPhoneOS.platform/DeviceSupport/ to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for me they were all there from 3.1 to 4.3)

you may download the older ios sdk / xcode from . https://developer.apple.com/downloads/index.action
(i found this answer in another stack overflow topic actually, but now i can not seem to find that question!)

Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."
The download section of Xcode preferences will open,
Click the "Components" tab.
You will see a list of simulators that can be installed, click install on version you need.
The simulator will need to restart to install.
To run the newly installed version of the simulator just select it from the run menu in Xcode.

You actually have to install previous simulator versions, they aren't there on a new install.
Maybe you can search and download them somewhere? - we keep them on a shared drive at the office.

After installing the Xcode 4.2 for Snow Leopard, I noticed there was a choice for iPad 3.2 Simulator, but using it just brings up some alerts that say "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." and another alert that says "Simulated application quit. Click Relaunch to try again." with Quit, Switch SDK, and Relaunch buttons.
I can successfully use iPhone 4.0 Simulator, iPhone 4.1 Simulator, iPad 4.2 Simulator, etc up to iPad/iPhone 5.0 Simulator, but really would like to have iPad 3.2 Simulator and iPhone 3.1.3 Simulator and earlier down to 3.0 if possible.
Our apps generally run all the way back to 3.0 and we occasionally receive bug reports from earlier iOS users, and would love to be able to debug these issues more effectively.
I tried the technique summarized by Tibidabo and although I am able to copy the simulator folders as mentioned, and though they show up as choices in Xcode, I cannot get them to actually run as simulators and I get the same problem alerts mentioned above.
What are other developers doing to support debugging of older iOS versions?

Go to Project Settings -> Summary an change Deployment Target.

Related

dont have iphone simulator folder

Some months ago when the newest iphone simulator version was 4.3.1, I removed the iphone simulator folder from my hard drive to an external hard drive.
Now when I drag it back again the version was still 4.3.1 so I cant use it for saving media on it.
Is it possible to like reinstall something to get the newest version (6.0)?
To confirm that the install location of the iOS Simulator: In XCode 4.5.2 (and most other recent versions of XCode, not sure when this was first introduced), the iOS Simulator is installed at:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
With the current version of the iOS Simulator, there aren't separate applications for different iOS versions. Instead you use the menu option "Hardware" -> "Version" to select a different iOS version to simulate.
If it's the "Application Support" folder that is missing (where simulator copies of your apps get "installed"), you might check:
/Users/<username>/Library/Application Support/iPhone Simulator
Note: Mountain Lion now hides the "Library" folder from the default Finder view. It's easy enough to look in that path for a "6.0" (or other iOS Simulator version) folder to see if yours exists there.
Finally, if really need a fresh copy of the iOS Simulator, to install another version (assuming XCode 4.5.2 or similar):
"XCode" menu -> "Preferences" -> "Downloads" tab -> Select another Simulator you'd like to install

Installing new and old versions of Xcode

So I saw this post: http://mobiledevelopertips.com/xcode/download-and-install-older-versions-of-xcode-xcode-previous-releases.html
(new location: at iosdevelopertips.com)
about downloading older versions of Xcode. Up to now, I have always just downloaded the newest version of Xcode from the App Store and let it do its thing. Recently on one computer that has Xcode 4.5 installed on it, I noticed that if I create a new project, I only get the iOS 6.0 simulators, not the 5.0 or 5.1.
My first question is, do I need older versions of Xcode to build apps for older OS (e.g. iOS 4, iOS 5.0, 5.1, etc)?
If so, what's the best way of installing these older versions of Xcode. I see that they have the command line tools to download as well. I'm not sure how all that stuff works.
What's the best way to update to the latest Xcode but keeping the old Xcode around? On a different machine that had Xcode 4.4.1 installed, I thought I could download Xcode 4.5 from the ADC website and install it. I downloaded it, double-clicked on the .dmg, then double-clicked on the Xcode file. This then installed Xcode 4.5 without asking me where I wanted it installed so I could keep the older version of Xcode (assuming that I need it as stated in my 1st question).
Thanks!
To answer your questions:
1) Yes. I renname Xcode to add the version number (i.e. Xcode_441.app)
2) I keep an archive of all versions of Xcode that I have downloaded so they are available after Apple pulls them from their download site.
3) Renaming them works for me, and I usually grab the direct download, when available, instead of getting it from the MAS. Try renaming Xcode before doing an install.
You are welcome.
It's possible to have multiple XCode installations by customizing the install path. Also note that the new 4.x install model is app bundles under Applications which are self contained so it's possible to just rename the old before installing the new XCode. You can also download the newest (4.5) from the developer site.
You can also add the old simulators by going to XCode preferences in 4.5.
Look under XCode, preferences, downloads. XCode 4.5 offers the 5.0 and 5.1 simulators for download. The same place that you download the command line tools.
For example, I added the 5.0 Simulator to my XCode 4.5 installation to go along with the 6.0 Simulator:
I noticed that if I create a new project, I only get the iOS 6.0 simulators, not the 5.0 or 5.1.
Choose your project target and in Summary tab, set the lowest Deployment Target for your app (I think the default value is 6.0 in Xcode 4.5).
My first question is, do I need older versions of Xcode to build apps for older OS (e.g. iOS 4, iOS 5.0, 5.1, etc)?
If you've updated from old version of Xcode, you can use the old SDK & simulator in new version.
If so, what's the best way of installing these older versions of Xcode. I see that they have the command line tools to download as well. I'm not sure how all that stuff works.
Actually, different versions of Xcode can stay happily with each other. It is a App Bundle right now.
third question
Just drag the new version of Xcode to Application folder. That's done. :)

iPhone Cannot debug any new projects on my iPhone

When I click my iPhone into the USB port, I hear the clicking sound and on my project it shows checking dd symbols and a little progress bar appears. But, when I click on the drop down list, upper right hand corner, my device does not show up, still says any iOS device. When I click debug, a box comes up saying xcode cannot run using using the selected device.
"No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination"
I checked to see what sdk version my project was using, it is 5.1.
On the organizer it says my iPhone is using software version 5.0.1.1,
Questions,
Do I have to upgrade my iPhone to 5.1?
I went to iTunes to upgrade it and they only had a option for 5.1.1, if I upgrade it to 5.1.1, will it still work with my xcode which has sdk 5.1 not 5.1.1
Any idea how to get my iPhone to work with the new projects created?
Also, the old projects are using sdk 5.1 and they run fine, could it be a different problem?
Just set the "Deployment Target" for targets and project to your device version.
To do this, click the project in the navigator -> info for project and summary for targets. There you find the deployment target.
Hope this helps
Try run a any XCode 3. And open him Organizer. Then will show a question about Collecting device. Press and reconnect a device. Must help. This helps in my case :)

iPhone: There is no SDK with the name or path 'iphoneos3.0'

A friend of mine just had to reinstall his OS (after power went down while updating) and when he installed Xcode he got this error. In the drop down that usually has device/simulator etc, it said 'missing'. I also noticed he had no developer folder on his machine as well. Anyone know why this might be?
Tell me about it. Try this
in XCode goto 'Project' Menu and select 'Edit Project Settings'. In the General tab, last but one item, select the drop down list 'Base SDK for all Configuration' There you can specify which SDK your project will target.
I had this problem after installing the Xcode that comes with Snow Leopard. To solve it I downloaded Xcode for iPhone. The Xcode that comes with Snow Leopard does not include the iPhone SDK.You have to be a registered iPhone developed to use it.
I had him reinstall it with me there, and I noticed that the action for the developer tools, was install as opposed to upgrade, and it was grayed out so not sure how he would have been able to avoid that. In any event he reinstalled and got the same error when launching from the dock. He then launched from terminal and it worked fine... so somehow he got two installs or some weird scenario. In any event we found the .app that spotlight saw and put it on the dock and then it worked.
The system does not include the dev tools (and hence the /Developer folder) by default. He needs to re-install the dev-tools from his CD (or from developer.apple.com), and also re-install the iPhone SDK (only available on developer.apple.com).
EDIT: I didn't see he re-installed XCode. Sounds weird. Make sure you re-install everything, and that you have the correct rights. However, is no issue is found by the installer and you still don't have a /Developer directoty, there might be something weird going on...
After Xcode updated to Version 11.6 got this error.
error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk'
Looks like iPhoneSimulator13.5.sdk got removed.
Fix by downloading "iOS 13.5 Simulator"
In Xcode -> Preferences -> Components downloaded iOS 13.5 Simulator again.

Why is the iPhone Simulator 3.0 not showing up in Xcode?

I have installed the new 3.0 SDK, but when I start up Xcode, I don't see an option to build for "Device - iPhone OS 3.0" or "Simulator - iPhone OS 3.0"
The Xcode About box says I am running: 3.1.2
Is there something else I have to do?
I think you need to upgrade to Xcode 3.1.3. I have the latest version and that's what my About box reads.
If you are sure you downloaded the latest version, perhaps you installed in to a different location?
If you are using an existing project you may have to tell your project to build to the 3.0 targets. I didn't have to do this for any of my projects but ...
Under the Deployment section of your project properties you should see:
iPhone OS Deployment Target - (change this to use iPhone OS 3.0)
You can also check that the Architectures section has the Base SDK set to 3.0.
This happens quite often when downloading Apple's sample code projects which are targeted for iOS 3.x but you've got iOS 4.x.
To show Simulator option go to Project Info window -> General tab -> Base SDK for All Configurations - choose Latest iOS.
If it doesn't appear straight away, close and reopen Xcode.
This is what worked for me:
I clicked on the box (where I expected iPhone Simulator to be shown), right clicked manage scheme. After that deleted all schemes, and in similar way, created a new scheme. It automatically produced all simulators including the ones for devices.