react-native-pay icon indicating copy to clipboard operation
react-native-pay copied to clipboard

ios集成时候出现了些问题

Open h31639347 opened this issue 7 years ago • 3 comments

Libtool /Users/apple/Library/Developer/Xcode/DerivedData/XYJYLH-ghtasprlcybwzvfdypcuubscohqz/Build/Products/Debug-iphonesimulator/libReactNativePay.a normal x86_64 cd /Users/apple/react/ylhapp/ios/pay export IPHONEOS_DEPLOYMENT_TARGET=10.3 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -L/Users/apple/Library/Developer/Xcode/DerivedData/XYJYLH-ghtasprlcybwzvfdypcuubscohqz/Build/Products/Debug-iphonesimulator -L/Users/apple/react/ylhapp/ios/pay/PaySdk/微信 -filelist /Users/apple/Library/Developer/Xcode/DerivedData/XYJYLH-ghtasprlcybwzvfdypcuubscohqz/Build/Intermediates/ReactNativePay.build/Debug-iphonesimulator/ReactNativePay.build/Objects-normal/x86_64/ReactNativePay.LinkFileList /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libz.tbd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libc++.tbd -framework CoreMotion -framework CFNetwork -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreText -framework QuartzCore -framework CoreTelephony -framework SystemConfiguration /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libsqlite3.tbd -lWeChatSDK -framework AlipaySDK -o /Users/apple/Library/Developer/Xcode/DerivedData/XYJYLH-ghtasprlcybwzvfdypcuubscohqz/Build/Products/Debug-iphonesimulator/libReactNativePay.a

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libz.tbd (No such file or directory) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libc++.tbd (No such file or directory) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/usr/lib/libsqlite3.tbd (No such file or directory)

h31639347 avatar Apr 30 '17 07:04 h31639347

找不到动态链接库,不知道有没有遇到过,怎么解决他

h31639347 avatar Apr 30 '17 07:04 h31639347

用xcode打开这个项目 react-native-paysdk/ios/ReactNativePay.xcodeproj,

  1. in xcode->project target->build phases->link binary with libraries->delete all *.tbd references

  2. in xcode->project target->build settings->linking->other linker flags->add those dependencies: -l, such as: -lxml2 -lsqlite3

AlexanderYao avatar Aug 15 '17 02:08 AlexanderYao

@AlexanderYao 按你说的做了但是报linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/hemaApp.app/hemaApp normal arm64 cd /Users/pw/Desktop/work/hemaApp/ios export IPHONEOS_DEPLOYMENT_TARGET=8.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L/Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos -F/Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos -F/Users/pw/Desktop/work/hemaApp/ios -filelist /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Intermediates.noindex/hemaApp.build/Debug-iphoneos/hemaApp.build/Objects-normal/arm64/hemaApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Intermediates.noindex/hemaApp.build/Debug-iphoneos/hemaApp.build/Objects-normal/arm64/hemaApp_lto.o -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -lc++ -lz -framework Security -framework SystemConfiguration /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTWeChat.a -lsqlite3.0 -framework CoreTelephony -framework Bugly /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libReact.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTAnimation.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTImage.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTText.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libRCTWebSocket.a -lSplashScreen -lReactNativeExceptionHandler -lBugsnagReactNative -lReactNativePay -Xlinker -dependency_info -Xlinker /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Intermediates.noindex/hemaApp.build/Debug-iphoneos/hemaApp.build/Objects-normal/arm64/hemaApp_dependency_info.dat -o /Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/hemaApp.app/hemaApp

ld: warning: object file (/Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libReactNativePay.a(WXPay.o)) was built for newer iOS version (10.3) than being linked (8.0) ld: warning: object file (/Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libReactNativePay.a(WXApiManager.o)) was built for newer iOS version (10.3) than being linked (8.0) ld: warning: object file (/Users/pw/Library/Developer/Xcode/DerivedData/hemaApp-hkufdbdqnkxomxacjoraxykcbnkp/Build/Products/Debug-iphoneos/libReactNativePay.a(ReactNativePay.o)) was built for newer iOS version (10.3) than being linked (8.0) Undefined symbols for architecture arm64: "OBJC_CLASS$_AlipaySDK", referenced from: objc-class-ref in libReactNativePay.a(ReactNativePay.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

foreverpw avatar Jan 07 '18 12:01 foreverpw