Restkit on Xcode 4.5 GM does not work on iOS 6 dev

2019-04-29 05:12发布

问题:

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.

回答1:

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



回答2:

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



回答3:

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.



回答4:

Restkit is compiled for armv6/armv7, so it can not work on armv7s, many the third Lib would meet the same question.