2017-12-17 38 views
3

Android에서 작업하는 동안 Mapbox를 구현 중이므로 CocoaPods를 통해 설치 한 후 iOS에서 오류가 발생합니다 ... framework not found Mapbox 하지만 $를 추가하는 방법에 대한 target overrides the FRAMEWORK_SEARCH_PATHS build settings에 대한 답변을 통해 다음 후 해결하지만 libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)Mapbox : libC++ abi.dylib : NSException (lldb) 유형의 캐치되지 않는 예외로 종료합니다.

내 podfile에 관한 빌드에 대한 문제입니다 다음과 같이 다음 있었다 프레임 워크 검색 경로에 (상속) :

# 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 


After running the build successfully, and after adding the following Mapbox snippet of code and the rest to get a basic mapbox preview 

      <MapboxGL.MapView 
      ref={map => { this._map = map }} 
      animated={true} 
     showUserLocation={true} 
     userTrackingMode={MapboxGL.UserTrackingModes.Follow} 
     styleURL={this.state.Street} 
     style={Styles.Map.map} 
     centerCoordinate={[this.props.region.longitude, this.props.region.latitude]} 
     attributionEnabled={false} 
     logoEnabled={false}  
     compassEnabled={true} 
     onRegionWillChange={this.handleRegionChange}> 

{

나는 더 내가

objc[20673]: Class MPExportableArtworkProperties is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/MediaPlaybackCore.framework/MediaPlaybackCore (0x12a56aff0) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer (0x129264348). One of the two will be used. Which one is undefined. 
objc[20673]: Class SMCalloutView is implemented in both /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/Frameworks/Mapbox.framework/Mapbox (0x110a1b068) and /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/clustr (0x10e852e10). One of the two will be used. Which one is undefined. 
objc[20673]: Class SMCalloutMaskedBackgroundView is implemented in both /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/Frameworks/Mapbox.framework/Mapbox (0x110a1b090) and /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/clustr (0x10e852e38). One of the two will be used. Which one is undefined. 
objc[20673]: Class SMCalloutBackgroundView is implemented in both /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/Frameworks/Mapbox.framework/Mapbox (0x110a1b0e0) and /Users/michaelstokes/Library/Developer/CoreSimulator/Devices/1F3A665E-E9A9-48C3-90ED-50C1E9C48DA3/data/Containers/Bundle/Application/368D9223-62FC-4D50-B28C-E6EE1E3D6AB5/clustr.app/clustr (0x10e852e88). One of the two will be used. Which one is undefined. 

정말 감사를 참조 로그를 보면 콘솔

libc++abi.dylib: terminating with uncaught exception of type NSException 
(lldb) 

에 오류가!

답변

1

좋아,

나는 내가 attributionEnabled={false} 정의 된 사용 속성 MapView에 대해 명확하게 문서를 읽을 수 있었다하지만 난이 간단한 지시 사항을 준수하지 않았다, 그래서 그 모든 이유는 ... 간다 나는 https://github.com/mapbox/react-native-mapbox-gl/blob/master/docs/MapView.md

에 이상

Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabledSettingShownInApp=YES to your Info.plist

libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)을 얻고 있었다