I am getting annoying warning messages for my targets after upgrading to osx 10.10, and the latest xcode (I can't remember which actually triggered it)
e.g: Incompatible SDK for ARC in target ApplicationName: macosx
If I change it from 'latest' to '10.10' then I get the same error:
Incompatible SDK for ARC in target ApplicationName: macosx10.10
Everything works and compiles, but still warning. The code is mixed swift and objective C, with ARC. Anyone else had this issue?
I had some older SDKs (10.5 and 10.6) from previous xcode versions that I had saved, in the xcode SDKs directory, which seemed to cause this error. I deleted these and replaced them with fresh ones downloaded from the apple website and the error went away.
I have same problem. But I found a solution:
In the Build Settings turn off the "Objective-C Automatic Reference Counting" paramter.
Related
I have imported CallKit framework as optional only. But import CallKit crashes while running on iOS 9 at launch. But works perfectly on iOS 10.
It worked fine in XCode 8 beta 6 but this issue is happening only on XCode 8.
The code is in Swift 3.
Any help is much appreciated.
CallKit API is only for iOS 10.0+. It won't work for iOS 9.0. Use a condition for iOS version 9.0 and 10.0 to avoid the crash.
Reference : https://developer.apple.com/reference/callkit?language=objc
There is/was a bug in Swift 3 language that wrongly links module libraries github pull request, that is fixed now, but the fix is not yet implemented in XCode, not even in beta.
You could get latest swift toolchain build from link and install it to XCode to try and see the fix, but the app would not be approved for Appstore as it's stated here
You got two solutions;
wait for apple to release XCode with new version of swift 3.0.2+
or revert your code back to swift 2, where it works, with "Use Legacy Swift Language Version" flag in Build Settings
If you choose to revert back to swift 2, brace yourself with a lot of patience :D
Despite the release notes stating this is supported and previous version of Xcode 6 working ok, I have a rather verbose error message when trying to build with 7.1 SDK.
"iOS targets using Swift cannot be built against an SDK older than 8.0, but the effective SDK is 7.1."
Has anyone else seen this?
I just had this issue, but with the app store build of Xcode 6.0.1 (6A317).
The issue was that I had copied old SDK's (7.0, 7.1) into the Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs directory. This was causing Xcode to use the wrong SDK for building.
Deleting them solved this problem for me. That'll teach me for mucking around with Xcode.
I'm developing an iOS App which targets iOS 5.1+. I'm using XCode 4.5 on Mac OS X 10.8 and I do own an iPhone 4 with iOS 5.1.1. The app needs OpenCV, which I have successfully built from sources according to a tutorial in the OpenCV-Documentation.
Here is what happens:
When I start up the application I get an exception:
dyld: Symbol not found: _objc_setProperty_nonatomic
The error does not occur with iOS 6, but with iOS 5.1 in both the simulator and on a real device.
What is that? Is it related to OpenCV? Does it have to do something with incompatibilities between iOS / the iPhone / XCode??
EDIT: My development target is set to 5.1. The Base SDK is 6.0. I copied an SDK für 4.3 (which is the lowest version that XCode 4.5 will support) from another Mac and set development target as well as the base SDK to 4.3. Did not work either (it did not even build then).
I did not an update, the project has been started from scratch using XCode 4.5 initially.
Meanwhile I also found a tip to use gnulibc++ instead of libc++, but that also resulted in that the project did not build at all.
I built a test project and found the same issue. OpenCV is being built with a deployment target of ios6, this is a known issue, and a fix is pending review, see https://github.com/Itseez/opencv/pull/70
I just updated to Mac OSX10.8 and I'm trying to compile a Mac app that ran perfectly when using 10.7 + Xcode 4.5. Now I get this error:
dyld: Symbol not found: __NSConcreteGlobalBlock
Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
I've looked everywhere and things seem to be ok. The deployment target for the app is 10.6 which already supports blocks. Any ideas?
Thanks!!
It turns out that my project was trying to use an old version of the CoreServices framework which was causing this issue. I re-added all the frameworks that my project was using and the problem was gone :)
+1 on your question... Not sure if that would help finding the problem with OS X, but there is a similar error that happens with iPhone apps, with a solution in the link below. Another reason I am providing this link is that googling this error for the iPhone got me to this page.
iOS 4 app crashes at startup on iOS 3.1.3: Symbol not found: __NSConcreteStackBlock
Xcode 4.3.2
I wrote a static library, using ARC.
When I put it into a project, and test on iOS 4.3 simulator. (base on iOS 5.1, deploy target 4.3)
If the project using ARC, it works fine.
If the project not using ARC, met errors, such as:
dyld: lazy symbol binding failed: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/cnzzmobile/Library/Application Support/iPhone Simulator/4.3.2/Applications/A4EEB0A0-AC16-402C-B426-46667225F66D/test.app/test
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
dyld: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/cnzzmobile/Library/Application Support/iPhone Simulator/4.3.2/Applications/A4EEB0A0-AC16-402C-B426-46667225F66D/test.app/test
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
I searched a lot, but can't find an answer can solve this problem.
I remove jsonobjcet which only supported by iOS5, and -fobjc-arc also doesn't work.
Thanks
I found add "-fobjc-arc" at "other linker flag" can solve this problem on Xcode 4.3.2 based on iOS 5.1. Because the xcode can't find the lib which support ARC to link.
Notice that: add "-fobjc-arc" at "other linker flag" not at "Compile sources".
But this still doesn't work on old version Xcode 4(snow leopard) based on iOS 4.3.
I found some lib can work on both ARC and non ARC project without adding any special setting. I'm still waiting for the answer how to do this. Write code using pure C?
_objc_retainAutoreleasedReturnValue is a function of iOS 5.x's version of arc. You are attempting to build this framework and run it on iOS 4.3, which requires you to specify and deploy it for iOS 4.x, which runs the "ArcLite" framework.