Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restkit on Xcode 4.5 GM does not work on iOS 6 device - file was built for archive which is not the architecture being linked

I have been using Xcode 4.4.1 and Restkit has been working perfectly on Simulator and Device. Since I upgraded to Xcode 4.5 yesterday, Restkit works fine on the Simulator, but when I try to run on my iOS 6 device, I get compile errors;

d: warning: ignoring file /Developer/Xcode/DerivedData/App-Name/Build/Products/Debug-iphoneos/libRestKit.a, file was built for archive which is not the architecture being linked (armv7s): /Developer/Xcode/DerivedData/App-Name/Build/Products/Debug-iphoneos/libRestKit.a
Undefined symbols for architecture armv7s:

  "_OBJC_CLASS_$_RKObjectManager", referenced from:
      objc-class-ref in AppDelegate.o

What does this mean and how do I fix this issue? Help is appreciated.

like image 431
Wasim Avatar asked Sep 13 '12 08:09

Wasim


3 Answers

I have pushed a branch to the RestKit Github repository that should address the build issues with the iOS 6 SDK. I was not able to duplicate the build errors in my project (I am diverged from the master branch significantly), but believe the fix is accurate.

Could someone experiencing the issue please switch to the bugfix/930-arm7s-compatibility branch and advise if the fix is good on Github? There is a Github issue tracking this at: https://github.com/RestKit/RestKit/issues/930

like image 83
Blake Watters Avatar answered Oct 17 '22 15:10

Blake Watters


You might need to recompile the RestKit Framework using iOS6 SDK and then add the libRestKit.a framework into your project.

EDIT:

Its been fixed. You should make the changes to your project files from here

like image 29
Vimal Venugopalan Avatar answered Oct 17 '22 16:10

Vimal Venugopalan


I had same problem

this thread solved my problem https://stackoverflow.com/a/12537677/2183952 and most importantly make sure "Build Active Architecture Only" is set to "No" in the build settings of both the "Restkit" project and your own project.

like image 1
Moaz Saeed Avatar answered Oct 17 '22 17:10

Moaz Saeed