【问题标题】:IOS architecture 64bitsIOS架构64位
【发布时间】:2015-08-27 07:05:31
【问题描述】:

我们的 phonegap 应用程序在 iphone 模拟器上构建良好,但在 iphone 上构建应用程序时会产生链接器错误。唯一改变的是安装 testflight 和一个测试应用程序。

我们已经删除了 testflight 和测试应用,但链接器错误仍然存​​在。

关于如何解决这个问题的任何想法?

我们使用的是 xcode 6.2 和 ordova 3.4.0

错误:

ld: warning: ignoring file /Users/gusph/Library/Developer/Xcode/DerivedData/momitSHDApp-evgpydfzbrlcmzazjhmquxttnqnq/Build/Products/Debug-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (arm64): /Users/gusph/Library/Developer/Xcode/DerivedData/momitSHDApp-evgpydfzbrlcmzazjhmquxttnqnq/Build/Products/Debug-iphoneos/libCordova.a
Undefined symbols for architecture arm64:
  "_CDVPageDidLoadNotification", referenced from:
      -[CDVSplashScreen pluginInitialize] in CDVSplashScreen.o
  "_OBJC_CLASS_$_CDVWebViewDelegate", referenced from:
      objc-class-ref in CDVInAppBrowser.o
  "_OBJC_CLASS_$_CDVInvokedUrlCommand", referenced from:
      objc-class-ref in CDVFile.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
      objc-class-ref in CDVFile.o
  "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVUserAgentUtil", referenced from:
      objc-class-ref in CDVInAppBrowser.o
  "_OBJC_CLASS_$_CDVCommandQueue", referenced from:
      _OBJC_CLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_CLASS_$_CDVPlugin", referenced from:
      _OBJC_CLASS_$_NotificationsNode in NotificationsNode.o
      _OBJC_CLASS_$_CDVConnection in CDVConnection.o
      _OBJC_CLASS_$_CDVCamera in CDVCamera.o
      _OBJC_CLASS_$_CDVBattery in CDVBattery.o
      _OBJC_CLASS_$_CDVLogger in CDVLogger.o
      _OBJC_CLASS_$_CDVContacts in CDVContacts.o
      _OBJC_CLASS_$_CDVDevice in CDVDevice.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:handleOpenURL:] in AppDelegate.o
      -[CDVInAppBrowser openInSystem:] in CDVInAppBrowser.o
  "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVPluginResult", referenced from:
      objc-class-ref in NotificationsNode.o
      objc-class-ref in CDVConnection.o
      objc-class-ref in CDVCamera.o
      objc-class-ref in CDVBattery.o
      objc-class-ref in CDVContacts.o
      objc-class-ref in CDVDevice.o
      objc-class-ref in CDVAccelerometer.o
      ...
  "_OBJC_METACLASS_$_CDVPlugin", referenced from:
      _OBJC_METACLASS_$_NotificationsNode in NotificationsNode.o
      _OBJC_METACLASS_$_CDVConnection in CDVConnection.o
      _OBJC_METACLASS_$_CDVCamera in CDVCamera.o
      _OBJC_METACLASS_$_CDVBattery in CDVBattery.o
      _OBJC_METACLASS_$_CDVLogger in CDVLogger.o
      _OBJC_METACLASS_$_CDVContacts in CDVContacts.o
      _OBJC_METACLASS_$_CDVDevice in CDVDevice.o
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

    标签: ios iphone xcode cordova app-store-connect


    【解决方案1】:

    这个链接器错误信息是关键:

    .../libCordova.a, file was built for archive which is not the architecture being linked (arm64)
    

    OSX 和 iOS 下的静态和动态库是,因为它们可以保存多个 CPU 架构的代码。该库没有arm64 架构,因此无法使用。

    解决方案是获取支持arm64 的版本。如果您正在构建该库,那么您在构建它时不包括 CPU 架构。

    【讨论】:

      【解决方案2】:

      来自this link

      This means that starting at that time, Cordova-based apps 
      should be built using a version of Cordova that has 64-bit iOS support.
      
      The first version of Cordova to include 64-bit for iOS is 3.4.1. 
      Therefore, to meet these requirements of the Apple App Store, you should be 
      using at least version 3.4.1 of Cordova before this February deadline.
      

      确保您使用的是内置 64 位架构的 Cordova 版本。您当前使用的似乎是没有(旧版本)的版本。

      【讨论】:

        【解决方案3】:

        从 CordovaLib 目标的有效架构中删除 arm64,
        还将“否”设置为仅构建活动架构,
        对主应用进行相同的设置。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2015-03-22
          • 2015-03-13
          • 2015-03-31
          • 2017-02-05
          • 1970-01-01
          • 2019-11-12
          • 2014-01-10
          • 1970-01-01
          相关资源
          最近更新 更多