我的React Native应用程序使用了`react-native-fbsdk`包,我正在尝试让iOS构建在CI服务器(Azure DevOps)上正常工作。主要问题是Facebook SDK需要安装在`~/Documents/FacebookSDK`中,这在CI构建服务器上无法运行。
我遇到了很多问题。目前我遇到的错误是:
我遇到了很多问题。目前我遇到的错误是:
▸ Linking TzoApp
⚠️ ld: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/TzoApp-bghowrtdysrbywbsslmkxejgzgoc/Build/Products/Release-iphoneos/React'
⚠️ ld: directory not found for option '-F/Users/vsts/agent/2.149.2/work/1/s/tzoapp-mobile/ios/Pods/FirebaseCore/Frameworks'
⚠️ ld: directory not found for option '-F/Users/vsts/agent/2.149.2/work/1/s/tzoapp-mobile/ios/Pods/FirebaseMessaging/Frameworks'
⚠️ ld: directory not found for option '-F/Users/vsts/Documents/FacebookSDK'
❌ ld: framework not found FBSDKCoreKit
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在通过Cocoapods安装Facebook SDK,我的podfile文件中包含以下内容:
pod 'FBSDKCoreKit', '~> 4.40.0'
pod 'FBSDKLoginKit', '~> 4.40.0'
pod 'FBSDKShareKit', '~> 4.40.0'
我的框架搜索路径如下:
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_ROOT}/FirebaseAnalytics/Frameworks\"",
"\"${PODS_ROOT}/FirebaseCore/Frameworks\"",
"\"${PODS_ROOT}/FirebaseInstanceID/Frameworks\"",
"\"${PODS_ROOT}/FirebaseMessaging/Frameworks\"",
"\"$(HOME)/Documents/FacebookSDK\"",
);
我的头文件搜索路径是:
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**",
"$(SRCROOT)/../node_modules/react-native-fbsdk/ios/RCTFBSDK/**",
"$(SRCROOT)/Pods/Headers/**",
"${PODS_ROOT}/Headers/Public/Facebook-iOS-SDK",
"${PODS_ROOT}/Headers/Public/Facebook-iOS-SDK/FacebookSDK",
"${PODS_ROOT}/Headers/Public/FBSDKCoreKit",
"${PODS_ROOT}/Headers/Public/FBSDKCoreKit/FBSDKCoreKit",
);
有人可以帮忙让构建工作起来吗?