After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project:
Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fd67af0a930:'com.apple.platform.iphonesimulator':<DVTFilePath:0x7fd67af0a7c0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>>.
I suspect Xcode 9 modified some shared state with Xcode 8 (set a path, overwrote a file, etc.). But I've tried deleting and both Xcodes to no avail.
The project uses Core Data and it's clearly failing when trying to compile the xcdatamodel.
I can still compile and run under Xcode 9.
An Apple engineer reached out about this...
Those of you with cdtool errors in Xcode 8, I suspect you installed the iOS 10.3 Simulator runtime from Xcode 9. It was discovered this week that this causes a problem with cdtool in Xcode 8.3.
You can work around that by moving iOS 10.3.simruntime aside and restarting CoreSimulatorService (source):
sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/Backup
sudo mv /Library/Developer/CoreSimulator/Profiles/Runtimes/{,Backup/}iOS\ 10.3.simruntime
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Then restart Xcode, Simulator, etc. Those of you that deleted CoreSimulator.framework and thus cannot run Xcode.app any more can reinstall CoreSimulator.framework with:
installer -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
Didn't work for me because I also have a Watch app and got the error on the Watch SDK.
I ended up deleting both Xcode 8 and 9 Beta, deleting /Library/Developer and ~/Library/Developer. Then reinstalled Xcode 8 and it worked.
You can also remove the 10.3 folder from
/Library/Developer/CoreSimulator/Profiles/Runtimes
Restart Xcode in order to take effect (may not be needed).
I agree with this answer. In addition I first removed all existing(took backup) Xcode version from machine.Then kept xcode 8.3.3 in Application folder. Made the project to open with default Xcode 8.3.2. Problem got resolved.
The problem came when I updated Xcode 9 beta to 9.2.
Related
I update xcode version 9.4 to 10.2.1, I have created a project on xcode 9.4, run it once on xcode 10.2.1 and then delete this version and switch back to xcode 9.4 due to some reasons ... when I tried to run project on xcode 9.4 it gives lot of warnings and 198 errors
how to solve this issue.
If it's only linker errors, try to clear derived data on Xcode (Which you can access from Xcode > Preferences > Locations) and run application after clean and build. Some times your lesser disk spay might caused to these kind of issues as well.
When you opened the project on XCode 10.2.1 did you allow the project to be updated to the "recommended settings"?
It would have appeared as the yellow yield icon in the issues log.
A possible solution is to go into Time Machine (hopefully you keep backups) and revert your project folder to a copy from before you updated XCode
Had been using Xcode 9 beta for a while, and then I updated Xcode 9 since now it has an official update. Then I removed the beta from my Desktop.
Now I have a problem compiling my project with the following error:
Header '/Users/sahn/Desktop/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/CommonCrypto//CommonCrypto.h' not found
I've tried cleaning the project, cleaning build folder... but that Xcode-beta.app location won't go away.
How can I fix this?
Didn't work with XCode for almost a year now, but this usually could be fixed before with
xcode-select --switch /Applications/Xcode.app/Contents/Developer
This command is used to switch the location of the XCode. Might need sudo.
Documentation is here btw : https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
It turns out that the problem was an external framework, internally uses CommonCrypto framework, and the framework was compiled previously with the Xcode Beta.
Simply fixed by recompiling dependencies.
So, because of all the naming changes my current project doesn't run on Xcode 8 beta and has lots of compilation errors that I cannot easily get rid of.
Is there a way to at least run a compiled version that was made in XCode 7.3.1 on the iOS10 Simulator?
The trick is to create a symbolic link the DeviceSupport folder from the beta to the stable version
From terminal
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5261u\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
I want to use Xcode 7 with iOS 10.
As I understand, working with iOS 10 beta requires Xcode 8 beta, so I should upgrade my Xcode. However, my code can't be built by the new compiler, so I want to stay with Xcode 7.
How can I achieve that?
You need use DeveloperDiskImage from Xcode 8 Beta.
For this extract Xcode 8 Beta app and copy DeveloperDiskImage for iOS 10 to your Xcode folder.
Suppose you extract Xcode to Downloads/Xcode-beta.app
cp -r /Users/fanruten/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A345\) /Applications/Xcode_7.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
After copy DeveloperDiskImage you should start Xcode and connect iOS device to your mac.
Edit:
With a standard Xcode install one can create a soft link:
sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5309d\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
You can use any SDK on an older build of Xcode simply by copying and pasting the folder of the OS you need. Also you obviously cannot have two apps with the same name so just rename them to Xcode 7 and Xcode 8.
right-click / ctrl-click the Xcode 8 application icon to show the package contents and navigate to this location and copy the iOS 10.0 or WatchOS 3.0 folder etc.
/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
/Applications/Xcode8.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport
Then navigate to the same location in Xcode 7 and paste the folder.
/Applications/Xcode7.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
/Applications/Xcode7.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport
Restart Xcode 7. You'll have to wait a while for Xcode to rebuild the symbols etc.
For me none of the above suggestions worked.
Instead, I navigated to this location(press CMD+SHIFT+K to insert the below path) (through finder)
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
And copied the 10.0(14A5339a) folder, which contains the developer disk image. I then pasted it into
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
EDIT: I'm using Xcode7 (version 7.3.1-7D1014),iOS 10 public beta 6(14A5345a)-this is released on aug 19,2016
Although copying the folder containing the disk image is still the best way to go, i had no time downloading the newest Xcode to get hold of the disk image folder, so i basically archived the app and exported it using the save for development deployment option, then installed it on the test device using iTunes app.
In my case i hade Xcode 8.0 wanting to build on a 10.2.1 iOS device.
Pascal && Fanruten are right.
tested on 12th aug, Xcode Version 7.3.1 (7D1014) AND iOS 10.0 (14A5309d) on iPhone6 Plus.
I made a symbolic link as suggested (path are a bit different... see below.) but works with linking to Xcode Version 8.0 beta 4 (8S188o).
only for completeness:
Beta 4
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5322e\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
Beta 5
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5339a\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
Tymac's answer almost worked for me. Rather than copy and past, I had two Finder windows opened and then dragged the iOS 10 folder to the Xcode 7 folder. Once it's in Xcode 7, open the folder and make sure there is a dmg file.
Earlier I had dragged a copy of the iOS 10 device support folder to my desktop then copied it to the Xcode 7 folder. That seemed to unpack the dmg file so Xcode 7 still complained. Needs to be a dmg file in the folder.
One warning. I tried to use XCode 7.3.1 with ios 10 images from XCode 8.1 for cordova project (it works), but had problems with push notifications permissions (different setups for ios 8/9/10). Not sure about it, but it seems to me that some compiler directives are missing in 7.3.1
Here it is for XCode 9 and iOS 11 Beta 1:
sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0
my two cents for Xcode Version 11 beta against Xcode 10 after wwdc2019:
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0
so I can use my iPhone with iOS 13 beta in Xcode 10.
after ln -s , pls relaunch Xcode
Current setup:
iPhone 6+ updated to iOS 8.2
iMac running Mavericks (10.9) with Xcode 6.2
Deployment target set to 8.2
When I connect the iPhone, it shows up as ineligible.
Also, it shows this warning:
I've tried:
to reboot both iPhone & iMac -> Not solved
to manually select iPhone from: Product > Destination > Ineligible Devices
Many other answers in this question, but all for problems using Xcode 6.3, not 6.2.
I know I can solve this:
upgrading to Yosemite & installing Xcode 6.3
using an iPhone running 8.2
But is there any possibility that mounting the Xcode 6.3 DMG and copying some libs / symlinking something it will work?
Just copy the folder DeviceSupport/8.3 from Xcode 6.3 to Xcode 6.2.
Details:
Download Xcode 6.2 and 6.3, install as /Applications/Xcode_6.2.app and /Applications/Xcode_6.3.app (or similar names)
In both installations, there's a folder Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
In Xcode 6.2, this folder contains packages for iOS 8.2 and many lower versions, but not for 8.3.
In Xcode 6.3, this folder also contains a package for iOS 8.3. In my case, the folder is called 8.3 (12F69)
Copy the iOS 8.3 package from Xcode 6.3 to Xcode 6.2 (this command is one line, of course):
cp -r '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Or even better, create a link:
ln -s '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Now restart Xcode 6.2 and connect your device through USB. Xcode should allow you to test apps on it.
Diego Freniche's solution (copying the whole iPhoneOS.platform folder) was a great help, but when I ran my app from Xcode 6.2, it looked slightly different than it did when I deployed an ipa file on the phone (buttons in wrong positions, status bar display wrong). I guess Xcode got confused and built the app as if it was targeted at a different iOS version.
With this solution (only copy one folder in DeviceSupport), it looks like the app works exactly as it is supposed to. I'll let you know if I encounter problems, but I haven't seen any so far.
A little progress, but this is a WIP.
Looks like in Yosemite Xcode 6.2 works correctly with 8.3 devices. Need to test on Mavericks
Testing with Xcode 6.2 in Yosemite (need to test also in Mavericks, any feedback would be appreciated)
Go to your Xcode 6.2 folder and rename
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform
into
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform.old
Mount your Xcode 6.3 DMG, install it
Copy from Xcode 6.3 this folder:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
inside your Xcode 6.2 folder.
you'll probably find an error telling you rootuser does not own the simulator / OS Platform folder. To solve that just open Terminal, then:
$ cd /Applications/Xcode6.2.app/Contents/Developer/Platforms
$ sudo chown -R root iPhoneSimulator.platform/
$ sudo chown -R root iPhoneOS.platform/
now you can run your app inside your iOS 8.3 device from Xcode 6.2 but you have no simulators in the target tdestination menu
UPDATE: I'm getting weird errors while ibtool tries to compile the storyboards:
/Users/dfreniche/Desktop/Test/Test/Base.lproj/Main.storyboard: The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)
So finally give up and update to Yosemite. If there's any new info on this, please share.
Had the same problem with connecting iOS8.3 devices to Xcode 6.2 on Mavericks. Ok on a machine at work running Xcode 6.4 on Yosemite. Software update on the Mavericks machine doesn't offer any higher version. Looking at the specs of Xcode 6.4 (and presumably 6.3 of the original question) says it requires OS X 10.10 (i.e. Yosemite). So, whether or not you can hack around it, the behaviour you/we are seeing on Mavericks is what Apple intends.
I have the same issue and I don't want to just use the lastest version of XCode for the need of maintaining my old projects. I end up with installing two versions XCode(6.2 and 6.3) to solve this problem. Here is what I did.
Download XCode6.2 install package from apple site
Upgrade the existed XCode6.2 to x6.3
Open my project on XCode6.3 (this time the device can be recognized by XCode, and I think XCode6.3 might have done some updates to your project.)
Close my project, re-install XCode6.2, there will be a prompt saying I have a newer version and if I want to keep both. Click Yes. Then I have two versions of XCode.
After all those steps done, I can finally open my project and use my device in XCode6.2. Hopefully it can help someone.
XCODE 6.3 is out.. It solved my problem.. If you have Yosemite, you can download the 6.4 beta version