Ios :: dyld: Symbol not found: _OBJC_CLASS_$_UIAlertAction - ios7

I have an app which works fine with iOS sdk 8.3 and Xcode 6. but when i check backward compatibility with iOS sdks 7.1 and 7.1 simulator it fails.
App crashes with following error
dyld: Symbol not found: _OBJC_CLASS_$_UIAlertAction
Referenced from: /Users/apogaeis/Library/Developer/CoreSimulator/Devices/F48B2D65-9EE8-4737-A0CE-2882D105C6C9/data/Applications/25B9DCDE-4BC6-4568-8EBE-3474FE559CBC/AppName.app/AppName
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/apogaeis/Library/Developer/CoreSimulator/Devices/F48B2D65-9EE8-4737-A0CE-2882D105C6C9/data/Applications/25B9DCDE-4BC6-4568-8EBE-3474FE559CBC/AppName.app/AppName
Please suggest to resolve the issue.
How can i make it work for all the iOS versions?
Thanks

In my case, UIKit.Framework had to be marked Optional rather than Required now my app works fine....

Related

dyld: Library not loaded: #rpath/Realm.framework/Realm error with Realm Objective C framework

I have installed the Realm Objective C Framework (2.0.3) by simply dragging it into my project created in Xcode 8. When I first tried it on simulator I got the typical dyld error.
dyld: Library not loaded: #rpath/Realm.framework/Realm
Referenced from: /var/containers/Bundle/Application/89F5987A-F3F0-45F2-9014-6BA662135E00/RelamDemo.app/RelamDemo
Reason: image not found
So I tried to fix it using the following suggestion:
https://github.com/realm/realm-cocoa/issues/1681#issuecomment-120749962
And it worked on iOS 10 Simulators.
But when I tried to run the same project on a device (iOS 10/9.3.2) I got the same dyld error again.
I have checked that I have copied the Realm.framework in my project. Now how can I solve the problem?
You need to ensure that Realm.framework is also copied to the 'Embedded Binaries' section of your app as well.
You can find that section in the 'General' tab of your project's settings.
(Screenshot courtesy of this iOSDevCenter post)

dyld: Symbol not found: __NSConcreteGlobalBlock after updating to OSX 10.8

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

while i try to run in iOS 6 my code throws Sen test Framework error. why?

I have a project that is developed in iOS 5.0 and now i need to update my project to iOS 6.0 .
While doing this my xcode 4.5 throws the error as below...
dyld: Library not loaded: #rpath/SenTestingKit.framework/Versions/A/SenTestingKit
Referenced from: /Users/developer/Library/Application Support/iPhone Simulator/6.0/Applications/6EFF12B6-DA80-4DD8-B3CF-B217C5EA63DF/XxxxXxxx.app/xxxxXxxxXxx
Reason: image not found
still it runs and works perfectly in iOS 5 devices and i am trying to run this app in iphone Simulator iOS 6.0 it throws that error...
Any body have any idea about this...
Thanks in advance...
its working....set SentestingKit.framework as optional
#fry copied his answer from here:
http://www.cocoabuilder.com/archive/xcode/260066-sentesttingkit-framework-runtime-failure.html
There's more information there which I found useful in solving this problem.
Try to delete the derived Data, then clean the project and restart Xcode.
If its still not working, check the Target dependencies of your library.
It seams like it has Problems with the armv7s Architecture, check that in the
Buildsettings of your Framework!

Static library(ARC) work on non ARC app, met error: dyld: lazy symbol binding failed: Symbol not found: _objc_retainAutoreleasedReturnValue

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.

Migration from 4.3 sdk to ios 5 sdk

I just updated my old ios 4.3 sdk working project to ios 5 sdk and I'm retrieving the following error:
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Any clue of what is causing this?
It seems like I was missing a library that in ios 4.3 was called libz.1.2.3.dylib but now on ios 5 the lib is called: libz.1.2.5.dylib.
Problem solved.
Instead of linking against libz.1.2.3.dylib or libz.1.2.5.dylib, link against libz.dylib. This will always be the latest version of libz.