使用Xcode 8.2和Swift 2.3 Card.io的错误
问题描述:
我试图在使用cocoaPods安装Card.io时在我的设备上运行我的项目(iPhone 7 Plus:我已经将我的固件DiskImage复制到此Xcode文件夹) Xcode(8.2)与Swift 2.3。使用Xcode 8.2和Swift 2.3 Card.io的错误
但compilator表明我这个错误:
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)
已经存在于我的其他链接器标志一节。
我无法弄清楚它为什么不能在我的系统上工作。任何帮助将不胜感激。
答
尝试使用这个版本
pod 'CardIO', :git => ' https://github.com/card-io/card.io-iOS-SDK.git ', :tag => '5.4.1'*
添加下列头文件
#import <CardIO.h>
不要忘记在构建设置将“心”在其他链接器标记