我和MKStoreKit 5一起犯了这个错误.
我在所有MKStoreKit文件上添加了-objc-arc标志,但是我收到了这个错误.
我在所有MKStoreKit文件上添加了-objc-arc标志,但是我收到了这个错误.
Ld /Users/Benoit/Library/Developer/Xcode/DerivedData/NaNowar-fpyxztssnpchdoalmoynsjjmsekg/Build/Products/Debug-iphonesimulator/NaNowar.app/NaNowar normal i386
cd /Users/Benoit/Workshop/DropBox/NaNowar2_Iphone
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator6.0.sdk -L/Users/Benoit/Library/Developer/Xcode/DerivedData/NaNowar-fpyxztssnpchdoalmoynsjjmsekg/Build/Products/Debug-iphonesimulator -L/Users/Benoit/Workshop/DropBox/NaNowar2_Iphone/NaNowar2/libs/TestFlightSDK1.0 -L/Users/Benoit/Workshop/DropBox/NaNowar2_Iphone/../../iOS/Chartboost -L/Users/Benoit/Workshop/DropBox/NaNowar2_Iphone/NaNowar2/libs/Chartboost -F/Users/Benoit/Library/Developer/Xcode/DerivedData/NaNowar-fpyxztssnpchdoalmoynsjjmsekg/Build/Products/Debug-iphonesimulator -F/Users/Benoit/Workshop/DropBox/NaNowar2_Iphone -filelist /Users/Benoit/Library/Developer/Xcode/DerivedData/NaNowar-fpyxztssnpchdoalmoynsjjmsekg/Build/Intermediates/NaNowar.build/Debug-iphonesimulator/NaNowar.build/Objects-normal/i386/NaNowar.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -lz -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.3 -framework StoreKit -weak_framework Social -weak_framework Twitter -weak_framework AdSupport -weak-lSystem -lz -framework GameKit -weak_framework SystemConfiguration -framework CFNetwork -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AudioToolBox -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -lTestFlight -lChartboost -o /Users/Benoit/Library/Developer/Xcode/DerivedData/NaNowar-fpyxztssnpchdoalmoynsjjmsekg/Build/Products/Debug-iphonesimulator/NaNowar.app/NaNowar
Undefined symbols for architecture i386:
"_SecCertificateCreateWithData",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecItemAdd",referenced from:
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
"_SecItemcopyMatching",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_SecItemDelete",referenced from:
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_SecItemUpdate",referenced from:
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
"_SecKeyRawVerify",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecPolicyCreateBasicX509",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecTrustcopyInfo",referenced from:
-[VerificationController validateTrust:error:] in VerificationController.o
"_SecTrustcopyPublicKey",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecTrustCreateWithCertificates",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecTrustEvaluate",referenced from:
_checkReceiptSecurity in VerificationController.o
-[VerificationController validateTrust:error:] in VerificationController.o
"_SecTrustGetCertificateCount",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecTrustSetAnchorCertificates",referenced from:
_checkReceiptSecurity in VerificationController.o
"_SecTrustSetVerifyDate",referenced from:
_checkReceiptSecurity in VerificationController.o
"_kSecAttrAccount",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecAttrLabel",referenced from:
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
"_kSecAttrService",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecclass",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecclassGenericPassword",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecReturnAttributes",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
+[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecReturnData",referenced from:
+[SFHFKeychainUtils getpasswordForUsername:andServiceName:error:] in SFHFKeychainUtils.o
"_kSecTrustInfoExtendedValidationKey",referenced from:
-[VerificationController validateTrust:error:] in VerificationController.o
"_kSecValueData",referenced from:
+[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in SFHFKeychainUtils.o
ld: symbol(s) not found for architecture i386
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
解决方法
您需要将项目与Security.framework链接 – 转到目标设置/构建阶段并将其添加到“Link Binary with Libraries”列表中: