我正在与Cordova一起运行cordova build ios
并收到此错误:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ESUserInfoResponse", referenced from:
l_OBJC_$_CATEGORY_ESUserInfoResponse_$_TMConvenience in TicketmasterSDK(ESUserInfoResponse+TMConvenience.o)
"_OBJC_CLASS_$_ESConfig", referenced from:
objc-class-ref in TicketmasterSDK(TMExperienceController.o)
"_OBJC_CLASS_$_ESProductInfoResponse", referenced from:
l_OBJC_$_CATEGORY_ESProductInfoResponse_$_Convenience in TicketmasterSDK(ESProductInfoResponse+Convenience.o)
"_OBJC_CLASS_$_ExperienceSDK", referenced from:
objc-class-ref in TicketmasterSDK(TMExperienceController.o)
"_OBJC_CLASS_$_ESUserInfo", referenced from:
objc-class-ref in TicketmasterSDK(TMExperienceController.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经关注了这个问题:iPad Safari scrolling causes HTML elements to disappear and reappear with a delay 主要的.h和.m是由Cordova生成的,我使用Swift作为自定义插件。
它在打开Xcode工作区并在Simulator中运行时构建并运行,但在通过Cordova进行编译时出错。我该如何解决这个问题?如何才能了解Cordova如何为iOS本地构建?
答案 0 :(得分:1)
项目中可能缺少部分文件。如果您将自定义代码添加到AppDelegate.m文件,然后在xCode中打开项目,单击第一个名为Navigator的选项卡,单击Classes文件夹,然后选择“将文件添加到[项目]”。添加您在那里引用的丢失文件,然后点击Build。它现在应该工作。它对我有用!