【问题标题】:Error with Card.io using Xcode 8.2 and Swift 2.3Card.io 使用 Xcode 8.2 和 Swift 2.3 时出错
【发布时间】:2017-07-29 06:26:02
【问题描述】:

我正在尝试在我的设备(iPhone 7 Plus:我已经将我的固件 DiskImage 复制到此 Xcode 文件夹)上运行我的项目,并使用带有 Swift 2.3 的 Xcode (8.2) 上的 cocoaPods 安装 Card.io。

但是编译器向我显示了这个错误:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CardIOPaymentViewController", referenced from:
type metadata accessor for __ObjC.CardIOPaymentViewController in CheckoutViewController.o
  "_OBJC_CLASS_$_CardIOUtilities", referenced from:
type metadata accessor for __ObjC.CardIOUtilities in CheckoutViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我的 Podfile 包含:

 pod 'PureLayout'
 pod 'Fabric', '~> 1.6.8'
 pod 'Crashlytics'
 pod 'AFNetworking'
 pod 'RealmSwift', '~> 0.98.6'
 pod 'MBProgressHUD'
 pod 'SDWebImage'
 pod 'HCSStarRatingView'
 pod 'DateTools'
 pod 'SWTableViewCell'
 pod 'Stripe'
 pod 'CardIO'
 pod 'SAMTextView'
 pod 'IQKeyboardManagerSwift', '4.0.5'

我刚刚输入了pod install 并启动了它创建的.xcworkspace

我尝试在模拟器上运行它,但我无法让它工作。谁能帮帮我?

我也尝试了这篇文章的解决方案: CocoaPods error with Card.io.

但是$(inherited) 已经存在于我的Other Linker Flags部分中。

我无法弄清楚为什么它不能在我的系统上运行。任何帮助将不胜感激。

【问题讨论】:

    标签: ios xcode cocoapods swift2.3 xcode8.2


    【解决方案1】:

    尝试使用这个版本

    pod 'CardIO', :git => 'https://github.com/card-io/card.io-iOS-SDK.git', :tag => '5.4.1'*

    在头文件中添加以下内容

    #import <CardIO.h>
    

    不要忘记在 Build Settings 的 Other Linker Flags 中添加“CardIO”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多