Hyperfine
Hyperfine

Reputation: 91

iOS app builds on device, but not Simulator

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'.

Upvotes: 1

Views: 394

Answers (1)

Jeremy Huddleston Sequoia
Jeremy Huddleston Sequoia

Reputation: 23651

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).

Upvotes: 0

Related Questions