cordova ios 开发微信支付遇到编译失败

提示内容:
Undefined symbols for architecture armv7:
“_CNCopyCurrentNetworkInfo”, referenced from:
-[MTAWXOHelper fetchSSIDInfo] in libWeChatSDK.a(MTAWXOHelper.o)
“_SCNetworkReachabilitySetDispatchQueue”, referenced from:
-[MTAWXOReachability startNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability stopNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
“_CNCopySupportedInterfaces”, referenced from:
-[MTAWXOHelper fetchSSIDInfo] in libWeChatSDK.a(MTAWXOHelper.o)
“_SCError”, referenced from:
-[MTAWXOReachability startNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
“_SCErrorString”, referenced from:
-[MTAWXOReachability startNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
“_SCNetworkReachabilityGetFlags”, referenced from:
-[MTAWXOReachability isReachable] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability isReachableViaWWAN] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability isReachableViaWiFi] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability connectionRequired] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability isConnectionOnDemand] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability isInterventionRequired] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability reachabilityFlags] in libWeChatSDK.a(MTAWXOReachability.o)

“_SCNetworkReachabilitySetCallback”, referenced from:
-[MTAWXOReachability startNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
-[MTAWXOReachability stopNotifier] in libWeChatSDK.a(MTAWXOReachability.o)
“_SCNetworkReachabilityCreateWithAddress”, referenced from:
+[MTAWXOReachability reachabilityWithAddress:] in libWeChatSDK.a(MTAWXOReachability.o)
“_SCNetworkReachabilityCreateWithName”, referenced from:
+[MTAWXOReachability reachabilityWithHostname:] in libWeChatSDK.a(MTAWXOReachability.o)
“_kSecValueData”, referenced from:
+[MTAWXOKeyChain save:data:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecReturnData”, referenced from:
+[MTAWXOKeyChain load:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_SecItemCopyMatching”, referenced from:
+[MTAWXOKeyChain load:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecClass”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecMatchLimit”, referenced from:
+[MTAWXOKeyChain load:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecClassGenericPassword”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecAttrService”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecMatchLimitOne”, referenced from:
+[MTAWXOKeyChain load:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecAttrAccount”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecAttrAccessibleAfterFirstUnlock”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_kSecAttrAccessible”, referenced from:
+[MTAWXOKeyChain getKeychainQuery:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_SecItemDelete”, referenced from:
+[MTAWXOKeyChain save:data:] in libWeChatSDK.a(MTAWXOKeyChain.o)
+[MTAWXOKeyChain delete:] in libWeChatSDK.a(MTAWXOKeyChain.o)
“_SecItemAdd”, referenced from:
+[MTAWXOKeyChain save:data:] in libWeChatSDK.a(MTAWXOKeyChain.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

网上找到方法地址:
http://www.bubuko.com/infodetail-1003524.html
http://stackoverflow.com/questions/11013997/strange-errors-in-apples-reachability-files

解决方法:
Add these frameworks: SystemConfiguration.framework Security.framework CFNetwork.framework

发表评论

您的电子邮箱地址不会被公开。