Skip to content

Commit fe2155e

Browse files
committed
Merge pull request #1893 from a2/Update_Tue_7_Jul
Updates from Tuesday, 7 July
2 parents fe9af98 + 3325e8f commit fe2155e

File tree

16 files changed

+118
-120
lines changed

16 files changed

+118
-120
lines changed

Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1515
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 144C5F681AC3E5D800B004E7 /* libReact.a */; };
1616
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58C5724D1AA6224400CDF9C8 /* libRCTText.a */; };
17+
832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832044951B492C1E00E297FC /* libRCTSettings.a */; };
1718
/* End PBXBuildFile section */
1819

1920
/* Begin PBXContainerItemProxy section */
@@ -38,6 +39,13 @@
3839
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
3940
remoteInfo = RCTText;
4041
};
42+
832044941B492C1E00E297FC /* PBXContainerItemProxy */ = {
43+
isa = PBXContainerItemProxy;
44+
containerPortal = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */;
45+
proxyType = 2;
46+
remoteGlobalIDString = 134814201AA4EA6300B7C361;
47+
remoteInfo = RCTSettings;
48+
};
4149
/* End PBXContainerItemProxy section */
4250

4351
/* Begin PBXFileReference section */
@@ -51,6 +59,7 @@
5159
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TicTacToe/main.m; sourceTree = "<group>"; };
5260
144C5F631AC3E5D800B004E7 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = "<group>"; };
5361
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
62+
8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../../Libraries/Settings/RCTSettings.xcodeproj; sourceTree = "<group>"; };
5463
/* End PBXFileReference section */
5564

