我曾经使用现在的相同设置在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插件
  • com.adobe.plugins.GAPlugin 2.3.1“GAPlugin”
  • com.google.playservices 18.0.0“适用于Android的Google Play服务”
  • com.ionic.keyboard 1.0.3“键盘”
  • com.phonegap.plugins.barcodescanner 2.0.0“BarcodeScanner”
  • com.phonegap.plugins.facebookconnect 0.10.0“Facebook Connect”
  • com.postmedia.DFPPlugin 0.0.4“DFPPlugin”
  • com.pushwoosh.plugins.pushwoosh 3.3.0“Pushwoosh”
  • nl.x-services.plugins.socialsharing 4.3.8“SocialSharing”
  • org.apache.cordova.device 0.2.12“设备”
  • org.apache.cordova.dialogs 0.2.10“通知”
  • org.apache.cordova.geolocation 0.3.10“地理位置”
  • org.apache.cordova.globalization 0.2.8“全球化”
  • org.apache.cordova.inappbrowser 0.5.3“InAppBrowser”
  • org.apache.cordova.network-information 0.2.10“网络信息”
  • org.apache.cordova.splashscreen 0.3.3“Splashscreen”
  • org.apache.cordova.statusbar 0.1.8“StatusBar”
  • org.pushandplay.cordova.apprate 1.1“AppRate”
  • 最佳答案

    有同样的问题……可能是过时的Xcode项目。我只运行了以下命令:

    cordova platform remove ios
    cordova platform add ios
    

    然后打开新的Xcode项目并运行,它对我有用!

    关于ios - 无法使用Xcode构建/运行iOS应用,但是“cordova run ios”可以正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27136603/

    10-14 18:49
    查看更多