I have a problem when building my Xcode project.
I am using Xcode4.3, with Base SDK = 5.0 and deployment target = 4.3
The strange scenario is that, I was able to build the project successfully several days ago without any error. Even for git commit it built successfully.
However, when I tried to build the .xcodeproj in command line, it says something like
Undefined symbols for architecture i386:
"_objc_retain", referenced from:
other undefined symbols are _objc_retainAutoreleasedReturnValue, _objc_release, _objc_autoreleaseReturnValue, _objc_storeStrong and _objc_autorelease.
I reckon that’s something related to ARC…… just that the sudden failure upon building it puzzled me……
I’ve also searched through websites and questions here and some mentioned about the referencing of frameworks…… Yet I’ve checked the connection and it seems that there’s not missing of any required framework.
So can anyone help for I have no idea at all on this sudden failure upon building…
More information:
Within these days, I didn’t change much in my codes but modified some layouts only. One big change would be allowing the application for APNS (which updated the provisioning profile and already fixed the “Code Sign Error: provisioning profile (long string) not found.”)
Edit:
Just find out that this is caused by changing the coding style….
I was using
NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:(NSString *)];
which caused an error looks like — error: no visible @interface for ‘NSFetchRequest’ declares the selector ‘initWithEntityName:’ ”
and then when I changed to use
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:(NSString *) inManagedObjectContext:(NSManagedObjectContext *)];
[request setEntity:entity];
The error mentioned in my above question appeared….
Need help…
Turn out it’s just about the accidentally branching during commit to git……