Xcode 6.4 cannot run using the selected device - ios

I know that I repeat this topic but I didn't find the solution. I don't have developer account, I just want to run the iOS simulator with my project. All the uptdates are instaled including iOS simulatores, Compiler for C/C++/Obj-C is set as Default compiler(Apple LLVM 6.1). Also I can't choose any device on the left side of "set the active scheme", there's only iOS Device. I have tried to change the versions of XCode and iOS to earlier and nothing happened. I found
I will be very gratefull for help!

In the Xcode options select Window>Devices and see if the simulators are created. If not, you would need to create simulators depending on which one you need.

Related

Xcode 9.0 simulators "disappeared"

I recently installed Xcode 9.0 GM on my machine. I fired it up to play around and the only simulators I see in the scheme are iPhone 8, iPHone 8 Plus, and iPhone X. I clicked "Download Additional Simulators" thinking the solution would lie there.
I'm greeted with this screen, which is everything I previously had installed.
I dug around on the Apple Developer forum and found this post discussing a similar problem with a prior version of iOS. At the suggestion of one of the posters, I powered down my machine and booted it cold. I opened up Xcode 9.0 again and I have the same issue.
Any suggestions what I can get additional hardware to appear in my Xcode scheme? Thank you for reading.
In Xcode 10.3, I also lost all simulators but got them back by running
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
In case anyone else gets here and are in my situation, I just upgraded to Xcode 9.2 and the simulators were all missing, but quitting and relaunching Xcode restored them.
For me quitting and relaunching Xcode also didn't help. So I did the following 3 steps.
Three steps
Step 1:
Product -> Destination -> Download Simulators... Download the simulator(s) you need
Step 2:
Sometimes when you download the new simulator types, they don't automatically show in the list of possible simulators.
Product -> Destination -> Add Additional Simulators... Click the + button in the lower left hand corner, then Add Simulator Give it a name, device type, and the iOS version you just downloaded.
Step 3:
Set proper deployment target. If you have downloaded simulators of lower versions, set the deployment target to the same.
Now it should show up in your list of simulator devices!
Delete every single one of the simulators listed in the Devices and Simulators window, one by one, and then start over make new simulators. That always works for me. It's a good idea after any upgrade, in fact.
My question was originally answered, but I found a more efficient way to do it with fastlane. Within fastlane, there's a tool called snapshot. The usage is as follows from terminal:
fastlane snapshot reset_simulators
Warning: This will delete all your simulators and replace by new ones! This is useful, if you run into weird problems when running snapshot.

Can't select iOS simulator in Xcode

I updated Xcode to the 6.1 version and now I don't understand why I can't select the simulator in the top left corner like in the previous version when I want to run my application. The only choice that appear is a general "iOS device".
Press "Window" and then "Devices", check if they appear there and if not - click the "+" icon in the lower left
Go to File -> Project Settings -> Info.
Change the deployment target to a lower or higher version.
Most probably you do not have a simulator installed for the current deployment target. You can do so by going to Xcode Preferences -> Downloads. In the Components section, you will see the options for downloading the simulators you already don't have.
Faced the same issue many times and found this solution. Hope this helps. :)
I finally found the solution. When I added a simulator in the devices menu (Shift+Cmd+2) I got this error: "Unable to determine SimDeviceSet, set_path=/Users/MyUser/Library/Developer/CoreSimulator/Devices"
I checked the directory and there was not the folder "CoreSimulator", so I created it. I restarted XCode and now there are all the iOS Simulators selectable for running my app.
Thank you all.
I suspect that you are having issues communicating with CoreSimualtorService due to renaming Xcode.app or similar. This is mentioned in the Xcode 6.0 and 6.1 release notes. Unfortunately, the only workaround at the moment is for you to rename it back or reboot.
Update:
Note that for current (as of this update) versions of Xcode (7.2+), renaming should work ok. For best results, only use one version of Xcode at a time. If you start another version of Xcode while one is running, the previous one will loose access to simulator devices. Restarting it will cause it to have access to the simulator devices (and of course the other one to stop). Basically, the last one wins.
I experienced same issue.My OS is 10.9.5. I solved this issue by downloading IOS simulator 7.1 from Xcode Preferences -> Downloads -> iOS 7.1 Simulator.
And then Windows -> Devices -> added simulator devices by clicking +.
Thanks.
Go to Window -> Devices and Simulators, check whether there is any Simulator listed. If no, add by clicking over "-" over the lower left corner. Or if devices are there but you are not able to see them in devices to be choose from, then check for deployment target that might not be compatible with Xcode simulators, set target according to your Xcode support and you will see the simulators list.
in my case, after delete xcuserdata from my folder, then simulate only have my mac without any other options. after search, I found in scheme setting, Run->Info->Executable without any app. Then I select my app in the project. then simulator all come back.

