简体   繁体   English

iOS应用程序建立在设备上,但不是模拟器

[英]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'. 当配置设置为“Release”时,我的iOS应用程序无法在Simulator上构建。 'Debug' builds fine. 'Debug'构建良好。 Additionally, both 'Release' and 'Debug' configurations build on a real device. 此外,“发布”和“调试”配置都构建在真实设备上。 In Xcode, the error is: 在Xcode中,错误是:

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'. 这里也有一个类似的问题,但似乎没有包括'Debug'和'Release'之间的差异。

That error just means that the code that provides the BMWAnalytics class is not being linked into your executable. 该错误仅表示提供BMWAnalytics类的代码未链接到您的可执行文件中。

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). 您需要确保BMWAnalytics类的@implementation由目标中包含的文件(或目标链接的库中)提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM