我在尝试安装和使用mapbox时遇到了这个错误很多天虽然Mapbox适用于Android,但它在iOS上无法正常运行导致构建错误target overrides the FRAMEWORK_SEARCH_PATHS build settings {1}}
通过CocoaPods安装时,我从xcode收到错误
framework not found Mapbox
非常感谢!
我得到的框架没有找到Mapbox但是在{{3}}目标上的回答之后会覆盖FRAMEWORK_SEARCH_PATHS构建设置有关将framework not found Mapbox
Ld /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/clustr.app/clustr normal x86_64
cd /Users/michaelstokes/clustr/clustr_app/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/React -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/Stripe -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/react-native-mapbox-gl -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/yoga -F/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator -F/Users/michaelstokes/Documents/FacebookSDK -filelist /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lReact -lStripe -lreact-native-mapbox-gl -lstdc++ -lyoga -framework AddressBook -framework Foundation -framework JavaScriptCore -framework Mapbox -framework PassKit -framework Security -framework WebKit -framework XCTest -weak_framework Contacts -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/clustr.app.xcent /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libReact.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTAnimation.a -framework FBSDKLoginKit /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTNetwork.a -framework FBSDKShareKit -framework Bolts /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTVibration.a -framework FBSDKCoreKit /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lAirMaps -lRNDeviceInfo -lPods-clustr -lRCTCamera -lreact-native-branch -lRNGeocoder -lReact -lyoga -lcxxreact -ljschelpers -lRNVectorIcons -lTPSStripe -Xlinker -dependency_info -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr_dependency_info.dat -o /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/clustr.app/clustr
ld: framework not found Mapbox
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My podfile is as follows:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'clustr' do
# Flexbox Layout Manager Used By React Natve
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
# React Native
pod 'React', path: '../node_modules/react-native', subspecs: [
# Comment out any unneeded subspecs to reduce bundle size.
'Core',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTBlob',
'RCTCameraRoll',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTTest',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTLinkingIOS'
]
# Mapbox
pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
pod 'Stripe', '~> 10.1.0'
inherit! :search_paths
end
When running pod install I get
MacBook-Pro:ios michaelstokes$ pod install
Analyzing dependencies
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `react-native-mapbox-gl` from `../node_modules/@mapbox/react-native-mapbox-gl`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga/Yoga.podspec`
Downloading dependencies
Using React (0.50.4)
Using Stripe (10.1.0)
Using react-native-mapbox-gl (6.0.1)
Using yoga (0.50.4.React)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 19 dependencies from the Podfile and 4 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target clustr because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] The `clustr [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-clustr/Pods-clustr.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `clustr [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-clustr/Pods-clustr.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
添加到已解决它的框架搜索路径但是后来出现以下问题与libc ++ abi.dylib有关:以NSException类型的未捕获异常终止$(inherited)
答案 0 :(得分:1)
要在构建期间解决framework not found Mapbox
问题,我必须将$(inherited)
添加到框架搜索路径,然后构建成功,但在尝试包含Mapbox视图时会出现问题,因此这是一个部分答案,它解决了framework not found Mapbox
的问题,但在Mapbox: libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
答案 1 :(得分:0)
如果在iOS模拟器上安装此错误时遇到错误,则必须将其添加到Framework Search Paths
中(如上所述)-但是,请使用调试和发布选项:
设备
任何iOS SDK
模拟器
任何iOS模拟器SDK
我将第一个选项放到了框架搜索路径中,并且该项目在物理设备上构建良好。但是,当我在Simualtor上使用它时,它失败了-这就是原因。
这是我的路:
$(SRCROOT)/../node_modules/@mapbox/react-native-mapbox-gl/ios