通过Cordova的LD找不到由插件安装的已编译Pod

时间:2019-05-30 17:32:57

标签: xcode cordova ionic-framework linker

该项目有一个cordova插件,其中添加了一个名为CocoaAsyncSocket的CocoaPod。用Ionic编译时,输出以下错误:

[cordova]  Ld /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket normal armv7
[cordova]      cd /Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/Pods
[cordova]      export IPHONEOS_DEPLOYMENT_TARGET=8.0
[cordova]      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/decimal/Projects/Apps/AppName/MobileApp/node_modules/.bin:/Users/decimal/.nvm/versions/node/v8.16.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
[cordova]      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -L/Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/build/device -F/Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/build/device -F/Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/BuildProductsPath/Debug-iphoneos/CocoaAsyncSocket -filelist /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket.LinkFileList -install_name @rpath/CocoaAsyncSocket.framework/CocoaAsyncSocket -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -framework CFNetwork -framework Security -framework CFNetwork -framework CocoaAsyncSocket -framework Security -framework CFNetwork -framework Foundation -framework Security -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket_dependency_info.dat -o /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket
[cordova]  ld: warning: directory not found for option '-F/Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App Name/BuildProductsPath/Debug-iphoneos/CocoaAsyncSocket'
[cordova]  ld: framework not found CocoaAsyncSocket
[cordova]  clang: error: linker command failed with exit code 1 (use -v to see invocation)
[cordova]
[cordova]  ** ARCHIVE FAILED **
[cordova]
[cordova]
[cordova]  The following build commands failed:
[cordova]   Ld /Users/decimal/Library/Developer/Xcode/DerivedData/App_Name-aqzqbqwmsewzgegqbbbtyinwkuil/Build/Intermediates.noindex/ArchiveIntermediates/App\ Name/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/CocoaAsyncSocket.build/Objects-normal/armv7/CocoaAsyncSocket normal armv7
[cordova]  (1 failure)
[cordova]  CordovaError: Promise rejected with non-error: 'Error code 65 
for command: xcodebuild with args: -xcconfig,
/Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/cordova/build-debug.xcconfig,
-workspace,App Name.xcworkspace,-scheme,App Name,-configuration,Debug,
-destination,generic/platform=iOS,-archivePath,App Name.xcarchive,archive,
CONFIGURATION_BUILD_DIR=/Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/build/device,
SHARED_PRECOMPS_DIR=/Users/decimal/Projects/Apps/AppName/MobileApp/platforms/ios/build/sharedpch,
-UseModernBuildSystem=0'

它正在查找的目录包含以下文件:

CocoaAsyncSocket-dummy.d      CocoaAsyncSocket_vers.d       GCDAsyncSocket.dia
CocoaAsyncSocket-dummy.dia    CocoaAsyncSocket_vers.dia     GCDAsyncSocket.o
CocoaAsyncSocket-dummy.o      CocoaAsyncSocket_vers.o       GCDAsyncUdpSocket.d
CocoaAsyncSocket.LinkFileList GCDAsyncSocket.d              GCDAsyncUdpSocket.dia
GCDAsyncUdpSocket.o

我认为正在发生以下两种情况之一:先前的操作无法生成CocoaAsyncSocket文件,或者为链接器提供了错误的文件名。我会猜测是前者。

有人能指出我正确的方向吗?

0 个答案:

没有答案