6

In my Xcode 5 project I use RestKit for REST communication. Everything works fine with the simulators, but generating the ipa file, I get the following error:

ld: warning: ignoring file /Users/joseph/Library/Developer/Xcode/DerivedData/XXXXXXXXXX-gdwdekevxtdfivfpsnmyykeqhulk/Build/Products/Debug-iphoneos/libRestKit.a, missing required architecture arm64 in file /Users/joseph/Library/Developer/Xcode/DerivedData/XXXXXXXXXXXXX-gdwdekevxtdfivfpsnmyykeqhulk/Build/Products/Debug-iphoneos/libRestKit.a (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RKRelationshipMapping", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKObjectMapping", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKRequestDescriptor", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKObjectManager", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKResponseDescriptor", referenced from:
      objc-class-ref in classname-xxx.o

  "_RKStatusCodeIndexSetForClass", referenced from:
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
  "_RKMIMETypeJSON", referenced from:
      -[classname-xxxinitWithURLBase:timeOut:] in classname-xxx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation).

If in RestKit project, I change in "Build Settings" -> "Architectures" the "Standard architectures (ARMv7, armv7s)" by Standard architectures (including 64-bit) (ARMv7, armv7s, arm64) option, everything compiles fine . Is this correct?, Does not bring any result, I have to change some other settings.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Jose Rodriguez
  • 9,753
  • 13
  • 36
  • 52
  • Did you try changing in **your** project and in **RestKit** "Build Settings" -> "Architectures" to "Standard architectures (ARMv7, armv7s)"? – Refael.S Jan 04 '14 at 21:26
  • I change in my project and in RestKit to "Standard architectures (including 64-bit) (ARMv7, armv7s, arm64)". – Jose Rodriguez Jan 04 '14 at 22:02
  • So whats the question? you build succeeds but archive doesn't? – Refael.S Jan 04 '14 at 22:08
  • My question is, if it brings no disadvantages or if I have to add some other configuration. Because RestKit has by default"Standard architectures (ARMv7, armv7s)" on "Build Settings" -> "Architectures". – Jose Rodriguez Jan 04 '14 at 22:30
  • What I wrote to you below answers your question? – Refael.S Jan 05 '14 at 15:35

6 Answers6

7
  1. Select Restkit project
  2. Set the Build Active Architecture Only to No

Build Active Architecture Only

Js Lim
  • 3,625
  • 6
  • 42
  • 80
6

It just means you are building your project also for 64bit (iPhone 5s) and nothing to worry about, see this link for some more explanations: Xcode 5 and iOS 7: Architecture and Valid architectures

Community
  • 1
  • 1
Refael.S
  • 1,634
  • 1
  • 12
  • 22
3

Just change in RestKit project -> Build Settings -> Architectures to Standard Architecture (armv7, armv7s, arm64). After that everything should work.

lukszar
  • 1,252
  • 10
  • 13
1

This worked for me:

ios sdk 9.3

into your build setting of app.xcodeproj valid architecture: armv7 armv7s Build Active architecture : No

Clean and build , worked for me.

Shashank Saxena
  • 2,014
  • 17
  • 11
1

In my case i forgot to add sqlite library in my project. After adding library from Linked framework and library the build was successful.

Arvind Kumar
  • 2,371
  • 1
  • 18
  • 25
0

I ran into the same/similar issue implementing AVPictureInPictureController and the issue was that I wasn't linking the AVKit framework in my project.

The error message was:

Undefined symbols for architecture armv7:

"_OBJC_CLASS_$_AVPictureInPictureController", 
referenced from:
   objc-class-ref in yourTarget.a(yourObject.o)
ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation) The Solution:

Go to your Project Select your Target Then, go to Build Phases Open Link Binary With Libraries Finally, just add + the AVKit framework / any other framework. Hopefully this helps someone else running into a similar issue I had.

Keshav
  • 2,965
  • 3
  • 25
  • 30