Skip to content

Commit 2d17998

Browse files
committed
Updates from Fri 15 May
2 parents e33fef8 + d27e6fa commit 2d17998

File tree

9 files changed

+408
-34
lines changed

9 files changed

+408
-34
lines changed

Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
00E356F31AD99517003FC87E /* SampleAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* SampleAppTests.m */; };
1818
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
1919
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
20+
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
2021
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2122
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
2223
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
@@ -82,6 +83,13 @@
8283
remoteGlobalIDString = 134814201AA4EA6300B7C361;
8384
remoteInfo = RCTSettings;
8485
};
86+
139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
87+
isa = PBXContainerItemProxy;
88+
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
89+
proxyType = 2;
90+
remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
91+
remoteInfo = RCTWebSocket;
92+
};
8593
146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
8694
isa = PBXContainerItemProxy;
8795
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
@@ -117,6 +125,7 @@
117125
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
118126
00E356F21AD99517003FC87E /* SampleAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SampleAppTests.m; sourceTree = "<group>"; };
119127
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../../Libraries/Settings/RCTSettings.xcodeproj; sourceTree = "<group>"; };
128+
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../../Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = "<group>"; };
120129
13B07F961A680F5B00A75B9A /* SampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
121130
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = "<group>"; };
122131
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = "<group>"; };
@@ -151,6 +160,7 @@
151160
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
152161
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
153162
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
163+
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
154164
);
155165
runOnlyForDeploymentPostprocessing = 0;
156166
};
@@ -230,6 +240,14 @@
230240
name = Products;
231241
sourceTree = "<group>";
232242
};
243+
139FDEE71B06529A00C62182 /* Products */ = {
244+
isa = PBXGroup;
245+
children = (
246+
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
247+
);
248+
name = Products;
249+
sourceTree = "<group>";
250+
};
233251
13B07FAE1A68108700A75B9A /* SampleApp */ = {
234252
isa = PBXGroup;
235253
children = (
@@ -273,6 +291,7 @@
273291
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
274292
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
275293
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
294+
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
276295
);
277296
name = Libraries;
278297
sourceTree = "<group>";
@@ -407,6 +426,10 @@
407426
ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
408427
ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
409428
},
429+
{
430+
ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
431+
ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
432+
},
410433
{
411434
ProductGroup = 146834001AC3E56700842450 /* Products */;
412435
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
@@ -470,6 +493,13 @@
470493
remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
471494
sourceTree = BUILT_PRODUCTS_DIR;
472495
};
496+
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
497+
isa = PBXReferenceProxy;
498+
fileType = archive.ar;
499+
path = libRCTWebSocket.a;
500+
remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
501+
sourceTree = BUILT_PRODUCTS_DIR;
502+
};
473503
146834041AC3E56700842450 /* libReact.a */ = {
474504
isa = PBXReferenceProxy;
475505
fileType = archive.ar;

Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1341802B1AA91779003F314A /* libRCTNetwork.a */; };
1414
134454601AAFCABD003F0779 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1344545A1AAFCAAE003F0779 /* libRCTAdSupport.a */; };
1515
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 134A8A251AACED6A00945AAE /* libRCTGeolocation.a */; };
16+
139FDEDB1B0651FB00C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDED91B0651EA00C62182 /* libRCTWebSocket.a */; };
1617
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
1718
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
1819
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
@@ -68,6 +69,13 @@
6869
remoteGlobalIDString = 134814201AA4EA6300B7C361;
6970
remoteInfo = RCTGeolocation;
7071
};
72+
139FDED81B0651EA00C62182 /* PBXContainerItemProxy */ = {
73+
isa = PBXContainerItemProxy;
74+
containerPortal = 139FDECA1B0651EA00C62182 /* RCTWebSocket.xcodeproj */;
75+
proxyType = 2;
76+
remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
77+
remoteInfo = RCTWebSocket;
78+
};
7179
147CED4A1AB34F8C00DA3E4C /* PBXContainerItemProxy */ = {
7280
isa = PBXContainerItemProxy;
7381
containerPortal = 14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */;
@@ -121,6 +129,7 @@
121129
134180261AA91779003F314A /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = "<group>"; };
122130
134454551AAFCAAE003F0779 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = ../../Libraries/AdSupport/RCTAdSupport.xcodeproj; sourceTree = "<group>"; };
123131
134A8A201AACED6A00945AAE /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../../Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
132+
139FDECA1B0651EA00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../../Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = "<group>"; };
124133
13B07F961A680F5B00A75B9A /* UIExplorer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIExplorer.app; sourceTree = BUILT_PRODUCTS_DIR; };
125134
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = UIExplorer/AppDelegate.h; sourceTree = "<group>"; };
126135
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = UIExplorer/AppDelegate.m; sourceTree = "<group>"; };
@@ -148,17 +157,18 @@
148157
isa = PBXFrameworksBuildPhase;
149158
buildActionMask = 2147483647;
150159
files = (
151-
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */,
152160
14AADF051AC3DBB1002390C9 /* libReact.a in Frameworks */,
153-
58005BF21ABA80A60062E044 /* libRCTTest.a in Frameworks */,
154-
D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */,
155-
14DC67F41AB71881001358AB /* libRCTPushNotification.a in Frameworks */,
156161
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */,
157162
134454601AAFCABD003F0779 /* libRCTAdSupport.a in Frameworks */,
158163
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */,
164+
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */,
159165
1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */,
166+
14DC67F41AB71881001358AB /* libRCTPushNotification.a in Frameworks */,
167+
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */,
168+
58005BF21ABA80A60062E044 /* libRCTTest.a in Frameworks */,
160169
134180011AA9153C003F314A /* libRCTText.a in Frameworks */,
161-
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */,
170+
D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */,
171+
139FDEDB1B0651FB00C62182 /* libRCTWebSocket.a in Frameworks */,
162172
);
163173
runOnlyForDeploymentPostprocessing = 0;
164174
};
@@ -196,6 +206,7 @@
196206
58005BE41ABA80530062E044 /* RCTTest.xcodeproj */,
197207
13417FEA1AA914B8003F314A /* RCTText.xcodeproj */,
198208
D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */,
209+
139FDECA1B0651EA00C62182 /* RCTWebSocket.xcodeproj */,
199210
);
200211
name = Libraries;
201212
sourceTree = "<group>";
@@ -240,6 +251,14 @@
240251
name = Products;
241252
sourceTree = "<group>";
242253
};
254+
139FDECB1B0651EA00C62182 /* Products */ = {
255+
isa = PBXGroup;
256+
children = (
257+
139FDED91B0651EA00C62182 /* libRCTWebSocket.a */,
258+
);
259+
name = Products;
260+
sourceTree = "<group>";
261+
};
243262
13B07FAE1A68108700A75B9A /* UIExplorer */ = {
244263
isa = PBXGroup;
245264
children = (
@@ -427,6 +446,10 @@
427446
ProductGroup = D85B82921AB6D5CE003F4FE2 /* Products */;
428447
ProjectRef = D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */;
429448
},
449+
{
450+
ProductGroup = 139FDECB1B0651EA00C62182 /* Products */;
451+
ProjectRef = 139FDECA1B0651EA00C62182 /* RCTWebSocket.xcodeproj */;
452+
},
430453
{
431454
ProductGroup = 14AADF001AC3DB95002390C9 /* Products */;
432455
ProjectRef = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
@@ -476,6 +499,13 @@
476499
remoteRef = 134A8A241AACED6A00945AAE /* PBXContainerItemProxy */;
477500
sourceTree = BUILT_PRODUCTS_DIR;
478501
};
502+
139FDED91B0651EA00C62182 /* libRCTWebSocket.a */ = {
503+
isa = PBXReferenceProxy;
504+
fileType = archive.ar;
505+
path = libRCTWebSocket.a;
506+
remoteRef = 139FDED81B0651EA00C62182 /* PBXContainerItemProxy */;
507+
sourceTree = BUILT_PRODUCTS_DIR;
508+
};
479509
147CED4B1AB34F8C00DA3E4C /* libRCTActionSheet.a */ = {
480510
isa = PBXReferenceProxy;
481511
fileType = archive.ar;

Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ function setUpWebSockets() {
119119
GLOBAL.WebSocket = require('WebSocket');
120120
}
121121

122+
function setupProfile() {
123+
console.profile = console.profile || GLOBAL.consoleProfile || function () {};
124+
console.profileEnd = console.profileEnd || GLOBAL.consoleProfileEnd || function () {};
125+
}
126+
122127
setUpRedBoxErrorHandler();
123128
setUpTimers();
124129
setUpAlert();
@@ -127,3 +132,4 @@ setUpXHR();
127132
setUpRedBoxConsoleErrorHandler();
128133
setUpGeolocation();
129134
setUpWebSockets();
135+
setupProfile();

Libraries/ReactIOS/NativeMethodsMixin.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ var findNodeHandle = require('findNodeHandle');
2020
var flattenStyle = require('flattenStyle');
2121
var invariant = require('invariant');
2222
var mergeFast = require('mergeFast');
23-
var mountSafeCallback = require('mountSafeCallback');
2423
var precomputeStyle = require('precomputeStyle');
2524

2625
type MeasureOnSuccessCallback = (
@@ -161,4 +160,17 @@ if (__DEV__) {
161160
};
162161
}
163162

163+
/**
164+
* In the future, we should cleanup callbacks by cancelling them instead of
165+
* using this.
166+
*/
167+
var mountSafeCallback = function(context: ReactComponent, callback: ?Function): any {
168+
return function() {
169+
if (!callback || (context.isMounted && !context.isMounted())) {
170+
return;
171+
}
172+
return callback.apply(context, arguments);
173+
};
174+
};
175+
164176
module.exports = NativeMethodsMixin;

Libraries/StyleSheet/precomputeStyle.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
var MatrixMath = require('MatrixMath');
1515
var Platform = require('Platform');
16+
1617
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
1718
var invariant = require('invariant');
19+
var stringifySafe = require('stringifySafe');
1820

1921
/**
2022
* This method provides a hook where flattened styles may be precomputed or
@@ -123,6 +125,13 @@ function _convertToRadians(value: string): number {
123125
}
124126

125127
function _validateTransform(key, value, transformation) {
128+
invariant(
129+
!value.getValue,
130+
'You passed an animated value or spring to a normal component. ' +
131+
'You need to wrap that component in an Animated. For example, ' +
132+
'replace <View /> by <Animated.View />.'
133+
);
134+
126135
var multivalueTransforms = [
127136
'matrix',
128137
'translate',
@@ -132,7 +141,7 @@ function _validateTransform(key, value, transformation) {
132141
Array.isArray(value),
133142
'Transform with key of %s must have an array as the value: %s',
134143
key,
135-
JSON.stringify(transformation)
144+
stringifySafe(transformation),
136145
);
137146
}
138147
switch (key) {
@@ -142,7 +151,7 @@ function _validateTransform(key, value, transformation) {
142151
'Matrix transform must have a length of 9 (2d) or 16 (3d). ' +
143152
'Provided matrix has a length of %s: %s',
144153
value.length,
145-
JSON.stringify(transformation)
154+
stringifySafe(transformation),
146155
);
147156
break;
148157
case 'translate':
@@ -152,21 +161,21 @@ function _validateTransform(key, value, transformation) {
152161
typeof value === 'string',
153162
'Transform with key of "%s" must be a string: %s',
154163
key,
155-
JSON.stringify(transformation)
164+
stringifySafe(transformation),
156165
);
157166
invariant(
158167
value.indexOf('deg') > -1 || value.indexOf('rad') > -1,
159168
'Rotate transform must be expressed in degrees (deg) or radians ' +
160169
'(rad): %s',
161-
JSON.stringify(transformation)
170+
stringifySafe(transformation),
162171
);
163172
break;
164173
default:
165174
invariant(
166175
typeof value === 'number',
167176
'Transform with key of "%s" must be a number: %s',
168177
key,
169-
JSON.stringify(transformation)
178+
stringifySafe(transformation),
170179
);
171180
}
172181
}

Libraries/Utilities/mountSafeCallback.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)