Just updated to Xcode 7.0.1, running on El Capitan (GM) with SIP disabled. And now every time I try to compile a Swift project I get this error;
<unknown>:0: error: Swift does not support the SDK 'iPhoneSimulator8.4.sdk'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
I've tried compiling for actual devices as well and get:
<unknown>:0: error: Swift does not support the SDK 'iPhoneOS8.4.sdk'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
My deployment target was originally set to 8.0, I've tried setting it to 9.0 but that makes no difference. My Base SDK is set to Latest iOS(iOS 9.0).
This is across all my Swift projects, even when I create a new project, I still get this error.
It doesn't seem to be affecting Objective-C. One thought I've had, is could this be an issue with SIP being disabled? It doesn't look like a permissions error but I can see no other reason why this isn't working.
This happened to me when I had simultaneously installed both Xcode 7 and 6.4 and after automatic update I was left with 7.0.1 only.
One indication that something got messed up was output of xcodebuild -sdk -version:
xcodebuild[29131:8243992] [MT] DVTSDK: Warning: SDK path collision for path '<DVTFilePath:0x7fac2ae3c800:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk'>': SDK with name 'iphoneos9.0' being superceded by SDK with 'iphoneos9.0'.
...
iPhoneOS8.4.sdk - iOS 9.0 (iphoneos9.0)
SDKVersion: 9.0
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk
PlatformVersion: 9.0
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
ProductBuildVersion: 13A340
ProductCopyright: 1983-2015 Apple Inc.
ProductName: iPhone OS
ProductVersion: 9.0
...
There might be easier way to solve this, but reinstalling Xcode 7.0.1 fixed it for me.
If you don't want to re-install Xcode (assumption: you're building for iOS 9), just quit Xcode and go to "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/" and remove the "iPhoneOS8.4.sdk" folder from that directory. Be sure to make an external copy if you still need it so you can put it back later. Then restart Xcode, clean, and build. Worked for me.
Related
After upgrading to xcode 15 if I launch my flutter app from android studio it fails to build but works on my iphone11 device. It also builds on the ios emulator if launched from xcode. I keep getting this error :
Xcode's output: ↳
ld: in /Users/macbook/Desktop/dis_or_dat/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame(VbrTag.o),
building for iOS Simulator, but linking in object file built for iOS,
file
'/Users/macbook/Desktop/dis_or_dat/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame'
for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/macbook/Desktop/dis_or_dat/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 15.0.99. (in target 'FMDB' from
project 'Pods')
ios>open "Podfile"write platform :ios, '9.0'
Seems like your project deployment target is set for iOS version 8 and later, you need to update that (iOS 9 should be minimum target).
Navigate to project's ios folder and open 'Podfile'. Uncomment the second line and set it to any later version than 8.
If the problem still doesn't get solved, this thread might help:
https://developer.apple.com/forums/thread/96361
Commenting here for the unwary who like me, spent far too long trying to work out what was going on.
It turns out this is an issue with Flutter sound. The app will build in XCode, and on a real device but not on a simulator.
Bug being tracked here:
https://github.com/Canardoux/flutter_sound/issues/775
I'm developing Hybrid app using ionic 3 framework and everything is working fine when Deployment target is set to 11.0.0 or above.
But as soon as I set iOS deployment target to 9.3 or 10.0.0 or 10.3.0(Below 11.0.0) am getting build failure with below error message.
linker command failed with exit code 1 (use -v to see invocation)
So i have to build my app with Deployment target 11.0.0. but if i do that i cant run app in the devices which has vsersion below 11.0.0.
my Xcode version is Version 10.1 (10B61)
I think there must be some packages or methods in the iOS native environment which doesn't work for iOS below then 11.0. You should analyse the error information to see which method or framework is not supported for iOS below 11.0.
The problem is in your pod files i think.
Click on pods.
Select one pod on left side and click on build settings.
Under development section check the version once for all the pods.
For the first time I was able to compile my app in Xcode 7 (failed in beta 4 and 5). So, thats good progress I guess.
However, when i load my app on my iPhone 6, iOS 8.4.1, it crashed in the debugger with the following message:
dyld: Symbol not found: _NSArray0
Referenced from: /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq
Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq
Is this something to do with the order of the libraries being linked? Look forward to some advise.
Thanks!
I fixed it by putting this in the podfile. platform :ios, '8.4'
No need to update your device to iOS 9 and lose out on 8.4 testing.
I had the same error and I fixed.
I removed CoreFoundation.framework and Add again with Status "Optional" and works.
If anybody else got this while running unit tests do the following:
Select unit tests target
Go to Build Settings
Search for 'Deployment Target'
Change Deployment Target version to your project's deployment target
That's it!
I also had this problem and I fixed it by adding framework CoreFoundation.framework to Build Settings.
This as a problem on iOS8 build with the new XCODE release, Please remove CoreFoundation.framework and Add it again with Status of "Optional".
I used to have the same error during compilation of a mac os project after updating the Xcode for 7.0 GM version (7A218). Xcode 7 has the 10.11 sdk in it only (you could check that in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, where it's a MacOSX10.11.sdk).
At compilation time the xcode will link the frameworks from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks, but at runtime from /System/Library/Frameworks/ as I guess.
I have OS X 10.10.5 (14F27) on mac. Either I have my static library that I've built by xcode 7 (MacOSX10.11.sdk as you remember from earlier), which I've linked to my project after. After running I got the runtime error as
dyld: Symbol not found: _NSArray0
I think it's because the library has been compiled with CoreFoundation.framework from mac os sdk 10.11, but at runtime was linked to CoreFoundation.framework from /System/Library/Frameworks/ where version of which is 10.10 (as OS version).
How I fixed this. Friend of mine has xcode 6 yet, I took mac os sdk 10.10 from there (as you remember in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, name is MacOSX10.10.sdk) and added it to Xcode of mine. Then I rebuilt my static library with 10.10 sdk (you could compile from cli with '-sdk macosx10.10' parameter or set build sdk in Build Settings => Base SDK). After the problem has been solved.
I assume that for the iOS you could apply the same strategy.
I experienced the same exact crash running Xcode 7.0 beta 6 on a device with the first iOS 9 beta installed, the crash however was not occurring while using the simulator.
After updating my iPhone to iOS 9 beta 5, the crash stopped.
For the first time I was able to compile my app in Xcode 7 (failed in beta 4 and 5). So, thats good progress I guess.
However, when i load my app on my iPhone 6, iOS 8.4.1, it crashed in the debugger with the following message:
dyld: Symbol not found: _NSArray0
Referenced from: /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq
Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq
Is this something to do with the order of the libraries being linked? Look forward to some advise.
Thanks!
I fixed it by putting this in the podfile. platform :ios, '8.4'
No need to update your device to iOS 9 and lose out on 8.4 testing.
I had the same error and I fixed.
I removed CoreFoundation.framework and Add again with Status "Optional" and works.
If anybody else got this while running unit tests do the following:
Select unit tests target
Go to Build Settings
Search for 'Deployment Target'
Change Deployment Target version to your project's deployment target
That's it!
I also had this problem and I fixed it by adding framework CoreFoundation.framework to Build Settings.
This as a problem on iOS8 build with the new XCODE release, Please remove CoreFoundation.framework and Add it again with Status of "Optional".
I used to have the same error during compilation of a mac os project after updating the Xcode for 7.0 GM version (7A218). Xcode 7 has the 10.11 sdk in it only (you could check that in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, where it's a MacOSX10.11.sdk).
At compilation time the xcode will link the frameworks from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks, but at runtime from /System/Library/Frameworks/ as I guess.
I have OS X 10.10.5 (14F27) on mac. Either I have my static library that I've built by xcode 7 (MacOSX10.11.sdk as you remember from earlier), which I've linked to my project after. After running I got the runtime error as
dyld: Symbol not found: _NSArray0
I think it's because the library has been compiled with CoreFoundation.framework from mac os sdk 10.11, but at runtime was linked to CoreFoundation.framework from /System/Library/Frameworks/ where version of which is 10.10 (as OS version).
How I fixed this. Friend of mine has xcode 6 yet, I took mac os sdk 10.10 from there (as you remember in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, name is MacOSX10.10.sdk) and added it to Xcode of mine. Then I rebuilt my static library with 10.10 sdk (you could compile from cli with '-sdk macosx10.10' parameter or set build sdk in Build Settings => Base SDK). After the problem has been solved.
I assume that for the iOS you could apply the same strategy.
I experienced the same exact crash running Xcode 7.0 beta 6 on a device with the first iOS 9 beta installed, the crash however was not occurring while using the simulator.
After updating my iPhone to iOS 9 beta 5, the crash stopped.
Developers I'm supporting just got new Macs with XCode 6.2 (Version 6.2 (6C131e)).
In running xcodebuild we're having failures in running against any earlier version of the simulator, even if it's been downloaded, getting:
:build
xcodebuild: error: SDK "iphonesimulator7.1" cannot be located.
:build FAILED
I go to Xcode -> Preferences and download the iOS 8.1 and 7.1 simulator, but still they don't show when doing an xcodebuild -showsdks:
xcodebuild -showsdks
iOS Simulator SDKs:
Simulator - iOS 8.2 -sdk iphonesimulator8.2
Ideas? I can't flip my whole project & CI pipeline to build against 8.2 just yet, wondering if there's a trick to getting the 7.1 / 8.1 sim working from the command line tools in Xcode 6.2.
It looks like Xcode 6.2 is having an issue recognizing any additional simulators:
xcodebuild[4554:1175053] [MT] iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed."
UserInfo=0x7fe952514ca0 {
NSLocalizedFailureReason=A connection to the simulator verification service could not be established.,
NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled.,
NSLocalizedDescription=Simulator verification failed.}
Some in the Apple Developer Forums are experiencing the same issues. A radar has been filed, and one possible solution of:
"Finally success by nuking /Library/Deverloper/* and re-installing Xcode."
Found the answer in this thread: xcode simulator not coming up - reinstall possible? (the accepted answer). Looks like xcode 6.2 is not "smart" enough to create the simulators on its own. This is why, if you update from 6.1 to 6.2, you won't be able to see ios 8.2 simulators even if you have the sdk, and the same reason why if you do a clean install you can't see any simulator at all, even if you specifically install the simulators in the preferences menu. Cheers for the poorly packaged official bundles!
I found this issue too. But my method is to copy the simulator into the SDKs folder and this work at Xcode 6 earlier versions. After I upgrade to xcode 6.2, I found this method did not work anymore.