我的解決辦法固定所有陣營橫跨MapboxGL庫導入語句。
把他們變成全球進口的形式#import <React/MissingClass.h>
解決了這個問題:
例如#import RCTView.h
到#import <React/RCTView.h>
(9個文件總數):
RCTMapboxAnnotation.m
:
#import "RCTMapboxAnnotation.h"
#import <React/RCTEventDispatcher.h>
#import <React/UIView+React.h>
#import <React/RCTBridge.h>
#import <React/RCTUtils.h>
RCTMapboxAnnotation.h
:
#import "RCTMapboxAnnotation.h"
#import <MapBox/MapBox.h>
#import <UIKit/UIKit.h>
#import <React/RCTConvert+MapKit.h>
#import <React/RCTComponent.h>
#import "RCTMapboxGL.h"
RCTMapboxAnnotationManager.m
:
#import "RCTMapboxAnnotationManager.h"
#import <React/RCTUIManager.h>
#import <React/RCTConvert+CoreLocation.h>
#import <React/UIView+React.h>
#import "RCTMapboxAnnotation.h"
RCTMapboxAnnotationManager.h
:
#import <React/RCTViewManager.h>
RCTMapboxGL.h
:
#import <Mapbox/Mapbox.h>
#import <React/RCTView.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTBridgeModule.h>
RCTMapboxGL.m
:
#import "RCTMapboxGL.h"
#import <React/RCTBridgeModule.h>
#import <React/RCTEventDispatcher.h>
#import <React/UIView+React.h>
#import <React/RCTLog.h>
#import "RCTMapboxGLConversions.h"
#import "RCTMapboxAnnotation.h"
RCTMapboxGLManager.h
:
#import <React/RCTViewManager.h>
RCTMapboxGLManager.m
:
#import "RCTMapboxGLManager.h"
#import "RCTMapboxGL.h"
#import <Mapbox/Mapbox.h>
#import <React/RCTConvert+CoreLocation.h>
#import <React/RCTConvert+MapKit.h>
#import <React/RCTBridge.h>
#import <React/RCTEventDispatcher.h>
#import <React/UIView+React.h>
#import <React/RCTUIManager.h>
#import "RCTMapboxGLConversions.h"
#import "MGLPolygon+RCTAdditions.h"
#import "MGLPolyline+RCTAdditions.h"
RCTMapboxGLConversions.m
:
#import <Foundation/Foundation.h>
#import <React/RCTConvert+CoreLocation.h>
#import <React/RCTConvert+MapKit.h>
#import "RCTMapboxGL.h"
這與固定在這個混帳問題註釋的參考鏈接框架搜索路徑爲我工作一起:https://github.com/mapbox/反應母語-mapbox-GL /問題/ 297#issuecomment-247644647 – KinGBin