Xcode 5 Deployment Device

I opened up Xcode5 but my app cannot deploy onto my phone.
The organizer lists it as a deployment device, but all I see in the main toolbar is just generic "iOS Device".
It's odd because on another project does list my phone when I hit the "Play" button. Anyone seen this?
I am new to Xcode. Are you only allowed to deploy one project on your phone at a time?
Both projects are Universal.
It could be that the device has an older version of the OS on it. If you are targetting a newer version of the OS it will not show.
There is no limitation to the number of apps that can be on the device, you can have multiple. It could be that the device is not registered with apple? Showing in the list, does it have a green dot?
here is a question with the answer: Provisioning New Device for Development Xcode
Also, is it possible it is just not selected, here is a screen shot and link: http://www.techotopia.com/index.php/Testing_Apps_on_iOS_7_Devices_with_Xcode_5
Go to /Library/Developer/Xcode/DerivedData and delete all the contents.
This should now allow your device to be seen in the devices for selection.
This has been tested and works as I had the exact problem.

How to run old simulators in Xcode 5 [duplicate]

Xcode 5 is behaving just fine, and I'm able to build and run apps on my iOS 7 device and in the iOS 7 simulator.
However, I do want to support iOS 6.1, but I don't see any way to build and run the apps for an iOS 6 simulator.
Things wot I've done:
Set Deployment Target to 6.1 for both Project and Target
Downloaded iOS 6 Simulator
Copied the iOS 6 SDK into Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Reset Content and Settings for the simulator
Originally, I was trying to see the app in the iOS 6 simulator by switching from iOS 7 to iOS 6 in the Hardware > Device menu in the iOS Simulator application, but there aren't any apps in the iOS 6 simulator.
I'm gathering from answers like this one that there should be something I can select before I click Build/Run.
I'd love to be able to see my apps in both iOS 6 and 7 simulators. Any ideas what I'm missing? Here's a LINK to what I see when I click on the simulator dropdown.
Turns out the solution was changing the deployment target for the project from iOS 6.1 to iOS 6.0, upon which the simulator scheme selection immediately showed the option to choose iOS 6 or 7 simulators. Basically the deployment target should match a simulator version that you have installed.
Thanks to random commenters in questions like this one who mentioned that that worked for them.
All you have to do is go to Xcode -> Preferences -> Choose the "Downloads" tab and install the iOS 6.0 Simulator.
Once you're done downloading it, it should show up as an option in your schemes.
Just a little caveat....I tried what you said but it didn't work for me...
Changed Deployment Target on "Project" from 7.1 to 6.0
Then I realised that Deployment Target was still set to 7.1 on the "Target" - once I changed that it worked!
Click to target or project > Build Settings > Achitecture > Supported Plateforms : change to iOS
What I did to get mine working was click on the scheme to the left of where the Simulators usually appear in the dropdown, then choose edit scheme.
A new window will display, make sure that Run is highlighted on the left and then click on the Info tab. Choose the .app file for Executable.
If you are still looking for a solution here's what worked for me:
From the xcode beta's pull down menus, Xcode > Open Developer Tool >
iOS Simulator (if you get a pop up error just dismiss it)
Once in the Simulator go to Hardware > Device > Manage Devices.
Delete everything listed under simulator.
Reboot your machine.
After that navigate back to Manage Devices in the simulator and click the plus to add back
your simulators. Then the iOS 8 simulators will show up.
This might help u out better..you have to copy paste iPhoneOS6.1sdk folder. This is for SDK, similarly instead of iPhoneOS.platform select iPhoneSimulator.platform and then the same path.
Please check whether your "Deployment Target" is higher than the ones available on your simulators.
Xcode5 neither has 6.0 SDK or 6.0 simulator. But what you can do is u can copy both 6.0SDK and 6.0 simulator from your previous Xcodes (xcode4.5 for 6.0 and XCode4.6 for ios6.1) You can find the simulator at /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/applications/iphone simulator.app
And SDK at /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0
Copy the entire folders for simulator and SDK in the exact same path of XCode5.
Note: to go the the Contents of Xcode.app just do a right click on the .app file and you will get an option"Show Contents".
Once u are done copy pasting, restart ur XCode5 and u can see 6.0/6.1 simulator as an option :)
Click on your project root.
Then Go to the Build settings.
Then set iOS deployment target 5.0
Then select iphone6 on top left of your project.
See this image
Solved restoring an older version of the xcodeproj file.

