Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on iOS 4.x (arc problem) #23

Open
orenmeiri opened this issue Apr 4, 2012 · 4 comments
Open

crash on iOS 4.x (arc problem) #23

orenmeiri opened this issue Apr 4, 2012 · 4 comments

Comments

@orenmeiri
Copy link

Project is not using ARC and base IOS 4.0

Added to project as described (including -fobj-arc for OpenUDID.m).
Runtime crash on iOS 4.3.3 on:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

dyld: Symbol not found: _objc_retainAutoreleasedReturnValue

@ylechelle
Copy link
Owner

Please take a look at the following:
http://stackoverflow.com/questions/7747783/is-arc-really-supported-in-ios-4-the-ios-4-2-sdk-is-missing-arc-related-symbols

Excerpt:
"ARC is supported on iOS 4.0 and above. You need to use the iOS 5.x SDK but can select iOS 4.3 for the Deployment Target. The one thing that is not supported in 4.x is automatic weak reference zeroing.
Oh, Xcode 4.2 is now out of NDA and can be used to submit apps."

@Gavtron
Copy link

Gavtron commented Apr 4, 2012

Also refer to the other issue "Compile error in iOS 4.3", because there's a linker flag that needs to be added that I'm not sure if that stackoverflow thread mentions or not. Because without that linker flag, you get exactly the error you pasted above.

@sshahidaslamm
Copy link

Hi,

I am runing iOS 5 sdk. when i choose iPhone 5 simulator it works fine and when i choose iPhone 4.3 or 4.0 it crashes on

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

the stackoverflow link not worked for me, Here is the error log :

Current language: auto; currently objective-c
dyld: lazy symbol binding failed: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/mbpro/Library/Application Support/iPhone Simulator/4.3.2/Applications/36937277-9D1C-41C0-AD19-DA009B5C6A41/IBFS.app/IBFS
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation

dyld: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/mbpro/Library/Application Support/iPhone Simulator/4.3.2/Applications/36937277-9D1C-41C0-AD19-DA009B5C6A41/IBFS.app/IBFS
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation

(gdb)

@sshahidaslamm
Copy link

Solved by this and yes it should be added to the "tutorial" part that explains how to enable arc for the file.

#21

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants