1

I have an iOS app that fails to build on Simulator when the configuration is set to 'Release'. 'Debug' builds fine. Additionally, both 'Release' and 'Debug' configurations build on a real device. In Xcode, the error is:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_BMWAnalytics", referenced from:
 objc-class-ref in BMWManager.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've tried resetting the simulator, cleaning the project, and deleting derived data. What is causing this error and how do I fix it? A similar question is found here, but does not seem to include the discrepancy between 'Debug' and 'Release'.

Community
  • 1
  • 1
Hyperfine
  • 91
  • 7
  • 1
    Out of curiosity, why are you doing a Release build against the simulator? There's no point for that. Use debug builds to do some basic testing but real Release builds should to be tested on real devices. – rmaddy Sep 16 '16 at 21:39

1 Answers1

0

That error just means that the code that provides the BMWAnalytics class is not being linked into your executable.

You need to make sure that the BMWAnalytics class's @implementation is provided by a file included in your target (or in a library that your target links against).

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86