![](/img/trans.png)
[英]Phonegap Build - Error - app does not support the compulsory arm64 (64-bit support) architecture
[英]Issues updating Phonegap iOS app for 64-bit architecture
我有一个带有许多插件的phonegap应用程序,可以在iOS设备上正常运行。 但是,我目前正在使用$(ARCHS_STANDARD_32_BIT)用于xcode中的体系结构,现在我认为我需要在架构设置中将其更新为$(ARCHS_STANDARD),并根据Apple 2015年2月1日的要求将arm64包含为有效体系结构。
当我尝试在iPhone 6上运行项目时,我现在收到16个错误,复制如下。 2个问题:
1)我是否需要使用第1段中提到的archs_standard和arm64更改?
2)如何解决这些问题,以便提交我的应用程序? 我正在使用的个别插件是否存在问题? 我是否需要找到更新版本(或更新自己)错误中列出的每个插件或与其他内容相关的问题? 在我看过的一些插件上,我没有看到64位的更新,所以不确定这是不是问题所在。 我对Obj C不是很熟悉,所以在此感谢任何帮助!
在此先感谢您的帮助!
错误消息:
架构arm64的未定义符号:“_ CDVPageDidLoadNotification”,引用自: - CDVSplashScreen.o中的[CDVSplashScreen pluginInitialize]“_OBJC_CLASS _ $ _ CDVInvokedUrlCommand”,引用自:CDVFile.o中的objc-class-ref“_OBJC_METACLASS _ $ _ CDVCommandQueue”,引自:_OBJC_METACLASS_ $ _MainCommandQueue在MainViewController.o “_OBJC_CLASS _ $ _ CDVPlugin”,从引用:_OBJC_CLASS _ $ _ CDVLocation在CDVLocation.o _OBJC_CLASS _ $ _ FacebookConnectPlugin在FacebookConnectPlugin.o _OBJC_CLASS _ $ _ IonicKeyboard在IonicKeyboard.o _OBJC_CLASS _ $ _ CDVInAppBrowser在CDVInAppBrowser.o _OBJC_CLASS _ $ _ APPEmailComposer在APPEmailComposer.o _ CDJSt_CLASS _ $ _ CDVStatusBar in CDVStatusBar.o _OBJC_CLASS _ $ _ CDVVibration in CDVVibration.o ...“_ OBJC_METACLASS _ $ _ CDVViewController”,引用自:_OBJC_METACLASS _ $ _ MainViewController in MainViewController.o“_ CDVLocalNotification”,引自: - AppDelegate中的[AppDelegate application:didReceiveLocalNotification:] .o“_ OBJC_CLASS _ $ _ CDVViewControll er“,引用自:l_OBJC _ $ _ CATEGORY_CDVViewController _ $ _ StatusBar in CDVStatusBar.o _OBJC_CLASS _ $ _ MainViewController in MainViewController.o objc-class-ref in CDVFile.o”_ OBJC_METACLASS _ $ _ CDVCommandDelegateImpl“,引自:_OBJC_METACLASS _ $ _ MainCommandDelegate in MainViewController.o”_OBJC_CLASS_ $ _CDVWebViewDelegate“,引自:CDVInAppBrowser.o中的objc-class-ref”_OBJC_CLASS _ $ _ CDVCommandQueue“,引自:MainViewController.o中的_OBJC_CLASS _ $ _ MainCommandQueue”_OBJC_CLASS _ $ _ CDVUserAgentUtil“,引用自:CDVInAppBrowser.o中的objc-class-ref” _CDVPluginHandleOpenURLNotification“,引自: - AppDelegate.o中的[AppDelegate应用程序:handleOpenURL:] - CDVInAppBrowser.o中的[CDVInAppBrowser openInSystem:]”_ OBJC_CLASS _ $ _ CDVCommandDelegateImpl“,引自:MainViewController.o中的_OBJC_CLASS _ $ _ MainCommandDelegate”_OBJC_CLASS _ $ _ CDVPluginResult“,引自:在FacebookConnectPlugin.o objc-class-ref中的CDVLocation.o objc-class-ref中的objc-class-ref 在CDVInAppBrowser.o objc-class-ref中的APPEmailComposer.o objc-class-ref in CDVStatusBar.o objc-class-ref in CDVLocalFilesystem.o objc-class-ref in PushPlugin.o ...“_ OBJC_METACLASS _ $ _ CDVPlugin”,引用来自:_OBJC_METACLASS _ $ _ CDVLocation在CDVLocation.o _OBJC_METACLASS _ $ _ FacebookConnectPlugin在FacebookConnectPlugin.o _OBJC_METACLASS _ $ _ IonicKeyboard在IonicKeyboard.o _OBJC_METACLASS _ $ _ CDVInAppBrowser在CDVInAppBrowser.o _OBJC_METACLASS _ $ _ APPEmailComposer在APPEmailComposer.o _OBJC_METACLASS _ $ _ CDVStatusBar在CDVStatusBar.o _OBJC_METACLASS _ $ _ CDVVibration在CDVVibration。 o ... ld:找不到架构arm64 clang的符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)
1)我是否需要使用第1段中提到的archs_standard和arm64更改?
是的,如果要将应用程序提交到商店,则必须使用$(ARCHS_STANDARD)
和arm64。
2)如何解决这些问题,以便提交我的应用程序? 我正在使用的个别插件是否存在问题? 我是否需要找到更新版本(或更新自己)错误中列出的每个插件或与其他内容相关的问题? 在我看过的一些插件上,我没有看到64位的更新,所以不确定这是不是问题所在。 我对Obj C不是很熟悉,所以在此感谢任何帮助!
插件很好,问题是cordovaLib项目。 您还必须将cordovaLib项目更改为$(ARCHS_STANDARD)
并重建libCordova.a,甚至更好,使用大于3.4的cordova版本,其中包括64位支持。
编辑:链接manihiki提供的更多详细信息:
您需要更新项目中的Build Settings。 这些步骤在本期中提及并转载如下:
//Update build settings for your project
Select your Project icon Choose Build Settings.
For “Architectures”, select $ARCHS_STANDARD – Standard architectures (armv7, armv7s, arm64)
For “Valid Architectures”, add “arm64″
//Update build settings for cordovaLib project
Select your CordovaLib.xcodeproj icon
In the Build Settings for the Project (not Target), delete *all* the conditional architecture settings (hover to see the minus sign). This is what is recommended by Apple in their Xcode 5.1 Release Notes.
For “Architectures”, select $ARCHS_STANDARD – Standard architectures(armv7, armv7s, arm64)
For “Valid Architectures”, add “arm64″
//Update build settings for the Target
In the Build Settings for the Target, delete *all* the conditional architecture settings (hover to see the minus sign).
For “Architectures”, select $ARCHS_STANDARD – Standard architectures (armv7, armv7s, arm64)
For “Valid Architectures”, add “arm64″
某些插件可能无法正常工作,您必须对CordovaLib/Classes/CDVCommandQueue.m
进行此更改。
objc_msgSend(obj, normalSelector, command);
对此
((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command);
以及CordovaLib/Classes/CDVViewController.m
改变这一点
if ((BOOL)objc_msgSend(plugin, selector, request, navigationType) == YES)
对此:
if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType) == YES)
所有细节都可以在这里找到https://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/
我继承了一个传统的PhoneGap / Cordova应用程序,并在将架构构建设置更改为$(ARCHS_STANDARD)
时收到了许多类似的错误。
在更新(删除然后添加)两个PhoneGap插件(总共九个)之后,我能够成功构建,并且每次都删除/添加PhoneGap iOS平台。 具体来说,插件是com.phonegap.plugins.barcodescanner
和org.apache.cordova.geolocation
。 我通过在错误中搜索类名来确定这两个插件,并确定它们与哪些插件相关。
要“更新”插件:
cordova plugin rm com.phonegap.plugins.barcodescanner
cordova plugin add com.phonegap.plugins.barcodescanner
要删除/添加PhoneGap / Cordova ios平台:
cordova platform remove ios
cordova platform add ios
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.