我曾经使用现在的相同设置在iPhone 4s上构建和运行该软件以进行测试,并且运行良好,现在我正尝试在iPhone 5S上运行该软件以进行测试,但它不起作用。
Phonegap GAplugin和arm64存在一个已知问题,我曾使用该问题从目标中的有效体系结构中删除了arm64。
第一次尝试,出现以下错误:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s).
我将目标上的“仅构建 Activity 体系结构”更改为“否”,然后出现以下错误:
Undefined symbols for architecture armv7:
"_CDVPageDidLoadNotification", referenced from:
-[CDVSplashScreen pluginInitialize] in CDVSplashScreen.o
"_OBJC_CLASS_$_CDVWebViewDelegate", referenced from:
objc-class-ref in CDVInAppBrowser.o
"_OBJC_METACLASS_$_CDVPlugin", referenced from:
_OBJC_METACLASS_$_GAPlugin in GAPlugin.o
_OBJC_METACLASS_$_IonicKeyboard in IonicKeyboard.o
_OBJC_METACLASS_$_CDVBarcodeScanner in CDVBarcodeScanner.o
_OBJC_METACLASS_$_DFPPlugin in DFPPlugin.o
_OBJC_METACLASS_$_PushNotification in PushNotification.o
_OBJC_METACLASS_$_SocialSharing in SocialSharing.o
_OBJC_METACLASS_$_CDVDevice in CDVDevice.o
...
"_CDVLocalNotification", referenced from:
-[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o
objc-class-ref in CDVDevice.o
l_OBJC_$_CATEGORY_CDVViewController_$_StatusBar in CDVStatusBar.o
"_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
"_OBJC_CLASS_$_CDVUserAgentUtil", referenced from:
objc-class-ref in CDVInAppBrowser.o
"_CDVRemoteNotification", referenced from:
-[AppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] in AppDelegate.o
"_OBJC_CLASS_$_CDVCommandQueue", referenced from:
_OBJC_CLASS_$_MainCommandQueue in MainViewController.o
"_OBJC_CLASS_$_CDVPlugin", referenced from:
_OBJC_CLASS_$_GAPlugin in GAPlugin.o
_OBJC_CLASS_$_IonicKeyboard in IonicKeyboard.o
_OBJC_CLASS_$_CDVBarcodeScanner in CDVBarcodeScanner.o
_OBJC_CLASS_$_DFPPlugin in DFPPlugin.o
_OBJC_CLASS_$_PushNotification in PushNotification.o
_OBJC_CLASS_$_SocialSharing in SocialSharing.o
_OBJC_CLASS_$_CDVDevice in CDVDevice.o
...
"_CDVRemoteNotificationError", referenced from:
-[AppDelegate application:didFailToRegisterForRemoteNotificationsWithError:] in AppDelegate.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
"_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
_OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
"_CDVPluginHandleOpenURLNotification", referenced from:
-[AppDelegate application:openURL:sourceApplication:annotation:] in AppDelegate.o
-[CDVInAppBrowser openInSystem:] in CDVInAppBrowser.o
-[FacebookConnectPlugin initWithWebView:] in FacebookConnectPlugin.o
"_OBJC_CLASS_$_CDVPluginResult", referenced from:
objc-class-ref in GAPlugin.o
objc-class-ref in CDVBarcodeScanner.o
objc-class-ref in DFPPlugin.o
objc-class-ref in PushNotification.o
objc-class-ref in SocialSharing.o
objc-class-ref in CDVDevice.o
objc-class-ref in CDVNotification.o
...
"_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
奇怪的是,我仍然可以使用“cordova run ios”在新设置上测试该应用程序,但是我无法为其构建发行版!我该怎么办?
科尔多瓦版本:4.1.2
Xcode版本:6.1
测试设备:具有iOS 8的iPhone 5S
Cordova插件
最佳答案
有同样的问题……可能是过时的Xcode项目。我只运行了以下命令:
cordova platform remove ios
cordova platform add ios
然后打开新的Xcode项目并运行,它对我有用!
关于ios - 无法使用Xcode构建/运行iOS应用,但是“cordova run ios”可以正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27136603/