I have created a new iOS project; by default the deployment target is iOS 8.2, but I don't have the option to use the simulator. I went to the Xcode preferences, and I don't have the option to download the iOS 8.2 simulator. I'm using Xcode Version 6.2 (6C131e).
If I tried to open the simulator via developer tools. I get this error:
I rename Xcode.app and rebooted my mac but didn't help.
I ran "xcrun simctl list" and I got this list:
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
== Runtimes ==
iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1)
iOS 8.2 (8.2 - 12D508) (com.apple.CoreSimulator.SimRuntime.iOS-8-2)
== Devices ==
-- iOS 8.1 --
-- iOS 8.2 --
Any of you know why I don't have the option to run my project in the simulator?
You are likely experiencing the issue mentioned in the release notes:
Renaming Xcode.app after running any of the Xcode tools in that bundle
may cause iOS simulator to be no longer be available. Either rename
Xcode.app back to what it was when first launched or restart your Mac.
(16646772)
Additionally, it may be the case that you really don't have any devices configured (did you delete them?). Look at the output of xcrun simctl list and try creating devices using xcrun simctl create. Also take a look in ~/Library/Developer/CoreSimulator/Devices. Is there anything there?
Related
I have these iPhone simulators:
iPhone 5
iPhone 5s
iPhone 6
iPhone 6 Plus
iPhone 6s
iPhone 6s Plus
iPhone 7
iPhone 7 Plus
iPhone SE
What happened to the iPhone 4 and iPhone 4s?
1) You have to download at least iOS 8.x, 9.x SDKs to be able to run iPhone 4S simulator.
2) Your deployment target should remain at least 9.x to see iPhone 4S simulator in the list of offered simulators in your project.
I have an Xcode 8 and these simulators available:
Xcode 8 includes simulator from iPhone 5 & higher with default deployment target 10.0, but you can add a new simulator.
1.) Change "iOS Deployment target 10.0" to 9.3
2.) In "iOS Simulators" Choose Download simulators
3.) Simulator downloading like this:
Select the simulator that you will need.
4.) Wait for it to be downloaded.
5.) Add new simulator.
6.) Enjoy =D
iOS10 will not support iPhone 4 or iPhone 4s. Hence it's removed by apple from Xcode8.
If you still want to use 7.1 ( copy the disk image from Xcode 7 ). This will work but not sure if it's allowed to do so .
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
I have found a quick solution - use an iPad simulator. It mimics screen size of iPhone 4.
If you have a universal app - disable this feature temporary (open your target -> select 'General' tab -> scroll down to 'Deployment Info' section -> click on 'Devices' dropdown -> select 'iPhone').
I'm using Xcode 6 GM Seed (build 6A313) with iPhone 5s (Model A1530, iOS 8 build 12A365). I connect the iPhone via USB lightning cable. But in Xcode, it shows as: "iPhone 5s (unavailable)".
Further investigation: I open Xcode menu > Window > Devices, it shows the following error:
An error was encountered while enabling development on this device.
Please try rebooting and reconnecting the device. (0xE8000070)
I reboot and reconnect my iPhone 5s, the same error is shown. This device was used for development in previous Xcode 5, and shows no problem at all.
What should I do? I want to try my apps in iOS 8 device.
If you are using Xcode-beta 7.1 and want to run app on iOS 9.0 like me you will also get the same error. The solution is:
Use corresponding iOS 9.1-beta.
Use Xcode 7.0
Run on simulator.
The problem is resolved after I updated iTunes to version 11.4 via Software Updates.
The Xcode error message is misleading.
In my case, during 2 years developing, my phone has several test app with name (null). you can only see a default Xcode app icon in app list in Setting. I had tried updating Xcode, but not work. finally I delete these null name apps, then Xcode - device can connect it without warning sign. Run test app won't get the error in question. only my case. share it in case you encounter in future.
Tried copying over the iOS 7.0 Simulator to the Xcode 4.6.3 bundle in the correct location. It does show up in the Device List, and the simulator starts, but then pinwheels.
I had to hard stop the simulator and Xcode. I'm mainly just curious, but wanted to know if this should work or can work.
Here is how to run the IOS 7.0 Simulator under the Xcode 4.6.3 version.
0) Make a backup point for the Mac
1) Download and install the Xcode 5 Beta X
2) Make sure that the IOS 7 simulator is working for Xcode 5 with IOS 7 Simulator
3) Stop all simulators and Xcodes
3.5) Make duplicate of the current Xcode 4 and do 4) to the duplicate app bundle
4) Copy
/Applications/Xcode5-DP3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/
to
/Applications/Xcode copy.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/
5) Start the proper simulator in 7.0 mode using Xcode 5 and a sample app, etc.
6) Stop Xcode 5
7) Start Xcode 4 COPY and choose the same 7.0 simulator and run your app (Xcode 4 is not "smart" enough to start the 7.0 simulator).
8) Should show up in the 7.0 simulator
Simple!
Open the iOS7 simulator from the XCode 5 Pacakage folder
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
Keep the iOS7 Simulator open. Now Open your XCode 4.6 build your project with Simulator selected. The app will be now opened in the iOS7 Simulator.
If the app quits or not running, Try Reseting the Simulator contents or Clean the project and keep trying. It works for me.
Nope. iOS7 only works with Xcode 5 DP.
Here is another way to run the IOS 7.0 Simulator under the Xcode 4.6.3 version, after copyint it to the right location described above:
Start XCode 5 running a sample app within the iOS simulator
Change settings of the simulator to keep it in dock
Quit XCode 5
Change requested hardware in iOS simulator which is still running
Start XCode 4.6.3 running your app within the iOS simulator after selecting the hardware set within the simulator - they must be equal.
That´s it !
Furtheron you only need to start the simulator first, set the requested hardware, start XCode 4.6.3 with equal hardware set in the simulator and RUN.
Simpler answer to run a Xcode 4 project on iOS7:
Backup your 4.6 project. (either physical backup or commit to github or svn)
Open your project in Xcode 5 DP
Xcode 5 will make changes to the files, but that's OK because you made a backup
Run the app with Xcode5 and iOS7
When you are done, restore your project with the backup you made earlier
???
Profit
I want to test my phonegap-jqm application in iphone 5 simulator.
Currently the application perfectly working in ipad 6.0 simulator.
How to add/install simulator (iphone5) in xcode 4.5.2
Thanks in advance.
iPhone 5 (4-inch retina)
If you want to test in iPhone 5, select appropriate configuration in iOS Simulator Hardware -> Device
Download iOS 5 simulator
If you want to install another version of iOS simulator, go to Xcode preferences -> Downloads and download simulator you want.
Ensure that your project target is 5.x or lower to run on iOS 5.x
BR.
Eugene
It should be installed by default.
You should check wether you have your app built for iPhone and iPad (Universal) or only for the iPad. In the picture down, the app will run both on iPhone and iPad, but on iPad it will be in an iPhone simulation mode with a 2x button down.
If it is built only for the iPad you won't be able to test it on the iPhone. Also check out this question.
when i run the XCODE with ios 4.3 the default simulator is set to ipad ....I changed active executable setting to iphone simulator .. but stil its not working ..Whenever i open the XCODE again its restting back to ipad .. Is ther any other way to set this out ?
When building the app in the iPhone simulator, wait until the iPad finishes loading; if your app is displayed and working properly then (and only then) try switching to the iPhone simulator.
To keep the iPhone display as the default, try changing the program preferences from the simulator itself or from the Xcode project file in Xcode.