4

Trying to get my app ready for arm64 and updating all my pods. I updated all the pods but getting this error so app will not compile.

    Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AFHTTPClient", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_AFJSONRequestOperation", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_AFNetworkActivityIndicatorManager", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKAttributeMapping", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKEntityMapping", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKErrorMessage", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKManagedObjectStore", referenced from:
      objc-class-ref in MYAPP.o
      objc-class-ref in NSManagedObject+ActiveRecord.o
  "_OBJC_CLASS_$_RKObjectManager", referenced from:
      objc-class-ref in MYAPP.o
      _OBJC_CLASS_$_STObjectManager in STObjectManager.o
      objc-class-ref in NSManagedObject+EasyFetching.o
  "_OBJC_CLASS_$_RKObjectMapping", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKRelationshipMapping", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKRequestDescriptor", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKResponseDescriptor", referenced from:
      objc-class-ref in MYAPP.o
  "_OBJC_CLASS_$_RKRoute", referenced from:
      objc-class-ref in MYAPP.o
Hossein Narimani Rad
  • 31,361
  • 18
  • 86
  • 116
jdog
  • 10,351
  • 29
  • 90
  • 165
  • Looks like you need to add AFNetworking and RestKit. – rmaddy Apr 11 '15 at 04:40
  • I did via pods? This seems like more of 64 bit vs. 32 bit issue given the "x86_64" info. – jdog Apr 11 '15 at 17:39
  • What is your project file's `Build Active Architecture Only` build setting set to? – Brian Apr 13 '15 at 22:55
  • 4
    Have you checked this link http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64 – Mustafa Ibrahim Apr 13 '15 at 23:08
  • THE BAAO is set to NO. – jdog Apr 14 '15 at 15:34
  • Kindly refer https://github.com/CocoaPods/CocoaPods/issues/2545... Hope it solve your issue.. – Nilesh Patel Apr 16 '15 at 06:47
  • @jdog Do you have `armv7 armv7s arm64` for `Valid Architectures` setting and and `Standard Architectures (armv7, arm64)` for `Architectures` setting for **both** your **Target** and your **Project** `Build Settings` for RestKit and others? – Shobhit Puri Apr 20 '15 at 17:44
  • Have you tried rolling back to Cocoapods v0.35? I had a similar issue with RestKit and Cocoapods v0.36.x and rolling it back was the only thing that worked. – Stakenborg Apr 20 '15 at 19:10
  • Now that I remember it, it was specifically the new xcodeproj gem that comes with Cocoapods v0.36.x. I pushed that back to v0.20.0 as well. Not sure what's actually causing it, but rolling back to v0.35 for Cocoapods and ensuring you have the older 0.20.0 version of xcodeproj as well should fix this problem in the short term. – Stakenborg Apr 20 '15 at 19:14

2 Answers2

1

There's a couple of things that might fix this:

  1. Check Your-Workspace/Build Settings and Pods/Build Settings for the following items: Architectures, Build Active Architecture Only, Valid Architectures. All three should match between both workspaces.

  2. Try cleaning (CMD-Shift-K) and also cleaning the build folder (CMD-Option-Shift-K).

David Schwartz
  • 507
  • 3
  • 14
0

I fixed this by going back from 1.0.1 version to 0.39.0.beta.3 version of cocoapods.