0

I am building and running my Xcode app but I get a build failed message on account of the following error message:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_SFAccountManager", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFApplication", referenced from:
      objc-class-ref in main.o
  "_OBJC_CLASS_$_SFAuthenticationManager", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFLogger", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFRestAPI", referenced from:
      objc-class-ref in OrderVC.o
      objc-class-ref in PerformanceVC.o
      objc-class-ref in CustomerDetailsVC.o
      objc-class-ref in AppDelegate.o
  "_kSFLoginHostChangedNotification", referenced from:
      -[AppDelegate init] in AppDelegate.o
      -[AppDelegate dealloc] in AppDelegate.o
  "_kSFUserLogoutNotification", referenced from:
      -[AppDelegate init] in AppDelegate.o
      -[AppDelegate dealloc] in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How do I resolve this/these issue(s)?

Bartley
  • 290
  • 2
  • 7
  • 21

3 Answers3

4

I would set Architectures in your project to $(ARCHS_STANDARD_32_BIT), which will do the right thing for both iOS builds and OS X / simulator builds.

The problem is that your library is not built for x86_64, but your project is trying to build for both i386 and x86_64, so the link step fails. Apple changed the default architecture in Xcode 5.1 to include 64-bit architectures.

See these other questions for more info:

Community
  • 1
  • 1
z00b
  • 356
  • 2
  • 3
2

Click on your project in xcode and go to build settings -> valid architectures and remove arm64 also change Standard Architectures to armv7 and armv7s .Clean and rerun the project

codester
  • 36,891
  • 10
  • 74
  • 72
1

It looks like you need to include the Salesforce Mobile SDK iOS framework in your project.

Cris
  • 464
  • 1
  • 3
  • 15