5665
/* Begin PBXFrameworksBuildPhase section */
@@ -61,6 +70,7 @@
6170
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */,
6271
1341803E1AA91802003F314A /* libRCTImage.a in Frameworks */,
6372
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */,
73+
832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */,
6474
);
6575
runOnlyForDeploymentPostprocessing = 0;
6676
};
@@ -101,6 +111,7 @@
101111
children = (
102112
144C5F631AC3E5D800B004E7 /* React.xcodeproj */,
103113
134180381AA917ED003F314A /* RCTImage.xcodeproj */,
114+
8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */,
104115
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */,
105116
);
106117
name = Libraries;
@@ -114,6 +125,14 @@
114125
name = Products;
115126
sourceTree = "<group>";
116127
};
128+
832044901B492C1E00E297FC /* Products */ = {
129+
isa = PBXGroup;
130+
children = (
131+
832044951B492C1E00E297FC /* libRCTSettings.a */,
132+
);
133+
name = Products;
134+
sourceTree = "<group>";
135+
};
117136
83CBB9F61A601CBA00E9B192 = {
118137
isa = PBXGroup;
119138
children = (
@@ -178,6 +197,10 @@
178197
ProductGroup = 134180391AA917ED003F314A /* Products */;
179198
ProjectRef = 134180381AA917ED003F314A /* RCTImage.xcodeproj */;
180199
},
200+
{
201+
ProductGroup = 832044901B492C1E00E297FC /* Products */;
202+
ProjectRef = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */;
203+
},
181204
{
182205
ProductGroup = 58C572481AA6224300CDF9C8 /* Products */;
183206
ProjectRef = 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */;
@@ -216,6 +239,13 @@
216239
remoteRef = 58C5724C1AA6224400CDF9C8 /* PBXContainerItemProxy */;
217240
sourceTree = BUILT_PRODUCTS_DIR;
218241
};
242+
832044951B492C1E00E297FC /* libRCTSettings.a */ = {
243+
isa = PBXReferenceProxy;
244+
fileType = archive.ar;
245+
path = libRCTSettings.a;
246+
remoteRef = 832044941B492C1E00E297FC /* PBXContainerItemProxy */;
247+
sourceTree = BUILT_PRODUCTS_DIR;
248+
};
219249
/* End PBXReferenceProxy section */
220250

221251
/* Begin PBXResourcesBuildPhase section */

Examples/TicTacToe/TicTacToeApp.js

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
var React = require('react-native');
2020
var {
2121
AppRegistry,
22-
Image,
2322
StyleSheet,
2423
Text,
2524
TouchableHighlight,
@@ -118,17 +117,6 @@ var Cell = React.createClass({
118117
}
119118
},
120119

121-
imageStyle() {
122-
switch (this.props.player) {
123-
case 1:
124-
return styles.imageX;
125-
case 2:
126-
return styles.imageO;
127-
default:
128-
return {};
129-
}
130-
},
131-
132120
textContents() {
133121
switch (this.props.player) {
134122
case 1:
@@ -140,25 +128,16 @@ var Cell = React.createClass({
140128
}
141129
},
142130

143-
imageContents() {
144-
switch (this.props.player) {
145-
case 1:
146-
return 'http://www.picgifs.com/alphabets/alphabets/children-5/alphabets-children-5-277623.gif';
147-
case 2:
148-
return 'http://www.picgifs.com/alphabets/alphabets/children-5/alphabets-children-5-730492.gif';
149-
default:
150-
return '';
151-
}
152-
},
153-
154131
render() {
155132
return (
156133
<TouchableHighlight
157134
onPress={this.props.onPress}
158135
underlayColor="transparent"
159136
activeOpacity={0.5}>
160137
<View style={[styles.cell, this.cellStyle()]}>
161-
<Image source={{uri: this.imageContents()}} style={this.imageStyle()}/>
138+
<Text style={[styles.cellText, this.textStyle()]}>
139+
{this.textContents()}
140+
</Text>
162141
</View>
163142
</TouchableHighlight>
164143
);
@@ -304,17 +283,6 @@ var styles = StyleSheet.create({
304283
color: '#b9dc2f',
305284
},
306285

307-
// CELL IMAGE
308-
309-
imageX: {
310-
width: 34,
311-
height: 42,
312-
},
313-
imageO: {
314-
width: 45,
315-
height: 41,
316-
},
317-
318286
// GAME OVER
319287

320288
overlay: {

Libraries/ART/ART.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696
0CF68AB81AF0540F00FF9E5C = {
9797
isa = PBXGroup;
9898
children = (
99+
0CF68AEA1AF0549300FF9E5C /* Brushes */,
100+
0CF68AF81AF0549300FF9E5C /* ViewManagers */,
99101
0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */,
100102
0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */,
101103
0CF68ADD1AF0549300FF9E5C /* ARTGroup.h */,
@@ -111,10 +113,8 @@
111113
0CF68AE71AF0549300FF9E5C /* ARTText.h */,
112114
0CF68AE81AF0549300FF9E5C /* ARTText.m */,
113115
0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */,
114-
0CF68AEA1AF0549300FF9E5C /* Brushes */,
115116
0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */,
116117
0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */,
117-
0CF68AF81AF0549300FF9E5C /* ViewManagers */,
118118
0CF68AC21AF0540F00FF9E5C /* Products */,
119119
);
120120
sourceTree = "<group>";

Libraries/AdSupport/RCTAdSupport.m

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,18 @@ @implementation RCTAdSupport
1818
RCT_EXPORT_METHOD(getAdvertisingId:(RCTResponseSenderBlock)callback
1919
withErrorCallback:(RCTResponseSenderBlock)errorCallback)
2020
{
21-
if ([ASIdentifierManager class]) {
22-
callback(@[[[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]]);
21+
NSUUID *advertisingIdentifier = [ASIdentifierManager sharedManager].advertisingIdentifier;
22+
if (advertisingIdentifier) {
23+
callback(@[advertisingIdentifier.UUIDString]);
2324
} else {
24-
return errorCallback(@[@"as_identifier_unavailable"]);
25+
errorCallback(@[@"as_identifier_unavailable"]);
2526
}
2627
}
2728

2829
RCT_EXPORT_METHOD(getAdvertisingTrackingEnabled:(RCTResponseSenderBlock)callback
29-
withErrorCallback:(RCTResponseSenderBlock)errorCallback)
30+
withErrorCallback:(__unused RCTResponseSenderBlock)errorCallback)
3031
{
31-
if ([ASIdentifierManager class]) {
32-
BOOL hasTracking = [[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled];
33-
callback(@[@(hasTracking)]);
34-
} else {
35-
return errorCallback(@[@"as_identifier_unavailable"]);
36-
}
32+
callback(@[@([ASIdentifierManager sharedManager].advertisingTrackingEnabled)]);
3733
}
3834

3935
@end

Libraries/Animation/POPAnimationMixin.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ var POPAnimationMixin = {
3636
AnimationProperties: POPAnimation.Properties,
3737

3838
getInitialState: function(): Object {
39+
this._popAnimationEnqueuedAnimationTimeouts = [];
3940
return {
4041
_currentAnimationsByNodeHandle: {},
4142
};
@@ -120,10 +121,11 @@ var POPAnimationMixin = {
120121
}
121122
doneCallback && doneCallback(finished);
122123
};
123-
// Hack to aviod race condition. This delay should be imperceptible:
124-
setTimeout(() => {
124+
// Hack to aviod race condition in POP:
125+
var animationTimeoutHandler = setTimeout(() => {
125126
POPAnimation.addAnimation(nodeHandle, animID, cleanupWrapper);
126-
}, 10);
127+
}, 1);
128+
this._popAnimationEnqueuedAnimationTimeouts.push(animationTimeoutHandler);
127129
},
128130

129131
/**
@@ -254,6 +256,10 @@ var POPAnimationMixin = {
254256
// Cleanup any potentially leaked animations.
255257
componentWillUnmount: function() {
256258
this.stopAllAnimations();
259+
this._popAnimationEnqueuedAnimationTimeouts.forEach(animationTimeoutHandler => {
260+
clearTimeout(animationTimeoutHandler);
261+
});
262+
this._popAnimationEnqueuedAnimationTimeouts = [];
257263
}
258264
};
259265

Libraries/Image/RCTImage.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
58B511541A9E6B3D00147676 = {
7070
isa = PBXGroup;
7171
children = (
72-
143879361AAD32A300F088A5 /* RCTImageLoader.h */,
73-
143879371AAD32A300F088A5 /* RCTImageLoader.m */,
7472
143879331AAD238D00F088A5 /* RCTCameraRollManager.h */,
7573
143879341AAD238D00F088A5 /* RCTCameraRollManager.m */,
7674
1304D5B01AA8C50D0002E2BE /* RCTGIFImage.h */,
7775
1304D5B11AA8C50D0002E2BE /* RCTGIFImage.m */,
7876
58B511891A9E6BD600147676 /* RCTImageDownloader.h */,
7977
58B5118A1A9E6BD600147676 /* RCTImageDownloader.m */,
78+
143879361AAD32A300F088A5 /* RCTImageLoader.h */,
79+
143879371AAD32A300F088A5 /* RCTImageLoader.m */,
8080
137620331B31C53500677FF0 /* RCTImagePickerManager.h */,
8181
137620341B31C53500677FF0 /* RCTImagePickerManager.m */,
8282
1345A8371B26592900583190 /* RCTImageRequestHandler.h */,

Libraries/Network/RCTHTTPRequestHandler.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99

1010
#import "RCTHTTPRequestHandler.h"
1111

12-
#import "RCTAssert.h"
13-
#import "RCTConvert.h"
14-
#import "RCTEventDispatcher.h"
15-
#import "RCTImageLoader.h"
16-
#import "RCTLog.h"
17-
#import "RCTUtils.h"
18-
1912
@interface RCTHTTPRequestHandler () <NSURLSessionDataDelegate>
2013

2114
@end

Libraries/Network/RCTNetwork.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
58B511D21A9E6C8500147676 = {
4949
isa = PBXGroup;
5050
children = (
51-
58B512061A9E6CE300147676 /* RCTNetworking.h */,
52-
58B512071A9E6CE300147676 /* RCTNetworking.m */,
5351
352DA0B71B17855800AA15A8 /* RCTHTTPRequestHandler.h */,
5452
352DA0B81B17855800AA15A8 /* RCTHTTPRequestHandler.m */,
53+
58B512061A9E6CE300147676 /* RCTNetworking.h */,
54+
58B512071A9E6CE300147676 /* RCTNetworking.m */,
5555
1372B7351AB03E7B00659ED6 /* RCTReachability.h */,
5656
1372B7361AB03E7B00659ED6 /* RCTReachability.m */,
5757
58B511DC1A9E6C8500147676 /* Products */,

Libraries/RCTTest/RCTTest.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@
5858
580C37661AB104AF0015E709 = {
5959
isa = PBXGroup;
6060
children = (
61+
58E64FE31AB964CD007446E2 /* FBSnapshotTestCase */,
6162
585135331AB3C56F00882537 /* RCTTestModule.h */,
6263
585135341AB3C56F00882537 /* RCTTestModule.m */,
6364
585135351AB3C56F00882537 /* RCTTestRunner.h */,
6465
585135361AB3C56F00882537 /* RCTTestRunner.m */,
65-
58E64FE31AB964CD007446E2 /* FBSnapshotTestCase */,
6666
580C37701AB104AF0015E709 /* Products */,
6767
);
6868
indentWidth = 2;

Libraries/Settings/Settings.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var invariant = require('invariant');
1919
var subscriptions: Array<{keys: Array<string>; callback: ?Function}> = [];
2020

2121
var Settings = {
22-
_settings: RCTSettingsManager.settings,
22+
_settings: RCTSettingsManager && RCTSettingsManager.settings,
2323

2424
get(key: string): mixed {
2525
return this._settings[key];

0 commit comments

Comments
 (0)