"The run destination iOS Device is not valid for running the scheme"

I've been running my app on an iPhone 5 /iOS 6, but when I try to run it on an iPhone 4S / iOS6 I get "The run destination iOS Device is not valid for running the scheme NN. The Scheme contains no buildables that can be built for the architectures supported by the run designation device".
I've looked at previous postings on this but they involve issues with the Deployment Target.
In my case I've got the Base SDK set to 6.1 and the Deployment Target set to 5.0.
The iPhone 4 has got iOS version 6.0.1.
It was a bug in XCode, I closed and reopened Xcode and it started working.
I've noticed this sort of thing many many times now with Xcode with other problems, its very frustrating that the tool is so dodgy.
I had the same problem. The issue that i found is that , by mistake I had chosen iPad as deployment target due to which XCode showed that iPhone 5 is an invalid device. .
Hope it helps. Then I just changed the target to iPhone and it worked.
The run destination iPhone is not valid for Running the scheme.
Quit Xcode
Open Xcode
Clean project
Run project
It will work
This is some sort of memory issue sometimes.Close some application and try again.
Close Xcode too and reopen. Worked for me.
Cheers.
Quit and Reset Xcode can reslove most problem. The other cause is Device not support iPhone, you can
Target -> select scheme -> General -> Deployment Info -> Device-> select Universal or the current device you want.
In my case the problem was missing executable value selected into Scheme -> Profile -> Executable (e selected from the dropdown build configuration debug and executable the "application".app).
A simple solution.
1) Force quit X-Code
2) Force quit itunes
3) Reconnect iPhone
4) Open X-Code
Go to project info set development Target as 4.3 or 5.1.1 and same in target also.
I had this problem in XCode 9.0.1.
It seems that XCode does not refresh the list of connected devices.
You may notice that after disconnecting your device, you can still choose it as a target. So XCode may actually be trying to connect to a bogus device.
To fix this:
Edit the scheme.
Re-select the scheme's executable.
this seems to force XCode to update the list of connected devices.
If that did not work, try reconnecting your device (cable) before you do this.
Or perhaps, some other combination of disconnecting device, connecting device, and re-selecting the scheme's executable.
As a desperate measure, you may also try to change the cable that connects your mobile device to your pc.
But ideally... Xcode should be fixed.
Just Go to Devices -> The Intended device you wanted to run (I Was iPhone6 Simulator)-> Select the Device (I was selected iPhone6) -> Right Click-> Make sure the ‘Show the Run Destination Menu’ enabled.
For Me, it was enabled. I did, it worked.
I faced this issue in XCode 9, but later realised that for some reasons I had unchecked run destination in "Devices & Simulators" window
In my case, none of the answers given worked for me.
I was trying to setup TravisCI to my project and this is what i did:
Select Target > Edit Scheme > Build
Check the "run" option in the Tests target and the issue disappeared, i hope this help someone, i spent 2 days trying to fix this.
Other solutions might work for other scenarios but, in case using Xcode 11, I went into "Build Settings" of my test target and changed to universal under "Deployment"->"Targeted Device Family"
Select your project, Under Targets, select your main target, then on the Build Settings Tab, there is one field that says "Valid Architectures". Make sure "armv7" is also there. You probably only have armv7s right now.
I am using XCode 8.2.1 having same problem.
Solution:
->Go to Devices
-> Add additional simulators
->Right Click simulator u are using
->Show in Run Destination Menu <-Enable this Option
For me Xcode failed to copy symbols for connected device due to low disk space. First check if you have symbols connected device under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/.
Since I had iOS 8.3 (12F70) installed on my device the path for me was /Users/$USERNAME/Library/Developer/Xcode/iOS DeviceSupport/8.3 (12F70)/Symbols The size of this directory should be around 2.5GB.
When I got this issue the size was 484 KB.
To fix it I
Free up about 3GB of disk space. You can delete folders for any unsupported devices that you might have under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/
Disconnected device from Xcode and closed Xcode.
Removed the folder in above path (everything under 8.3(12F70).
Start Xcode and connected the device.
Xcode should start Copying symbols once done the size of the folder should be around 2.5GB
This happened to me because I switched branches in source control with unshared schemes.
My xcuserdata folder was git-ignored, and it contained a scheme I forgot to share. This meant I was trying to use a scheme that was from a completely different code branch.
I remade the scheme which fixed the problem, and marked it as shared so that it would be in the xcshareddata folder and checked into source control.
For my case, check the target -> Build Settings -> Search "Mach-O Type" and check the value, it should be Executable/Dynamic Library/Static Library. For other type values, the target could NOT be built and run.
This is similar to Kunal Gupta's comment, but I got this error after running an Xcode project on an actual iPad (the deployment target was changed to iPad and I wanted to run it on my iPhone simulator). Remember to change the deployment info after you use an actual device/simulator, especially when switching from iPad to iPhone.
Swift 3 or 4 Xcode 8 or 9
One thing you can do is click the Project file to open up General Settings, Capabilities etc.
Choose Build Settings
Search for Base SDK
Make sure debug AND release have the same build type.
I had debug set to ios 11.0 and release set to macOS 10.13
They must be the same in order to Archive
In my Case,
I open my iPhone here is the alert appearing in my iPhone for Trust and Don't Trust. I click on Trust. It works fine.
Switching to a different USB port and restarting Xcode solved the problem. Experienced this issue on iMac running Xcode 9.1 whenever I tried connecting any iOS device to one specific USB port. If your USB ports stopped working, check this.
Open the Apple Menu > About this Mac > More Info > System Report > USB and check that the device appears in the USB Device Tree. If it is not here try another USB cable.
I notice this with certain cable+device combinations (probably bad contact), restarting the XCode will only help for one or two runs and then it strikes again. Changing cable / device is the only long term solution worked for me.
In my case, this issue was fixed changing the Architectures (Build Settings --> Architectures) to Standard architectures - $(ARCHS_STANDARD)
Make sure to have arm64 armv7 armv7s on Valid Architectures.
In the case of iOS 13.x - What worked for me is unpairing my watch to my phone and repairing it to my iPhone. I wouldn't just unpair it via Bluetooth- I repeated the whole cycle as if I got a new watch. It took 10 mins to do the whole thing. When I ran my app again, it worked. From there, ensure all your Targets have the same sign in for identity.
Device Support Files is missing for device iOS version. Add it in XCode App Content path.
App Content Path is "contents/Developer/platform/iPhoneOS.platform/DeviceSupport"
Dowloaded support files from here and past them by creating folder of device version number there in app content path.
Go To General => Supported Destinations add IPhone or whatever platform you want run your app.
I encountered this issue while trying to run a watchOS app. After restarting both the Apple Watch and the iPhone, it displayed a different error message that informed me about the Developer Mode setting being turned off:
The run destination iPhone is not valid for Running the scheme 'My Watch App'.
To use Apple Watch for development, enable Developer Mode in Settings → Privacy & Security.
I turned on the Developer Mode setting, restarted Xcode, waited for a bit and it started working again.
Make sure your Xcode is up to date.
This might sound obvious. I tried all the answers presented in this threat and nothing would help. I used Xcode 12.0. After upgrading to 13.1, everything worked as expected.

Resources