Ошибка сборки продуктаact-native-fbads на iOS - библиотека не найдена - PullRequest
0 голосов
/ 26 октября 2018

Описание

Я не могу собрать производственную сборку моего приложения Reaction-native с зависимостью от Reaction-native-fbads.

Я получаю следующую ошибку:

ld: library not found for -lReactNativeAdsFacebook
clang: error: linker command failed with exit code 1 (use -v to see invocation)

При сборке для производственного выпуска с этой библиотекой я сталкиваюсь с этой проблемой на iOS.Андроид работает нормально.Я использую новейшую версию от npm, но это также происходит с главной веткой.

При установке Build Active Architecture Only на YES в XCode Build Settings и сборке для iPhone 7 iOS 12 все работает нормально.Это не решение для производства, потому что более старые версии также должны поддерживаться.

С 4.2.0 он прекрасно работает.

трассировка стека

Ld /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/Objects-normal/x86_64/playground normal x86_64 (in target: playground)
cd /Users/jobeso/projects/playground/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -L/Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator -F/Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator -F/Users/jobeso/projects/playground/ios/Pods/FBAudienceNetwork -filelist /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/Objects-normal/x86_64/playground.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/Objects-normal/x86_64/playground_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -lxml2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework FBAudienceNetwork -framework Foundation -framework Security -framework StoreKit -framework UIKit -weak_framework AdSupport -weak_framework CoreMotion -weak_framework SafariServices -weak_framework WebKit -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/playground.app-Simulated.xcent /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTBlob.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTAnimation.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libReact.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTActionSheet.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTGeolocation.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTImage.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTLinking.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTNetwork.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTSettings.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTText.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTVibration.a /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Products/Release-iphonesimulator/libRCTWebSocket.a -lPods-playground -lReactNativeAdsFacebook -Xlinker -dependency_info -Xlinker /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/Objects-normal/x86_64/playground_dependency_info.dat -o /Users/jobeso/Library/Developer/Xcode/DerivedData/playground-breooeaonoutyzaiywigdxwsujyp/Build/Intermediates.noindex/playground.build/Release-iphonesimulator/playground.build/Objects-normal/x86_64/playground

Воспроизводимый демонстрационный пример

пример проекта на gitlab

выпуск

выпуск на github

1 Ответ

0 голосов
/ 27 октября 2018

Это была проблема с путями поиска заголовка в библиотеке. PR с исправлением находится в связанном выпуске github.

...