Skip to content

Commit d274eb4

Browse files
committed
[RN 0.40] Update iOS header imports and JS SyntheticEvent import for RN 0.40
React Native 0.40 (coming soon) changes the way its iOS headers should be imported. The headers are now under a directory called "React" that is in the compiler's include path, hence the new import style. On the JS side, RN 0.40 now peer-depends on React 15.4.x which moved SyntheticEvent from `react/lib` to deep inside `react-native`, so update that import as well. Test Plan: Follow the setup instructions (https://github.com/airbnb/react-native-maps/blob/master/docs/examples-setup.md) and run the explorer app (notably verify that it compiles).
1 parent 1e71a21 commit d274eb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+146
-148
lines changed

example/examples/EventListener.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React, { PropTypes } from 'react';
2-
import SyntheticEvent from 'react/lib/SyntheticEvent';
32
import {
43
StyleSheet,
54
View,
65
Text,
76
Dimensions,
87
ScrollView,
98
} from 'react-native';
9+
// eslint-disable-next-line max-len
10+
import SyntheticEvent from 'react-native/Libraries/Renderer/src/renderers/shared/stack/event/SyntheticEvent';
1011
import MapView from 'react-native-maps';
1112
import PriceMarker from './PriceMarker';
1213

example/ios/AirMapsExplorer/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#import "AppDelegate.h"
1111

12-
#import "RCTRootView.h"
12+
#import <React/RCTRootView.h>
1313

1414
#import <GoogleMaps/GoogleMaps.h>
1515

example/ios/AirMapsExplorerTests/AirMapsExplorerTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#import <UIKit/UIKit.h>
1111
#import <XCTest/XCTest.h>
1212

13-
#import "RCTLog.h"
14-
#import "RCTRootView.h"
13+
#import <React/RCTLog.h>
14+
#import <React/RCTRootView.h>
1515

1616
#define TIMEOUT_SECONDS 240
1717
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"

example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"dev": "concurrently 'npm run watch' 'npm run packager'"
1010
},
1111
"dependencies": {
12-
"react": "^15.3.1",
13-
"react-native": "^0.35.0",
14-
"react-native-maps": "../"
12+
"react": "~15.4.1",
13+
"react-native": "^0.40.0",
14+
"react-native-maps": "file:../"
1515
},
1616
"devDependencies": {
1717
"concurrently": "^2.2.0",

ios/AirGoogleMaps/AIRGMSMarker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
#import <GoogleMaps/GoogleMaps.h>
9-
#import "UIView+React.h"
9+
#import <React/UIView+React.h>
1010

1111
@class AIRGoogleMapMarker;
1212

ios/AirGoogleMaps/AIRGoogleMap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
//
77

88
#import <UIKit/UIKit.h>
9-
#import "RCTComponent.h"
9+
#import <React/RCTComponent.h>
10+
#import <React/RCTConvert+MapKit.h>
1011
#import <GoogleMaps/GoogleMaps.h>
1112
#import <MapKit/MapKit.h>
12-
#import "RCTConvert+MapKit.h"
1313
#import "AIRGMSMarker.h"
1414

1515
@interface AIRGoogleMap : GMSMapView

ios/AirGoogleMaps/AIRGoogleMap.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#import "AIRGoogleMapUrlTile.h"
1414
#import <GoogleMaps/GoogleMaps.h>
1515
#import <MapKit/MapKit.h>
16-
#import "RCTConvert+MapKit.h"
17-
#import "UIView+React.h"
16+
#import <React/RCTConvert+MapKit.h>
17+
#import <React/UIView+React.h>
1818

1919
id regionAsJSON(MKCoordinateRegion region) {
2020
return @{

ios/AirGoogleMaps/AIRGoogleMapCallout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import <UIKit/UIKit.h>
10-
#import "RCTView.h"
10+
#import <React/RCTView.h>
1111

1212
@interface AIRGoogleMapCallout : UIView
1313
@property (nonatomic, assign) BOOL tooltip;

ios/AirGoogleMaps/AIRGoogleMapCallout.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
//
88

99
#import "AIRGoogleMapCallout.h"
10-
#import "RCTUtils.h"
11-
#import "RCTView.h"
12-
#import "RCTBridge.h"
10+
#import <React/RCTUtils.h>
11+
#import <React/RCTView.h>
12+
#import <React/RCTBridge.h>
1313

1414
@implementation AIRGoogleMapCallout
1515
@end

ios/AirGoogleMaps/AIRGoogleMapCalloutManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Gil Birman on 9/6/16.
66
//
77
//
8-
#import "RCTViewManager.h"
8+
#import <React/RCTViewManager.h>
99

1010
@interface AIRGoogleMapCalloutManager : RCTViewManager
1111

0 commit comments

Comments
 (0)