gpt4 book ai didi

ios - 无法使用 Xcode 构建/运行 iOS 应用程序,但是 'cordova run ios' 工作正常

转载 作者:行者123 更新时间:2023-12-01 18:12:52 25 4
gpt4 key购买 nike

我曾经在我现在拥有的相同设置上构建并运行它以在 iPhone 4s 上进行测试,它工作正常,现在我试图在 iPhone 5S 上运行它以进行测试,但它不起作用。

Phonegap GAplugin 和 arm64 存在一个已知问题,我用它从目标中的有效架构中删除 arm64。

我第一次尝试时,出现以下错误:

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s).

我将目标上的“仅构建事件架构”更改为“否”,然后出现以下错误:
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”在新设置上测试应用程序,但我无法构建它以供发布!我该怎么办?

Cordova 版本: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 “条形码扫描仪”
  • com.phonegap.plugins.facebookconnect 0.10.0 “Facebook 连接”
  • com.postmedia.DFPPlugin 0.0.4 "DFPPlugin"
  • com.pushwoosh.plugins.pushwoosh 3.3.0 “Pushwoosh”
  • nl.x-services.plugins.socialsharing 4.3.8 “社交共享”
  • 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 “闪屏”
  • org.apache.cordova.statusbar 0.1.8 “状态栏”
  • 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/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com