ios simulator doesn't start - black screen,
xcode display 'invalid device state' when running the simulator
also happens when simulator starts from Spotlight
tried:
restart mac/xcode/simulator
reset content and settings
$ xcrun simctl 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.3 (8.3 - 12F69) (com.apple.CoreSimulator.SimRuntime.iOS-8-3)
== Devices ==
-- iOS 8.3 --
iPhone 4s (6EFCAF10-4208-4A5E-B956-500AC64E4F78) (Booted)
iPhone 5 (3111A1E3-1950-44CF-9E77-5862AF8D3C0A) (Shutdown)
iPhone 5s (C8D57731-039E-41DE-8097-A8AF7A4B8778) (Shutdown)
iPhone 6 Plus (42B3FFAB-6718-44E4-9374-9C6A91D91AC2) (Shutdown)
iPhone 6 (765AD568-D63E-41F2-822E-6A7DF22E5F61) (Shutdown)
iPad 2 (28339A10-7624-46AA-9659-F563F9D70958) (Shutdown)
iPad Retina (226EB488-0ECC-4166-BAB5-E787C2EC23B4) (Shutdown)
iPad Air (EE9742AC-FFE4-43E3-B7A7-FCFB5E60137D) (Shutdown)
Resizable iPhone (6A94AFC8-C862-4984-94B5-E13FCADBA9DC) (Shutdown)
Resizable iPad (59E84767-46C5-4A4C-A9D5-E2C4B0600FC2) (Shutdown)
device stuck in booted state
tried
xcrun simctl erase all
version: mac 10.10.3, xcode 6.3.2, simulator 8.3
additional info: yesterday before I finished work it was working with no problems, no change made to anything - just tried to run it from skretch this morning.
Trying to upgrade xcode - it is stuck on waiting for 1 day now...
Every day brings a new Xcode issue, is this one solvable? except for throwing another 2000 euro on a new mac
Edit:
Upgrade solved this issue - but just for a few days, no it's back to black.
new version is Version 6.4 (6E35b)
Notes about upgrade:
upgrade from App Store -> purchased tab
don't try to pause the upgrade, if you do and the process stuck on waiting see this https://apple.stackexchange.com/questions/152934/os-x-yosemite-xcode-update-stuck-on-waiting
download can take about 10-20 hours
Related
I am trying to debug my flutter iOS project with a real iPhone device which is iPhone 5. My Xcode application is not showing my iPhone 5 in the device list. Can I run my flutter iOS project in my iPhone 5?
Xcode version: 12.3
iPhone 5 version: 10.3.4
Yes, Of course you can run your flutter project in a real IOS device. Check your connection between your iPhone and system which is used by you. If this solution doesn't work then restart your Xcode otherwise restart your system after connect your iPhone with your system a pop-up menu appears in iPhone to ask "Trust this computer" click on trust. And You need to set the deployment target according to your iPhone version. Enjoy ;)
This snippet came out at the transition from 32-bit to 64-bit hardware for iPhones:
The following iOS devices are 64-bit:
iPhone 5s/SE/6/6s/7
iPad Air and iPad Air 2
iPad mini 2, iPad mini 3 and iPad mini 4
Sixth-generation iPod touch
12.9-inch iPad Pro and 9.7-inch iPad Pro
9.7-inch iPad (2017)
https://medium.com/#ClrMobile/why-is-apple-dropping-32-bit-app-support-and-how-will-it-impact-your-app-d2a0b0ab56e0
I recall Flutter needing 64-bit ARM, which would seem to preclude an iPhone 5 according to the above list.
I am building a Cordova App for iOS using XCore. It perfectly works on simulator of all devices from iPhone 5S to iPhone 7, and for iPhone 8 Plus.
But I need my app to work for iPhone 8 and iPhone X devices.
Here is my error when I run my app on iPhone 8 or iPhone X. The simulator is turning on, but the app is not installed and I got this error in Xcode :
Unable to lookup service com.apple.CoreSimulator.host_support: 0x3
I already tried to clean my project, reboot my Mac and Xcode, but I still have the same error. As I said, I have no problem with iPhone 5S, 6, 6S, 6 Plus, 6S Plus, SE, 7, 7 Plus and 8 Plus
I use :
macOS High Sierra 10.13.6,
Xcode 9.4
iOS 11.4
Thank you for your answers.
Please go to Xcode->Window->Device and Simulators
Select Simulator option from segment
Remove simulator and add again
I am not sure if i am doing it right. Please help.
To add simulator, goto > windows > devices
problem:
1) When I tried to add simulator for iphone 5 or 4 , it show iOS version 8.3
the dialogbox show :
Simulator name : iphone 4s
Device Type : iphone 4s
iOS version : iOS8.3
Is this correct? iphone 4s should be using ios lower than ios 8 right?
How to I do testing for iphone 4/5 using simulator ?
In the Xcode menu, go to Windows > Devices, and at the bottom left click on the + button.
Xcode 6 only supports iOS 7 and iOS8. You could use iOS 7 for iPhone 4s or iPhone 5, just install the iOS 7.1 simulator from
Xcode > Preferences > Downloads.
iPhone 5 and iPhone 4S can be updated to run iOS 8, so it is perfectly ok to test iOS 8 with these phones.
Is this correct? iphone 4s should be using ios lower than ios 8 right?
It is correct. I have an actual iPhone 4s and it is running iOS 8.3. (In fact, it is my primary development testing device for iOS 8.)
You can install earlier simulators, but there is nothing wrong with what you're seeing.
(And yes, this means that in order to develop for iOS 8, you need to support screen sizes ranging from the tiny iPhone 4s to the massive iPhone 6 Plus. Good luck.)
I'm running some test code on the simulator but need to reset the simulator contents each time before runs to make sure the data stored and cached by the app during execution is removed before each re-run of the test cases.
Is there a way to do this from within the tests?
You can use simctl to reset your simulators from the command line, which you could use in a script in your actions to run before a test scheme, but not individual test cases. You need to install the xcode command line tools
to reset the simulator use :
xcrun simctl erase <simulator device id>
to get the device ID you use :
$ xcrun simctl list devices
== Devices ==
-- iOS 10.2 --
iPhone 5 (D226CF12-6782-4D7D-9C00-2D662CF4022C) (Shutdown)
iPhone 5s (34E0E0F8-3429-4D91-B038-ECF4FD0F3311) (Shutdown)
iPhone 6 (9C772A68-34E3-4F3F-981C-543DE6D5D985) (Shutdown)
iPhone 6 Plus (7848A50E-BFB5-4F19-BB31-4A56CA78AA2C) (Shutdown)
iPhone 6s (12CF89BA-C8B2-4837-B4EB-FB24DFF1622C) (Shutdown)
iPhone 6s Plus (3EE6CA84-8F12-4A5E-A31D-EF4BF3CCBDB2) (Shutdown)
iPhone 7 (1EB3CE5D-849C-491C-9CAA-5E97B1BD89CE) (Booted)
iPhone 7 Low Disk Space (6CCF4C7A-606B-40B7-A8D8-DF8B3CB119CB) (Shutdown)
iPhone 7 Plus (94FEFD36-6EFF-4762-BD21-79B1F958F6C6) (Shutdown)
iPhone SE (E8E8ECEB-34C0-44F0-B92E-57DCA91024F1) (Shutdown)
iPad Retina (0DA5BF39-3DC7-49B3-BE9B-2FA756FCA725) (Shutdown)
iPad Air (DAB9C2D3-8EBC-41DC-9C2D-0ECEC1D2FAE3) (Shutdown)
iPad Air 2 (1E2DA170-5C2E-413C-831B-FA65524643D3) (Shutdown)
iPad Pro (9.7 inch) (99F931A9-0708-4637-9294-6420DC7A149C) (Shutdown)
iPad Pro (12.9 inch) (08CD02EB-C44A-4183-961A-EED89FF1C225) (Shutdown)
-- tvOS 10.1 --
Apple TV 1080p (7EE393F2-C83E-467F-9802-3E5BFE7C2CA9) (Shutdown)
-- watchOS 3.1 --
Apple Watch - 38mm (B8969533-D7CD-462E-9E76-511C08E8CC8E) (Shutdown)
Apple Watch - 42mm (E16167D9-1007-438B-8812-CD97CE6ABECA) (Shutdown)
Apple Watch Series 2 - 38mm (F59C0BB1-B4D0-47DD-B927-1BFD78DD78C0) (Shutdown)
Apple Watch Series 2 - 42mm (7FE3AADD-94AB-46B9-A057-78F20F030999) (Shutdown)
Device IDs remain constant I think until they're deleted or recreated, it would probably be possible to retrieve the device id of the booted simulator using some scripting magik (which I haven't yet worked out), the current active simulator is always marked as (Booted)
You can also use simctl to create custom simulators, just use xcrun simctl to list all the stuff it does.
You could use LUA script to do this with your automated testing. Have a look at http://www.coronalabs.com/blog/2011/08/11/automated-testing-on-mobile-devices-part4/ for detailed instructions.
Basically you will have lua use events to reset it.
I have xcode 4.5.1 and want to add photos to the iphone 6.0 simulator but cant find it. I have a folder named iphone simulator but it just contains 4.3.1. It may be because some months ago I drag almost everything in the application support to my extern hard drive to save some memory. Now when I drag it back it contains the 4.3.1 which I used before. Do I have to download something on new or what should I do?
Thanks in advance!
Run the simulator
Run Safari on the Simulator
Drag a picture onto Safari running on the Simulator, this opens the image.
Click and hold on the image, or tap on the share icon in the bottom tool bar.
You'll get an alert asking if you want to store the image to your phone
There is a slightly faster approach than what Abizern described
Open the Simulator
Drag an image directly onto it (no need to launch Safari.app)
Safari willl launch
Long-Press the image and save it to the Simulators Camera Roll
Update for iOS9: Locally stored images can be dragged directly onto the simulator and don't have to be saved explicitly.
Please note that your images are stored here (6.1 matches the Simulator version):
~/Library/Application Suppport/iPhone Simulator/6.1/Media/DCIM/100APPLE
Unfortunately you can't just add images to that folder as they will be ignored because they're not in the image database of the Simulator. However you can get all the stored images via the Finder.
With Xcode 6 is easier.
1.- Drag and drop an Image to the Simulator and the image will appear directly in the native Photos app.
You can also now do this through the command line with smctl addmedia command.
$ xcrun simctl addmedia
Usage: simctl addmedia <device> <path> [... <path>]
You can specify multiple files including a mix of photos and videos.
You can also specify multiple live photos by providing the photo and video files. They will automatically be discovered and imported correctly.
Note (you may not need to add xcrun in front of simctl depending on how command line tools are installed).
To find the correct device id, run simctl list devices
$ xcrun simctl list devices
== Devices ==
-- iOS 10.2 --
iPhone 5 (D226CF12-6782-4D7D-9C00-2D662CF4022C) (Shutdown)
iPhone 5s (34E0E0F8-3429-4D91-B038-ECF4FD0F3311) (Shutdown)
iPhone 6 (9C772A68-34E3-4F3F-981C-543DE6D5D985) (Shutdown)
iPhone 6 Plus (7848A50E-BFB5-4F19-BB31-4A56CA78AA2C) (Shutdown)
iPhone 6s (12CF89BA-C8B2-4837-B4EB-FB24DFF1622C) (Shutdown)
iPhone 6s Plus (3EE6CA84-8F12-4A5E-A31D-EF4BF3CCBDB2) (Shutdown)
iPhone 7 (1EB3CE5D-849C-491C-9CAA-5E97B1BD89CE) (Booted)
iPhone 7 Plus (94FEFD36-6EFF-4762-BD21-79B1F958F6C6) (Shutdown)
iPhone SE (E8E8ECEB-34C0-44F0-B92E-57DCA91024F1) (Shutdown)
iPad Retina (0DA5BF39-3DC7-49B3-BE9B-2FA756FCA725) (Shutdown)
iPad Air (DAB9C2D3-8EBC-41DC-9C2D-0ECEC1D2FAE3) (Shutdown)
iPad Air 2 (1E2DA170-5C2E-413C-831B-FA65524643D3) (Shutdown)
iPad Pro (9.7 inch) (99F931A9-0708-4637-9294-6420DC7A149C) (Shutdown)
iPad Pro (12.9 inch) (08CD02EB-C44A-4183-961A-EED89FF1C225) (Shutdown)
-- tvOS 10.1 --
Apple TV 1080p (7EE393F2-C83E-467F-9802-3E5BFE7C2CA9) (Shutdown)
-- watchOS 3.1 --
Apple Watch - 38mm (B8969533-D7CD-462E-9E76-511C08E8CC8E) (Shutdown)
Apple Watch - 42mm (E16167D9-1007-438B-8812-CD97CE6ABECA) (Shutdown)
Apple Watch Series 2 - 38mm (F59C0BB1-B4D0-47DD-B927-1BFD78DD78C0) (Shutdown)
Apple Watch Series 2 - 42mm (7FE3AADD-94AB-46B9-A057-78F20F030999) (Shutdown)
So to add a video to my iPhone 7 simulator, I would use:
$ xcrun simctl addmedia 1EB3CE5D-849C-491C-9CAA-5E97B1BD89CE <path to video>
With the drag and drop feature you will lose all the metadata of the photos.
I've created a project that make it really easy to import assets to the simulator: MBAssetsImporter.
It enables you to import both videos and photos while preserving all the original metadata of the files.
This is MUCH easier with the new iOS Simulator that comes with Xcode 6+ (iOS Simulator 8.1 and above.) Now all you have to do is drag one or more photos onto the iOS Simulator window, and instead of opening Safari, the Photos app opens, and instantly adds all dragged-in photos to the device.
It's simple. Just goto photos in your iPhone simulator and drag images from your location (where the images Eg.Desktop) to IphoneSimulator. It add these picture in camera album.
Another easy way, in High Sierra with XCode 10, with your simulator running, select your photo in Photos, go the Share menu and select "Simulator".
Voilá!