Skip to content

Commit d63eac4

Browse files
committed
Merge pull request #1312 from vjeux/Updates_Sat_16_May
Updates sat 16 may
2 parents 7a1c52c + 3676380 commit d63eac4

11 files changed

Lines changed: 58 additions & 37 deletions

File tree

Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
1111
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
12-
00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; };
1312
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
1413
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
1514
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
@@ -34,13 +33,6 @@
3433
remoteGlobalIDString = 134814201AA4EA6300B7C361;
3534
remoteInfo = RCTActionSheet;
3635
};
37-
00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */ = {
38-
isa = PBXContainerItemProxy;
39-
containerPortal = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */;
40-
proxyType = 2;
41-
remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
42-
remoteInfo = RCTAdSupport;
43-
};
4436
00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
4537
isa = PBXContainerItemProxy;
4638
containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
@@ -116,7 +108,6 @@
116108
/* Begin PBXFileReference section */
117109
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = "<group>"; };
118110
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
119-
00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = ../../Libraries/AdSupport/RCTAdSupport.xcodeproj; sourceTree = "<group>"; };
120111
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../../Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
121112
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../../Libraries/Image/RCTImage.xcodeproj; sourceTree = "<group>"; };
122113
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = "<group>"; };
@@ -152,7 +143,6 @@
152143
files = (
153144
146834051AC3E58100842450 /* libReact.a in Frameworks */,
154145
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
155-
00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */,
156146
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
157147
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
158148
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
@@ -175,14 +165,6 @@
175165
name = Products;
176166
sourceTree = "<group>";
177167
};
178-
00C302B01ABCB8E700DB3ED1 /* Products */ = {
179-
isa = PBXGroup;
180-
children = (
181-
00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */,
182-
);
183-
name = Products;
184-
sourceTree = "<group>";
185-
};
186168
00C302B61ABCB90400DB3ED1 /* Products */ = {
187169
isa = PBXGroup;
188170
children = (
@@ -283,7 +265,6 @@
283265
children = (
284266
146833FF1AC3E56700842450 /* React.xcodeproj */,
285267
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
286-
00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */,
287268
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
288269
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
289270
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
@@ -394,10 +375,6 @@
394375
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
395376
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
396377
},
397-
{
398-
ProductGroup = 00C302B01ABCB8E700DB3ED1 /* Products */;
399-
ProjectRef = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */;
400-
},
401378
{
402379
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
403380
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
@@ -451,13 +428,6 @@
451428
remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
452429
sourceTree = BUILT_PRODUCTS_DIR;
453430
};
454-
00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */ = {
455-
isa = PBXReferenceProxy;
456-
fileType = archive.ar;
457-
path = libRCTAdSupport.a;
458-
remoteRef = 00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */;
459-
sourceTree = BUILT_PRODUCTS_DIR;
460-
};
461431
00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
462432
isa = PBXReferenceProxy;
463433
fileType = archive.ar;

Libraries/Components/ActivityIndicatorIOS/ActivityIndicatorIOS.ios.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ var ActivityIndicatorIOS = React.createClass({
5353
'small',
5454
'large',
5555
]),
56+
/**
57+
* Invoked on mount and layout changes with
58+
*
59+
* {nativeEvent: { layout: {x, y, width, height}}}.
60+
*/
61+
onLayout: PropTypes.func,
5662
},
5763

5864
getDefaultProps: function(): DefaultProps {
@@ -65,10 +71,12 @@ var ActivityIndicatorIOS = React.createClass({
6571
},
6672

6773
render: function() {
68-
var {style, ...props} = this.props;
74+
var {onLayout, style, ...props} = this.props;
6975
var sizeStyle = (this.props.size === 'large') ? styles.sizeLarge : styles.sizeSmall;
7076
return (
71-
<View style={[styles.container, sizeStyle, style]}>
77+
<View
78+
onLayout={onLayout}
79+
style={[styles.container, sizeStyle, style]}>
7280
<RCTActivityIndicatorView {...props} />
7381
</View>
7482
);

Libraries/Components/View/View.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ var View = React.createClass({
9191
onStartShouldSetResponderCapture: PropTypes.func,
9292

9393
/**
94-
* Invoked on mount and layout changes with {x, y, width, height}.
94+
* Invoked on mount and layout changes with
95+
*
96+
* {nativeEvent: { layout: {x, y, width, height}}}.
9597
*/
9698
onLayout: PropTypes.func,
9799

Libraries/Image/Image.ios.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ var Image = React.createClass({
9999
* testing scripts.
100100
*/
101101
testID: PropTypes.string,
102+
/**
103+
* Invoked on mount and layout changes with
104+
*
105+
* {nativeEvent: { layout: {x, y, width, height}}}.
106+
*/
107+
onLayout: PropTypes.func,
102108
},
103109

104110
statics: {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
* @providesModule RCTNativeAppEventEmitter
10+
* @flow
11+
*/
12+
'use strict';
13+
14+
var EventEmitter = require('EventEmitter');
15+
16+
var RCTNativeAppEventEmitter = new EventEmitter();
17+
18+
module.exports = RCTNativeAppEventEmitter;

Libraries/Text/Text.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ var Text = React.createClass({
9292
* Used to locate this view in end-to-end tests.
9393
*/
9494
testID: React.PropTypes.string,
95+
/**
96+
* Invoked on mount and layout changes with
97+
*
98+
* {nativeEvent: { layout: {x, y, width, height}}}.
99+
*/
100+
onLayout: React.PropTypes.func,
95101
},
96102

97103
viewConfig: viewConfig,

Libraries/react-native/react-native.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
5959

6060
// Plugins
6161
DeviceEventEmitter: require('RCTDeviceEventEmitter'),
62+
NativeAppEventEmitter: require('RCTNativeAppEventEmitter'),
6263
NativeModules: require('NativeModules'),
6364
requireNativeComponent: require('requireNativeComponent'),
6465

React/Base/RCTBridge.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,9 @@ - (void)initJS
11481148
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidLoadNotification
11491149
object:_parentBridge
11501150
userInfo:@{ @"bridge": self }];
1151+
} else {
1152+
[[RCTRedBox sharedInstance] showErrorMessage:[loadError localizedDescription]
1153+
withDetails:[loadError localizedFailureReason]];
11511154
}
11521155
}];
11531156
}

packager/react-packager/src/Packager/Package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,6 @@ function generateSourceMapForVirtualModule(module) {
285285
names: [],
286286
mappings: mappings,
287287
file: module.sourcePath,
288-
sourcesContent: [ module.code ],
288+
sourcesContent: [ module.sourceCode ],
289289
};
290290
}

packager/react-packager/src/Packager/__tests__/Packager-test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ describe('Packager', function() {
150150
sourceCode: 'module.exports = ' +
151151
JSON.stringify(imgModule_DEPRECATED) +
152152
';',
153-
sourcePath: '/root/img/img.png'
153+
sourcePath: '/root/img/img.png',
154+
virtual: true,
155+
map: undefined,
154156
});
155157

156158
var imgModule = {
@@ -172,13 +174,17 @@ describe('Packager', function() {
172174
sourceCode: 'module.exports = require("AssetRegistry").registerAsset(' +
173175
JSON.stringify(imgModule) +
174176
');',
175-
sourcePath: '/root/img/new_image.png'
177+
sourcePath: '/root/img/new_image.png',
178+
virtual: true,
179+
map: undefined,
176180
});
177181

178182
expect(p.addModule.mock.calls[4][0]).toEqual({
179183
code: 'lol module.exports = {"json":true}; lol',
180184
sourceCode: 'module.exports = {"json":true};',
181-
sourcePath: '/root/file.json'
185+
sourcePath: '/root/file.json',
186+
map: undefined,
187+
virtual: true,
182188
});
183189

184190
expect(p.finalize.mock.calls[0]).toEqual([

0 commit comments

Comments
 (0)