mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
149
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
486c507dd0 | ||
|
|
7aa5858ea6 | ||
|
|
ec9f38c540 | ||
|
|
741ac367d8 | ||
|
|
486f3b035f | ||
|
|
8491e08755 | ||
|
|
c2b60dd029 | ||
|
|
60b2b5175d | ||
|
|
44206a949f | ||
|
|
64dd140c1b | ||
|
|
295867607b | ||
|
|
016f47c7f5 | ||
|
|
5c0dec16ba | ||
|
|
79e1eacc18 | ||
|
|
770091f3c1 | ||
|
|
b7ded130df | ||
|
|
9673c885fd | ||
|
|
b99343bdad | ||
|
|
dd6d297c55 | ||
|
|
f0a3a25cd2 | ||
|
|
3968e0ac45 | ||
|
|
5200ac1ee9 | ||
|
|
1c23b70929 | ||
|
|
24a83fae2f | ||
|
|
1296cb29eb | ||
|
|
d89f59d94a | ||
|
|
b6719b247d | ||
|
|
fea38570ff | ||
|
|
8708c8bb82 | ||
|
|
9311c4e6f5 | ||
|
|
217a4449d4 | ||
|
|
1502e66c31 | ||
|
|
ccea759b71 | ||
|
|
467b637656 | ||
|
|
645540809f | ||
|
|
0b2d5317c4 | ||
|
|
aef3d8128f | ||
|
|
8622998335 | ||
|
|
91d266ba87 | ||
|
|
f77185f27e | ||
|
|
1941450649 | ||
|
|
9a7e4b4902 | ||
|
|
fb355f663d | ||
|
|
69ec19c61e | ||
|
|
f7cbd56d8e | ||
|
|
5eb28dc4f0 | ||
|
|
20ef20591f | ||
|
|
2bca6acdaf | ||
|
|
286b56fbd0 | ||
|
|
9ac9ec90c3 | ||
|
|
bbade77fb4 | ||
|
|
b8804fdbc3 | ||
|
|
8fbf0dad1f | ||
|
|
e2b25c8c9d | ||
|
|
179a651240 | ||
|
|
6130650d93 | ||
|
|
d7d89172c2 | ||
|
|
6d175f2c25 | ||
|
|
8915507244 | ||
|
|
a1402511f5 | ||
|
|
0e2591e90b | ||
|
|
feced42fea | ||
|
|
a2aab625f3 | ||
|
|
1a9853da37 | ||
|
|
86c195b3d8 | ||
|
|
5a24ea0b42 | ||
|
|
707aba822e | ||
|
|
c4ac8b329c | ||
|
|
5b52dab781 | ||
|
|
6ee319d8eb | ||
|
|
67f9d92478 | ||
|
|
dbc853246d | ||
|
|
4b70c66a27 | ||
|
|
31a78f3644 | ||
|
|
2817b397de | ||
|
|
90db4f3c6d | ||
|
|
9b261dbc94 | ||
|
|
12a97e1ecd | ||
|
|
b1fdac47b5 | ||
|
|
aa36adb116 | ||
|
|
17405b9774 | ||
|
|
05de4dbb94 | ||
|
|
a75ec1153c | ||
|
|
0eea9c61ee | ||
|
|
3080b8d26c | ||
|
|
542ab8643e | ||
|
|
eafd9b258f | ||
|
|
154c4890c6 | ||
|
|
fc154fcd74 | ||
|
|
e4c21fe292 | ||
|
|
462ab9f988 | ||
|
|
9981b8928d | ||
|
|
af5c8a8fd2 | ||
|
|
441d146b7b | ||
|
|
b2dac834fb | ||
|
|
c43a3f5d84 | ||
|
|
e083f9a139 | ||
|
|
404b7cc069 | ||
|
|
fc62b00880 | ||
|
|
ba8066d7f3 | ||
|
|
95b1fc42b7 | ||
|
|
b32a857d60 | ||
|
|
d22a85211e | ||
|
|
1f27dd6643 | ||
|
|
dfcfb90baa | ||
|
|
449c195941 | ||
|
|
d368ebfab2 | ||
|
|
339531065f | ||
|
|
30989dd24a | ||
|
|
cfae3e376d | ||
|
|
0a0dd30c6a | ||
|
|
9af620bc33 | ||
|
|
97e3c091f8 | ||
|
|
d7a2d3a957 | ||
|
|
6071e8ca2c | ||
|
|
51df83d7d5 | ||
|
|
971cda8794 | ||
|
|
72e203bf95 | ||
|
|
0ce2bbdd64 | ||
|
|
b644b426af | ||
|
|
9462a73189 | ||
|
|
7a02b400be | ||
|
|
251f65263c | ||
|
|
0a9b6bedb3 | ||
|
|
295ee16430 | ||
|
|
0abaaeead0 | ||
|
|
7fd9e77837 | ||
|
|
9584480261 | ||
|
|
8adf78ffc9 | ||
|
|
2289909374 | ||
|
|
9f792c2bae | ||
|
|
100a31412f | ||
|
|
3a2bb3dbc5 | ||
|
|
b2821c3345 | ||
|
|
1b2d9a858b | ||
|
|
24c72f513e | ||
|
|
1142d9d059 | ||
|
|
0cfc38a59f | ||
|
|
797ca6c219 | ||
|
|
1f9b765f81 | ||
|
|
7dff5d2e30 | ||
|
|
76c54847bb | ||
|
|
31b158c9fe | ||
|
|
ff79224d37 | ||
|
|
acdd08aef7 | ||
|
|
53c9dbabaf | ||
|
|
4c2fa7e4ee | ||
|
|
db06fc6814 | ||
|
|
23d84c8df8 |
@@ -221,6 +221,9 @@
|
||||
"no-bitwise": 1, // disallow use of bitwise operators (off by default)
|
||||
"no-plusplus": 0, // disallow use of unary operators, ++ and -- (off by default)
|
||||
|
||||
// React Plugin
|
||||
// The following rules are made available via `eslint-plugin-react`.
|
||||
|
||||
"react/display-name": 0,
|
||||
"react/jsx-boolean-value": 0,
|
||||
"react/jsx-no-duplicate-props": 2,
|
||||
@@ -228,8 +231,8 @@
|
||||
"react/jsx-sort-props": 0,
|
||||
"react/jsx-uses-react": 1,
|
||||
"react/jsx-uses-vars": 1,
|
||||
"react/no-did-mount-set-state": [1, "allow-in-func"],
|
||||
"react/no-did-update-set-state": [1, "allow-in-func"],
|
||||
"react/no-did-mount-set-state": 1,
|
||||
"react/no-did-update-set-state": 1,
|
||||
"react/no-multi-comp": 0,
|
||||
"react/no-string-refs": 1,
|
||||
"react/no-unknown-property": 0,
|
||||
|
||||
+3
-3
@@ -47,11 +47,11 @@ suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.32.0
|
||||
^0.33.0
|
||||
|
||||
@@ -34,6 +34,7 @@ project.xcworkspace
|
||||
buck-out
|
||||
/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/
|
||||
/ReactAndroid/src/main/jni/prebuilt/lib/x86/
|
||||
/ReactAndroid/src/main/gen
|
||||
|
||||
# Android
|
||||
.idea
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
language: objective-c
|
||||
|
||||
osx_image: xcode7.3
|
||||
osx_image: xcode8
|
||||
|
||||
install:
|
||||
- mkdir -p /Users/travis/build/facebook/.nvm
|
||||
@@ -16,6 +16,7 @@ install:
|
||||
|
||||
script:
|
||||
- if [[ "$TEST_TYPE" = objc ]]; then travis_retry travis_wait ./scripts/objc-test.sh; fi
|
||||
- if [[ "$TEST_TYPE" = objc-tvos ]]; then travis_retry travis_wait ./scripts/objc-test-tvos.sh; fi
|
||||
- if [[ "$TEST_TYPE" = e2e-objc ]]; then node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; fi
|
||||
- if [[ "$TEST_TYPE" = js ]]; then npm run flow check; fi
|
||||
- if [[ "$TEST_TYPE" = js ]]; then npm test -- --maxWorkers=1; fi
|
||||
@@ -24,6 +25,7 @@ env:
|
||||
matrix:
|
||||
- TEST_TYPE=e2e-objc
|
||||
- TEST_TYPE=objc
|
||||
- TEST_TYPE=objc-tvos
|
||||
- TEST_TYPE=js
|
||||
|
||||
branches:
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Automatic</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -7,6 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
001BFCE41D838343008E587E /* RCTMultipartStreamReaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */; };
|
||||
1300627F1B59179B0043FE5A /* RCTGzipTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1300627E1B59179B0043FE5A /* RCTGzipTests.m */; };
|
||||
13129DD41C85F87C007D611C /* RCTModuleInitNotificationRaceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13129DD31C85F87C007D611C /* RCTModuleInitNotificationRaceTests.m */; };
|
||||
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13417FE81AA91428003F314A /* libRCTImage.a */; };
|
||||
@@ -57,11 +58,55 @@
|
||||
272E6B3F1BEA849E001FCF37 /* UpdatePropertiesExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */; };
|
||||
27B885561BED29AF00008352 /* RCTRootViewIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */; };
|
||||
27F441EC1BEBE5030039B79C /* FlexibleSizeExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */; };
|
||||
2D4624FA1DA2EAC300C74D09 /* RCTLoggingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D299BAE1D33EBFA00FA1057 /* RCTLoggingTests.m */; };
|
||||
2D4624FB1DA2EAC300C74D09 /* RCTRootViewIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */; };
|
||||
2D4624FC1DA2EAC300C74D09 /* UIExplorerIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB99D0B1BA0340600302749 /* UIExplorerIntegrationTests.m */; };
|
||||
2D4624FD1DA2EAC300C74D09 /* UIExplorerSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 143BC5A01B21E45C00462512 /* UIExplorerSnapshotTests.m */; };
|
||||
2D4624FE1DA2EAC300C74D09 /* RCTUIManagerScenarioTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 83636F8E1B53F22C009F943E /* RCTUIManagerScenarioTests.m */; };
|
||||
2D4625351DA2EBBE00C74D09 /* libRCTTest-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323CC1DA2DD8B000FE1B8 /* libRCTTest-tvOS.a */; };
|
||||
2D4BD8D21DA2E20D005AC8A8 /* RCTURLUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B6C1A21C34225900D3FAF5 /* RCTURLUtilsTests.m */; };
|
||||
2D4BD8D31DA2E20D005AC8A8 /* RCTBundleURLProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FF44371CF6111500720EFD /* RCTBundleURLProviderTests.m */; };
|
||||
2D4BD8D41DA2E20D005AC8A8 /* RCTAllocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA41B21F5E400C1F8F2 /* RCTAllocationTests.m */; };
|
||||
2D4BD8D51DA2E20D005AC8A8 /* RCTBridgeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA51B21F5E400C1F8F2 /* RCTBridgeTests.m */; };
|
||||
2D4BD8D61DA2E20D005AC8A8 /* RCTJSCExecutorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA61B21F5E400C1F8F2 /* RCTJSCExecutorTests.m */; };
|
||||
2D4BD8D71DA2E20D005AC8A8 /* RCTConvert_NSURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA71B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m */; };
|
||||
2D4BD8D81DA2E20D005AC8A8 /* RCTFontTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA81B21F5E400C1F8F2 /* RCTFontTests.m */; };
|
||||
2D4BD8D91DA2E20D005AC8A8 /* RCTEventDispatcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA91B21F5E400C1F8F2 /* RCTEventDispatcherTests.m */; };
|
||||
2D4BD8DA1DA2E20D005AC8A8 /* RCTGzipTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1300627E1B59179B0043FE5A /* RCTGzipTests.m */; };
|
||||
2D4BD8DB1DA2E20D005AC8A8 /* RCTImageLoaderHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 8385CF031B87479200C6273E /* RCTImageLoaderHelpers.m */; };
|
||||
2D4BD8DC1DA2E20D005AC8A8 /* RCTImageLoaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8385CEF41B873B5C00C6273E /* RCTImageLoaderTests.m */; };
|
||||
2D4BD8DD1DA2E20D005AC8A8 /* RCTImageUtilTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 144D21231B2204C5006DB32B /* RCTImageUtilTests.m */; };
|
||||
2D4BD8DE1DA2E20D005AC8A8 /* RCTJSONTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DB03471B5D2ED500C27245 /* RCTJSONTests.m */; };
|
||||
2D4BD8DF1DA2E20D005AC8A8 /* RCTMethodArgumentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DF61B51B67A45000EDB188 /* RCTMethodArgumentTests.m */; };
|
||||
2D4BD8E01DA2E20D005AC8A8 /* RCTModuleInitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 134CB9291C85A38800265FA6 /* RCTModuleInitTests.m */; };
|
||||
2D4BD8E11DA2E20D005AC8A8 /* RCTModuleInitNotificationRaceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13129DD31C85F87C007D611C /* RCTModuleInitNotificationRaceTests.m */; };
|
||||
2D4BD8E21DA2E20D005AC8A8 /* RCTModuleMethodTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1393D0371B68CD1300E1B601 /* RCTModuleMethodTests.m */; };
|
||||
2D4BD8E31DA2E20D005AC8A8 /* RCTShadowViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 138D6A161B53CD440074A87E /* RCTShadowViewTests.m */; };
|
||||
2D4BD8E41DA2E20D005AC8A8 /* RCTUIManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFAB1B21F5E400C1F8F2 /* RCTUIManagerTests.m */; };
|
||||
2D4BD8E51DA2E20D005AC8A8 /* RCTComponentPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BCE84E1C9C209600DD7AAD /* RCTComponentPropsTests.m */; };
|
||||
2D4BD8E61DA2E20D005AC8A8 /* TestBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* TestBundle.js */; };
|
||||
2D4BD8E71DA2E20D005AC8A8 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14D6D7101B220EB3001FB087 /* libOCMock.a */; };
|
||||
2D8C2E321DA40403000EE098 /* RCTMultipartStreamReaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */; };
|
||||
2DD323DC1DA2DDBF000FE1B8 /* FlexibleSizeExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */; };
|
||||
2DD323DD1DA2DDBF000FE1B8 /* UpdatePropertiesExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */; };
|
||||
2DD323DE1DA2DDBF000FE1B8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
|
||||
2DD323DF1DA2DDBF000FE1B8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
2DD323E01DA2DDBF000FE1B8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
2DD323E11DA2DDBF000FE1B8 /* legacy_image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */; };
|
||||
2DD323E21DA2DDBF000FE1B8 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB61A68108700A75B9A /* Info.plist */; };
|
||||
2DD323E31DA2DE3F000FE1B8 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323B51DA2DD8B000FE1B8 /* libRCTAnimation-tvOS.a */; };
|
||||
2DD323E41DA2DE3F000FE1B8 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323BB1DA2DD8B000FE1B8 /* libRCTImage-tvOS.a */; };
|
||||
2DD323E51DA2DE3F000FE1B8 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323BF1DA2DD8B000FE1B8 /* libRCTLinking-tvOS.a */; };
|
||||
2DD323E61DA2DE3F000FE1B8 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323C31DA2DD8B000FE1B8 /* libRCTNetwork-tvOS.a */; };
|
||||
2DD323E71DA2DE3F000FE1B8 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323C81DA2DD8B000FE1B8 /* libRCTSettings-tvOS.a */; };
|
||||
2DD323E81DA2DE3F000FE1B8 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323D01DA2DD8B000FE1B8 /* libRCTText-tvOS.a */; };
|
||||
2DD323E91DA2DE3F000FE1B8 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323D51DA2DD8B000FE1B8 /* libRCTWebSocket-tvOS.a */; };
|
||||
2DD323EA1DA2DE3F000FE1B8 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */; };
|
||||
3578590A1B28D2CF00341EDB /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 357859011B28D2C500341EDB /* libRCTLinking.a */; };
|
||||
3D13F8481D6F6AF900E69E0E /* ImageInBundle.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F8441D6F6AF200E69E0E /* ImageInBundle.png */; };
|
||||
3D13F84A1D6F6AFD00E69E0E /* OtherImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F8451D6F6AF200E69E0E /* OtherImages.xcassets */; };
|
||||
3D299BAF1D33EBFA00FA1057 /* RCTLoggingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D299BAE1D33EBFA00FA1057 /* RCTLoggingTests.m */; };
|
||||
3D2AFAF51D646CF80089D1A3 /* LegacyImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D2AFAF41D646CF80089D1A3 /* LegacyImage@2x.png */; };
|
||||
3D2AFAF51D646CF80089D1A3 /* legacy_image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */; };
|
||||
3D56F9F11D6F6E9B00F53A06 /* UIExplorerBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F83E1D6F6AE000E69E0E /* UIExplorerBundle.bundle */; };
|
||||
3DB99D0C1BA0340600302749 /* UIExplorerIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB99D0B1BA0340600302749 /* UIExplorerIntegrationTests.m */; };
|
||||
3DD981D61D33C6FB007DC7BE /* TestBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* TestBundle.js */; };
|
||||
@@ -158,6 +203,83 @@
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RCTPushNotification;
|
||||
};
|
||||
2D4624C31DA2EA6900C74D09 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 2DD3238F1DA2DD8A000FE1B8;
|
||||
remoteInfo = "UIExplorer-tvOS";
|
||||
};
|
||||
2DD323A61DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 2DD3238F1DA2DD8A000FE1B8;
|
||||
remoteInfo = "UIExplorer-tvOS";
|
||||
};
|
||||
2DD323B41DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 13E5019C1D07A502005F35D8 /* RCTAnimation.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
|
||||
remoteInfo = "RCTAnimation-tvOS";
|
||||
};
|
||||
2DD323BA1DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 13417FE31AA91428003F314A /* RCTImage.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
|
||||
remoteInfo = "RCTImage-tvOS";
|
||||
};
|
||||
2DD323BE1DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 357858F81B28D2C400341EDB /* RCTLinking.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
|
||||
remoteInfo = "RCTLinking-tvOS";
|
||||
};
|
||||
2DD323C21DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 134180261AA91779003F314A /* RCTNetwork.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
|
||||
remoteInfo = "RCTNetwork-tvOS";
|
||||
};
|
||||
2DD323C71DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 13CC9D481AEED2B90020D1C2 /* RCTSettings.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28611D9B046600D4039D;
|
||||
remoteInfo = "RCTSettings-tvOS";
|
||||
};
|
||||
2DD323CB1DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 58005BE41ABA80530062E044 /* RCTTest.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A286E1D9B047700D4039D;
|
||||
remoteInfo = "RCTTest-tvOS";
|
||||
};
|
||||
2DD323CF1DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 13417FEA1AA914B8003F314A /* RCTText.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
|
||||
remoteInfo = "RCTText-tvOS";
|
||||
};
|
||||
2DD323D41DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 139FDECA1B0651EA00C62182 /* RCTWebSocket.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28881D9B049200D4039D;
|
||||
remoteInfo = "RCTWebSocket-tvOS";
|
||||
};
|
||||
2DD323D81DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
|
||||
remoteInfo = "React-tvOS";
|
||||
};
|
||||
357859001B28D2C500341EDB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 357858F81B28D2C400341EDB /* RCTLinking.xcodeproj */;
|
||||
@@ -196,6 +318,7 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultipartStreamReaderTests.m; sourceTree = "<group>"; };
|
||||
004D289E1AAF61C70097A701 /* UIExplorerUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIExplorerUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1300627E1B59179B0043FE5A /* RCTGzipTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTGzipTests.m; sourceTree = "<group>"; };
|
||||
13129DD31C85F87C007D611C /* RCTModuleInitNotificationRaceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTModuleInitNotificationRaceTests.m; sourceTree = "<group>"; };
|
||||
@@ -252,13 +375,17 @@
|
||||
27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
|
||||
27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlexibleSizeExampleView.m; path = UIExplorer/NativeExampleViews/FlexibleSizeExampleView.m; sourceTree = "<group>"; };
|
||||
27F441EA1BEBE5030039B79C /* FlexibleSizeExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlexibleSizeExampleView.h; path = UIExplorer/NativeExampleViews/FlexibleSizeExampleView.h; sourceTree = "<group>"; };
|
||||
2D4624E01DA2EA6900C74D09 /* UIExplorer-tvOSIntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UIExplorer-tvOSIntegrationTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2DD323901DA2DD8A000FE1B8 /* UIExplorer-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "UIExplorer-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2DD323A01DA2DD8B000FE1B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
2DD323A51DA2DD8B000FE1B8 /* UIExplorer-tvOSUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UIExplorer-tvOSUnitTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
357858F81B28D2C400341EDB /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../../Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = "<group>"; };
|
||||
3D13F83E1D6F6AE000E69E0E /* UIExplorerBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIExplorerBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3D13F8401D6F6AE000E69E0E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = "<group>"; };
|
||||
3D13F8441D6F6AF200E69E0E /* ImageInBundle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ImageInBundle.png; sourceTree = "<group>"; };
|
||||
3D13F8451D6F6AF200E69E0E /* OtherImages.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = OtherImages.xcassets; sourceTree = "<group>"; };
|
||||
3D299BAE1D33EBFA00FA1057 /* RCTLoggingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTLoggingTests.m; sourceTree = "<group>"; };
|
||||
3D2AFAF41D646CF80089D1A3 /* LegacyImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "LegacyImage@2x.png"; path = "UIExplorer/LegacyImage@2x.png"; sourceTree = "<group>"; };
|
||||
3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "legacy_image@2x.png"; path = "UIExplorer/legacy_image@2x.png"; sourceTree = "<group>"; };
|
||||
3DB99D0B1BA0340600302749 /* UIExplorerIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIExplorerIntegrationTests.m; sourceTree = "<group>"; };
|
||||
3DD981D51D33C6FB007DC7BE /* TestBundle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = TestBundle.js; sourceTree = "<group>"; };
|
||||
58005BE41ABA80530062E044 /* RCTTest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTTest.xcodeproj; path = ../../Libraries/RCTTest/RCTTest.xcodeproj; sourceTree = "<group>"; };
|
||||
@@ -320,6 +447,37 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2D4624D91DA2EA6900C74D09 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D4625351DA2EBBE00C74D09 /* libRCTTest-tvOS.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD3238D1DA2DD8A000FE1B8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2DD323E31DA2DE3F000FE1B8 /* libRCTAnimation-tvOS.a in Frameworks */,
|
||||
2DD323E41DA2DE3F000FE1B8 /* libRCTImage-tvOS.a in Frameworks */,
|
||||
2DD323E51DA2DE3F000FE1B8 /* libRCTLinking-tvOS.a in Frameworks */,
|
||||
2DD323E61DA2DE3F000FE1B8 /* libRCTNetwork-tvOS.a in Frameworks */,
|
||||
2DD323E71DA2DE3F000FE1B8 /* libRCTSettings-tvOS.a in Frameworks */,
|
||||
2DD323E81DA2DE3F000FE1B8 /* libRCTText-tvOS.a in Frameworks */,
|
||||
2DD323E91DA2DE3F000FE1B8 /* libRCTWebSocket-tvOS.a in Frameworks */,
|
||||
2DD323EA1DA2DE3F000FE1B8 /* libReact-tvOS.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD323A21DA2DD8B000FE1B8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D4BD8E71DA2E20D005AC8A8 /* libOCMock.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D13F83B1D6F6AE000E69E0E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -355,7 +513,7 @@
|
||||
1323F18D1C04ABAC0091BED0 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3D2AFAF41D646CF80089D1A3 /* LegacyImage@2x.png */,
|
||||
3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */,
|
||||
13B07FB61A68108700A75B9A /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
@@ -365,6 +523,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13417FE81AA91428003F314A /* libRCTImage.a */,
|
||||
2DD323BB1DA2DD8B000FE1B8 /* libRCTImage-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -373,6 +532,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13417FEF1AA914B8003F314A /* libRCTText.a */,
|
||||
2DD323D01DA2DD8B000FE1B8 /* libRCTText-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -381,6 +541,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1341802B1AA91779003F314A /* libRCTNetwork.a */,
|
||||
2DD323C31DA2DD8B000FE1B8 /* libRCTNetwork-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -413,6 +574,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
139FDED91B0651EA00C62182 /* libRCTWebSocket.a */,
|
||||
2DD323D51DA2DD8B000FE1B8 /* libRCTWebSocket-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -435,6 +597,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13E501A31D07A502005F35D8 /* libRCTAnimation.a */,
|
||||
2DD323B51DA2DD8B000FE1B8 /* libRCTAnimation-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -460,6 +623,7 @@
|
||||
134CB9291C85A38800265FA6 /* RCTModuleInitTests.m */,
|
||||
13129DD31C85F87C007D611C /* RCTModuleInitNotificationRaceTests.m */,
|
||||
1393D0371B68CD1300E1B601 /* RCTModuleMethodTests.m */,
|
||||
001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */,
|
||||
138D6A161B53CD440074A87E /* RCTShadowViewTests.m */,
|
||||
1497CFAB1B21F5E400C1F8F2 /* RCTUIManagerTests.m */,
|
||||
13BCE84E1C9C209600DD7AAD /* RCTComponentPropsTests.m */,
|
||||
@@ -504,6 +668,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
14AADF041AC3DB95002390C9 /* libReact.a */,
|
||||
2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -550,10 +715,19 @@
|
||||
name = NativeExampleViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2DD323911DA2DD8B000FE1B8 /* UIExplorer-tvOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2DD323A01DA2DD8B000FE1B8 /* Info.plist */,
|
||||
);
|
||||
path = "UIExplorer-tvOS";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
357858F91B28D2C400341EDB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
357859011B28D2C500341EDB /* libRCTLinking.a */,
|
||||
2DD323BF1DA2DD8B000FE1B8 /* libRCTLinking-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -573,6 +747,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
58005BEE1ABA80530062E044 /* libRCTTest.a */,
|
||||
2DD323CC1DA2DD8B000FE1B8 /* libRCTTest-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -581,6 +756,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
834C36D21AF8DA610019C93C /* libRCTSettings.a */,
|
||||
2DD323C81DA2DD8B000FE1B8 /* libRCTSettings-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -594,6 +770,7 @@
|
||||
143BC5961B21E3E100462512 /* UIExplorerIntegrationTests */,
|
||||
3D13F83F1D6F6AE000E69E0E /* UIExplorerBundle */,
|
||||
14D6D6EA1B2205C0001FB087 /* OCMock */,
|
||||
2DD323911DA2DD8B000FE1B8 /* UIExplorer-tvOS */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
@@ -607,6 +784,9 @@
|
||||
004D289E1AAF61C70097A701 /* UIExplorerUnitTests.xctest */,
|
||||
143BC5951B21E3E100462512 /* UIExplorerIntegrationTests.xctest */,
|
||||
3D13F83E1D6F6AE000E69E0E /* UIExplorerBundle.bundle */,
|
||||
2DD323901DA2DD8A000FE1B8 /* UIExplorer-tvOS.app */,
|
||||
2DD323A51DA2DD8B000FE1B8 /* UIExplorer-tvOSUnitTests.xctest */,
|
||||
2D4624E01DA2EA6900C74D09 /* UIExplorer-tvOSIntegrationTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -676,6 +856,60 @@
|
||||
productReference = 143BC5951B21E3E100462512 /* UIExplorerIntegrationTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
2D4624C11DA2EA6900C74D09 /* UIExplorer-tvOSIntegrationTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D4624DD1DA2EA6900C74D09 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOSIntegrationTests" */;
|
||||
buildPhases = (
|
||||
2D4624C41DA2EA6900C74D09 /* Sources */,
|
||||
2D4624D91DA2EA6900C74D09 /* Frameworks */,
|
||||
2D4624DB1DA2EA6900C74D09 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
2D4624C21DA2EA6900C74D09 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "UIExplorer-tvOSIntegrationTests";
|
||||
productName = "UIExplorer-tvOSUnitTests";
|
||||
productReference = 2D4624E01DA2EA6900C74D09 /* UIExplorer-tvOSIntegrationTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
2DD3238F1DA2DD8A000FE1B8 /* UIExplorer-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2DD323DA1DA2DD8B000FE1B8 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOS" */;
|
||||
buildPhases = (
|
||||
2DD3238C1DA2DD8A000FE1B8 /* Sources */,
|
||||
2DD3238D1DA2DD8A000FE1B8 /* Frameworks */,
|
||||
2DD3238E1DA2DD8A000FE1B8 /* Resources */,
|
||||
2DD323EB1DA2DEC1000FE1B8 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "UIExplorer-tvOS";
|
||||
productName = "UIExplorer-tvOS";
|
||||
productReference = 2DD323901DA2DD8A000FE1B8 /* UIExplorer-tvOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
2DD323A41DA2DD8B000FE1B8 /* UIExplorer-tvOSUnitTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2DD323DB1DA2DD8B000FE1B8 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOSUnitTests" */;
|
||||
buildPhases = (
|
||||
2DD323A11DA2DD8B000FE1B8 /* Sources */,
|
||||
2DD323A21DA2DD8B000FE1B8 /* Frameworks */,
|
||||
2DD323A31DA2DD8B000FE1B8 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
2DD323A71DA2DD8B000FE1B8 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "UIExplorer-tvOSUnitTests";
|
||||
productName = "UIExplorer-tvOSUnitTests";
|
||||
productReference = 2DD323A51DA2DD8B000FE1B8 /* UIExplorer-tvOSUnitTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
3D13F83D1D6F6AE000E69E0E /* UIExplorerBundle */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3D13F8411D6F6AE000E69E0E /* Build configuration list for PBXNativeTarget "UIExplorerBundle" */;
|
||||
@@ -709,6 +943,15 @@
|
||||
CreatedOnToolsVersion = 6.3.2;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
2DD3238F1DA2DD8A000FE1B8 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
2DD323A41DA2DD8B000FE1B8 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 2DD3238F1DA2DD8A000FE1B8;
|
||||
};
|
||||
3D13F83D1D6F6AE000E69E0E = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
};
|
||||
@@ -793,6 +1036,9 @@
|
||||
004D289D1AAF61C70097A701 /* UIExplorerUnitTests */,
|
||||
143BC5941B21E3E100462512 /* UIExplorerIntegrationTests */,
|
||||
3D13F83D1D6F6AE000E69E0E /* UIExplorerBundle */,
|
||||
2DD3238F1DA2DD8A000FE1B8 /* UIExplorer-tvOS */,
|
||||
2DD323A41DA2DD8B000FE1B8 /* UIExplorer-tvOSUnitTests */,
|
||||
2D4624C11DA2EA6900C74D09 /* UIExplorer-tvOSIntegrationTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -875,6 +1121,69 @@
|
||||
remoteRef = 14DC67F01AB71876001358AB /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323B51DA2DD8B000FE1B8 /* libRCTAnimation-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTAnimation-tvOS.a";
|
||||
remoteRef = 2DD323B41DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323BB1DA2DD8B000FE1B8 /* libRCTImage-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTImage-tvOS.a";
|
||||
remoteRef = 2DD323BA1DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323BF1DA2DD8B000FE1B8 /* libRCTLinking-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTLinking-tvOS.a";
|
||||
remoteRef = 2DD323BE1DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323C31DA2DD8B000FE1B8 /* libRCTNetwork-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTNetwork-tvOS.a";
|
||||
remoteRef = 2DD323C21DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323C81DA2DD8B000FE1B8 /* libRCTSettings-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTSettings-tvOS.a";
|
||||
remoteRef = 2DD323C71DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323CC1DA2DD8B000FE1B8 /* libRCTTest-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTTest-tvOS.a";
|
||||
remoteRef = 2DD323CB1DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323D01DA2DD8B000FE1B8 /* libRCTText-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTText-tvOS.a";
|
||||
remoteRef = 2DD323CF1DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323D51DA2DD8B000FE1B8 /* libRCTWebSocket-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTWebSocket-tvOS.a";
|
||||
remoteRef = 2DD323D41DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libReact-tvOS.a";
|
||||
remoteRef = 2DD323D81DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
357859011B28D2C500341EDB /* libRCTLinking.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
@@ -920,7 +1229,7 @@
|
||||
files = (
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
3D56F9F11D6F6E9B00F53A06 /* UIExplorerBundle.bundle in Resources */,
|
||||
3D2AFAF51D646CF80089D1A3 /* LegacyImage@2x.png in Resources */,
|
||||
3D2AFAF51D646CF80089D1A3 /* legacy_image@2x.png in Resources */,
|
||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -932,6 +1241,31 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2D4624DB1DA2EA6900C74D09 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD3238E1DA2DD8A000FE1B8 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2DD323DF1DA2DDBF000FE1B8 /* Images.xcassets in Resources */,
|
||||
2DD323E11DA2DDBF000FE1B8 /* legacy_image@2x.png in Resources */,
|
||||
2DD323E21DA2DDBF000FE1B8 /* Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD323A31DA2DD8B000FE1B8 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D4BD8E61DA2E20D005AC8A8 /* TestBundle.js in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D13F83C1D6F6AE000E69E0E /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -944,6 +1278,19 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
2DD323EB1DA2DEC1000FE1B8 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "export NODE_BINARY=node\n$SRCROOT/../../packager/react-native-xcode.sh Examples/UIExplorer/js/UIExplorerApp.ios.js";
|
||||
};
|
||||
68CD48B71D2BCB2C007E06A9 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -979,6 +1326,7 @@
|
||||
1497CFB31B21F5E400C1F8F2 /* RCTUIManagerTests.m in Sources */,
|
||||
13DB03481B5D2ED500C27245 /* RCTJSONTests.m in Sources */,
|
||||
1497CFAC1B21F5E400C1F8F2 /* RCTAllocationTests.m in Sources */,
|
||||
001BFCE41D838343008E587E /* RCTMultipartStreamReaderTests.m in Sources */,
|
||||
13DF61B61B67A45000EDB188 /* RCTMethodArgumentTests.m in Sources */,
|
||||
138D6A181B53CD440074A87E /* RCTShadowViewTests.m in Sources */,
|
||||
13B6C1A31C34225900D3FAF5 /* RCTURLUtilsTests.m in Sources */,
|
||||
@@ -1011,6 +1359,57 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2D4624C41DA2EA6900C74D09 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D4624FC1DA2EAC300C74D09 /* UIExplorerIntegrationTests.m in Sources */,
|
||||
2D4624FA1DA2EAC300C74D09 /* RCTLoggingTests.m in Sources */,
|
||||
2D4624FE1DA2EAC300C74D09 /* RCTUIManagerScenarioTests.m in Sources */,
|
||||
2D4624FD1DA2EAC300C74D09 /* UIExplorerSnapshotTests.m in Sources */,
|
||||
2D4624FB1DA2EAC300C74D09 /* RCTRootViewIntegrationTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD3238C1DA2DD8A000FE1B8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2DD323DC1DA2DDBF000FE1B8 /* FlexibleSizeExampleView.m in Sources */,
|
||||
2DD323DD1DA2DDBF000FE1B8 /* UpdatePropertiesExampleView.m in Sources */,
|
||||
2DD323E01DA2DDBF000FE1B8 /* main.m in Sources */,
|
||||
2DD323DE1DA2DDBF000FE1B8 /* AppDelegate.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
2DD323A11DA2DD8B000FE1B8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D4BD8DC1DA2E20D005AC8A8 /* RCTImageLoaderTests.m in Sources */,
|
||||
2D4BD8D51DA2E20D005AC8A8 /* RCTBridgeTests.m in Sources */,
|
||||
2D4BD8D91DA2E20D005AC8A8 /* RCTEventDispatcherTests.m in Sources */,
|
||||
2D4BD8D41DA2E20D005AC8A8 /* RCTAllocationTests.m in Sources */,
|
||||
2D4BD8DA1DA2E20D005AC8A8 /* RCTGzipTests.m in Sources */,
|
||||
2D4BD8DB1DA2E20D005AC8A8 /* RCTImageLoaderHelpers.m in Sources */,
|
||||
2D4BD8E51DA2E20D005AC8A8 /* RCTComponentPropsTests.m in Sources */,
|
||||
2D4BD8D71DA2E20D005AC8A8 /* RCTConvert_NSURLTests.m in Sources */,
|
||||
2D4BD8E21DA2E20D005AC8A8 /* RCTModuleMethodTests.m in Sources */,
|
||||
2D4BD8E11DA2E20D005AC8A8 /* RCTModuleInitNotificationRaceTests.m in Sources */,
|
||||
2D4BD8DF1DA2E20D005AC8A8 /* RCTMethodArgumentTests.m in Sources */,
|
||||
2D4BD8D61DA2E20D005AC8A8 /* RCTJSCExecutorTests.m in Sources */,
|
||||
2D4BD8D31DA2E20D005AC8A8 /* RCTBundleURLProviderTests.m in Sources */,
|
||||
2D4BD8D21DA2E20D005AC8A8 /* RCTURLUtilsTests.m in Sources */,
|
||||
2D8C2E321DA40403000EE098 /* RCTMultipartStreamReaderTests.m in Sources */,
|
||||
2D4BD8DE1DA2E20D005AC8A8 /* RCTJSONTests.m in Sources */,
|
||||
2D4BD8E31DA2E20D005AC8A8 /* RCTShadowViewTests.m in Sources */,
|
||||
2D4BD8D81DA2E20D005AC8A8 /* RCTFontTests.m in Sources */,
|
||||
2D4BD8DD1DA2E20D005AC8A8 /* RCTImageUtilTests.m in Sources */,
|
||||
2D4BD8E41DA2E20D005AC8A8 /* RCTUIManagerTests.m in Sources */,
|
||||
2D4BD8E01DA2E20D005AC8A8 /* RCTModuleInitTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3D13F83A1D6F6AE000E69E0E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -1026,6 +1425,16 @@
|
||||
target = 13B07F861A680F5B00A75B9A /* UIExplorer */;
|
||||
targetProxy = 143BC59B1B21E3E100462512 /* PBXContainerItemProxy */;
|
||||
};
|
||||
2D4624C21DA2EA6900C74D09 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 2DD3238F1DA2DD8A000FE1B8 /* UIExplorer-tvOS */;
|
||||
targetProxy = 2D4624C31DA2EA6900C74D09 /* PBXContainerItemProxy */;
|
||||
};
|
||||
2DD323A71DA2DD8B000FE1B8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 2DD3238F1DA2DD8A000FE1B8 /* UIExplorer-tvOS */;
|
||||
targetProxy = 2DD323A61DA2DD8B000FE1B8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
3D13F84C1D6F6B5F00E69E0E /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3D13F83D1D6F6AE000E69E0E /* UIExplorerBundle */;
|
||||
@@ -1161,6 +1570,169 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2D4624DE1DA2EA6900C74D09 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"FB_REFERENCE_IMAGE_DIR=\"\\\"$(SOURCE_ROOT)/$(PROJECT_NAME)IntegrationTests/ReferenceImages\\\"\"",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../../Libraries/**",
|
||||
);
|
||||
INFOPLIST_FILE = UIExplorerIntegrationTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/UIExplorerUnitTests",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOSIntegrationTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIExplorer-tvOS.app/UIExplorer-tvOS";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D4624DF1DA2EA6900C74D09 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../../Libraries/**",
|
||||
);
|
||||
INFOPLIST_FILE = UIExplorerIntegrationTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/UIExplorerUnitTests",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOSIntegrationTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIExplorer-tvOS.app/UIExplorer-tvOS";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2DD323AC1DA2DD8B000FE1B8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "UIExplorer-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2DD323AD1DA2DD8B000FE1B8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "UIExplorer-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2DD323AE1DA2DD8B000FE1B8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../../Libraries/**",
|
||||
"$(SRCROOT)/UIExplorerUnitTests",
|
||||
);
|
||||
INFOPLIST_FILE = UIExplorerUnitTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/UIExplorerUnitTests",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOSUnitTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIExplorer-tvOS.app/UIExplorer-tvOS";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2DD323AF1DA2DD8B000FE1B8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../../Libraries/**",
|
||||
"$(SRCROOT)/UIExplorerUnitTests",
|
||||
);
|
||||
INFOPLIST_FILE = UIExplorerUnitTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/UIExplorerUnitTests",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.UIExplorer-tvOSUnitTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIExplorer-tvOS.app/UIExplorer-tvOS";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3D13F8421D6F6AE000E69E0E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -1356,6 +1928,33 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2D4624DD1DA2EA6900C74D09 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOSIntegrationTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D4624DE1DA2EA6900C74D09 /* Debug */,
|
||||
2D4624DF1DA2EA6900C74D09 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2DD323DA1DA2DD8B000FE1B8 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2DD323AC1DA2DD8B000FE1B8 /* Debug */,
|
||||
2DD323AD1DA2DD8B000FE1B8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2DD323DB1DA2DD8B000FE1B8 /* Build configuration list for PBXNativeTarget "UIExplorer-tvOSUnitTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2DD323AE1DA2DD8B000FE1B8 /* Debug */,
|
||||
2DD323AF1DA2DD8B000FE1B8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3D13F8411D6F6AE000E69E0E /* Build configuration list for PBXNativeTarget "UIExplorerBundle" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD323A41DA2DD8B000FE1B8"
|
||||
BuildableName = "UIExplorer-tvOSUnitTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSUnitTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D4624C11DA2EA6900C74D09"
|
||||
BuildableName = "UIExplorer-tvOSIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "CI_USE_PACKAGER"
|
||||
value = "1"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -19,7 +19,9 @@
|
||||
#import "RCTJavaScriptLoader.h"
|
||||
#import "RCTLinkingManager.h"
|
||||
#import "RCTRootView.h"
|
||||
#if !TARGET_OS_TV
|
||||
#import "RCTPushNotificationManager.h"
|
||||
#endif
|
||||
|
||||
@interface AppDelegate() <RCTBridgeDelegate>
|
||||
|
||||
@@ -79,6 +81,8 @@
|
||||
|
||||
# pragma mark - Push Notifications
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
// Required to register for notifications
|
||||
- (void)application:(__unused UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
|
||||
{
|
||||
@@ -109,4 +113,6 @@
|
||||
[RCTPushNotificationManager didReceiveLocalNotification:notification];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
@@ -41,4 +51,4 @@
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,9 @@ RCT_EXPORT_MODULE();
|
||||
[_resizableRootView setSizeFlexibility:RCTRootViewSizeFlexibilityHeight];
|
||||
|
||||
_currentSizeTextView = [UITextView new];
|
||||
#ifndef TARGET_OS_TV
|
||||
_currentSizeTextView.editable = NO;
|
||||
#endif
|
||||
_currentSizeTextView.text = @"Resizable view has not been resized yet";
|
||||
_currentSizeTextView.textColor = [UIColor blackColor];
|
||||
_currentSizeTextView.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -45,12 +45,14 @@
|
||||
[_runner runTest:_cmd module:@#name]; \
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV // None of these will run in tvOS due to StatusBar not existing
|
||||
RCT_TEST(ViewExample)
|
||||
RCT_TEST(LayoutExample)
|
||||
RCT_TEST(TextExample)
|
||||
RCT_TEST(SwitchExample)
|
||||
RCT_TEST(SliderExample)
|
||||
RCT_TEST(TabBarExample)
|
||||
#endif
|
||||
|
||||
- (void)testZZZNotInRecordMode
|
||||
{
|
||||
|
||||
@@ -63,11 +63,13 @@
|
||||
|
||||
- (void)testFamily
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
{
|
||||
UIFont *expected = [UIFont fontWithName:@"Cochin" size:14];
|
||||
UIFont *result = [RCTConvert UIFont:@{@"fontFamily": @"Cochin"}];
|
||||
RCTAssertEqualFonts(expected, result);
|
||||
}
|
||||
#endif
|
||||
{
|
||||
UIFont *expected = [UIFont fontWithName:@"HelveticaNeue" size:14];
|
||||
UIFont *result = [RCTConvert UIFont:@{@"fontFamily": @"Helvetica Neue"}];
|
||||
@@ -135,6 +137,7 @@
|
||||
UIFont *result = [RCTConvert UIFont:@{@"fontFamily": @"HelveticaNeue-Bold", @"fontWeight": @"normal"}];
|
||||
RCTAssertEqualFonts(expected, result);
|
||||
}
|
||||
#if !TARGET_OS_TV
|
||||
{
|
||||
UIFont *expected = [UIFont fontWithName:@"Cochin-Bold" size:14];
|
||||
UIFont *result = [RCTConvert UIFont:@{@"fontFamily": @"Cochin", @"fontWeight": @"700"}];
|
||||
@@ -145,6 +148,7 @@
|
||||
UIFont *result = [RCTConvert UIFont:@{@"fontFamily": @"Cochin", @"fontWeight": @"100"}];
|
||||
RCTAssertEqualFonts(expected, result);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)testFamilyAndStyle
|
||||
|
||||
@@ -47,7 +47,13 @@
|
||||
return _canLoadImageURLHandler(requestURL);
|
||||
}
|
||||
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL size:(CGSize)size scale:(CGFloat)scale resizeMode:(RCTResizeMode)resizeMode progressHandler:(RCTImageLoaderProgressBlock)progressHandler partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadHandler:(__unused RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
{
|
||||
return _loadImageURLHandler(imageURL, size, scale, resizeMode, progressHandler, completionHandler);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "RCTUtils.h"
|
||||
#import "RCTMultipartStreamReader.h"
|
||||
|
||||
@interface RCTMultipartStreamReaderTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTMultipartStreamReaderTests
|
||||
|
||||
- (void)testSimpleCase {
|
||||
NSString *response =
|
||||
@"preable, should be ignored\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"Content-Type: application/json; charset=utf-8\r\n"
|
||||
@"Content-Length: 2\r\n\r\n"
|
||||
@"{}\r\n"
|
||||
@"--sample_boundary--\r\n"
|
||||
@"epilogue, should be ignored";
|
||||
|
||||
NSInputStream *inputStream = [NSInputStream inputStreamWithData:[response dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
RCTMultipartStreamReader *reader = [[RCTMultipartStreamReader alloc] initWithInputStream:inputStream boundary:@"sample_boundary"];
|
||||
__block NSInteger count = 0;
|
||||
BOOL success = [reader readAllParts:^(NSDictionary *headers, NSData *content, BOOL done) {
|
||||
XCTAssertTrue(done);
|
||||
XCTAssertEqualObjects(headers[@"Content-Type"], @"application/json; charset=utf-8");
|
||||
XCTAssertEqualObjects([[NSString alloc] initWithData:content encoding:NSUTF8StringEncoding], @"{}");
|
||||
count++;
|
||||
}];
|
||||
XCTAssertTrue(success);
|
||||
XCTAssertEqual(count, 1);
|
||||
}
|
||||
|
||||
- (void)testMultipleParts {
|
||||
NSString *response =
|
||||
@"preable, should be ignored\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"1\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"2\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"3\r\n"
|
||||
@"--sample_boundary--\r\n"
|
||||
@"epilogue, should be ignored";
|
||||
|
||||
NSInputStream *inputStream = [NSInputStream inputStreamWithData:[response dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
RCTMultipartStreamReader *reader = [[RCTMultipartStreamReader alloc] initWithInputStream:inputStream boundary:@"sample_boundary"];
|
||||
__block NSInteger count = 0;
|
||||
BOOL success = [reader readAllParts:^(__unused NSDictionary *headers, NSData *content, BOOL done) {
|
||||
count++;
|
||||
XCTAssertEqual(done, count == 3);
|
||||
NSString *expectedBody = [NSString stringWithFormat:@"%ld", (long)count];
|
||||
NSString *actualBody = [[NSString alloc] initWithData:content encoding:NSUTF8StringEncoding];
|
||||
XCTAssertEqualObjects(actualBody, expectedBody);
|
||||
}];
|
||||
XCTAssertTrue(success);
|
||||
XCTAssertEqual(count, 3);
|
||||
}
|
||||
|
||||
- (void)testNoDelimiter {
|
||||
NSString *response = @"Yolo";
|
||||
|
||||
NSInputStream *inputStream = [NSInputStream inputStreamWithData:[response dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
RCTMultipartStreamReader *reader = [[RCTMultipartStreamReader alloc] initWithInputStream:inputStream boundary:@"sample_boundary"];
|
||||
__block NSInteger count = 0;
|
||||
BOOL success = [reader readAllParts:^(__unused NSDictionary *headers, __unused NSData *content, __unused BOOL done) {
|
||||
count++;
|
||||
}];
|
||||
XCTAssertFalse(success);
|
||||
XCTAssertEqual(count, 0);
|
||||
}
|
||||
|
||||
- (void)testNoCloseDelimiter {
|
||||
NSString *response =
|
||||
@"preable, should be ignored\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"Content-Type: application/json; charset=utf-8\r\n"
|
||||
@"Content-Length: 2\r\n\r\n"
|
||||
@"{}\r\n"
|
||||
@"--sample_boundary\r\n"
|
||||
@"incomplete message...";
|
||||
|
||||
NSInputStream *inputStream = [NSInputStream inputStreamWithData:[response dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
RCTMultipartStreamReader *reader = [[RCTMultipartStreamReader alloc] initWithInputStream:inputStream boundary:@"sample_boundary"];
|
||||
__block NSInteger count = 0;
|
||||
BOOL success = [reader readAllParts:^(__unused NSDictionary *headers, __unused NSData *content, __unused BOOL done) {
|
||||
count++;
|
||||
}];
|
||||
XCTAssertFalse(success);
|
||||
XCTAssertEqual(count, 1);
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
@@ -612,7 +612,7 @@ exports.examples = [
|
||||
render: function() {
|
||||
return (
|
||||
<Image
|
||||
source={require('image!LegacyImage')}
|
||||
source={require('image!legacy_image')}
|
||||
/>
|
||||
);
|
||||
},
|
||||
@@ -645,6 +645,7 @@ exports.examples = [
|
||||
</View>
|
||||
);
|
||||
},
|
||||
platform: 'ios',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -300,23 +300,23 @@ class TextExample extends React.Component {
|
||||
</Text>
|
||||
</UIExplorerBlock>
|
||||
<UIExplorerBlock title="Unicode">
|
||||
<View style={{flex: 1}}>
|
||||
<View>
|
||||
<View style={{flexDirection: 'row'}}>
|
||||
<Text style={{backgroundColor: 'red'}}>
|
||||
星际争霸是世界上最好的游戏。
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{flex: 1}}>
|
||||
<View>
|
||||
<Text style={{backgroundColor: 'red'}}>
|
||||
星际争霸是世界上最好的游戏。
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{flex: 1, alignItems: 'center'}}>
|
||||
<View style={{alignItems: 'center'}}>
|
||||
<Text style={{backgroundColor: 'red'}}>
|
||||
星际争霸是世界上最好的游戏。
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{flex: 1}}>
|
||||
<View>
|
||||
<Text style={{backgroundColor: 'red'}}>
|
||||
星际争霸是世界上最好的游戏。星际争霸是世界上最好的游戏。星际争霸是世界上最好的游戏。星际争霸是世界上最好的游戏。
|
||||
</Text>
|
||||
|
||||
@@ -727,6 +727,9 @@ class AnimatedValue extends AnimatedWithChildren {
|
||||
*/
|
||||
setOffset(offset: number): void {
|
||||
this._offset = offset;
|
||||
if (this.__isNative) {
|
||||
NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -736,6 +739,9 @@ class AnimatedValue extends AnimatedWithChildren {
|
||||
flattenOffset(): void {
|
||||
this._value += this._offset;
|
||||
this._offset = 0;
|
||||
if (this.__isNative) {
|
||||
NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1130,6 +1136,54 @@ class AnimatedAddition extends AnimatedWithChildren {
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedDivision extends AnimatedWithChildren {
|
||||
_a: Animated;
|
||||
_b: Animated;
|
||||
|
||||
constructor(a: Animated | number, b: Animated | number) {
|
||||
super();
|
||||
this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
|
||||
this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
|
||||
}
|
||||
|
||||
__makeNative() {
|
||||
super.__makeNative();
|
||||
this._a.__makeNative();
|
||||
this._b.__makeNative();
|
||||
}
|
||||
|
||||
__getValue(): number {
|
||||
const a = this._a.__getValue();
|
||||
const b = this._b.__getValue();
|
||||
if (b === 0) {
|
||||
console.error('Detected division by zero in AnimatedDivision');
|
||||
}
|
||||
return a / b;
|
||||
}
|
||||
|
||||
interpolate(config: InterpolationConfigType): AnimatedInterpolation {
|
||||
return new AnimatedInterpolation(this, config);
|
||||
}
|
||||
|
||||
__attach(): void {
|
||||
this._a.__addChild(this);
|
||||
this._b.__addChild(this);
|
||||
}
|
||||
|
||||
__detach(): void {
|
||||
this._a.__removeChild(this);
|
||||
this._b.__removeChild(this);
|
||||
super.__detach();
|
||||
}
|
||||
|
||||
__getNativeConfig(): any {
|
||||
return {
|
||||
type: 'division',
|
||||
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedMultiplication extends AnimatedWithChildren {
|
||||
_a: Animated;
|
||||
_b: Animated;
|
||||
@@ -1789,15 +1843,22 @@ type CompositeAnimation = {
|
||||
};
|
||||
|
||||
var add = function(
|
||||
a: Animated,
|
||||
b: Animated
|
||||
a: Animated | number,
|
||||
b: Animated | number,
|
||||
): AnimatedAddition {
|
||||
return new AnimatedAddition(a, b);
|
||||
};
|
||||
|
||||
var divide = function(
|
||||
a: Animated | number,
|
||||
b: Animated | number,
|
||||
): AnimatedDivision {
|
||||
return new AnimatedDivision(a, b);
|
||||
};
|
||||
|
||||
var multiply = function(
|
||||
a: Animated,
|
||||
b: Animated
|
||||
a: Animated | number,
|
||||
b: Animated | number,
|
||||
): AnimatedMultiplication {
|
||||
return new AnimatedMultiplication(a, b);
|
||||
};
|
||||
@@ -2289,6 +2350,13 @@ module.exports = {
|
||||
* together.
|
||||
*/
|
||||
add,
|
||||
|
||||
/**
|
||||
* Creates a new Animated value composed by dividing the first Animated value
|
||||
* by the second Animated value.
|
||||
*/
|
||||
divide,
|
||||
|
||||
/**
|
||||
* Creates a new Animated value composed from two Animated values multiplied
|
||||
* together.
|
||||
|
||||
@@ -163,7 +163,7 @@ function colorToRgba(input: string): string {
|
||||
return input;
|
||||
}
|
||||
|
||||
int32Color = int32Color || 0; // $FlowIssue
|
||||
int32Color = int32Color || 0;
|
||||
|
||||
var r = (int32Color & 0xff000000) >>> 24;
|
||||
var g = (int32Color & 0x00ff0000) >>> 16;
|
||||
|
||||
@@ -65,6 +65,14 @@ const API = {
|
||||
assertNativeAnimatedModule();
|
||||
NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);
|
||||
},
|
||||
setAnimatedNodeOffset: function(nodeTag: number, offset: number): void {
|
||||
assertNativeAnimatedModule();
|
||||
NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);
|
||||
},
|
||||
flattenAnimatedNodeOffset: function(nodeTag: number): void {
|
||||
assertNativeAnimatedModule();
|
||||
NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);
|
||||
},
|
||||
connectAnimatedNodeToView: function(nodeTag: number, viewTag: number): void {
|
||||
assertNativeAnimatedModule();
|
||||
NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);
|
||||
|
||||
@@ -15,9 +15,11 @@ var BatchedBridge = require('BatchedBridge');
|
||||
var BugReporting = require('BugReporting');
|
||||
var ReactNative = require('react/lib/ReactNative');
|
||||
|
||||
const infoLog = require('infoLog');
|
||||
var invariant = require('fbjs/lib/invariant');
|
||||
var renderApplication = require('renderApplication');
|
||||
const infoLog = require('infoLog');
|
||||
|
||||
const { HeadlessJsTaskSupport } = require('NativeModules');
|
||||
|
||||
if (__DEV__) {
|
||||
// In order to use Cmd+P to record/dump perf data, we need to make sure
|
||||
@@ -25,8 +27,12 @@ if (__DEV__) {
|
||||
require('RCTRenderingPerf');
|
||||
}
|
||||
|
||||
type Task = (taskData: any) => Promise<void>;
|
||||
type TaskProvider = () => Task;
|
||||
|
||||
var runnables = {};
|
||||
var runCount = 1;
|
||||
const tasks: Map<string, TaskProvider> = new Map();
|
||||
|
||||
type ComponentProvider = () => ReactClass<any>;
|
||||
|
||||
@@ -103,6 +109,40 @@ var AppRegistry = {
|
||||
ReactNative.unmountComponentAtNodeAndRemoveContainer(rootTag);
|
||||
},
|
||||
|
||||
/**
|
||||
* Register a headless task. A headless task is a bit of code that runs without a UI.
|
||||
* @param taskKey the key associated with this task
|
||||
* @param task a promise returning function that takes some data passed from the native side as
|
||||
* the only argument; when the promise is resolved or rejected the native side is
|
||||
* notified of this event and it may decide to destroy the JS context.
|
||||
*/
|
||||
registerHeadlessTask: function(taskKey: string, task: TaskProvider): void {
|
||||
if (tasks.has(taskKey)) {
|
||||
console.warn(`registerHeadlessTask called multiple times for same key '${taskKey}'`);
|
||||
}
|
||||
tasks.set(taskKey, task);
|
||||
},
|
||||
|
||||
/**
|
||||
* Only called from native code. Starts a headless task.
|
||||
*
|
||||
* @param taskId the native id for this task instance to keep track of its execution
|
||||
* @param taskKey the key for the task to start
|
||||
* @param data the data to pass to the task
|
||||
*/
|
||||
startHeadlessTask: function(taskId: number, taskKey: string, data: any): void {
|
||||
const taskProvider = tasks.get(taskKey);
|
||||
if (!taskProvider) {
|
||||
throw new Error(`No task registered for key ${taskKey}`);
|
||||
}
|
||||
taskProvider()(data)
|
||||
.then(() => HeadlessJsTaskSupport.notifyTaskFinished(taskId))
|
||||
.catch(reason => {
|
||||
console.error(reason);
|
||||
HeadlessJsTaskSupport.notifyTaskFinished(taskId);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
BatchedBridge.registerCallableModule(
|
||||
|
||||
@@ -7,20 +7,16 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule BatchedBridge
|
||||
* @flow
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const MessageQueue = require('MessageQueue');
|
||||
|
||||
const BatchedBridge = new MessageQueue(() => global.__fbBatchedBridgeConfig);
|
||||
const BatchedBridge = new MessageQueue();
|
||||
|
||||
// TODO: Move these around to solve the cycle in a cleaner way.
|
||||
|
||||
const Systrace = require('Systrace');
|
||||
const JSTimersExecution = require('JSTimersExecution');
|
||||
|
||||
BatchedBridge.registerCallableModule('Systrace', Systrace);
|
||||
BatchedBridge.registerCallableModule('JSTimersExecution', JSTimersExecution);
|
||||
BatchedBridge.registerCallableModule('Systrace', require('Systrace'));
|
||||
BatchedBridge.registerCallableModule('JSTimersExecution', require('JSTimersExecution'));
|
||||
BatchedBridge.registerCallableModule('HeapCapture', require('HeapCapture'));
|
||||
BatchedBridge.registerCallableModule('SamplingProfiler', require('SamplingProfiler'));
|
||||
|
||||
|
||||
@@ -12,53 +12,130 @@
|
||||
'use strict';
|
||||
|
||||
const BatchedBridge = require('BatchedBridge');
|
||||
const RemoteModules = BatchedBridge.RemoteModules;
|
||||
|
||||
function normalizePrefix(moduleName: string): string {
|
||||
return moduleName.replace(/^(RCT|RK)/, '');
|
||||
const defineLazyObjectProperty = require('defineLazyObjectProperty');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
|
||||
type ModuleConfig = [
|
||||
string, /* name */
|
||||
?Object, /* constants */
|
||||
Array<string>, /* functions */
|
||||
Array<number>, /* promise method IDs */
|
||||
Array<number>, /* sync method IDs */
|
||||
];
|
||||
|
||||
export type MethodType = 'async' | 'promise' | 'sync';
|
||||
|
||||
function genModule(config: ?ModuleConfig, moduleID: number): ?{name: string, module?: Object} {
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const [moduleName, constants, methods, promiseMethods, syncMethods] = config;
|
||||
invariant(!moduleName.startsWith('RCT') && !moduleName.startsWith('RK'),
|
||||
'Module name prefixes should\'ve been stripped by the native side ' +
|
||||
'but wasn\'t for ' + moduleName);
|
||||
|
||||
if (!constants && !methods) {
|
||||
// Module contents will be filled in lazily later
|
||||
return { name: moduleName };
|
||||
}
|
||||
|
||||
const module = {};
|
||||
methods && methods.forEach((methodName, methodID) => {
|
||||
const isPromise = promiseMethods && arrayContains(promiseMethods, methodID);
|
||||
const isSync = syncMethods && arrayContains(syncMethods, methodID);
|
||||
invariant(!isPromise || !isSync, 'Cannot have a method that is both async and a sync hook');
|
||||
const methodType = isPromise ? 'promise' : isSync ? 'sync' : 'async';
|
||||
module[methodName] = genMethod(moduleID, methodID, methodType);
|
||||
});
|
||||
Object.assign(module, constants);
|
||||
|
||||
if (__DEV__) {
|
||||
BatchedBridge.createDebugLookup(moduleID, moduleName, methods);
|
||||
}
|
||||
|
||||
return { name: moduleName, module };
|
||||
}
|
||||
|
||||
/**
|
||||
* Dirty hack to support old (RK) and new (RCT) native module name conventions.
|
||||
* TODO 10487027: kill this behaviour
|
||||
*/
|
||||
Object.keys(RemoteModules).forEach((moduleName) => {
|
||||
const strippedName = normalizePrefix(moduleName);
|
||||
if (RemoteModules['RCT' + strippedName] && RemoteModules['RK' + strippedName]) {
|
||||
throw new Error(
|
||||
'Module cannot be registered as both RCT and RK: ' + moduleName
|
||||
);
|
||||
}
|
||||
if (strippedName !== moduleName) {
|
||||
RemoteModules[strippedName] = RemoteModules[moduleName];
|
||||
delete RemoteModules[moduleName];
|
||||
}
|
||||
});
|
||||
function loadModule(name: string, moduleID: number): ?Object {
|
||||
invariant(global.nativeRequireModuleConfig,
|
||||
'Can\'t lazily create module without nativeRequireModuleConfig');
|
||||
const config = global.nativeRequireModuleConfig(name);
|
||||
const info = genModule(config, moduleID);
|
||||
return info && info.module;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define lazy getters for each module.
|
||||
* These will return the module if already loaded, or load it if not.
|
||||
*/
|
||||
const NativeModules = {};
|
||||
Object.keys(RemoteModules).forEach((moduleName) => {
|
||||
Object.defineProperty(NativeModules, moduleName, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
let module = RemoteModules[moduleName];
|
||||
if (module && typeof module.moduleID === 'number' && global.nativeRequireModuleConfig) {
|
||||
const config = global.nativeRequireModuleConfig(moduleName);
|
||||
module = config && BatchedBridge.processModuleConfig(config, module.moduleID);
|
||||
RemoteModules[moduleName] = module;
|
||||
}
|
||||
Object.defineProperty(NativeModules, moduleName, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: module,
|
||||
function genMethod(moduleID: number, methodID: number, type: MethodType) {
|
||||
let fn = null;
|
||||
if (type === 'promise') {
|
||||
fn = function(...args: Array<any>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
BatchedBridge.enqueueNativeCall(moduleID, methodID, args,
|
||||
(data) => resolve(data),
|
||||
(errorData) => reject(createErrorFromErrorData(errorData)));
|
||||
});
|
||||
return module;
|
||||
},
|
||||
});
|
||||
};
|
||||
} else if (type === 'sync') {
|
||||
fn = function(...args: Array<any>) {
|
||||
return global.nativeCallSyncHook(moduleID, methodID, args);
|
||||
};
|
||||
} else {
|
||||
fn = function(...args: Array<any>) {
|
||||
const lastArg = args.length > 0 ? args[args.length - 1] : null;
|
||||
const secondLastArg = args.length > 1 ? args[args.length - 2] : null;
|
||||
const hasSuccessCallback = typeof lastArg === 'function';
|
||||
const hasErrorCallback = typeof secondLastArg === 'function';
|
||||
hasErrorCallback && invariant(
|
||||
hasSuccessCallback,
|
||||
'Cannot have a non-function arg after a function arg.'
|
||||
);
|
||||
const onSuccess = hasSuccessCallback ? lastArg : null;
|
||||
const onFail = hasErrorCallback ? secondLastArg : null;
|
||||
const callbackCount = hasSuccessCallback + hasErrorCallback;
|
||||
args = args.slice(0, args.length - callbackCount);
|
||||
BatchedBridge.enqueueNativeCall(moduleID, methodID, args, onFail, onSuccess);
|
||||
};
|
||||
}
|
||||
fn.type = type;
|
||||
return fn;
|
||||
}
|
||||
|
||||
function arrayContains<T>(array: Array<T>, value: T): boolean {
|
||||
return array.indexOf(value) !== -1;
|
||||
}
|
||||
|
||||
function createErrorFromErrorData(errorData: {message: string}): Error {
|
||||
const {
|
||||
message,
|
||||
...extraErrorInfo
|
||||
} = errorData;
|
||||
const error = new Error(message);
|
||||
(error:any).framesToPop = 1;
|
||||
return Object.assign(error, extraErrorInfo);
|
||||
}
|
||||
|
||||
const bridgeConfig = global.__fbBatchedBridgeConfig;
|
||||
invariant(bridgeConfig, '__fbBatchedBridgeConfig is not set, cannot invoke native modules');
|
||||
|
||||
const NativeModules : {[moduleName: string]: Object} = {};
|
||||
(bridgeConfig.remoteModuleConfig || []).forEach((config: ModuleConfig, moduleID: number) => {
|
||||
// Initially this config will only contain the module name when running in JSC. The actual
|
||||
// configuration of the module will be lazily loaded.
|
||||
const info = genModule(config, moduleID);
|
||||
if (!info) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.module) {
|
||||
NativeModules[info.name] = info.module;
|
||||
}
|
||||
// If there's no module config, define a lazy getter
|
||||
else {
|
||||
defineLazyObjectProperty(NativeModules, info.name, {
|
||||
get: () => loadModule(info.name, moduleID)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = NativeModules;
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
*/
|
||||
'use strict';
|
||||
var remoteModulesConfig = [
|
||||
['RemoteModule1',['remoteMethod1','remoteMethod2'],[],[]],
|
||||
['RemoteModule2',['remoteMethod1','remoteMethod2'],[],[]],
|
||||
['RemoteModule1',null,['remoteMethod','promiseMethod'],[]],
|
||||
['RemoteModule2',null,['remoteMethod','promiseMethod'],[]],
|
||||
];
|
||||
|
||||
var MessageQueueTestConfig = {
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('BatchedBridge');
|
||||
jest.unmock('defineLazyObjectProperty');
|
||||
jest.unmock('MessageQueue');
|
||||
jest.unmock('NativeModules');
|
||||
|
||||
let BatchedBridge;
|
||||
let NativeModules;
|
||||
|
||||
const MODULE_IDS = 0;
|
||||
const METHOD_IDS = 1;
|
||||
const PARAMS = 2;
|
||||
const CALL_ID = 3;
|
||||
|
||||
const assertQueue = (flushedQueue, index, moduleID, methodID, params) => {
|
||||
expect(flushedQueue[MODULE_IDS][index]).toEqual(moduleID);
|
||||
expect(flushedQueue[METHOD_IDS][index]).toEqual(methodID);
|
||||
expect(flushedQueue[PARAMS][index]).toEqual(params);
|
||||
};
|
||||
|
||||
// Important things to test:
|
||||
//
|
||||
// [x] Calling remote method actually queues it up on the BatchedBridge
|
||||
//
|
||||
// [x] Both error and success callbacks are invoked.
|
||||
//
|
||||
// [x] When simulating an error callback from remote method, both error and
|
||||
// success callbacks are cleaned up.
|
||||
//
|
||||
// [ ] Remote invocation throws if not supplying an error callback.
|
||||
describe('MessageQueue', function() {
|
||||
beforeEach(function() {
|
||||
jest.resetModuleRegistry();
|
||||
|
||||
global.__fbBatchedBridgeConfig = require('MessageQueueTestConfig');
|
||||
BatchedBridge = require('BatchedBridge');
|
||||
NativeModules = require('NativeModules');
|
||||
});
|
||||
|
||||
it('should generate native modules', () => {
|
||||
NativeModules.RemoteModule1.remoteMethod('foo');
|
||||
const flushedQueue = BatchedBridge.flushedQueue();
|
||||
assertQueue(flushedQueue, 0, 0, 0, ['foo']);
|
||||
});
|
||||
|
||||
it('should make round trip and clear memory', function() {
|
||||
const onFail = jasmine.createSpy();
|
||||
const onSucc = jasmine.createSpy();
|
||||
|
||||
// Perform communication
|
||||
NativeModules.RemoteModule1.promiseMethod('paloAlto', 'menloPark', onFail, onSucc);
|
||||
NativeModules.RemoteModule2.promiseMethod('mac', 'windows', onFail, onSucc);
|
||||
|
||||
const resultingRemoteInvocations = BatchedBridge.flushedQueue();
|
||||
|
||||
// As always, the message queue has four fields
|
||||
expect(resultingRemoteInvocations.length).toBe(4);
|
||||
expect(resultingRemoteInvocations[MODULE_IDS].length).toBe(2);
|
||||
expect(resultingRemoteInvocations[METHOD_IDS].length).toBe(2);
|
||||
expect(resultingRemoteInvocations[PARAMS].length).toBe(2);
|
||||
expect(typeof resultingRemoteInvocations[CALL_ID]).toEqual('number');
|
||||
|
||||
expect(resultingRemoteInvocations[0][0]).toBe(0); // `RemoteModule1`
|
||||
expect(resultingRemoteInvocations[1][0]).toBe(1); // `promiseMethod`
|
||||
expect([ // the arguments
|
||||
resultingRemoteInvocations[2][0][0],
|
||||
resultingRemoteInvocations[2][0][1]
|
||||
]).toEqual(['paloAlto', 'menloPark']);
|
||||
// Callbacks ids are tacked onto the end of the remote arguments.
|
||||
const firstFailCBID = resultingRemoteInvocations[2][0][2];
|
||||
const firstSuccCBID = resultingRemoteInvocations[2][0][3];
|
||||
|
||||
expect(resultingRemoteInvocations[0][1]).toBe(1); // `RemoteModule2`
|
||||
expect(resultingRemoteInvocations[1][1]).toBe(1); // `promiseMethod`
|
||||
expect([ // the arguments
|
||||
resultingRemoteInvocations[2][1][0],
|
||||
resultingRemoteInvocations[2][1][1]
|
||||
]).toEqual(['mac', 'windows']);
|
||||
const secondFailCBID = resultingRemoteInvocations[2][1][2];
|
||||
const secondSuccCBID = resultingRemoteInvocations[2][1][3];
|
||||
|
||||
// Handle the first remote invocation by signaling failure.
|
||||
BatchedBridge.__invokeCallback(firstFailCBID, ['firstFailure']);
|
||||
// The failure callback was already invoked, the success is no longer valid
|
||||
expect(function() {
|
||||
BatchedBridge.__invokeCallback(firstSuccCBID, ['firstSucc']);
|
||||
}).toThrow();
|
||||
expect(onFail.calls.count()).toBe(1);
|
||||
expect(onSucc.calls.count()).toBe(0);
|
||||
|
||||
// Handle the second remote invocation by signaling success.
|
||||
BatchedBridge.__invokeCallback(secondSuccCBID, ['secondSucc']);
|
||||
// The success callback was already invoked, the fail cb is no longer valid
|
||||
expect(function() {
|
||||
BatchedBridge.__invokeCallback(secondFailCBID, ['secondFail']);
|
||||
}).toThrow();
|
||||
expect(onFail.calls.count()).toBe(1);
|
||||
expect(onSucc.calls.count()).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -11,7 +11,130 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
const NativeEventEmitter = require('NativeEventEmitter');
|
||||
const KeyboardObserver = require('NativeModules').KeyboardObserver;
|
||||
const dismissKeyboard = require('dismissKeyboard');
|
||||
const KeyboardEventEmitter = new NativeEventEmitter(KeyboardObserver);
|
||||
|
||||
type KeyboardEventName =
|
||||
| 'keyboardWillShow'
|
||||
| 'keyboardDidShow'
|
||||
| 'keyboardWillHide'
|
||||
| 'keyboardDidHide'
|
||||
| 'keyboardWillChangeFrame'
|
||||
| 'keyboardDidChangeFrame';
|
||||
|
||||
type KeyboardEventData = {
|
||||
endCoordinates: {
|
||||
width: number,
|
||||
height: number,
|
||||
screenX: number,
|
||||
screenY: number,
|
||||
},
|
||||
};
|
||||
|
||||
type KeyboardEventListener = (e: KeyboardEventData) => void;
|
||||
|
||||
// The following object exists for documentation purposes
|
||||
// Actual work happens in
|
||||
// https://github.com/facebook/react-native/blob/master/Libraries/EventEmitter/NativeEventEmitter.js
|
||||
|
||||
/**
|
||||
* `Keyboard` module to control keyboard events.
|
||||
*
|
||||
* ### Usage
|
||||
*
|
||||
* The Keyboard module allows you to listen for native events and react to them, as
|
||||
* well as make changes to the keyboard, like dismissing it.
|
||||
*
|
||||
*```
|
||||
* import React, { Component } from 'react';
|
||||
* import { Keyboard, TextInput } from 'react-native';
|
||||
*
|
||||
* class Example extends Component {
|
||||
* componentWillMount () {
|
||||
* this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
|
||||
* this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
|
||||
* }
|
||||
*
|
||||
* componentWillUnmount () {
|
||||
* this.keyboardDidShowListener.remove();
|
||||
* this.keyboardDidHideListener.remove();
|
||||
* }
|
||||
*
|
||||
* _keyboardDidShow () {
|
||||
* alert('Keyboard Shown');
|
||||
* }
|
||||
*
|
||||
* _keyboardDidHide () {
|
||||
* alert('Keyboard Hidden');
|
||||
* }
|
||||
*
|
||||
* render() {
|
||||
* return (
|
||||
* <TextInput
|
||||
* onSubmitEditing={Keyboard.dismiss}
|
||||
* />
|
||||
* );
|
||||
* }
|
||||
* }
|
||||
*```
|
||||
*/
|
||||
|
||||
let Keyboard = {
|
||||
/**
|
||||
* The `addListener` function connects a JavaScript function to an identified native
|
||||
* keyboard notification event.
|
||||
*
|
||||
* This function then returns the reference to the listener.
|
||||
*
|
||||
* @param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for. This
|
||||
*can be any of the following:
|
||||
*
|
||||
* - `keyboardWillShow`
|
||||
* - `keyboardDidShow`
|
||||
* - `keyboardWillHide`
|
||||
* - `keyboardDidHide`
|
||||
* - `keyboardWillChangeFrame`
|
||||
* - `keyboardDidChangeFrame`
|
||||
*
|
||||
* @param {function} callback function to be called when the event fires.
|
||||
*/
|
||||
addListener(eventName: KeyboardEventName, callback: KeyboardEventListener) {
|
||||
invariant(false, 'Dummy method used for documentation');
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes a specific listener.
|
||||
*
|
||||
* @param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for.
|
||||
* @param {function} callback function to be called when the event fires.
|
||||
*/
|
||||
removeListener(eventName: KeyboardEventName, callback: Function) {
|
||||
invariant(false, 'Dummy method used for documentation');
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes all listeners for a specific event type.
|
||||
*
|
||||
* @param {string} eventType The native event string listeners are watching which will be removed.
|
||||
*/
|
||||
removeAllListeners(eventName: KeyboardEventName) {
|
||||
invariant(false, 'Dummy method used for documentation');
|
||||
},
|
||||
|
||||
/**
|
||||
* Dismisses the active keyboard and removes focus.
|
||||
*/
|
||||
dismiss() {
|
||||
invariant(false, 'Dummy method used for documentation');
|
||||
}
|
||||
};
|
||||
|
||||
// Throw away the dummy object and reassign it to original module
|
||||
Keyboard = KeyboardEventEmitter;
|
||||
Keyboard.dismiss = dismissKeyboard;
|
||||
|
||||
module.exports = Keyboard;
|
||||
|
||||
module.exports = new NativeEventEmitter(KeyboardObserver);
|
||||
|
||||
@@ -87,7 +87,7 @@ const KeyboardAvoidingView = React.createClass({
|
||||
|
||||
relativeKeyboardHeight(keyboardFrame: ScreenRect): number {
|
||||
const frame = this.frame;
|
||||
if (!frame) {
|
||||
if (!frame || !keyboardFrame) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,10 +251,12 @@ const ScrollView = React.createClass({
|
||||
scrollsToTop: PropTypes.bool,
|
||||
/**
|
||||
* When true, shows a horizontal scroll indicator.
|
||||
* The default value is true.
|
||||
*/
|
||||
showsHorizontalScrollIndicator: PropTypes.bool,
|
||||
/**
|
||||
* When true, shows a vertical scroll indicator.
|
||||
* The default value is true.
|
||||
*/
|
||||
showsVerticalScrollIndicator: PropTypes.bool,
|
||||
/**
|
||||
@@ -529,7 +531,7 @@ const ScrollView = React.createClass({
|
||||
return React.cloneElement(
|
||||
refreshControl,
|
||||
{style: props.style},
|
||||
<ScrollViewClass {...props} style={baseStyle} ref={this._setScrollViewRef}>
|
||||
<ScrollViewClass {...props} ref={this._setScrollViewRef}>
|
||||
{contentContainer}
|
||||
</ScrollViewClass>
|
||||
);
|
||||
@@ -545,12 +547,16 @@ const ScrollView = React.createClass({
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
baseVertical: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexShrink: 1,
|
||||
flexDirection: 'column',
|
||||
overflow: 'scroll',
|
||||
},
|
||||
baseHorizontal: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexShrink: 1,
|
||||
flexDirection: 'row',
|
||||
overflow: 'scroll',
|
||||
},
|
||||
contentContainerHorizontal: {
|
||||
flexDirection: 'row',
|
||||
|
||||
@@ -24,13 +24,17 @@ const StatusBarManager = require('NativeModules').StatusBarManager;
|
||||
*/
|
||||
export type StatusBarStyle = $Enum<{
|
||||
/**
|
||||
* Default status bar style
|
||||
* Default status bar style (dark for iOS, light for Android)
|
||||
*/
|
||||
'default': string,
|
||||
/**
|
||||
* Dark background style
|
||||
* Dark background, white texts and icons
|
||||
*/
|
||||
'light-content': string,
|
||||
/**
|
||||
* Light background, dark texts and icons
|
||||
*/
|
||||
'dark-content': string,
|
||||
}>;
|
||||
|
||||
/**
|
||||
@@ -134,7 +138,7 @@ class StatusBar extends React.Component {
|
||||
animated?: boolean,
|
||||
backgroundColor?: $FlowFixMe,
|
||||
translucent?: boolean,
|
||||
barStyle?: 'default' | 'light-content',
|
||||
barStyle?: 'default' | 'light-content' | 'dark-content',
|
||||
networkActivityIndicatorVisible?: boolean,
|
||||
showHideTransition?: 'fade' | 'slide',
|
||||
};
|
||||
@@ -191,13 +195,13 @@ class StatusBar extends React.Component {
|
||||
* @param animated Animate the style change.
|
||||
*/
|
||||
static setBarStyle(style: StatusBarStyle, animated?: boolean) {
|
||||
if (Platform.OS !== 'ios') {
|
||||
console.warn('`setBarStyle` is only available on iOS');
|
||||
return;
|
||||
}
|
||||
animated = animated || false;
|
||||
StatusBar._defaultProps.barStyle.value = style;
|
||||
StatusBarManager.setStyle(style, animated);
|
||||
if (Platform.OS === 'ios') {
|
||||
StatusBarManager.setStyle(style, animated);
|
||||
} else if (Platform.OS === 'android') {
|
||||
StatusBarManager.setStyle(style);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,6 +276,7 @@ class StatusBar extends React.Component {
|
||||
barStyle: React.PropTypes.oneOf([
|
||||
'default',
|
||||
'light-content',
|
||||
'dark-content',
|
||||
]),
|
||||
/**
|
||||
* If the network activity indicator should be visible.
|
||||
@@ -360,6 +365,9 @@ class StatusBar extends React.Component {
|
||||
);
|
||||
}
|
||||
} else if (Platform.OS === 'android') {
|
||||
if (!oldProps || oldProps.barStyle.value !== mergedProps.barStyle.value) {
|
||||
StatusBarManager.setStyle(mergedProps.barStyle.value);
|
||||
}
|
||||
if (!oldProps || oldProps.backgroundColor.value !== mergedProps.backgroundColor.value) {
|
||||
StatusBarManager.setColor(
|
||||
processColor(mergedProps.backgroundColor.value),
|
||||
|
||||
@@ -360,7 +360,7 @@ const TextInput = React.createClass({
|
||||
/**
|
||||
* The string that will be rendered before text input has been entered.
|
||||
*/
|
||||
placeholder: PropTypes.string,
|
||||
placeholder: PropTypes.node,
|
||||
/**
|
||||
* The text color of the placeholder string.
|
||||
*/
|
||||
@@ -413,7 +413,7 @@ const TextInput = React.createClass({
|
||||
* Useful for simple use-cases where you do not want to deal with listening
|
||||
* to events and updating the value prop to keep the controlled state in sync.
|
||||
*/
|
||||
defaultValue: PropTypes.string,
|
||||
defaultValue: PropTypes.node,
|
||||
/**
|
||||
* When the clear button should appear on the right side of the text view.
|
||||
* @platform ios
|
||||
|
||||
@@ -690,16 +690,9 @@ var TouchableMixin = {
|
||||
}
|
||||
|
||||
if (newIsHighlight && !curIsHighlight) {
|
||||
this._savePressInLocation(e);
|
||||
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
|
||||
} else if (!newIsHighlight && curIsHighlight && this.touchableHandleActivePressOut) {
|
||||
if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {
|
||||
this.pressOutDelayTimeout = setTimeout(() => {
|
||||
this.touchableHandleActivePressOut(e);
|
||||
}, this.touchableGetPressOutDelayMS());
|
||||
} else {
|
||||
this.touchableHandleActivePressOut(e);
|
||||
}
|
||||
this._startHighlight(e);
|
||||
} else if (!newIsHighlight && curIsHighlight) {
|
||||
this._endHighlight(e);
|
||||
}
|
||||
|
||||
if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {
|
||||
@@ -712,13 +705,35 @@ var TouchableMixin = {
|
||||
|
||||
var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;
|
||||
if (shouldInvokePress && this.touchableHandlePress) {
|
||||
if (!newIsHighlight && !curIsHighlight) {
|
||||
// we never highlighted because of delay, but we should highlight now
|
||||
this._startHighlight(e);
|
||||
this._endHighlight(e);
|
||||
}
|
||||
this.touchableHandlePress(e);
|
||||
}
|
||||
}
|
||||
|
||||
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);
|
||||
this.touchableDelayTimeout = null;
|
||||
}
|
||||
},
|
||||
|
||||
_startHighlight: function(e) {
|
||||
this._savePressInLocation(e);
|
||||
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
|
||||
},
|
||||
|
||||
_endHighlight: function(e) {
|
||||
if (this.touchableHandleActivePressOut) {
|
||||
if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {
|
||||
this.pressOutDelayTimeout = setTimeout(() => {
|
||||
this.touchableHandleActivePressOut(e);
|
||||
}, this.touchableGetPressOutDelayMS());
|
||||
} else {
|
||||
this.touchableHandleActivePressOut(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* );
|
||||
* },
|
||||
* ```
|
||||
* > **NOTE**: TouchableHighlight supports only one child
|
||||
* > **NOTE**: TouchableHighlight must have one child (not zero or more than one)
|
||||
* >
|
||||
* > If you wish to have several child components, wrap them in a View.
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var Platform = require('Platform');
|
||||
var PropTypes = require('react/lib/ReactPropTypes');
|
||||
var React = require('React');
|
||||
var ReactNative = require('react/lib/ReactNative');
|
||||
@@ -41,6 +42,7 @@ var backgroundPropType = PropTypes.oneOfType([
|
||||
var TouchableView = requireNativeComponent('RCTView', null, {
|
||||
nativeOnly: {
|
||||
nativeBackgroundAndroid: backgroundPropType,
|
||||
nativeForegroundAndroid: backgroundPropType,
|
||||
}
|
||||
});
|
||||
|
||||
@@ -86,6 +88,17 @@ var TouchableNativeFeedback = React.createClass({
|
||||
* methods to generate that dictionary.
|
||||
*/
|
||||
background: backgroundPropType,
|
||||
|
||||
/**
|
||||
* Set to true to add the ripple effect to the foreground of the view, instead of the
|
||||
* background. This is useful if one of your child views has a background of its own, or you're
|
||||
* e.g. displaying images, and you don't want the ripple to be covered by them.
|
||||
*
|
||||
* Check TouchableNativeFeedback.canUseNativeForeground() first, as this is only available on
|
||||
* Android 6.0 and above. If you try to use this on older versions you will get a warning and
|
||||
* fallback to background.
|
||||
*/
|
||||
useForeground: PropTypes.bool,
|
||||
},
|
||||
|
||||
statics: {
|
||||
@@ -117,6 +130,10 @@ var TouchableNativeFeedback = React.createClass({
|
||||
Ripple: function(color: string, borderless: boolean) {
|
||||
return {type: 'RippleAndroid', color: processColor(color), borderless: borderless};
|
||||
},
|
||||
|
||||
canUseNativeForeground: function() {
|
||||
return Platform.OS === 'android' && Platform.Version >= 23;
|
||||
}
|
||||
},
|
||||
|
||||
mixins: [Touchable.Mixin],
|
||||
@@ -213,9 +230,19 @@ var TouchableNativeFeedback = React.createClass({
|
||||
}
|
||||
children.push(Touchable.renderDebugView({color: 'brown', hitSlop: this.props.hitSlop}));
|
||||
}
|
||||
if (this.props.useForeground && !TouchableNativeFeedback.canUseNativeForeground()) {
|
||||
console.warn(
|
||||
'Requested foreground ripple, but it is not available on this version of Android. ' +
|
||||
'Consider calling TouchableNativeFeedback.canUseNativeForeground() and using a different ' +
|
||||
'Touchable if the result is false.');
|
||||
}
|
||||
const drawableProp =
|
||||
this.props.useForeground && TouchableNativeFeedback.canUseNativeForeground()
|
||||
? 'nativeForegroundAndroid'
|
||||
: 'nativeBackgroundAndroid';
|
||||
var childProps = {
|
||||
...child.props,
|
||||
nativeBackgroundAndroid: this.props.background,
|
||||
[drawableProp]: this.props.background,
|
||||
accessible: this.props.accessible !== false,
|
||||
accessibilityLabel: this.props.accessibilityLabel,
|
||||
accessibilityComponentType: this.props.accessibilityComponentType,
|
||||
|
||||
@@ -97,7 +97,7 @@ const statics = {
|
||||
*
|
||||
* ### Synthetic Touch Events
|
||||
*
|
||||
* For `View` repsonder props (e.g., `onResponderMove`), the synthetic touch event passed to them
|
||||
* For `View` responder props (e.g., `onResponderMove`), the synthetic touch event passed to them
|
||||
* are of the following form:
|
||||
*
|
||||
* - `nativeEvent`
|
||||
@@ -143,7 +143,7 @@ const View = React.createClass({
|
||||
* with the element. By default, the label is constructed by traversing all the
|
||||
* children and accumulating all the `Text` nodes separated by space.
|
||||
*/
|
||||
accessibilityLabel: PropTypes.string,
|
||||
accessibilityLabel: PropTypes.node,
|
||||
|
||||
/**
|
||||
* Indicates to accessibility services to treat UI component like a
|
||||
@@ -509,6 +509,7 @@ const View = React.createClass({
|
||||
const RCTView = requireNativeComponent('RCTView', View, {
|
||||
nativeOnly: {
|
||||
nativeBackgroundAndroid: true,
|
||||
nativeForegroundAndroid: true,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ var ViewStylePropTypes = {
|
||||
borderBottomWidth: ReactPropTypes.number,
|
||||
borderLeftWidth: ReactPropTypes.number,
|
||||
opacity: ReactPropTypes.number,
|
||||
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
||||
/**
|
||||
* (Android-only) Sets the elevation of a view, using Android's underlying
|
||||
* [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).
|
||||
|
||||
@@ -454,7 +454,7 @@ var ListView = React.createClass({
|
||||
|
||||
var {
|
||||
renderScrollComponent,
|
||||
...props,
|
||||
...props
|
||||
} = this.props;
|
||||
if (!props.scrollEventThrottle) {
|
||||
props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE;
|
||||
|
||||
@@ -82,7 +82,7 @@ class NavigationCard extends React.Component<any, Props, any> {
|
||||
pointerEvents,
|
||||
renderScene,
|
||||
style,
|
||||
...props, /* NavigationSceneRendererProps */
|
||||
...props /* NavigationSceneRendererProps */
|
||||
} = this.props;
|
||||
|
||||
const viewStyle = style === undefined ?
|
||||
|
||||
@@ -297,7 +297,7 @@ var Navigator = React.createClass({
|
||||
* (route, routeStack) => Navigator.SceneConfigs.FloatFromRight
|
||||
* ```
|
||||
*
|
||||
* Available scene configutation options are:
|
||||
* Available scene configuration options are:
|
||||
*
|
||||
* - Navigator.SceneConfigs.PushFromRight (default)
|
||||
* - Navigator.SceneConfigs.FloatFromRight
|
||||
@@ -484,6 +484,7 @@ var Navigator = React.createClass({
|
||||
*/
|
||||
immediatelyResetRouteStack: function(nextRouteStack) {
|
||||
var destIndex = nextRouteStack.length - 1;
|
||||
this._emitWillFocus(nextRouteStack[destIndex]);
|
||||
this.setState({
|
||||
routeStack: nextRouteStack,
|
||||
sceneConfigStack: nextRouteStack.map(
|
||||
@@ -1248,7 +1249,7 @@ var Navigator = React.createClass({
|
||||
key={'scene_' + getRouteID(route)}
|
||||
ref={'scene_' + i}
|
||||
onStartShouldSetResponderCapture={() => {
|
||||
return (this.state.transitionFromIndex != null) || (this.state.transitionFromIndex != null);
|
||||
return (this.state.transitionFromIndex != null);
|
||||
}}
|
||||
pointerEvents={disabledScenePointerEvents}
|
||||
style={[styles.baseScene, this.props.sceneStyle, disabledSceneStyle]}>
|
||||
|
||||
@@ -34,13 +34,13 @@ type Props = {
|
||||
bounceFirstRowOnMount: boolean,
|
||||
dataSource: SwipeableListViewDataSource,
|
||||
maxSwipeDistance: number,
|
||||
onScroll: ?Function,
|
||||
renderRow: Function,
|
||||
renderQuickActions: Function,
|
||||
};
|
||||
|
||||
type State = {
|
||||
dataSource: Object,
|
||||
scrollEnabled: boolean,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -107,7 +107,6 @@ class SwipeableListView extends React.Component {
|
||||
this._shouldBounceFirstRowOnMount = this.props.bounceFirstRowOnMount;
|
||||
this.state = {
|
||||
dataSource: this.props.dataSource,
|
||||
scrollEnabled: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -129,18 +128,18 @@ class SwipeableListView extends React.Component {
|
||||
dataSource={this.state.dataSource.getDataSource()}
|
||||
onScroll={this._onScroll}
|
||||
renderRow={this._renderRow}
|
||||
scrollEnabled={this.state.scrollEnabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
_onScroll = (): void => {
|
||||
_onScroll = (e): void => {
|
||||
// Close any opens rows on ListView scroll
|
||||
if (this.props.dataSource.getOpenRowID()) {
|
||||
this.setState({
|
||||
dataSource: this.state.dataSource.setOpenRowID(null),
|
||||
});
|
||||
}
|
||||
this.props.onScroll && this.props.onScroll(e);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
139A38841C4D587C00862840 /* RCTResizeMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 139A38831C4D587C00862840 /* RCTResizeMode.m */; };
|
||||
13EF7F7F1BC825B1003F47DD /* RCTLocalAssetImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 13EF7F7E1BC825B1003F47DD /* RCTLocalAssetImageLoader.m */; };
|
||||
143879381AAD32A300F088A5 /* RCTImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 143879371AAD32A300F088A5 /* RCTImageLoader.m */; };
|
||||
2D3B5F1A1D9B0D0400451313 /* RCTImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CCD34C261D4B8FE900268922 /* RCTImageCache.m */; };
|
||||
2D3B5F1B1D9B0D0700451313 /* RCTImageBlurUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF314711C9B0DD30049118E /* RCTImageBlurUtils.m */; };
|
||||
2D3B5F1C1D9B0D1300451313 /* RCTResizeMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 139A38831C4D587C00862840 /* RCTResizeMode.m */; };
|
||||
2D3B5F1D1D9B0D1300451313 /* RCTLocalAssetImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 13EF7F7E1BC825B1003F47DD /* RCTLocalAssetImageLoader.m */; };
|
||||
2D3B5F1E1D9B0D1300451313 /* RCTGIFImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 1304D5B11AA8C50D0002E2BE /* RCTGIFImageDecoder.m */; };
|
||||
2D3B5F1F1D9B0D1300451313 /* RCTImageEditingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 354631671B69857700AA0B86 /* RCTImageEditingManager.m */; };
|
||||
2D3B5F201D9B0D1300451313 /* RCTImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 143879371AAD32A300F088A5 /* RCTImageLoader.m */; };
|
||||
2D3B5F211D9B0D1300451313 /* RCTImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1304D5A81AA8C4A30002E2BE /* RCTImageView.m */; };
|
||||
2D3B5F221D9B0D1300451313 /* RCTImageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1304D5AA1AA8C4A30002E2BE /* RCTImageViewManager.m */; };
|
||||
2D3B5F231D9B0D1300451313 /* RCTImageStoreManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 35123E6A1B59C99D00EBAD80 /* RCTImageStoreManager.m */; };
|
||||
2D3B5F241D9B0D1300451313 /* RCTImageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 134B00A11B54232B00EC8DFB /* RCTImageUtils.m */; };
|
||||
35123E6B1B59C99D00EBAD80 /* RCTImageStoreManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 35123E6A1B59C99D00EBAD80 /* RCTImageStoreManager.m */; };
|
||||
354631681B69857700AA0B86 /* RCTImageEditingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 354631671B69857700AA0B86 /* RCTImageEditingManager.m */; };
|
||||
CCD34C271D4B8FE900268922 /* RCTImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CCD34C261D4B8FE900268922 /* RCTImageCache.m */; };
|
||||
@@ -21,6 +32,15 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28381D9B042B00D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B5115B1A9E6B3D00147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -47,6 +67,7 @@
|
||||
13EF7F7E1BC825B1003F47DD /* RCTLocalAssetImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTLocalAssetImageLoader.m; sourceTree = "<group>"; };
|
||||
143879361AAD32A300F088A5 /* RCTImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTImageLoader.h; sourceTree = "<group>"; };
|
||||
143879371AAD32A300F088A5 /* RCTImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImageLoader.m; sourceTree = "<group>"; };
|
||||
2D2A283A1D9B042B00D4039D /* libRCTImage-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTImage-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
35123E691B59C99D00EBAD80 /* RCTImageStoreManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTImageStoreManager.h; sourceTree = "<group>"; };
|
||||
35123E6A1B59C99D00EBAD80 /* RCTImageStoreManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImageStoreManager.m; sourceTree = "<group>"; };
|
||||
354631661B69857700AA0B86 /* RCTImageEditingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTImageEditingManager.h; sourceTree = "<group>"; };
|
||||
@@ -59,6 +80,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28371D9B042B00D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B5115A1A9E6B3D00147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -104,6 +132,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
58B5115D1A9E6B3D00147676 /* libRCTImage.a */,
|
||||
2D2A283A1D9B042B00D4039D /* libRCTImage-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -111,6 +140,23 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28391D9B042B00D4039D /* RCTImage-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28421D9B042B00D4039D /* Build configuration list for PBXNativeTarget "RCTImage-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A28361D9B042B00D4039D /* Sources */,
|
||||
2D2A28371D9B042B00D4039D /* Frameworks */,
|
||||
2D2A28381D9B042B00D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTImage-tvOS";
|
||||
productName = "RCTImage-tvOS";
|
||||
productReference = 2D2A283A1D9B042B00D4039D /* libRCTImage-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B5115C1A9E6B3D00147676 /* RCTImage */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511711A9E6B3D00147676 /* Build configuration list for PBXNativeTarget "RCTImage" */;
|
||||
@@ -137,6 +183,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28391D9B042B00D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B5115C1A9E6B3D00147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -155,11 +205,30 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B5115C1A9E6B3D00147676 /* RCTImage */,
|
||||
2D2A28391D9B042B00D4039D /* RCTImage-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A28361D9B042B00D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F231D9B0D1300451313 /* RCTImageStoreManager.m in Sources */,
|
||||
2D3B5F1A1D9B0D0400451313 /* RCTImageCache.m in Sources */,
|
||||
2D3B5F1D1D9B0D1300451313 /* RCTLocalAssetImageLoader.m in Sources */,
|
||||
2D3B5F1F1D9B0D1300451313 /* RCTImageEditingManager.m in Sources */,
|
||||
2D3B5F1E1D9B0D1300451313 /* RCTGIFImageDecoder.m in Sources */,
|
||||
2D3B5F1C1D9B0D1300451313 /* RCTResizeMode.m in Sources */,
|
||||
2D3B5F221D9B0D1300451313 /* RCTImageViewManager.m in Sources */,
|
||||
2D3B5F211D9B0D1300451313 /* RCTImageView.m in Sources */,
|
||||
2D3B5F201D9B0D1300451313 /* RCTImageLoader.m in Sources */,
|
||||
2D3B5F1B1D9B0D0700451313 /* RCTImageBlurUtils.m in Sources */,
|
||||
2D3B5F241D9B0D1300451313 /* RCTImageUtils.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511591A9E6B3D00147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -181,6 +250,54 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28401D9B042B00D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../Network/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A28411D9B042B00D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../Network/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B5116F1A9E6B3D00147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -312,6 +429,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28421D9B042B00D4039D /* Build configuration list for PBXNativeTarget "RCTImage-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28401D9B042B00D4039D /* Debug */,
|
||||
2D2A28411D9B042B00D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511581A9E6B3D00147676 /* Build configuration list for PBXProject "RCTImage" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -444,7 +444,9 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
|
||||
// Download image
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
RCTNetworkTask *task = [networking networkTaskWithRequest:request completionBlock:^(NSURLResponse *response, NSData *data, NSError *error) {
|
||||
__block RCTNetworkTask *task =
|
||||
[networking networkTaskWithRequest:request
|
||||
completionBlock:^(NSURLResponse *response, NSData *data, NSError *error) {
|
||||
__typeof(self) strongSelf = weakSelf;
|
||||
if (!strongSelf) {
|
||||
return;
|
||||
@@ -488,8 +490,15 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
}
|
||||
|
||||
return ^{
|
||||
[task cancel];
|
||||
[weakSelf dequeueTasks];
|
||||
__typeof(self) strongSelf = weakSelf;
|
||||
if (!strongSelf || !task) {
|
||||
return;
|
||||
}
|
||||
dispatch_async(strongSelf->_URLRequestQueue, ^{
|
||||
[task cancel];
|
||||
task = nil;
|
||||
});
|
||||
[strongSelf dequeueTasks];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -505,7 +514,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
__block volatile uint32_t cancelled = 0;
|
||||
__block dispatch_block_t cancelLoad = nil;
|
||||
dispatch_block_t cancellationBlock = ^{
|
||||
if (cancelLoad) {
|
||||
if (cancelLoad && !cancelled) {
|
||||
cancelLoad();
|
||||
}
|
||||
OSAtomicOr32Barrier(1, &cancelled);
|
||||
@@ -553,7 +562,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
completionBlock(error_, image);
|
||||
};
|
||||
|
||||
cancelLoad = [weakSelf decodeImageData:imageOrData
|
||||
cancelLoad = [strongSelf decodeImageData:imageOrData
|
||||
size:size
|
||||
scale:scale
|
||||
clipped:clipped
|
||||
|
||||
@@ -8,9 +8,19 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
148699CF1ABD045300480536 /* RCTLinkingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 148699CE1ABD045300480536 /* RCTLinkingManager.m */; };
|
||||
2D3B5F251D9B0DE600451313 /* RCTLinkingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 148699CE1ABD045300480536 /* RCTLinkingManager.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28451D9B043800D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -26,9 +36,17 @@
|
||||
134814201AA4EA6300B7C361 /* libRCTLinking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTLinking.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
148699CD1ABD045300480536 /* RCTLinkingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTLinkingManager.h; sourceTree = "<group>"; };
|
||||
148699CE1ABD045300480536 /* RCTLinkingManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTLinkingManager.m; sourceTree = "<group>"; };
|
||||
2D2A28471D9B043800D4039D /* libRCTLinking-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTLinking-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28441D9B043800D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -53,12 +71,30 @@
|
||||
148699CD1ABD045300480536 /* RCTLinkingManager.h */,
|
||||
148699CE1ABD045300480536 /* RCTLinkingManager.m */,
|
||||
134814211AA4EA7D00B7C361 /* Products */,
|
||||
2D2A28471D9B043800D4039D /* libRCTLinking-tvOS.a */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28461D9B043800D4039D /* RCTLinking-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A284F1D9B043800D4039D /* Build configuration list for PBXNativeTarget "RCTLinking-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A28431D9B043800D4039D /* Sources */,
|
||||
2D2A28441D9B043800D4039D /* Frameworks */,
|
||||
2D2A28451D9B043800D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTLinking-tvOS";
|
||||
productName = "RCTLinking-tvOS";
|
||||
productReference = 2D2A28471D9B043800D4039D /* libRCTLinking-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B511DA1A9E6C8500147676 /* RCTLinking */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTLinking" */;
|
||||
@@ -85,6 +121,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28461D9B043800D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B511DA1A9E6C8500147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -103,11 +143,20 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* RCTLinking */,
|
||||
2D2A28461D9B043800D4039D /* RCTLinking-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A28431D9B043800D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F251D9B0DE600451313 /* RCTLinkingManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D71A9E6C8500147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -119,6 +168,52 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A284D1D9B043800D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A284E1D9B043800D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511ED1A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -236,6 +331,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A284F1D9B043800D4039D /* Build configuration list for PBXNativeTarget "RCTLinking-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A284D1D9B043800D4039D /* Debug */,
|
||||
2D2A284E1D9B043800D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTLinking" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const AppContainer = require('AppContainer');
|
||||
const I18nManager = require('I18nManager');
|
||||
const Platform = require('Platform');
|
||||
const PropTypes = require('react/lib/ReactPropTypes');
|
||||
const React = require('React');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
const UIManager = require('UIManager');
|
||||
const View = require('View');
|
||||
const deprecatedPropType = require('deprecatedPropType');
|
||||
|
||||
const deprecatedPropType = require('deprecatedPropType');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
const RCTModalHostView = requireNativeComponent('RCTModalHostView', null);
|
||||
|
||||
@@ -27,7 +27,7 @@ const RCTModalHostView = requireNativeComponent('RCTModalHostView', null);
|
||||
* The Modal component is a simple way to present content above an enclosing view.
|
||||
*
|
||||
* _Note: If you need more control over how to present modals over the rest of your app,
|
||||
* then consider using a top-level Navigator. Go [here](/react-native/docs/navigator-comparison.html) to compare navigation options._
|
||||
* then consider using a top-level Navigator._
|
||||
*
|
||||
* ```javascript
|
||||
* import React, { Component } from 'react';
|
||||
@@ -136,7 +136,6 @@ class Modal extends React.Component {
|
||||
|
||||
const containerStyles = {
|
||||
backgroundColor: this.props.transparent ? 'transparent' : 'white',
|
||||
top: Platform.OS === 'android' && Platform.Version >= 19 ? UIManager.RCTModalHostView.Constants.StatusBarHeight : 0,
|
||||
};
|
||||
|
||||
let animationType = this.props.animationType;
|
||||
@@ -148,6 +147,12 @@ class Modal extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const innerChildren = __DEV__ ?
|
||||
( <AppContainer>
|
||||
{this.props.children}
|
||||
</AppContainer>) :
|
||||
this.props.children;
|
||||
|
||||
return (
|
||||
<RCTModalHostView
|
||||
animationType={animationType}
|
||||
@@ -160,7 +165,7 @@ class Modal extends React.Component {
|
||||
onOrientationChange={this.props.onOrientationChange}
|
||||
>
|
||||
<View style={[styles.container, containerStyles]}>
|
||||
{this.props.children}
|
||||
{innerChildren}
|
||||
</View>
|
||||
</RCTModalHostView>
|
||||
);
|
||||
|
||||
+4
-7
@@ -5,13 +5,10 @@
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule NativeModules
|
||||
* @flow
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const BatchedBridge = require('BatchedBridge');
|
||||
const RemoteModules = BatchedBridge.RemoteModules;
|
||||
#import "RCTValueAnimatedNode.h"
|
||||
|
||||
module.exports = RemoteModules;
|
||||
@interface RCTDivisionAnimatedNode : RCTValueAnimatedNode
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "RCTDivisionAnimatedNode.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@implementation RCTDivisionAnimatedNode
|
||||
|
||||
- (void)performUpdate
|
||||
{
|
||||
[super performUpdate];
|
||||
|
||||
NSArray<NSNumber *> *inputNodes = self.config[@"input"];
|
||||
if (inputNodes.count > 1) {
|
||||
RCTValueAnimatedNode *parent1 = (RCTValueAnimatedNode *)self.parentNodes[inputNodes[0]];
|
||||
RCTValueAnimatedNode *parent2 = (RCTValueAnimatedNode *)self.parentNodes[inputNodes[1]];
|
||||
if ([parent1 isKindOfClass:[RCTValueAnimatedNode class]] &&
|
||||
[parent2 isKindOfClass:[RCTValueAnimatedNode class]]) {
|
||||
if (parent2.value == 0) {
|
||||
RCTLogError(@"Detected a division by zero in Animated.divide node");
|
||||
return;
|
||||
}
|
||||
self.value = parent1.value / parent2.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
@interface RCTValueAnimatedNode : RCTAnimatedNode
|
||||
|
||||
- (void)setOffset:(CGFloat)offset;
|
||||
- (void)flattenOffset;
|
||||
|
||||
@property (nonatomic, assign) CGFloat value;
|
||||
@property (nonatomic, weak) id<RCTValueAnimatedNodeObserver> valueObserver;
|
||||
|
||||
|
||||
@@ -9,8 +9,37 @@
|
||||
|
||||
#import "RCTValueAnimatedNode.h"
|
||||
|
||||
@interface RCTValueAnimatedNode ()
|
||||
|
||||
@property (nonatomic, assign) CGFloat offset;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTValueAnimatedNode
|
||||
|
||||
@synthesize value = _value;
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
config:(NSDictionary<NSString *, id> *)config
|
||||
{
|
||||
if (self = [super initWithTag:tag config:config]) {
|
||||
_offset = [self.config[@"offset"] floatValue];
|
||||
_value = [self.config[@"value"] floatValue];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)flattenOffset
|
||||
{
|
||||
_value += _offset;
|
||||
_offset = 0;
|
||||
}
|
||||
|
||||
- (CGFloat)value
|
||||
{
|
||||
return _value + _offset;
|
||||
}
|
||||
|
||||
- (void)setValue:(CGFloat)value
|
||||
{
|
||||
_value = value;
|
||||
|
||||
@@ -19,11 +19,36 @@
|
||||
13E501EE1D07A6C9005F35D8 /* RCTStyleAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E31D07A6C9005F35D8 /* RCTStyleAnimatedNode.m */; };
|
||||
13E501EF1D07A6C9005F35D8 /* RCTTransformAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E51D07A6C9005F35D8 /* RCTTransformAnimatedNode.m */; };
|
||||
13E501F01D07A6C9005F35D8 /* RCTValueAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E71D07A6C9005F35D8 /* RCTValueAnimatedNode.m */; };
|
||||
94DAE3F91D7334A70059942F /* RCTModuloAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 94DAE3F81D7334A70059942F /* RCTModuloAnimatedNode.m */; };
|
||||
193F64F41D776EC6004D1CAA /* RCTDiffClampAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 193F64F31D776EC6004D1CAA /* RCTDiffClampAnimatedNode.m */; };
|
||||
2D3B5EF21D9B0B3100451313 /* RCTAnimationUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501B81D07A644005F35D8 /* RCTAnimationUtils.m */; };
|
||||
2D3B5EF31D9B0B3400451313 /* RCTViewPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501C81D07A644005F35D8 /* RCTViewPropertyMapper.m */; };
|
||||
2D3B5EF41D9B0B3700451313 /* RCTNativeAnimatedModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501BE1D07A644005F35D8 /* RCTNativeAnimatedModule.m */; };
|
||||
2D3B5EF51D9B0B4800451313 /* RCTDivisionAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9894941D999639008027DB /* RCTDivisionAnimatedNode.m */; };
|
||||
2D3B5EF61D9B0B4800451313 /* RCTDiffClampAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 193F64F31D776EC6004D1CAA /* RCTDiffClampAnimatedNode.m */; };
|
||||
2D3B5EF71D9B0B4800451313 /* RCTAdditionAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501D71D07A6C9005F35D8 /* RCTAdditionAnimatedNode.m */; };
|
||||
2D3B5EF81D9B0B4800451313 /* RCTAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501D91D07A6C9005F35D8 /* RCTAnimatedNode.m */; };
|
||||
2D3B5EF91D9B0B4800451313 /* RCTAnimationDriverNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501DB1D07A6C9005F35D8 /* RCTAnimationDriverNode.m */; };
|
||||
2D3B5EFA1D9B0B4800451313 /* RCTInterpolationAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501DD1D07A6C9005F35D8 /* RCTInterpolationAnimatedNode.m */; };
|
||||
2D3B5EFB1D9B0B4800451313 /* RCTModuloAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 94DAE3F81D7334A70059942F /* RCTModuloAnimatedNode.m */; };
|
||||
2D3B5EFC1D9B0B4800451313 /* RCTMultiplicationAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501DF1D07A6C9005F35D8 /* RCTMultiplicationAnimatedNode.m */; };
|
||||
2D3B5EFD1D9B0B4800451313 /* RCTPropsAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E11D07A6C9005F35D8 /* RCTPropsAnimatedNode.m */; };
|
||||
2D3B5EFE1D9B0B4800451313 /* RCTStyleAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E31D07A6C9005F35D8 /* RCTStyleAnimatedNode.m */; };
|
||||
2D3B5EFF1D9B0B4800451313 /* RCTTransformAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E51D07A6C9005F35D8 /* RCTTransformAnimatedNode.m */; };
|
||||
2D3B5F001D9B0B4800451313 /* RCTValueAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E501E71D07A6C9005F35D8 /* RCTValueAnimatedNode.m */; };
|
||||
5C9894951D999639008027DB /* RCTDivisionAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C9894941D999639008027DB /* RCTDivisionAnimatedNode.m */; };
|
||||
94DAE3F91D7334A70059942F /* RCTModuloAnimatedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 94DAE3F81D7334A70059942F /* RCTModuloAnimatedNode.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A281E1D9B03D100D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -61,13 +86,23 @@
|
||||
13E501E51D07A6C9005F35D8 /* RCTTransformAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTransformAnimatedNode.m; sourceTree = "<group>"; };
|
||||
13E501E61D07A6C9005F35D8 /* RCTValueAnimatedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTValueAnimatedNode.h; sourceTree = "<group>"; };
|
||||
13E501E71D07A6C9005F35D8 /* RCTValueAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTValueAnimatedNode.m; sourceTree = "<group>"; };
|
||||
94DAE3F71D7334A70059942F /* RCTModuloAnimatedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTModuloAnimatedNode.h; sourceTree = "<group>"; };
|
||||
94DAE3F81D7334A70059942F /* RCTModuloAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTModuloAnimatedNode.m; sourceTree = "<group>"; };
|
||||
193F64F21D776EC6004D1CAA /* RCTDiffClampAnimatedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDiffClampAnimatedNode.h; sourceTree = "<group>"; };
|
||||
193F64F31D776EC6004D1CAA /* RCTDiffClampAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDiffClampAnimatedNode.m; sourceTree = "<group>"; };
|
||||
2D2A28201D9B03D100D4039D /* libRCTAnimation-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTAnimation-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5C9894931D999639008027DB /* RCTDivisionAnimatedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDivisionAnimatedNode.h; sourceTree = "<group>"; };
|
||||
5C9894941D999639008027DB /* RCTDivisionAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDivisionAnimatedNode.m; sourceTree = "<group>"; };
|
||||
94DAE3F71D7334A70059942F /* RCTModuloAnimatedNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTModuloAnimatedNode.h; sourceTree = "<group>"; };
|
||||
94DAE3F81D7334A70059942F /* RCTModuloAnimatedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTModuloAnimatedNode.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A281D1D9B03D100D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -89,6 +124,8 @@
|
||||
13E501D51D07A6C9005F35D8 /* Nodes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5C9894931D999639008027DB /* RCTDivisionAnimatedNode.h */,
|
||||
5C9894941D999639008027DB /* RCTDivisionAnimatedNode.m */,
|
||||
193F64F21D776EC6004D1CAA /* RCTDiffClampAnimatedNode.h */,
|
||||
193F64F31D776EC6004D1CAA /* RCTDiffClampAnimatedNode.m */,
|
||||
13E501D61D07A6C9005F35D8 /* RCTAdditionAnimatedNode.h */,
|
||||
@@ -126,12 +163,30 @@
|
||||
13E501BE1D07A644005F35D8 /* RCTNativeAnimatedModule.m */,
|
||||
13E501D51D07A6C9005F35D8 /* Nodes */,
|
||||
134814211AA4EA7D00B7C361 /* Products */,
|
||||
2D2A28201D9B03D100D4039D /* libRCTAnimation-tvOS.a */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A281F1D9B03D100D4039D /* RCTAnimation-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28281D9B03D100D4039D /* Build configuration list for PBXNativeTarget "RCTAnimation-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A281C1D9B03D100D4039D /* Sources */,
|
||||
2D2A281D1D9B03D100D4039D /* Frameworks */,
|
||||
2D2A281E1D9B03D100D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTAnimation-tvOS";
|
||||
productName = "RCTAnimation-tvOS";
|
||||
productReference = 2D2A28201D9B03D100D4039D /* libRCTAnimation-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B511DA1A9E6C8500147676 /* RCTAnimation */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTAnimation" */;
|
||||
@@ -158,6 +213,10 @@
|
||||
LastUpgradeCheck = 0730;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A281F1D9B03D100D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B511DA1A9E6C8500147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -176,11 +235,34 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* RCTAnimation */,
|
||||
2D2A281F1D9B03D100D4039D /* RCTAnimation-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A281C1D9B03D100D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F001D9B0B4800451313 /* RCTValueAnimatedNode.m in Sources */,
|
||||
2D3B5EFB1D9B0B4800451313 /* RCTModuloAnimatedNode.m in Sources */,
|
||||
2D3B5EF21D9B0B3100451313 /* RCTAnimationUtils.m in Sources */,
|
||||
2D3B5EF51D9B0B4800451313 /* RCTDivisionAnimatedNode.m in Sources */,
|
||||
2D3B5EF71D9B0B4800451313 /* RCTAdditionAnimatedNode.m in Sources */,
|
||||
2D3B5EF41D9B0B3700451313 /* RCTNativeAnimatedModule.m in Sources */,
|
||||
2D3B5EF61D9B0B4800451313 /* RCTDiffClampAnimatedNode.m in Sources */,
|
||||
2D3B5EF81D9B0B4800451313 /* RCTAnimatedNode.m in Sources */,
|
||||
2D3B5EFE1D9B0B4800451313 /* RCTStyleAnimatedNode.m in Sources */,
|
||||
2D3B5EFA1D9B0B4800451313 /* RCTInterpolationAnimatedNode.m in Sources */,
|
||||
2D3B5EF91D9B0B4800451313 /* RCTAnimationDriverNode.m in Sources */,
|
||||
2D3B5EFF1D9B0B4800451313 /* RCTTransformAnimatedNode.m in Sources */,
|
||||
2D3B5EFC1D9B0B4800451313 /* RCTMultiplicationAnimatedNode.m in Sources */,
|
||||
2D3B5EFD1D9B0B4800451313 /* RCTPropsAnimatedNode.m in Sources */,
|
||||
2D3B5EF31D9B0B3400451313 /* RCTViewPropertyMapper.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D71A9E6C8500147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -196,6 +278,7 @@
|
||||
13E501E91D07A6C9005F35D8 /* RCTAnimatedNode.m in Sources */,
|
||||
13E501EB1D07A6C9005F35D8 /* RCTInterpolationAnimatedNode.m in Sources */,
|
||||
13E501E81D07A6C9005F35D8 /* RCTAdditionAnimatedNode.m in Sources */,
|
||||
5C9894951D999639008027DB /* RCTDivisionAnimatedNode.m in Sources */,
|
||||
13E501EA1D07A6C9005F35D8 /* RCTAnimationDriverNode.m in Sources */,
|
||||
13E501EF1D07A6C9005F35D8 /* RCTTransformAnimatedNode.m in Sources */,
|
||||
13E501D41D07A644005F35D8 /* RCTViewPropertyMapper.m in Sources */,
|
||||
@@ -205,6 +288,51 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28261D9B03D100D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A28271D9B03D100D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511ED1A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -325,6 +453,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28281D9B03D100D4039D /* Build configuration list for PBXNativeTarget "RCTAnimation-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28261D9B03D100D4039D /* Debug */,
|
||||
2D2A28271D9B03D100D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTAnimation" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#import "RCTInterpolationAnimatedNode.h"
|
||||
#import "RCTLog.h"
|
||||
#import "RCTDiffClampAnimatedNode.h"
|
||||
#import "RCTDivisionAnimatedNode.h"
|
||||
#import "RCTModuloAnimatedNode.h"
|
||||
#import "RCTMultiplicationAnimatedNode.h"
|
||||
#import "RCTPropsAnimatedNode.h"
|
||||
@@ -71,6 +72,7 @@ RCT_EXPORT_METHOD(createAnimatedNode:(nonnull NSNumber *)tag
|
||||
@"interpolation" : [RCTInterpolationAnimatedNode class],
|
||||
@"addition" : [RCTAdditionAnimatedNode class],
|
||||
@"diffclamp": [RCTDiffClampAnimatedNode class],
|
||||
@"division" : [RCTDivisionAnimatedNode class],
|
||||
@"multiplication" : [RCTMultiplicationAnimatedNode class],
|
||||
@"modulus" : [RCTModuloAnimatedNode class],
|
||||
@"transform" : [RCTTransformAnimatedNode class]};
|
||||
@@ -175,6 +177,32 @@ RCT_EXPORT_METHOD(setAnimatedNodeValue:(nonnull NSNumber *)nodeTag
|
||||
[valueNode setNeedsUpdate];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setAnimatedNodeOffset:(nonnull NSNumber *)nodeTag
|
||||
offset:(nonnull NSNumber *)offset)
|
||||
{
|
||||
RCTAnimatedNode *node = _animationNodes[nodeTag];
|
||||
if (![node isKindOfClass:[RCTValueAnimatedNode class]]) {
|
||||
RCTLogError(@"Not a value node.");
|
||||
return;
|
||||
}
|
||||
|
||||
RCTValueAnimatedNode *valueNode = (RCTValueAnimatedNode *)node;
|
||||
[valueNode setOffset:offset.floatValue];
|
||||
[_updatedValueNodes addObject:valueNode];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(flattenAnimatedNodeOffset:(nonnull NSNumber *)nodeTag)
|
||||
{
|
||||
RCTAnimatedNode *node = _animationNodes[nodeTag];
|
||||
if (![node isKindOfClass:[RCTValueAnimatedNode class]]) {
|
||||
RCTLogError(@"Not a value node.");
|
||||
return;
|
||||
}
|
||||
|
||||
RCTValueAnimatedNode *valueNode = (RCTValueAnimatedNode *)node;
|
||||
[valueNode flattenOffset];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(connectAnimatedNodeToView:(nonnull NSNumber *)nodeTag
|
||||
viewTag:(nonnull NSNumber *)viewTag)
|
||||
{
|
||||
|
||||
@@ -11,11 +11,26 @@
|
||||
1372B7371AB03E7B00659ED6 /* RCTNetInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1372B7361AB03E7B00659ED6 /* RCTNetInfo.m */; };
|
||||
13D6D66A1B5FCF8200883BE9 /* RCTNetworkTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 13D6D6691B5FCF8200883BE9 /* RCTNetworkTask.m */; };
|
||||
13EF800E1BCBE015003F47DD /* RCTFileRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 13EF800D1BCBE015003F47DD /* RCTFileRequestHandler.m */; };
|
||||
2D3B5F261D9B0EAB00451313 /* RCTNetworkTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 13D6D6691B5FCF8200883BE9 /* RCTNetworkTask.m */; };
|
||||
2D3B5F271D9B0EB400451313 /* RCTHTTPRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 352DA0B81B17855800AA15A8 /* RCTHTTPRequestHandler.m */; };
|
||||
2D3B5F281D9B0EB400451313 /* RCTFileRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 13EF800D1BCBE015003F47DD /* RCTFileRequestHandler.m */; };
|
||||
2D3B5F291D9B0EB400451313 /* RCTDataRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 134E96991BCEB7F800AFFDA1 /* RCTDataRequestHandler.m */; };
|
||||
2D3B5F2A1D9B0EB400451313 /* RCTNetInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1372B7361AB03E7B00659ED6 /* RCTNetInfo.m */; };
|
||||
2D3B5F2B1D9B0EB400451313 /* RCTNetworking.mm in Sources */ = {isa = PBXBuildFile; fileRef = 58B512071A9E6CE300147676 /* RCTNetworking.mm */; };
|
||||
352DA0BA1B17855800AA15A8 /* RCTHTTPRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 352DA0B81B17855800AA15A8 /* RCTHTTPRequestHandler.m */; };
|
||||
58B512081A9E6CE300147676 /* RCTNetworking.mm in Sources */ = {isa = PBXBuildFile; fileRef = 58B512071A9E6CE300147676 /* RCTNetworking.mm */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28521D9B044C00D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -36,6 +51,7 @@
|
||||
13D6D6691B5FCF8200883BE9 /* RCTNetworkTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTNetworkTask.m; sourceTree = "<group>"; };
|
||||
13EF800C1BCBE015003F47DD /* RCTFileRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTFileRequestHandler.h; sourceTree = "<group>"; };
|
||||
13EF800D1BCBE015003F47DD /* RCTFileRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTFileRequestHandler.m; sourceTree = "<group>"; };
|
||||
2D2A28541D9B044C00D4039D /* libRCTNetwork-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTNetwork-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
352DA0B71B17855800AA15A8 /* RCTHTTPRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTHTTPRequestHandler.h; sourceTree = "<group>"; };
|
||||
352DA0B81B17855800AA15A8 /* RCTHTTPRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTHTTPRequestHandler.m; sourceTree = "<group>"; };
|
||||
58B511DB1A9E6C8500147676 /* libRCTNetwork.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTNetwork.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -44,6 +60,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28511D9B044C00D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -79,6 +102,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
58B511DB1A9E6C8500147676 /* libRCTNetwork.a */,
|
||||
2D2A28541D9B044C00D4039D /* libRCTNetwork-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -86,6 +110,23 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28531D9B044C00D4039D /* RCTNetwork-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A285C1D9B044C00D4039D /* Build configuration list for PBXNativeTarget "RCTNetwork-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A28501D9B044C00D4039D /* Sources */,
|
||||
2D2A28511D9B044C00D4039D /* Frameworks */,
|
||||
2D2A28521D9B044C00D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTNetwork-tvOS";
|
||||
productName = "RCTNetwork-tvOS";
|
||||
productReference = 2D2A28541D9B044C00D4039D /* libRCTNetwork-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B511DA1A9E6C8500147676 /* RCTNetwork */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTNetwork" */;
|
||||
@@ -112,6 +153,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28531D9B044C00D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B511DA1A9E6C8500147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -130,11 +175,25 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* RCTNetwork */,
|
||||
2D2A28531D9B044C00D4039D /* RCTNetwork-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A28501D9B044C00D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F2A1D9B0EB400451313 /* RCTNetInfo.m in Sources */,
|
||||
2D3B5F261D9B0EAB00451313 /* RCTNetworkTask.m in Sources */,
|
||||
2D3B5F281D9B0EB400451313 /* RCTFileRequestHandler.m in Sources */,
|
||||
2D3B5F271D9B0EB400451313 /* RCTHTTPRequestHandler.m in Sources */,
|
||||
2D3B5F2B1D9B0EB400451313 /* RCTNetworking.mm in Sources */,
|
||||
2D3B5F291D9B0EB400451313 /* RCTDataRequestHandler.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D71A9E6C8500147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -151,6 +210,52 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A285A1D9B044C00D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A285B1D9B044C00D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511ED1A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -275,6 +380,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A285C1D9B044C00D4039D /* Build configuration list for PBXNativeTarget "RCTNetwork-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A285A1D9B044C00D4039D /* Debug */,
|
||||
2D2A285B1D9B044C00D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTNetwork" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -53,6 +53,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
_incrementalDataBlock = nil;
|
||||
_responseBlock = nil;
|
||||
_uploadProgressBlock = nil;
|
||||
_requestToken = nil;
|
||||
}
|
||||
|
||||
- (void)dispatchCallback:(dispatch_block_t)callback
|
||||
@@ -66,6 +67,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
- (void)start
|
||||
{
|
||||
if (_status != RCTNetworkTaskPending) {
|
||||
RCTLogError(@"RCTNetworkTask was already started or completed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_requestToken == nil) {
|
||||
id token = [_handler sendRequest:_request withDelegate:self];
|
||||
if ([self validateRequestToken:token]) {
|
||||
@@ -77,6 +83,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
- (void)cancel
|
||||
{
|
||||
if (_status == RCTNetworkTaskFinished) {
|
||||
return;
|
||||
}
|
||||
|
||||
_status = RCTNetworkTaskFinished;
|
||||
id token = _requestToken;
|
||||
if (token && [_handler respondsToSelector:@selector(cancelRequest:)]) {
|
||||
|
||||
@@ -340,7 +340,7 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
|
||||
var headers = this.responseHeaders || {};
|
||||
return Object.keys(headers).map((headerName) => {
|
||||
return headerName + ': ' + headers[headerName];
|
||||
}).join('\n');
|
||||
}).join('\r\n');
|
||||
}
|
||||
|
||||
getResponseHeader(header: string): ?string {
|
||||
|
||||
@@ -194,4 +194,17 @@ describe('XMLHttpRequest', function() {
|
||||
expect(handleProgress.mock.calls[0][0].total).toBe(100);
|
||||
});
|
||||
|
||||
it('should combine response headers with CRLF', function() {
|
||||
xhr.open('GET', 'blabla');
|
||||
xhr.send();
|
||||
xhr.__didReceiveResponse(1, 200, {
|
||||
'Content-Type': 'text/plain; charset=utf-8',
|
||||
'Content-Length': '32',
|
||||
});
|
||||
|
||||
expect(xhr.getAllResponseHeaders()).toBe(
|
||||
'Content-Type: text/plain; charset=utf-8\r\n' +
|
||||
'Content-Length: 32');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -41,8 +41,7 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
@property(readwrite, nonatomic, assign) BOOL recordMode;
|
||||
|
||||
/**
|
||||
@param testClass The subclass of FBSnapshotTestCase that is using this controller.
|
||||
@param referenceImagesDirectory The directory where the reference images are stored.
|
||||
@param testClass The subclass of FBSnapshotTestCase that is using this controller.d.
|
||||
@returns An instance of FBSnapshotTestController.
|
||||
*/
|
||||
- (id)initWithTestClass:(Class)testClass;
|
||||
@@ -50,7 +49,6 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
/**
|
||||
Designated initializer.
|
||||
@param testName The name of the tests.
|
||||
@param referenceImagesDirectory The directory where the reference images are stored.
|
||||
@returns An instance of FBSnapshotTestController.
|
||||
*/
|
||||
- (id)initWithTestName:(NSString *)testName;
|
||||
@@ -59,9 +57,8 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
/**
|
||||
Performs the comparison of the layer.
|
||||
@param layer The Layer to snapshot.
|
||||
@param referenceImagesDirectory The directory in which reference images are stored.
|
||||
@param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
|
||||
@param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@param errorPtr An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@returns YES if the comparison (or saving of the reference image) succeeded.
|
||||
*/
|
||||
- (BOOL)compareSnapshotOfLayer:(CALayer *)layer
|
||||
@@ -72,9 +69,9 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
/**
|
||||
Performs the comparison of the view.
|
||||
@param view The view to snapshot.
|
||||
@param referenceImagesDirectory The directory in which reference images are stored.
|
||||
@param selector selector
|
||||
@param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
|
||||
@param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@param errorPtr An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@returns YES if the comparison (or saving of the reference image) succeeded.
|
||||
*/
|
||||
- (BOOL)compareSnapshotOfView:(UIView *)view
|
||||
@@ -84,10 +81,10 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
|
||||
/**
|
||||
Performs the comparison of a view or layer.
|
||||
@param view The view or layer to snapshot.
|
||||
@param referenceImagesDirectory The directory in which reference images are stored.
|
||||
@param viewOrLayer The view or layer to snapshot.
|
||||
@param selector selector
|
||||
@param identifier An optional identifier, used is there are muliptle snapshot tests in a given -test method.
|
||||
@param error An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@param errorPtr An error to log in an XCTAssert() macro if the method fails (missing reference image, images differ, etc).
|
||||
@returns YES if the comparison (or saving of the reference image) succeeded.
|
||||
*/
|
||||
- (BOOL)compareSnapshotOfViewOrLayer:(id)viewOrLayer
|
||||
@@ -116,7 +113,7 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
Saves a reference image.
|
||||
@param selector The test method being run.
|
||||
@param identifier The optional identifier, used when multiple images are tested in a single -test method.
|
||||
@param error An error, if this methods returns NO, the error will be something useful.
|
||||
@param errorPtr An error, if this methods returns NO, the error will be something useful.
|
||||
@returns An image.
|
||||
*/
|
||||
- (BOOL)saveReferenceImage:(UIImage *)image
|
||||
@@ -128,8 +125,8 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
Performs a pixel-by-pixel comparison of the two images.
|
||||
@param referenceImage The reference (correct) image.
|
||||
@param image The image to test against the reference.
|
||||
@param error An error that indicates why the comparison failed if it does.
|
||||
@param YES if the comparison succeeded and the images are the same.
|
||||
@param errorPtr An error that indicates why the comparison failed if it does.
|
||||
@returns YES if the comparison succeeded and the images are the same.
|
||||
*/
|
||||
- (BOOL)compareReferenceImage:(UIImage *)referenceImage
|
||||
toImage:(UIImage *)image
|
||||
@@ -141,8 +138,8 @@ extern NSString *const FBReferenceImageFilePathKey;
|
||||
@param testImage The image to test against the reference.
|
||||
@param selector The test method being run.
|
||||
@param identifier The optional identifier, used when multiple images are tested in a single -test method.
|
||||
@param error An error that indicates why the comparison failed if it does.
|
||||
@param YES if the save succeeded.
|
||||
@param errorPtr An error that indicates why the comparison failed if it does.
|
||||
@returns YES if the save succeeded.
|
||||
*/
|
||||
- (BOOL)saveFailedReferenceImage:(UIImage *)referenceImage
|
||||
testImage:(UIImage *)testImage
|
||||
|
||||
@@ -247,6 +247,9 @@ typedef NS_ENUM(NSUInteger, FBTestSnapshotFileNameType) {
|
||||
if ([[UIScreen mainScreen] scale] > 1.0) {
|
||||
fileName = [fileName stringByAppendingFormat:@"@%.fx", [[UIScreen mainScreen] scale]];
|
||||
}
|
||||
#if TARGET_OS_TV
|
||||
fileName = [fileName stringByAppendingString:@"_tvOS"];
|
||||
#endif
|
||||
fileName = [fileName stringByAppendingPathExtension:@"png"];
|
||||
return fileName;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2D3B5F2D1D9B0F2800451313 /* RCTSnapshotManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9913A84A1BBE833400D70E66 /* RCTSnapshotManager.m */; };
|
||||
2D3B5F2E1D9B0F2B00451313 /* RCTTestModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 585135341AB3C56F00882537 /* RCTTestModule.m */; };
|
||||
2D3B5F2F1D9B0F2E00451313 /* RCTTestRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 585135361AB3C56F00882537 /* RCTTestRunner.m */; };
|
||||
2D3B5F301D9B0F3D00451313 /* FBSnapshotTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 58E64FE71AB964CD007446E2 /* FBSnapshotTestController.m */; };
|
||||
2D3B5F311D9B0F4200451313 /* UIImage+Compare.m in Sources */ = {isa = PBXBuildFile; fileRef = 58E64FE91AB964CD007446E2 /* UIImage+Compare.m */; };
|
||||
2D3B5F321D9B0F4500451313 /* UIImage+Diff.m in Sources */ = {isa = PBXBuildFile; fileRef = 58E64FEB1AB964CD007446E2 /* UIImage+Diff.m */; };
|
||||
585135371AB3C56F00882537 /* RCTTestModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 585135341AB3C56F00882537 /* RCTTestModule.m */; };
|
||||
585135381AB3C57000882537 /* RCTTestRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 585135361AB3C56F00882537 /* RCTTestRunner.m */; };
|
||||
585135391AB3C59A00882537 /* RCTTestRunner.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 585135351AB3C56F00882537 /* RCTTestRunner.h */; };
|
||||
@@ -17,6 +23,15 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A286C1D9B047700D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
580C376D1AB104AF0015E709 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -30,6 +45,7 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2D2A286E1D9B047700D4039D /* libRCTTest-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTTest-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
580C376F1AB104AF0015E709 /* libRCTTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTTest.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
585135331AB3C56F00882537 /* RCTTestModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTestModule.h; sourceTree = "<group>"; };
|
||||
585135341AB3C56F00882537 /* RCTTestModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTestModule.m; sourceTree = "<group>"; };
|
||||
@@ -48,6 +64,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A286B1D9B047700D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
580C376C1AB104AF0015E709 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -78,6 +101,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
580C376F1AB104AF0015E709 /* libRCTTest.a */,
|
||||
2D2A286E1D9B047700D4039D /* libRCTTest-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -100,6 +124,23 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A286D1D9B047700D4039D /* RCTTest-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28761D9B047700D4039D /* Build configuration list for PBXNativeTarget "RCTTest-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A286A1D9B047700D4039D /* Sources */,
|
||||
2D2A286B1D9B047700D4039D /* Frameworks */,
|
||||
2D2A286C1D9B047700D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTTest-tvOS";
|
||||
productName = "RCTTest-tvOS";
|
||||
productReference = 2D2A286E1D9B047700D4039D /* libRCTTest-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
580C376E1AB104AF0015E709 /* RCTTest */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 580C37831AB104AF0015E709 /* Build configuration list for PBXNativeTarget "RCTTest" */;
|
||||
@@ -126,6 +167,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A286D1D9B047700D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
580C376E1AB104AF0015E709 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -144,11 +189,25 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
580C376E1AB104AF0015E709 /* RCTTest */,
|
||||
2D2A286D1D9B047700D4039D /* RCTTest-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A286A1D9B047700D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F311D9B0F4200451313 /* UIImage+Compare.m in Sources */,
|
||||
2D3B5F2F1D9B0F2E00451313 /* RCTTestRunner.m in Sources */,
|
||||
2D3B5F321D9B0F4500451313 /* UIImage+Diff.m in Sources */,
|
||||
2D3B5F301D9B0F3D00451313 /* FBSnapshotTestController.m in Sources */,
|
||||
2D3B5F2D1D9B0F2800451313 /* RCTSnapshotManager.m in Sources */,
|
||||
2D3B5F2E1D9B0F2B00451313 /* RCTTestModule.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
580C376B1AB104AF0015E709 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -165,6 +224,42 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28741D9B047700D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A28751D9B047700D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
580C37811AB104AF0015E709 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -303,6 +398,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28761D9B047700D4039D /* Build configuration list for PBXNativeTarget "RCTTest-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28741D9B047700D4039D /* Debug */,
|
||||
2D2A28751D9B047700D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
580C376A1AB104AF0015E709 /* Build configuration list for PBXProject "RCTTest" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -8,9 +8,19 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
13DBA45E1AEE749000A17CF8 /* RCTSettingsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DBA45D1AEE749000A17CF8 /* RCTSettingsManager.m */; };
|
||||
2D3B5F2C1D9B0ECA00451313 /* RCTSettingsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13DBA45D1AEE749000A17CF8 /* RCTSettingsManager.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A285F1D9B046600D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -26,9 +36,17 @@
|
||||
134814201AA4EA6300B7C361 /* libRCTSettings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTSettings.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13DBA45C1AEE749000A17CF8 /* RCTSettingsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSettingsManager.h; sourceTree = "<group>"; };
|
||||
13DBA45D1AEE749000A17CF8 /* RCTSettingsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSettingsManager.m; sourceTree = "<group>"; };
|
||||
2D2A28611D9B046600D4039D /* libRCTSettings-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTSettings-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A285E1D9B046600D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -53,12 +71,30 @@
|
||||
13DBA45C1AEE749000A17CF8 /* RCTSettingsManager.h */,
|
||||
13DBA45D1AEE749000A17CF8 /* RCTSettingsManager.m */,
|
||||
134814211AA4EA7D00B7C361 /* Products */,
|
||||
2D2A28611D9B046600D4039D /* libRCTSettings-tvOS.a */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28601D9B046600D4039D /* RCTSettings-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28691D9B046600D4039D /* Build configuration list for PBXNativeTarget "RCTSettings-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A285D1D9B046600D4039D /* Sources */,
|
||||
2D2A285E1D9B046600D4039D /* Frameworks */,
|
||||
2D2A285F1D9B046600D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTSettings-tvOS";
|
||||
productName = "RCTSettings-tvOS";
|
||||
productReference = 2D2A28611D9B046600D4039D /* libRCTSettings-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B511DA1A9E6C8500147676 /* RCTSettings */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTSettings" */;
|
||||
@@ -85,6 +121,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28601D9B046600D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B511DA1A9E6C8500147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -103,11 +143,20 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* RCTSettings */,
|
||||
2D2A28601D9B046600D4039D /* RCTSettings-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A285D1D9B046600D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F2C1D9B0ECA00451313 /* RCTSettingsManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511D71A9E6C8500147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -119,6 +168,52 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28671D9B046600D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A28681D9B046600D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511ED1A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -238,6 +333,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28691D9B046600D4039D /* Build configuration list for PBXNativeTarget "RCTSettings-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28671D9B046600D4039D /* Debug */,
|
||||
2D2A28681D9B046600D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTSettings" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -83,7 +83,7 @@ var LayoutPropTypes = {
|
||||
* use logical pixel units, rather than percents, ems, or any of that.
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom
|
||||
* for more details of how `top` affects layout.
|
||||
* for more details of how `bottom` affects layout.
|
||||
*/
|
||||
bottom: ReactPropTypes.number,
|
||||
|
||||
@@ -328,6 +328,19 @@ var LayoutPropTypes = {
|
||||
'stretch'
|
||||
]),
|
||||
|
||||
/** `overflow` controls how a children are measured and displayed.
|
||||
* `overflow: hidden` causes views to be clipped while `overflow: scroll`
|
||||
* causes views to be measured independently of their parents main axis.`
|
||||
* It works like `overflow` in CSS (default: visible).
|
||||
* See https://developer.mozilla.org/en/docs/Web/CSS/overflow
|
||||
* for more details.
|
||||
*/
|
||||
overflow: ReactPropTypes.oneOf([
|
||||
'visible',
|
||||
'hidden',
|
||||
'scroll',
|
||||
]),
|
||||
|
||||
/** In React Native `flex` does not work the same way that it does in CSS.
|
||||
* `flex` is a number rather than a string, and it works
|
||||
* according to the `css-layout` library
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
1362F1001B4D51F400E06D8C /* RCTTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FD1B4D51F400E06D8C /* RCTTextField.m */; };
|
||||
1362F1011B4D51F400E06D8C /* RCTTextFieldManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */; };
|
||||
19FC5C851D41A4120090108F /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 19FC5C841D41A4120090108F /* RCTTextSelection.m */; };
|
||||
2D3B5F331D9B102D00451313 /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 19FC5C841D41A4120090108F /* RCTTextSelection.m */; };
|
||||
2D3B5F341D9B103100451313 /* RCTRawTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */; };
|
||||
2D3B5F351D9B103300451313 /* RCTShadowRawText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */; };
|
||||
2D3B5F361D9B106F00451313 /* RCTShadowText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */; };
|
||||
2D3B5F371D9B106F00451313 /* RCTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B512141A9E6EFF00147676 /* RCTText.m */; };
|
||||
2D3B5F381D9B106F00451313 /* RCTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */; };
|
||||
2D3B5F391D9B106F00451313 /* RCTTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FD1B4D51F400E06D8C /* RCTTextField.m */; };
|
||||
2D3B5F3A1D9B106F00451313 /* RCTTextFieldManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */; };
|
||||
2D3B5F3B1D9B106F00451313 /* RCTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */; };
|
||||
2D3B5F3C1D9B106F00451313 /* RCTTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */; };
|
||||
58B511CE1A9E6C5C00147676 /* RCTRawTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */; };
|
||||
58B511CF1A9E6C5C00147676 /* RCTShadowRawText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */; };
|
||||
58B511D01A9E6C5C00147676 /* RCTShadowText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */; };
|
||||
@@ -20,6 +30,15 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28791D9B048500D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511991A9E6C1200147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -42,6 +61,7 @@
|
||||
1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextFieldManager.m; sourceTree = "<group>"; };
|
||||
19FC5C841D41A4120090108F /* RCTTextSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextSelection.m; sourceTree = "<group>"; };
|
||||
19FC5C861D41A4220090108F /* RCTTextSelection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTTextSelection.h; sourceTree = "<group>"; };
|
||||
2D2A287B1D9B048500D4039D /* libRCTText-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTText-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
58B5119B1A9E6C1200147676 /* libRCTText.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTText.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
58B511C61A9E6C5C00147676 /* RCTRawTextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTRawTextManager.h; sourceTree = "<group>"; };
|
||||
58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRawTextManager.m; sourceTree = "<group>"; };
|
||||
@@ -56,6 +76,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28781D9B048500D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511981A9E6C1200147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -99,6 +126,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
58B5119B1A9E6C1200147676 /* libRCTText.a */,
|
||||
2D2A287B1D9B048500D4039D /* libRCTText-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -106,6 +134,23 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A287A1D9B048500D4039D /* RCTText-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28831D9B048500D4039D /* Build configuration list for PBXNativeTarget "RCTText-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A28771D9B048500D4039D /* Sources */,
|
||||
2D2A28781D9B048500D4039D /* Frameworks */,
|
||||
2D2A28791D9B048500D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTText-tvOS";
|
||||
productName = "RCTText-tvOS";
|
||||
productReference = 2D2A287B1D9B048500D4039D /* libRCTText-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
58B5119A1A9E6C1200147676 /* RCTText */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511AF1A9E6C1300147676 /* Build configuration list for PBXNativeTarget "RCTText" */;
|
||||
@@ -132,6 +177,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A287A1D9B048500D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
58B5119A1A9E6C1200147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -150,11 +199,29 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B5119A1A9E6C1200147676 /* RCTText */,
|
||||
2D2A287A1D9B048500D4039D /* RCTText-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A28771D9B048500D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F371D9B106F00451313 /* RCTText.m in Sources */,
|
||||
2D3B5F381D9B106F00451313 /* RCTTextManager.m in Sources */,
|
||||
2D3B5F391D9B106F00451313 /* RCTTextField.m in Sources */,
|
||||
2D3B5F361D9B106F00451313 /* RCTShadowText.m in Sources */,
|
||||
2D3B5F3B1D9B106F00451313 /* RCTTextView.m in Sources */,
|
||||
2D3B5F3A1D9B106F00451313 /* RCTTextFieldManager.m in Sources */,
|
||||
2D3B5F341D9B103100451313 /* RCTRawTextManager.m in Sources */,
|
||||
2D3B5F3C1D9B106F00451313 /* RCTTextViewManager.m in Sources */,
|
||||
2D3B5F331D9B102D00451313 /* RCTTextSelection.m in Sources */,
|
||||
2D3B5F351D9B103300451313 /* RCTShadowRawText.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
58B511971A9E6C1200147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -175,6 +242,52 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28811D9B048500D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A28821D9B048500D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511AD1A9E6C1300147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -295,6 +408,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28831D9B048500D4039D /* Build configuration list for PBXNativeTarget "RCTText-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28811D9B048500D4039D /* Debug */,
|
||||
2D2A28821D9B048500D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511961A9E6C1200147676 /* Build configuration list for PBXProject "RCTText" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -96,12 +96,16 @@
|
||||
_textView = [[RCTUITextView alloc] initWithFrame:CGRectZero];
|
||||
_textView.backgroundColor = [UIColor clearColor];
|
||||
_textView.textColor = [UIColor blackColor];
|
||||
#if !TARGET_OS_TV
|
||||
_textView.scrollsToTop = NO;
|
||||
#endif
|
||||
_textView.scrollEnabled = NO;
|
||||
_textView.delegate = self;
|
||||
|
||||
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
|
||||
#if !TARGET_OS_TV
|
||||
_scrollView.scrollsToTop = NO;
|
||||
#endif
|
||||
[_scrollView addSubview:_textView];
|
||||
|
||||
[self addSubview:_scrollView];
|
||||
@@ -283,11 +287,13 @@ static NSAttributedString *removeReactTagFromString(NSAttributedString *string)
|
||||
|
||||
if (_placeholder) {
|
||||
_placeholderView = [[UITextView alloc] initWithFrame:self.bounds];
|
||||
_placeholderView.editable = NO;
|
||||
_placeholderView.userInteractionEnabled = NO;
|
||||
_placeholderView.backgroundColor = [UIColor clearColor];
|
||||
_placeholderView.scrollEnabled = NO;
|
||||
#if !TARGET_OS_TV
|
||||
_placeholderView.editable = NO;
|
||||
_placeholderView.scrollsToTop = NO;
|
||||
#endif
|
||||
_placeholderView.attributedText =
|
||||
[[NSAttributedString alloc] initWithString:_placeholder attributes:@{
|
||||
NSFontAttributeName : (_textView.font ? _textView.font : [self defaultPlaceholderFont]),
|
||||
|
||||
@@ -7,39 +7,40 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule MessageQueue
|
||||
* @flow
|
||||
*/
|
||||
|
||||
/*eslint no-bitwise: 0*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const Systrace = require('Systrace');
|
||||
const ErrorUtils = require('ErrorUtils');
|
||||
const JSTimersExecution = require('JSTimersExecution');
|
||||
const Systrace = require('Systrace');
|
||||
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
const keyMirror = require('fbjs/lib/keyMirror');
|
||||
const deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
const stringifySafe = require('stringifySafe');
|
||||
|
||||
export type SpyData = {
|
||||
type: number,
|
||||
module: ?string,
|
||||
method: string|number,
|
||||
args: any
|
||||
}
|
||||
|
||||
const TO_JS = 0;
|
||||
const TO_NATIVE = 1;
|
||||
|
||||
const MODULE_IDS = 0;
|
||||
const METHOD_IDS = 1;
|
||||
const PARAMS = 2;
|
||||
const MIN_TIME_BETWEEN_FLUSHES_MS = 5;
|
||||
|
||||
const TO_NATIVE = 1;
|
||||
const TO_JS = 0;
|
||||
|
||||
const TRACE_TAG_REACT_APPS = 1 << 17;
|
||||
|
||||
const DEBUG_INFO_LIMIT = 32;
|
||||
|
||||
const MethodTypes = keyMirror({
|
||||
async: null,
|
||||
promise: null,
|
||||
sync: null,
|
||||
});
|
||||
|
||||
const guard = (fn) => {
|
||||
try {
|
||||
fn();
|
||||
@@ -48,12 +49,22 @@ const guard = (fn) => {
|
||||
}
|
||||
};
|
||||
|
||||
type Config = {
|
||||
remoteModuleConfig: Object,
|
||||
};
|
||||
|
||||
class MessageQueue {
|
||||
constructor(configProvider: () => Config) {
|
||||
_callableModules: {[key: string]: Object};
|
||||
_queue: [Array<number>, Array<number>, Array<any>, number];
|
||||
_callbacks: [];
|
||||
_callbackID: number;
|
||||
_callID: number;
|
||||
_lastFlush: number;
|
||||
_eventLoopStartTime: number;
|
||||
|
||||
_debugInfo: Object;
|
||||
_remoteModuleTable: Object;
|
||||
_remoteMethodTable: Object;
|
||||
|
||||
__spy: ?(data: SpyData) => void;
|
||||
|
||||
constructor() {
|
||||
this._callableModules = {};
|
||||
this._queue = [[], [], [], 0];
|
||||
this._callbacks = [];
|
||||
@@ -68,28 +79,20 @@ class MessageQueue {
|
||||
this._remoteMethodTable = {};
|
||||
}
|
||||
|
||||
[
|
||||
'invokeCallbackAndReturnFlushedQueue',
|
||||
'callFunctionReturnFlushedQueue',
|
||||
'callFunctionReturnResultAndFlushedQueue',
|
||||
'flushedQueue',
|
||||
].forEach((fn) => (this[fn] = this[fn].bind(this)));
|
||||
|
||||
lazyProperty(this, 'RemoteModules', () => {
|
||||
const {remoteModuleConfig} = configProvider();
|
||||
const modulesConfig = remoteModuleConfig;
|
||||
return this._genModules(modulesConfig);
|
||||
});
|
||||
(this:any).callFunctionReturnFlushedQueue = this.callFunctionReturnFlushedQueue.bind(this);
|
||||
(this:any).callFunctionReturnResultAndFlushedQueue = this.callFunctionReturnResultAndFlushedQueue.bind(this);
|
||||
(this:any).flushedQueue = this.flushedQueue.bind(this);
|
||||
(this:any).invokeCallbackAndReturnFlushedQueue = this.invokeCallbackAndReturnFlushedQueue.bind(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Public APIs
|
||||
*/
|
||||
|
||||
static spy(spyOrToggle){
|
||||
static spy(spyOrToggle: boolean|(data: SpyData) => void){
|
||||
if (spyOrToggle === true){
|
||||
MessageQueue.prototype.__spy = (info)=>{
|
||||
console.log(`${info.type == TO_JS ? 'N->JS' : 'JS->N'} : ` +
|
||||
MessageQueue.prototype.__spy = info => {
|
||||
console.log(`${info.type === TO_JS ? 'N->JS' : 'JS->N'} : ` +
|
||||
`${info.module ? (info.module + '.') : ''}${info.method}` +
|
||||
`(${JSON.stringify(info.args)})`);
|
||||
};
|
||||
@@ -100,7 +103,7 @@ class MessageQueue {
|
||||
}
|
||||
}
|
||||
|
||||
callFunctionReturnFlushedQueue(module, method, args) {
|
||||
callFunctionReturnFlushedQueue(module: string, method: string, args: Array<any>) {
|
||||
guard(() => {
|
||||
this.__callFunction(module, method, args);
|
||||
this.__callImmediates();
|
||||
@@ -109,7 +112,7 @@ class MessageQueue {
|
||||
return this.flushedQueue();
|
||||
}
|
||||
|
||||
callFunctionReturnResultAndFlushedQueue(module, method, args) {
|
||||
callFunctionReturnResultAndFlushedQueue(module: string, method: string, args: Array<any>) {
|
||||
let result;
|
||||
guard(() => {
|
||||
result = this.__callFunction(module, method, args);
|
||||
@@ -119,7 +122,7 @@ class MessageQueue {
|
||||
return [result, this.flushedQueue()];
|
||||
}
|
||||
|
||||
invokeCallbackAndReturnFlushedQueue(cbID, args) {
|
||||
invokeCallbackAndReturnFlushedQueue(cbID: number, args: Array<any>) {
|
||||
guard(() => {
|
||||
this.__invokeCallback(cbID, args);
|
||||
this.__callImmediates();
|
||||
@@ -136,37 +139,19 @@ class MessageQueue {
|
||||
return queue[0].length ? queue : null;
|
||||
}
|
||||
|
||||
processModuleConfig(config, moduleID) {
|
||||
const info = this._genModule(config, moduleID);
|
||||
this.RemoteModules[info.name] = info.module;
|
||||
if (__DEV__) {
|
||||
this._createDebugLookup(config, moduleID, this._remoteModuleTable, this._remoteMethodTable);
|
||||
}
|
||||
return info.module;
|
||||
}
|
||||
|
||||
getEventLoopRunningTime() {
|
||||
return new Date().getTime() - this._eventLoopStartTime;
|
||||
}
|
||||
|
||||
registerCallableModule(name, methods) {
|
||||
this._callableModules[name] = methods;
|
||||
registerCallableModule(name: string, module: Object) {
|
||||
this._callableModules[name] = module;
|
||||
}
|
||||
|
||||
/**
|
||||
* "Private" methods
|
||||
*/
|
||||
__callImmediates() {
|
||||
Systrace.beginEvent('JSTimersExecution.callImmediates()');
|
||||
guard(() => JSTimersExecution.callImmediates());
|
||||
Systrace.endEvent();
|
||||
}
|
||||
|
||||
__nativeCall(module, method, params, onFail, onSucc) {
|
||||
enqueueNativeCall(moduleID: number, methodID: number, params: Array<any>, onFail: ?Function, onSucc: ?Function) {
|
||||
if (onFail || onSucc) {
|
||||
if (__DEV__) {
|
||||
const callId = this._callbackID >> 1;
|
||||
this._debugInfo[callId] = [module, method];
|
||||
this._debugInfo[callId] = [moduleID, methodID];
|
||||
if (callId > DEBUG_INFO_LIMIT) {
|
||||
delete this._debugInfo[callId - DEBUG_INFO_LIMIT];
|
||||
}
|
||||
@@ -183,15 +168,15 @@ class MessageQueue {
|
||||
}
|
||||
this._callID++;
|
||||
|
||||
this._queue[MODULE_IDS].push(module);
|
||||
this._queue[METHOD_IDS].push(method);
|
||||
this._queue[MODULE_IDS].push(moduleID);
|
||||
this._queue[METHOD_IDS].push(methodID);
|
||||
|
||||
if (__DEV__) {
|
||||
// Any params sent over the bridge should be encodable as JSON
|
||||
JSON.stringify(params);
|
||||
|
||||
// The params object should not be mutated after being queued
|
||||
deepFreezeAndThrowOnMutationInDev(params);
|
||||
deepFreezeAndThrowOnMutationInDev((params:any));
|
||||
}
|
||||
this._queue[PARAMS].push(params);
|
||||
|
||||
@@ -203,17 +188,34 @@ class MessageQueue {
|
||||
this._lastFlush = now;
|
||||
}
|
||||
Systrace.counterEvent('pending_js_to_native_queue', this._queue[0].length);
|
||||
if (__DEV__ && this.__spy && isFinite(module)) {
|
||||
if (__DEV__ && this.__spy && isFinite(moduleID)) {
|
||||
this.__spy(
|
||||
{ type: TO_NATIVE,
|
||||
module: this._remoteModuleTable[module],
|
||||
method: this._remoteMethodTable[module][method],
|
||||
module: this._remoteModuleTable[moduleID],
|
||||
method: this._remoteMethodTable[moduleID][methodID],
|
||||
args: params }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
__callFunction(module: string, method: string, args: any) {
|
||||
createDebugLookup(moduleID: number, name: string, methods: Array<string>) {
|
||||
if (__DEV__) {
|
||||
this._remoteModuleTable[moduleID] = name;
|
||||
this._remoteMethodTable[moduleID] = methods;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* "Private" methods
|
||||
*/
|
||||
|
||||
__callImmediates() {
|
||||
Systrace.beginEvent('JSTimersExecution.callImmediates()');
|
||||
guard(() => JSTimersExecution.callImmediates());
|
||||
Systrace.endEvent();
|
||||
}
|
||||
|
||||
__callFunction(module: string, method: string, args: Array<any>) {
|
||||
this._lastFlush = new Date().getTime();
|
||||
this._eventLoopStartTime = this._lastFlush;
|
||||
Systrace.beginEvent(`${module}.${method}()`);
|
||||
@@ -236,7 +238,7 @@ class MessageQueue {
|
||||
return result;
|
||||
}
|
||||
|
||||
__invokeCallback(cbID, args) {
|
||||
__invokeCallback(cbID: number, args: Array<any>) {
|
||||
this._lastFlush = new Date().getTime();
|
||||
this._eventLoopStartTime = this._lastFlush;
|
||||
const callback = this._callbacks[cbID];
|
||||
@@ -276,145 +278,6 @@ class MessageQueue {
|
||||
Systrace.endEvent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Private helper methods
|
||||
*/
|
||||
|
||||
_genModules(remoteModules) {
|
||||
const modules = {};
|
||||
remoteModules.forEach((config, moduleID) => {
|
||||
// Initially this config will only contain the module name when running in JSC. The actual
|
||||
// configuration of the module will be lazily loaded (see NativeModules.js) and updated
|
||||
// through processModuleConfig.
|
||||
const info = this._genModule(config, moduleID);
|
||||
if (info) {
|
||||
modules[info.name] = info.module;
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
this._createDebugLookup(config, moduleID, this._remoteModuleTable, this._remoteMethodTable);
|
||||
}
|
||||
});
|
||||
return modules;
|
||||
}
|
||||
|
||||
_genModule(config, moduleID): ?Object {
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let moduleName, constants, methods, promiseMethods, syncMethods;
|
||||
if (moduleHasConstants(config)) {
|
||||
[moduleName, constants, methods, promiseMethods, syncMethods] = config;
|
||||
} else {
|
||||
[moduleName, methods, promiseMethods, syncMethods] = config;
|
||||
}
|
||||
|
||||
const module = {};
|
||||
methods && methods.forEach((methodName, methodID) => {
|
||||
const isPromise = promiseMethods && arrayContains(promiseMethods, methodID);
|
||||
const isSync = syncMethods && arrayContains(syncMethods, methodID);
|
||||
invariant(!isPromise || !isSync, 'Cannot have a method that is both async and a sync hook');
|
||||
const methodType = isPromise ? MethodTypes.promise :
|
||||
isSync ? MethodTypes.sync : MethodTypes.async;
|
||||
module[methodName] = this._genMethod(moduleID, methodID, methodType);
|
||||
});
|
||||
Object.assign(module, constants);
|
||||
|
||||
if (!constants && !methods && !promiseMethods) {
|
||||
module.moduleID = moduleID;
|
||||
}
|
||||
|
||||
return { name: moduleName, module };
|
||||
}
|
||||
|
||||
_genMethod(module, method, type) {
|
||||
let fn = null;
|
||||
const self = this;
|
||||
if (type === MethodTypes.promise) {
|
||||
fn = function(...args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self.__nativeCall(module, method, args,
|
||||
(data) => resolve(data),
|
||||
(errorData) => reject(createErrorFromErrorData(errorData)));
|
||||
});
|
||||
};
|
||||
} else if (type === MethodTypes.sync) {
|
||||
fn = function(...args) {
|
||||
return global.nativeCallSyncHook(module, method, args);
|
||||
};
|
||||
} else {
|
||||
fn = function(...args) {
|
||||
const lastArg = args.length > 0 ? args[args.length - 1] : null;
|
||||
const secondLastArg = args.length > 1 ? args[args.length - 2] : null;
|
||||
const hasSuccessCallback = typeof lastArg === 'function';
|
||||
const hasErrorCallback = typeof secondLastArg === 'function';
|
||||
hasErrorCallback && invariant(
|
||||
hasSuccessCallback,
|
||||
'Cannot have a non-function arg after a function arg.'
|
||||
);
|
||||
const onSuccess = hasSuccessCallback ? lastArg : null;
|
||||
const onFail = hasErrorCallback ? secondLastArg : null;
|
||||
const callbackCount = hasSuccessCallback + hasErrorCallback;
|
||||
args = args.slice(0, args.length - callbackCount);
|
||||
return self.__nativeCall(module, method, args, onFail, onSuccess);
|
||||
};
|
||||
}
|
||||
fn.type = type;
|
||||
return fn;
|
||||
}
|
||||
|
||||
_createDebugLookup(config, moduleID, moduleTable, methodTable) {
|
||||
if (!config) {
|
||||
return;
|
||||
}
|
||||
|
||||
let moduleName, methods;
|
||||
if (moduleHasConstants(config)) {
|
||||
[moduleName, , methods] = config;
|
||||
} else {
|
||||
[moduleName, methods] = config;
|
||||
}
|
||||
|
||||
moduleTable[moduleID] = moduleName;
|
||||
methodTable[moduleID] = Object.assign({}, methods);
|
||||
}
|
||||
}
|
||||
|
||||
function moduleHasConstants(moduleArray: Array<Object|Array<>>): boolean {
|
||||
return !Array.isArray(moduleArray[1]);
|
||||
}
|
||||
|
||||
function arrayContains<T>(array: Array<T>, value: T): boolean {
|
||||
return array.indexOf(value) !== -1;
|
||||
}
|
||||
|
||||
function createErrorFromErrorData(errorData: {message: string}): Error {
|
||||
const {
|
||||
message,
|
||||
...extraErrorInfo,
|
||||
} = errorData;
|
||||
const error = new Error(message);
|
||||
error.framesToPop = 1;
|
||||
return Object.assign(error, extraErrorInfo);
|
||||
}
|
||||
|
||||
function lazyProperty(target: Object, name: string, f: () => any) {
|
||||
Object.defineProperty(target, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get() {
|
||||
const value = f();
|
||||
Object.defineProperty(target, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writeable: true,
|
||||
value: value,
|
||||
});
|
||||
return value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = MessageQueue;
|
||||
|
||||
@@ -11,13 +11,15 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const Platform = require('Platform');
|
||||
const NativeModules = require('NativeModules');
|
||||
const { UIManager } = NativeModules;
|
||||
const Platform = require('Platform');
|
||||
|
||||
const defineLazyObjectProperty = require('defineLazyObjectProperty');
|
||||
const findNodeHandle = require('react/lib/findNodeHandle');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
|
||||
const { UIManager } = NativeModules;
|
||||
|
||||
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
|
||||
|
||||
const _takeSnapshot = UIManager.takeSnapshot;
|
||||
@@ -64,25 +66,13 @@ UIManager.takeSnapshot = async function(
|
||||
* namespace instead of UIManager, unlike Android.
|
||||
*/
|
||||
if (Platform.OS === 'ios') {
|
||||
// Copied from NativeModules
|
||||
function normalizePrefix(moduleName: string): string {
|
||||
return moduleName.replace(/^(RCT|RK)/, '');
|
||||
}
|
||||
|
||||
Object.keys(UIManager).forEach(viewName => {
|
||||
const viewConfig = UIManager[viewName];
|
||||
if (viewConfig.Manager) {
|
||||
let constants;
|
||||
/* $FlowFixMe - nice try. Flow doesn't like getters */
|
||||
Object.defineProperty(viewConfig, 'Constants', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
defineLazyObjectProperty(viewConfig, 'Constants', {
|
||||
get: () => {
|
||||
if (constants) {
|
||||
return constants;
|
||||
}
|
||||
constants = {};
|
||||
const viewManager = NativeModules[normalizePrefix(viewConfig.Manager)];
|
||||
const viewManager = NativeModules[viewConfig.Manager];
|
||||
const constants = {};
|
||||
viewManager && Object.keys(viewManager).forEach(key => {
|
||||
const value = viewManager[key];
|
||||
if (typeof value !== 'function') {
|
||||
@@ -92,17 +82,10 @@ if (Platform.OS === 'ios') {
|
||||
return constants;
|
||||
},
|
||||
});
|
||||
let commands;
|
||||
/* $FlowFixMe - nice try. Flow doesn't like getters */
|
||||
Object.defineProperty(viewConfig, 'Commands', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
defineLazyObjectProperty(viewConfig, 'Commands', {
|
||||
get: () => {
|
||||
if (commands) {
|
||||
return commands;
|
||||
}
|
||||
commands = {};
|
||||
const viewManager = NativeModules[normalizePrefix(viewConfig.Manager)];
|
||||
const viewManager = NativeModules[viewConfig.Manager];
|
||||
const commands = {};
|
||||
let index = 0;
|
||||
viewManager && Object.keys(viewManager).forEach(key => {
|
||||
const value = viewManager[key];
|
||||
@@ -115,6 +98,8 @@ if (Platform.OS === 'ios') {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (Platform.OS === 'android' && UIManager.AndroidLazyViewManagersEnabled) {
|
||||
// TODO fill this out
|
||||
}
|
||||
|
||||
module.exports = UIManager;
|
||||
|
||||
+3
-4
@@ -6,7 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule MessageQueueTestModule1
|
||||
* @providesModule MessageQueueTestModule
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
* correctly dispatches to commonJS modules. The `testHook` is overriden by test
|
||||
* cases.
|
||||
*/
|
||||
var MessageQueueTestModule1 = {
|
||||
var MessageQueueTestModule = {
|
||||
testHook1: function() {
|
||||
},
|
||||
testHook2: function() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = MessageQueueTestModule1;
|
||||
|
||||
module.exports = MessageQueueTestModule;
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule MessageQueueTestModule2
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var MessageQueueTestModule2 = {
|
||||
runLocalCode: function() {
|
||||
},
|
||||
runLocalCode2: function() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = MessageQueueTestModule2;
|
||||
@@ -9,12 +9,12 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const MessageQueueTestConfig = require('MessageQueueTestConfig');
|
||||
// const MessageQueueTestConfig = require('MessageQueueTestConfig');
|
||||
jest.unmock('MessageQueue');
|
||||
jest.unmock('defineLazyObjectProperty');
|
||||
|
||||
let MessageQueue;
|
||||
let MessageQueueTestModule1;
|
||||
let MessageQueueTestModule2;
|
||||
let MessageQueueTestModule;
|
||||
let queue;
|
||||
|
||||
const MODULE_IDS = 0;
|
||||
@@ -29,169 +29,59 @@ const assertQueue = (flushedQueue, index, moduleID, methodID, params) => {
|
||||
|
||||
// Important things to test:
|
||||
//
|
||||
// [x] Calling remote method on queue actually queues it up.
|
||||
//
|
||||
// [x] Both error and success callbacks are invoked.
|
||||
//
|
||||
// [x] When simulating an error callback from remote method, both error and
|
||||
// success callbacks are cleaned up.
|
||||
//
|
||||
// [x] Local modules can be invoked through the queue.
|
||||
//
|
||||
// [ ] Local modules that throw exceptions are gracefully caught. In that case
|
||||
// local callbacks stored by IDs are cleaned up.
|
||||
//
|
||||
// [ ] Remote invocation throws if not supplying an error callback.
|
||||
describe('MessageQueue', function() {
|
||||
beforeEach(function() {
|
||||
jest.resetModuleRegistry();
|
||||
MessageQueue = require('MessageQueue');
|
||||
MessageQueueTestModule1 = require('MessageQueueTestModule1');
|
||||
MessageQueueTestModule2 = require('MessageQueueTestModule2');
|
||||
queue = new MessageQueue(
|
||||
() => MessageQueueTestConfig
|
||||
);
|
||||
|
||||
MessageQueueTestModule = require('MessageQueueTestModule');
|
||||
queue = new MessageQueue();
|
||||
queue.registerCallableModule(
|
||||
'MessageQueueTestModule1',
|
||||
MessageQueueTestModule1
|
||||
);
|
||||
queue.registerCallableModule(
|
||||
'MessageQueueTestModule2',
|
||||
MessageQueueTestModule2
|
||||
'MessageQueueTestModule',
|
||||
MessageQueueTestModule
|
||||
);
|
||||
queue.createDebugLookup(0, 'MessageQueueTestModule',
|
||||
['testHook1', 'testHook2']);
|
||||
});
|
||||
|
||||
it('should enqueue native calls', () => {
|
||||
queue.__nativeCall(0, 1, [2]);
|
||||
queue.enqueueNativeCall(0, 1, [2]);
|
||||
const flushedQueue = queue.flushedQueue();
|
||||
assertQueue(flushedQueue, 0, 0, 1, [2]);
|
||||
});
|
||||
|
||||
it('should call a local function with the function name', () => {
|
||||
MessageQueueTestModule1.testHook2 = jasmine.createSpy();
|
||||
expect(MessageQueueTestModule1.testHook2.calls.count()).toEqual(0);
|
||||
queue.__callFunction('MessageQueueTestModule1', 'testHook2', [2]);
|
||||
expect(MessageQueueTestModule1.testHook2.calls.count()).toEqual(1);
|
||||
});
|
||||
|
||||
it('should generate native modules', () => {
|
||||
queue.RemoteModules.RemoteModule1.remoteMethod1('foo');
|
||||
const flushedQueue = queue.flushedQueue();
|
||||
assertQueue(flushedQueue, 0, 0, 0, ['foo']);
|
||||
MessageQueueTestModule.testHook2 = jasmine.createSpy();
|
||||
expect(MessageQueueTestModule.testHook2.calls.count()).toEqual(0);
|
||||
queue.__callFunction('MessageQueueTestModule', 'testHook2', [2]);
|
||||
expect(MessageQueueTestModule.testHook2.calls.count()).toEqual(1);
|
||||
});
|
||||
|
||||
it('should store callbacks', () => {
|
||||
queue.RemoteModules.RemoteModule1.remoteMethod2('foo', () => {}, () => {});
|
||||
queue.enqueueNativeCall(0, 1, ['foo'], null, null);
|
||||
const flushedQueue = queue.flushedQueue();
|
||||
assertQueue(flushedQueue, 0, 0, 1, ['foo', 0, 1]);
|
||||
assertQueue(flushedQueue, 0, 0, 1, ['foo']);
|
||||
});
|
||||
|
||||
it('should call the stored callback', () => {
|
||||
var done = false;
|
||||
queue.RemoteModules.RemoteModule1.remoteMethod1(() => { done = true; });
|
||||
let done = false;
|
||||
queue.enqueueNativeCall(0, 1, [], () => {}, () => { done = true; });
|
||||
queue.__invokeCallback(1);
|
||||
expect(done).toEqual(true);
|
||||
});
|
||||
|
||||
it('should throw when calling the same callback twice', () => {
|
||||
queue.RemoteModules.RemoteModule1.remoteMethod1(() => {});
|
||||
queue.enqueueNativeCall(0, 1, [], () => {}, () => {});
|
||||
queue.__invokeCallback(1);
|
||||
expect(() => queue.__invokeCallback(1)).toThrow();
|
||||
});
|
||||
|
||||
it('should throw when calling both success and failure callback', () => {
|
||||
queue.RemoteModules.RemoteModule1.remoteMethod1(() => {}, () => {});
|
||||
queue.enqueueNativeCall(0, 1, [], () => {}, () => {});
|
||||
queue.__invokeCallback(1);
|
||||
expect(() => queue.__invokeCallback(0)).toThrow();
|
||||
});
|
||||
|
||||
it('should make round trip and clear memory', function() {
|
||||
// Perform communication
|
||||
|
||||
// First we're going to call into this (overriden) test hook pretending to
|
||||
// be a remote module making a "local" invocation into JS.
|
||||
const onFail = jasmine.createSpy();
|
||||
const onSucc = jasmine.createSpy();
|
||||
MessageQueueTestModule1.testHook1 = function() {
|
||||
// Then inside of this local module, we're going to fire off a remote
|
||||
// request.
|
||||
queue.__nativeCall(
|
||||
0,
|
||||
0,
|
||||
Array.prototype.slice.apply(arguments),
|
||||
onFail,
|
||||
onSucc,
|
||||
);
|
||||
};
|
||||
|
||||
// The second test hook does the same thing as the first, but fires off a
|
||||
// remote request to a different remote module/method.
|
||||
MessageQueueTestModule1.testHook2 = function() {
|
||||
queue.__nativeCall(
|
||||
1,
|
||||
1,
|
||||
Array.prototype.slice.apply(arguments),
|
||||
onFail,
|
||||
onSucc,
|
||||
);
|
||||
};
|
||||
|
||||
/* MessageQueueTestModule1.testHook1 */
|
||||
queue.__callFunction('MessageQueueTestModule1', 'testHook1', ['paloAlto', 'menloPark']);
|
||||
/* MessageQueueTestModule1.testHook2 */
|
||||
queue.__callFunction('MessageQueueTestModule1', 'testHook2', ['mac', 'windows']);
|
||||
|
||||
// And how do we know that it executed those local modules correctly? Well,
|
||||
// these particular test method echo their arguments back to remote methods!
|
||||
|
||||
var resultingRemoteInvocations = queue.flushedQueue();
|
||||
// As always, the message queue has five fields
|
||||
expect(resultingRemoteInvocations.length).toBe(4);
|
||||
expect(resultingRemoteInvocations[0].length).toBe(2);
|
||||
expect(resultingRemoteInvocations[1].length).toBe(2);
|
||||
expect(resultingRemoteInvocations[2].length).toBe(2);
|
||||
expect(typeof resultingRemoteInvocations[3]).toEqual('number');
|
||||
|
||||
expect(resultingRemoteInvocations[0][0]).toBe(0); // `RemoteModule1`
|
||||
expect(resultingRemoteInvocations[1][0]).toBe(0); // `remoteMethod1`
|
||||
expect([ // the arguments
|
||||
resultingRemoteInvocations[2][0][0],
|
||||
resultingRemoteInvocations[2][0][1]
|
||||
]).toEqual(['paloAlto', 'menloPark']);
|
||||
// Callbacks ids are tacked onto the end of the remote arguments.
|
||||
var firstFailCBID = resultingRemoteInvocations[2][0][2];
|
||||
var firstSuccCBID = resultingRemoteInvocations[2][0][3];
|
||||
|
||||
expect(resultingRemoteInvocations[0][1]).toBe(1); // `RemoteModule2`
|
||||
expect(resultingRemoteInvocations[1][1]).toBe(1); // `remoteMethod2`
|
||||
expect([ // the arguments
|
||||
resultingRemoteInvocations[2][1][0],
|
||||
resultingRemoteInvocations[2][1][1]
|
||||
]).toEqual(['mac', 'windows']);
|
||||
var secondFailCBID = resultingRemoteInvocations[2][1][2];
|
||||
var secondSuccCBID = resultingRemoteInvocations[2][1][3];
|
||||
|
||||
// Trigger init
|
||||
queue.RemoteModules;
|
||||
// Handle the first remote invocation by signaling failure.
|
||||
// -------------------------------------------------------
|
||||
queue.__invokeCallback(firstFailCBID, ['firstFailure']);
|
||||
// The failure callback was already invoked, the success is no longer valid
|
||||
expect(function() {
|
||||
queue.__invokeCallback(firstSuccCBID, ['firstSucc']);
|
||||
}).toThrow();
|
||||
expect(onFail.calls.count()).toBe(1);
|
||||
expect(onSucc.calls.count()).toBe(0);
|
||||
|
||||
// Handle the second remote invocation by signaling success.
|
||||
// -------------------------------------------------------
|
||||
queue.__invokeCallback(secondSuccCBID, ['secondSucc']);
|
||||
// The success callback was already invoked, the fail cb is no longer valid
|
||||
expect(function() {
|
||||
queue.__invokeCallback(secondFailCBID, ['secondFail']);
|
||||
}).toThrow();
|
||||
expect(onFail.calls.count()).toBe(1);
|
||||
expect(onSucc.calls.count()).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,15 +9,32 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
1338BBE01B04ACC80064A9C9 /* RCTSRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */; };
|
||||
1338BBE11B04ACC80064A9C9 /* RCTWebSocketExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDF1B04ACC80064A9C9 /* RCTWebSocketExecutor.m */; };
|
||||
2D3B5F3D1D9B165B00451313 /* RCTSRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */; };
|
||||
2D3B5F3E1D9B165B00451313 /* RCTWebSocketExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDF1B04ACC80064A9C9 /* RCTWebSocketExecutor.m */; };
|
||||
2D3B5F3F1D9B165B00451313 /* RCTWebSocketManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB9106E1C74B1ED00838BBE /* RCTWebSocketManager.m */; };
|
||||
2D3B5F401D9B165B00451313 /* RCTWebSocketModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */; };
|
||||
3C86DF7C1ADF695F0047B81A /* RCTWebSocketModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */; };
|
||||
3DB9106F1C74B1ED00838BBE /* RCTWebSocketManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB9106E1C74B1ED00838BBE /* RCTWebSocketManager.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28861D9B049200D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1338BBDC1B04ACC80064A9C9 /* RCTSRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSRWebSocket.h; sourceTree = "<group>"; };
|
||||
1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSRWebSocket.m; sourceTree = "<group>"; };
|
||||
1338BBDE1B04ACC80064A9C9 /* RCTWebSocketExecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWebSocketExecutor.h; sourceTree = "<group>"; };
|
||||
1338BBDF1B04ACC80064A9C9 /* RCTWebSocketExecutor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWebSocketExecutor.m; sourceTree = "<group>"; };
|
||||
2D2A28881D9B049200D4039D /* libRCTWebSocket-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTWebSocket-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3C86DF461ADF2C930047B81A /* libRCTWebSocket.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTWebSocket.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3C86DF7A1ADF695F0047B81A /* RCTWebSocketModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWebSocketModule.h; sourceTree = "<group>"; };
|
||||
3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = RCTWebSocketModule.m; sourceTree = "<group>"; tabWidth = 2; };
|
||||
@@ -26,6 +43,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28851D9B049200D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3C86DF431ADF2C930047B81A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -57,6 +81,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3C86DF461ADF2C930047B81A /* libRCTWebSocket.a */,
|
||||
2D2A28881D9B049200D4039D /* libRCTWebSocket-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -64,6 +89,23 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28871D9B049200D4039D /* RCTWebSocket-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A28901D9B049200D4039D /* Build configuration list for PBXNativeTarget "RCTWebSocket-tvOS" */;
|
||||
buildPhases = (
|
||||
2D2A28841D9B049200D4039D /* Sources */,
|
||||
2D2A28851D9B049200D4039D /* Frameworks */,
|
||||
2D2A28861D9B049200D4039D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RCTWebSocket-tvOS";
|
||||
productName = "RCTWebSocket-tvOS";
|
||||
productReference = 2D2A28881D9B049200D4039D /* libRCTWebSocket-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
3C86DF451ADF2C930047B81A /* RCTWebSocket */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3C86DF5A1ADF2C930047B81A /* Build configuration list for PBXNativeTarget "RCTWebSocket" */;
|
||||
@@ -89,6 +131,10 @@
|
||||
LastUpgradeCheck = 0630;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28871D9B049200D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
3C86DF451ADF2C930047B81A = {
|
||||
CreatedOnToolsVersion = 6.3;
|
||||
};
|
||||
@@ -107,11 +153,23 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3C86DF451ADF2C930047B81A /* RCTWebSocket */,
|
||||
2D2A28871D9B049200D4039D /* RCTWebSocket-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A28841D9B049200D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5F3E1D9B165B00451313 /* RCTWebSocketExecutor.m in Sources */,
|
||||
2D3B5F401D9B165B00451313 /* RCTWebSocketModule.m in Sources */,
|
||||
2D3B5F3D1D9B165B00451313 /* RCTSRWebSocket.m in Sources */,
|
||||
2D3B5F3F1D9B165B00451313 /* RCTWebSocketManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3C86DF421ADF2C930047B81A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -126,6 +184,50 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A288E1D9B049200D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../SRWebSocket",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A288F1D9B049200D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../React/**",
|
||||
"$(SRCROOT)/../SRWebSocket",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3C86DF581ADF2C930047B81A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -253,6 +355,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A28901D9B049200D4039D /* Build configuration list for PBXNativeTarget "RCTWebSocket-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A288E1D9B049200D4039D /* Debug */,
|
||||
2D2A288F1D9B049200D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3C86DF411ADF2C930047B81A /* Build configuration list for PBXProject "RCTWebSocket" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -70,8 +70,11 @@ RCT_EXPORT_MODULE()
|
||||
[_socket setDelegateDispatchQueue:_jsQueue];
|
||||
|
||||
NSURL *startDevToolsURL = [NSURL URLWithString:@"/launch-js-devtools" relativeToURL:_url];
|
||||
[NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:startDevToolsURL] delegate:nil];
|
||||
|
||||
NSURLSession *session = [NSURLSession sharedSession];
|
||||
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:[NSURLRequest requestWithURL:startDevToolsURL]
|
||||
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){}];
|
||||
[dataTask resume];
|
||||
if (![self connectToProxy]) {
|
||||
RCTLogError(@"Connection to %@ timed out. Are you running node proxy? If "
|
||||
"you are running on the device, check if you have the right IP "
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React"
|
||||
s.version = package['version']
|
||||
s.version = "0.36.1"
|
||||
s.summary = package['description']
|
||||
s.description = <<-DESC
|
||||
React Native apps are built using the React JS
|
||||
|
||||
@@ -80,12 +80,6 @@ typedef NS_ENUM(NSUInteger, RCTBridgeFields) {
|
||||
_displayLink = [RCTDisplayLink new];
|
||||
|
||||
[RCTBridge setCurrentBridge:self];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:RCTJavaScriptWillStartLoadingNotification
|
||||
object:_parentBridge userInfo:@{@"bridge": self}];
|
||||
|
||||
[self start];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -97,6 +91,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
||||
|
||||
- (void)start
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:RCTJavaScriptWillStartLoadingNotification
|
||||
object:_parentBridge userInfo:@{@"bridge": self}];
|
||||
|
||||
RCT_PROFILE_BEGIN_EVENT(0, @"-[RCTBatchedBridge setUp]", nil);
|
||||
|
||||
dispatch_queue_t bridgeQueue = dispatch_queue_create("com.facebook.react.RCTBridgeQueue", DISPATCH_QUEUE_CONCURRENT);
|
||||
@@ -235,9 +233,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
||||
- (NSArray *)configForModuleName:(NSString *)moduleName
|
||||
{
|
||||
RCTModuleData *moduleData = _moduleDataByName[moduleName];
|
||||
if (!moduleData) {
|
||||
moduleData = _moduleDataByName[[@"RCT" stringByAppendingString:moduleName]];
|
||||
}
|
||||
if (moduleData) {
|
||||
#if RCT_DEV
|
||||
if ([self.delegate respondsToSelector:@selector(whitelistedModulesForBridge:)]) {
|
||||
@@ -246,9 +241,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
||||
@"Required config for %@, which was not whitelisted", moduleName);
|
||||
}
|
||||
#endif
|
||||
return moduleData.config;
|
||||
}
|
||||
return (id)kCFNull;
|
||||
return moduleData.config;
|
||||
}
|
||||
|
||||
- (void)initModulesWithDispatchGroup:(dispatch_group_t)dispatchGroup
|
||||
@@ -784,6 +778,48 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
} queue:RCTJSThread];
|
||||
}
|
||||
|
||||
/**
|
||||
* JS thread only
|
||||
*/
|
||||
- (JSValue *)callFunctionOnModule:(NSString *)module
|
||||
method:(NSString *)method
|
||||
arguments:(NSArray *)arguments
|
||||
error:(NSError **)error
|
||||
{
|
||||
RCTJSCExecutor *jsExecutor = (RCTJSCExecutor *)_javaScriptExecutor;
|
||||
if (![jsExecutor isKindOfClass:[RCTJSCExecutor class]]) {
|
||||
RCTLogWarn(@"FBReactBridgeJSExecutor is only supported when running in JSC");
|
||||
return nil;
|
||||
}
|
||||
|
||||
__block JSValue *jsResult = nil;
|
||||
|
||||
RCTAssertJSThread();
|
||||
RCT_PROFILE_BEGIN_EVENT(0, @"callFunctionOnModule", (@{ @"module": module, @"method": method }));
|
||||
[jsExecutor callFunctionOnModule:module
|
||||
method:method
|
||||
arguments:arguments ?: @[]
|
||||
jsValueCallback:^(JSValue *result, NSError *jsError) {
|
||||
if (error) {
|
||||
*error = jsError;
|
||||
}
|
||||
|
||||
JSValue *length = result[@"length"];
|
||||
RCTAssert([length isNumber] && [length toUInt32] == 2,
|
||||
@"Return value of a callFunction must be an array of size 2");
|
||||
|
||||
jsResult = [result valueAtIndex:0];
|
||||
|
||||
NSArray *nativeModuleCalls = [[result valueAtIndex:1] toArray];
|
||||
[self handleBuffer:nativeModuleCalls batchEnded:YES];
|
||||
}];
|
||||
|
||||
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"js_call");
|
||||
|
||||
return jsResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Private hack to support `setTimeout(fn, 0)`
|
||||
*/
|
||||
@@ -947,8 +983,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
#if RCT_PROFILE
|
||||
if (RCT_DEV && callID != -1 && self->_flowIDMap != NULL && RCTProfileIsProfiling()) {
|
||||
[self.flowIDMapLock lock];
|
||||
int64_t newFlowID = (int64_t)CFDictionaryGetValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
_RCTProfileEndFlowEvent(@(newFlowID));
|
||||
NSUInteger newFlowID = (NSUInteger)CFDictionaryGetValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
_RCTProfileEndFlowEvent(newFlowID);
|
||||
CFDictionaryRemoveValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
[self.flowIDMapLock unlock];
|
||||
}
|
||||
@@ -1002,13 +1038,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
RCTModuleData *moduleData = _moduleDataByID[moduleID];
|
||||
if (RCT_DEBUG && !moduleData) {
|
||||
RCTLogError(@"No module found for id '%zd'", moduleID);
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
id<RCTBridgeMethod> method = moduleData.methods[methodID];
|
||||
if (RCT_DEBUG && !method) {
|
||||
RCTLogError(@"Unknown methodID: %zd for module: %zd (%@)", methodID, moduleID, moduleData.name);
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
@try {
|
||||
|
||||
@@ -80,6 +80,11 @@ RCT_EXTERN void RCTVerifyAllModulesExported(NSArray *extraModules);
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL moduleSetupComplete;
|
||||
|
||||
/**
|
||||
* Called on the child bridge to run the executor and start loading.
|
||||
*/
|
||||
- (void)start;
|
||||
|
||||
/**
|
||||
* Used by RCTModuleData to register the module for frame updates after it is
|
||||
* lazily initialized.
|
||||
@@ -142,5 +147,6 @@ RCT_EXTERN void RCTVerifyAllModulesExported(NSArray *extraModules);
|
||||
@property (nonatomic, assign, readonly) BOOL moduleSetupComplete;
|
||||
|
||||
- (instancetype)initWithParentBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
||||
- (void)start;
|
||||
|
||||
@end
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#import "RCTFrameUpdate.h"
|
||||
#import "RCTInvalidating.h"
|
||||
|
||||
@class JSValue;
|
||||
@class RCTBridge;
|
||||
@class RCTEventDispatcher;
|
||||
@class RCTPerformanceLogger;
|
||||
@@ -103,6 +104,21 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
|
||||
- (void)enqueueJSCall:(NSString *)moduleDotMethod args:(NSArray *)args;
|
||||
- (void)enqueueJSCall:(NSString *)module method:(NSString *)method args:(NSArray *)args completion:(dispatch_block_t)completion;
|
||||
|
||||
/**
|
||||
* This method is used to call functions in the JavaScript application context
|
||||
* synchronously. This is intended for use by applications which do their own
|
||||
* thread management and are careful to manage multi-threaded access to the JSVM.
|
||||
* See also -[RCTBridgeDelgate shouldBridgeLoadJavaScriptSynchronously], which
|
||||
* may be needed to ensure that any requires JS code is loaded before this method
|
||||
* is called. If the underlying executor is not JSC, this will return nil. Safe
|
||||
* to call from any thread.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
- (JSValue *)callFunctionOnModule:(NSString *)module
|
||||
method:(NSString *)method
|
||||
arguments:(NSArray *)arguments
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Retrieve a bridge module instance by name or class. Note that modules are
|
||||
|
||||
+15
-1
@@ -67,9 +67,13 @@ NSString *RCTBridgeModuleNameForClass(Class cls)
|
||||
if (name.length == 0) {
|
||||
name = NSStringFromClass(cls);
|
||||
}
|
||||
|
||||
if ([name hasPrefix:@"RK"]) {
|
||||
name = [name stringByReplacingCharactersInRange:(NSRange){0,@"RK".length} withString:@"RCT"];
|
||||
name = [name substringFromIndex:2];
|
||||
} else if ([name hasPrefix:@"RCT"]) {
|
||||
name = [name substringFromIndex:3];
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -292,6 +296,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
|
||||
|
||||
[self createBatchedBridge];
|
||||
[self.batchedBridge start];
|
||||
|
||||
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");
|
||||
}
|
||||
@@ -346,4 +351,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
[self.batchedBridge enqueueCallback:cbID args:args];
|
||||
}
|
||||
|
||||
- (JSValue *)callFunctionOnModule:(NSString *)module
|
||||
method:(NSString *)method
|
||||
arguments:(NSArray *)arguments
|
||||
error:(NSError **)error
|
||||
{
|
||||
return [self.batchedBridge callFunctionOnModule:module method:method arguments:arguments error:error];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -63,6 +63,15 @@
|
||||
*/
|
||||
- (NSArray<Class> *)whitelistedModulesForBridge:(RCTBridge *)bridge;
|
||||
|
||||
/**
|
||||
* When loading initial JavaScript, do so synchronously when the bridge is created iff
|
||||
* this returns true. Otherwise, the JS will be fetched on a network thread, and
|
||||
* executed on the JS thread. Currently used only by C++ bridge.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
- (BOOL)shouldBridgeLoadJavaScriptSynchronously:(RCTBridge *)bridge;
|
||||
|
||||
/**
|
||||
* When initializing native modules that require main thread initialization, the bridge
|
||||
* will default to dispatch module creation blocks asynchrously. If we're blockingly
|
||||
|
||||
@@ -72,10 +72,14 @@ typedef NSURL RCTFileURL;
|
||||
+ (UIKeyboardType)UIKeyboardType:(id)json;
|
||||
+ (UIKeyboardAppearance)UIKeyboardAppearance:(id)json;
|
||||
+ (UIReturnKeyType)UIReturnKeyType:(id)json;
|
||||
#if !TARGET_OS_TV
|
||||
+ (UIDataDetectorTypes)UIDataDetectorTypes:(id)json;
|
||||
#endif
|
||||
|
||||
+ (UIViewContentMode)UIViewContentMode:(id)json;
|
||||
#if !TARGET_OS_TV
|
||||
+ (UIBarStyle)UIBarStyle:(id)json;
|
||||
#endif
|
||||
|
||||
+ (CGFloat)CGFloat:(id)json;
|
||||
+ (CGPoint)CGPoint:(id)json;
|
||||
|
||||
@@ -330,6 +330,7 @@ RCT_ENUM_CONVERTER(UIKeyboardType, (@{
|
||||
@"numeric": @(UIKeyboardTypeDecimalPad),
|
||||
}), UIKeyboardTypeDefault, integerValue)
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
RCT_MULTI_ENUM_CONVERTER(UIDataDetectorTypes, (@{
|
||||
@"phoneNumber": @(UIDataDetectorTypePhoneNumber),
|
||||
@"link": @(UIDataDetectorTypeLink),
|
||||
@@ -338,6 +339,7 @@ RCT_MULTI_ENUM_CONVERTER(UIDataDetectorTypes, (@{
|
||||
@"none": @(UIDataDetectorTypeNone),
|
||||
@"all": @(UIDataDetectorTypeAll),
|
||||
}), UIDataDetectorTypePhoneNumber, unsignedLongLongValue)
|
||||
#endif
|
||||
|
||||
RCT_ENUM_CONVERTER(UIKeyboardAppearance, (@{
|
||||
@"default": @(UIKeyboardAppearanceDefault),
|
||||
@@ -379,10 +381,12 @@ RCT_ENUM_CONVERTER(UIViewContentMode, (@{
|
||||
@"stretch": @(UIViewContentModeScaleToFill),
|
||||
}), UIViewContentModeScaleAspectFill, integerValue)
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
RCT_ENUM_CONVERTER(UIBarStyle, (@{
|
||||
@"default": @(UIBarStyleDefault),
|
||||
@"black": @(UIBarStyleBlack),
|
||||
}), UIBarStyleDefault, integerValue)
|
||||
#endif
|
||||
|
||||
// TODO: normalise the use of w/width so we can do away with the alias values (#6566645)
|
||||
static void RCTConvertCGStructValue(const char *type, NSArray *fields, NSDictionary *aliases, CGFloat *result, id json)
|
||||
@@ -612,7 +616,8 @@ RCT_ENUM_CONVERTER(css_backface_visibility_t, (@{
|
||||
|
||||
RCT_ENUM_CONVERTER(CSSOverflow, (@{
|
||||
@"hidden": @(CSSOverflowHidden),
|
||||
@"visible": @(CSSOverflowVisible)
|
||||
@"visible": @(CSSOverflowVisible),
|
||||
@"scroll": @(CSSOverflowScroll),
|
||||
}), CSSOverflowVisible, intValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(CSSFlexDirection, (@{
|
||||
|
||||
@@ -329,12 +329,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init);
|
||||
}
|
||||
|
||||
NSArray *config = @[
|
||||
self.name,
|
||||
RCTNullIfNil(constants),
|
||||
RCTNullIfNil(methods),
|
||||
RCTNullIfNil(promiseMethods),
|
||||
RCTNullIfNil(syncMethods)
|
||||
];
|
||||
self.name,
|
||||
RCTNullIfNil(constants),
|
||||
RCTNullIfNil(methods),
|
||||
RCTNullIfNil(promiseMethods),
|
||||
RCTNullIfNil(syncMethods)
|
||||
];
|
||||
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, ([NSString stringWithFormat:@"[RCTModuleData config] %@", _moduleClass]));
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef void (^RCTMultipartCallback)(NSDictionary *headers, NSData *content, BOOL done);
|
||||
|
||||
|
||||
// RCTMultipartStreamReader can be used to parse responses with Content-Type: multipart/mixed
|
||||
// See https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
|
||||
@interface RCTMultipartStreamReader : NSObject
|
||||
|
||||
- (instancetype)initWithInputStream:(NSInputStream *)stream boundary:(NSString *)boundary;
|
||||
- (BOOL)readAllParts:(RCTMultipartCallback)callback;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "RCTMultipartStreamReader.h"
|
||||
|
||||
#define CRLF @"\r\n"
|
||||
|
||||
@implementation RCTMultipartStreamReader {
|
||||
__strong NSInputStream *_stream;
|
||||
__strong NSString *_boundary;
|
||||
}
|
||||
|
||||
- (instancetype)initWithInputStream:(NSInputStream *)stream boundary:(NSString *)boundary
|
||||
{
|
||||
if (self = [super init]) {
|
||||
_stream = stream;
|
||||
_boundary = boundary;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSDictionary *)parseHeaders:(NSData *)data
|
||||
{
|
||||
NSMutableDictionary *headers = [NSMutableDictionary new];
|
||||
NSString *text = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
NSArray<NSString *> *lines = [text componentsSeparatedByString:CRLF];
|
||||
for (NSString *line in lines) {
|
||||
NSUInteger location = [line rangeOfString:@":"].location;
|
||||
if (location == NSNotFound) {
|
||||
continue;
|
||||
}
|
||||
NSString *key = [line substringToIndex:location];
|
||||
NSString *value = [[line substringFromIndex:location + 1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
[headers setValue:value forKey:key];
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
- (void)emitChunk:(NSData *)data callback:(RCTMultipartCallback)callback done:(BOOL)done
|
||||
{
|
||||
NSData *marker = [CRLF CRLF dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSRange range = [data rangeOfData:marker options:0 range:NSMakeRange(0, data.length)];
|
||||
if (range.location == NSNotFound) {
|
||||
callback(nil, data, done);
|
||||
} else {
|
||||
NSData *headersData = [data subdataWithRange:NSMakeRange(0, range.location)];
|
||||
NSInteger bodyStart = range.location + marker.length;
|
||||
NSData *bodyData = [data subdataWithRange:NSMakeRange(bodyStart, data.length - bodyStart)];
|
||||
callback([self parseHeaders:headersData], bodyData, done);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)readAllParts:(RCTMultipartCallback)callback
|
||||
{
|
||||
NSInteger start = 0;
|
||||
NSData *delimiter = [[NSString stringWithFormat:@"%@--%@%@", CRLF, _boundary, CRLF] dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSData *closeDelimiter = [[NSString stringWithFormat:@"%@--%@--%@", CRLF, _boundary, CRLF] dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSMutableData *content = [[NSMutableData alloc] initWithCapacity:1];
|
||||
|
||||
const NSUInteger bufferLen = 4 * 1024;
|
||||
uint8_t buffer[bufferLen];
|
||||
|
||||
[_stream open];
|
||||
while (true) {
|
||||
BOOL isCloseDelimiter = NO;
|
||||
NSRange remainingBufferRange = NSMakeRange(start, content.length - start);
|
||||
NSRange range = [content rangeOfData:delimiter options:0 range:remainingBufferRange];
|
||||
if (range.location == NSNotFound) {
|
||||
isCloseDelimiter = YES;
|
||||
range = [content rangeOfData:closeDelimiter options:0 range:remainingBufferRange];
|
||||
}
|
||||
|
||||
if (range.location == NSNotFound) {
|
||||
NSInteger bytesRead = [_stream read:buffer maxLength:bufferLen];
|
||||
if (bytesRead <= 0 || _stream.streamError) {
|
||||
return NO;
|
||||
}
|
||||
[content appendBytes:buffer length:bytesRead];
|
||||
continue;
|
||||
}
|
||||
|
||||
NSInteger end = range.location;
|
||||
NSInteger length = end - start;
|
||||
|
||||
// Ignore preamble
|
||||
if (start > 0) {
|
||||
NSData *chunk = [content subdataWithRange:NSMakeRange(start, length)];
|
||||
[self emitChunk:chunk callback:callback done:isCloseDelimiter];
|
||||
}
|
||||
|
||||
if (isCloseDelimiter) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
start = end + delimiter.length;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -92,14 +92,6 @@ RCT_EXTERN UIViewController *__nullable RCTPresentedViewController(void);
|
||||
// Does this device support force touch (aka 3D Touch)?
|
||||
RCT_EXTERN BOOL RCTForceTouchAvailable(void);
|
||||
|
||||
// Return a UIAlertView initialized with the given values
|
||||
// or nil if running in an app extension
|
||||
RCT_EXTERN UIAlertView *__nullable RCTAlertView(NSString *title,
|
||||
NSString *__nullable message,
|
||||
id __nullable delegate,
|
||||
NSString *__nullable cancelButtonTitle,
|
||||
NSArray<NSString *> *__nullable otherButtonTitles);
|
||||
|
||||
// Create an NSError in the RCTErrorDomain
|
||||
RCT_EXTERN NSError *RCTErrorWithMessage(NSString *message);
|
||||
|
||||
|
||||
@@ -493,31 +493,6 @@ BOOL RCTForceTouchAvailable(void)
|
||||
(RCTKeyWindow() ?: [UIView new]).traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable;
|
||||
}
|
||||
|
||||
UIAlertView *__nullable RCTAlertView(NSString *title,
|
||||
NSString *__nullable message,
|
||||
id __nullable delegate,
|
||||
NSString *__nullable cancelButtonTitle,
|
||||
NSArray<NSString *> *__nullable otherButtonTitles)
|
||||
{
|
||||
if (RCTRunningInAppExtension()) {
|
||||
RCTLogError(@"RCTAlertView is unavailable when running in an app extension");
|
||||
return nil;
|
||||
}
|
||||
|
||||
UIAlertView *alertView = [UIAlertView new];
|
||||
alertView.title = title;
|
||||
alertView.message = message;
|
||||
alertView.delegate = delegate;
|
||||
if (cancelButtonTitle != nil) {
|
||||
[alertView addButtonWithTitle:cancelButtonTitle];
|
||||
alertView.cancelButtonIndex = 0;
|
||||
}
|
||||
for (NSString *buttonTitle in otherButtonTitles) {
|
||||
[alertView addButtonWithTitle:buttonTitle];
|
||||
}
|
||||
return alertView;
|
||||
}
|
||||
|
||||
NSError *RCTErrorWithMessage(NSString *message)
|
||||
{
|
||||
NSDictionary<NSString *, id> *errorInfo = @{NSLocalizedDescriptionKey: message};
|
||||
|
||||
+53
-17
@@ -129,9 +129,12 @@ computedEdgeValue(const float edges[CSSEdgeCount], const CSSEdge edge, const flo
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
static int32_t gNodeInstanceCount = 0;
|
||||
|
||||
CSSNodeRef CSSNodeNew() {
|
||||
const CSSNodeRef node = calloc(1, sizeof(CSSNode));
|
||||
CSS_ASSERT(node, "Could not allocate memory for node");
|
||||
gNodeInstanceCount++;
|
||||
|
||||
CSSNodeInit(node);
|
||||
return node;
|
||||
@@ -140,6 +143,20 @@ CSSNodeRef CSSNodeNew() {
|
||||
void CSSNodeFree(const CSSNodeRef node) {
|
||||
CSSNodeListFree(node->children);
|
||||
free(node);
|
||||
gNodeInstanceCount--;
|
||||
}
|
||||
|
||||
void CSSNodeFreeRecursive(const CSSNodeRef root) {
|
||||
while (CSSNodeChildCount(root) > 0) {
|
||||
const CSSNodeRef child = CSSNodeGetChild(root, 0);
|
||||
CSSNodeRemoveChild(root, child);
|
||||
CSSNodeFreeRecursive(child);
|
||||
}
|
||||
CSSNodeFree(root);
|
||||
}
|
||||
|
||||
int32_t CSSNodeGetInstanceCount() {
|
||||
return gNodeInstanceCount;
|
||||
}
|
||||
|
||||
void CSSNodeInit(const CSSNodeRef node) {
|
||||
@@ -183,6 +200,7 @@ void CSSNodeInit(const CSSNodeRef node) {
|
||||
// Such that the comparison is always going to be false
|
||||
node->layout.lastParentDirection = (CSSDirection) -1;
|
||||
node->layout.nextCachedMeasurementsIndex = 0;
|
||||
node->layout.computedFlexBasis = CSSUndefined;
|
||||
|
||||
node->layout.measuredDimensions[CSSDimensionWidth] = CSSUndefined;
|
||||
node->layout.measuredDimensions[CSSDimensionHeight] = CSSUndefined;
|
||||
@@ -193,6 +211,7 @@ void CSSNodeInit(const CSSNodeRef node) {
|
||||
void _CSSNodeMarkDirty(const CSSNodeRef node) {
|
||||
if (!node->isDirty) {
|
||||
node->isDirty = true;
|
||||
node->layout.computedFlexBasis = CSSUndefined;
|
||||
if (node->parent) {
|
||||
_CSSNodeMarkDirty(node->parent);
|
||||
}
|
||||
@@ -200,6 +219,7 @@ void _CSSNodeMarkDirty(const CSSNodeRef node) {
|
||||
}
|
||||
|
||||
void CSSNodeInsertChild(const CSSNodeRef node, const CSSNodeRef child, const uint32_t index) {
|
||||
CSS_ASSERT(child->parent == NULL, "Child already has a parent, it must be removed first.");
|
||||
CSSNodeListInsert(node->children, child, index);
|
||||
child->parent = node;
|
||||
_CSSNodeMarkDirty(node);
|
||||
@@ -451,6 +471,8 @@ _CSSNodePrint(const CSSNodeRef node, const CSSPrintOptions options, const uint32
|
||||
printf("overflow: 'hidden', ");
|
||||
} else if (node->style.overflow == CSSOverflowVisible) {
|
||||
printf("overflow: 'visible', ");
|
||||
} else if (node->style.overflow == CSSOverflowScroll) {
|
||||
printf("overflow: 'scroll', ");
|
||||
}
|
||||
|
||||
if (eqFour(node->style.margin)) {
|
||||
@@ -1117,8 +1139,10 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
||||
getPaddingAndBorderAxis(child, CSSFlexDirectionColumn));
|
||||
} else if (!CSSValueIsUndefined(child->style.flexBasis) &&
|
||||
!CSSValueIsUndefined(availableInnerMainDim)) {
|
||||
child->layout.computedFlexBasis =
|
||||
fmaxf(child->style.flexBasis, getPaddingAndBorderAxis(child, mainAxis));
|
||||
if (CSSValueIsUndefined(child->layout.computedFlexBasis)) {
|
||||
child->layout.computedFlexBasis =
|
||||
fmaxf(child->style.flexBasis, getPaddingAndBorderAxis(child, mainAxis));
|
||||
}
|
||||
} else {
|
||||
// Compute the flex basis and hypothetical main size (i.e. the clamped
|
||||
// flex basis).
|
||||
@@ -1138,21 +1162,19 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
||||
childHeightMeasureMode = CSSMeasureModeExactly;
|
||||
}
|
||||
|
||||
// According to the spec, if the main size is not definite and the
|
||||
// child's inline axis is parallel to the main axis (i.e. it's
|
||||
// horizontal), the child should be sized using "UNDEFINED" in
|
||||
// the main size. Otherwise use "AT_MOST" in the cross axis.
|
||||
if (!isMainAxisRow && CSSValueIsUndefined(childWidth) &&
|
||||
!CSSValueIsUndefined(availableInnerWidth)) {
|
||||
childWidth = availableInnerWidth;
|
||||
childWidthMeasureMode = CSSMeasureModeAtMost;
|
||||
}
|
||||
|
||||
// The W3C spec doesn't say anything about the 'overflow' property,
|
||||
// but all major browsers appear to implement the following logic.
|
||||
if (node->style.overflow == CSSOverflowHidden) {
|
||||
if (isMainAxisRow && CSSValueIsUndefined(childHeight) &&
|
||||
!CSSValueIsUndefined(availableInnerHeight)) {
|
||||
if ((!isMainAxisRow && node->style.overflow == CSSOverflowScroll) ||
|
||||
node->style.overflow != CSSOverflowScroll) {
|
||||
if (CSSValueIsUndefined(childWidth) && !CSSValueIsUndefined(availableInnerWidth)) {
|
||||
childWidth = availableInnerWidth;
|
||||
childWidthMeasureMode = CSSMeasureModeAtMost;
|
||||
}
|
||||
}
|
||||
|
||||
if ((isMainAxisRow && node->style.overflow == CSSOverflowScroll) ||
|
||||
node->style.overflow != CSSOverflowScroll) {
|
||||
if (CSSValueIsUndefined(childHeight) && !CSSValueIsUndefined(availableInnerHeight)) {
|
||||
childHeight = availableInnerHeight;
|
||||
childHeightMeasureMode = CSSMeasureModeAtMost;
|
||||
}
|
||||
@@ -1701,7 +1723,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
||||
for (ii = startIndex; ii < childCount; ii++) {
|
||||
const CSSNodeRef child = CSSNodeListGet(node->children, ii);
|
||||
|
||||
if (child->style.positionType == CSSPositionTypeAbsolute) {
|
||||
if (child->style.positionType == CSSPositionTypeRelative) {
|
||||
if (child->lineIndex != i) {
|
||||
break;
|
||||
}
|
||||
@@ -1720,7 +1742,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
||||
for (ii = startIndex; ii < endIndex; ii++) {
|
||||
const CSSNodeRef child = CSSNodeListGet(node->children, ii);
|
||||
|
||||
if (child->style.positionType == CSSPositionTypeAbsolute) {
|
||||
if (child->style.positionType == CSSPositionTypeRelative) {
|
||||
switch (getAlignItem(node, child)) {
|
||||
case CSSAlignFlexStart:
|
||||
child->layout.position[pos[crossAxis]] =
|
||||
@@ -2274,3 +2296,17 @@ void CSSNodeCalculateLayout(const CSSNodeRef node,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CSS_ASSERT_FAIL_ENABLED
|
||||
static CSSAssertFailFunc gAssertFailFunc;
|
||||
|
||||
void CSSAssertSetFailFunc(CSSAssertFailFunc func) {
|
||||
gAssertFailFunc = func;
|
||||
}
|
||||
|
||||
void CSSAssertFail(const char *message) {
|
||||
if (gAssertFailFunc) {
|
||||
(*gAssertFailFunc)(message);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,7 @@ typedef enum CSSJustify {
|
||||
typedef enum CSSOverflow {
|
||||
CSSOverflowVisible,
|
||||
CSSOverflowHidden,
|
||||
CSSOverflowScroll,
|
||||
} CSSOverflow;
|
||||
|
||||
// Note: auto is only a valid value for alignSelf. It is NOT a valid value for
|
||||
@@ -121,10 +122,16 @@ typedef CSSSize (*CSSMeasureFunc)(void *context,
|
||||
CSSMeasureMode heightMode);
|
||||
typedef void (*CSSPrintFunc)(void *context);
|
||||
|
||||
#ifdef CSS_ASSERT_FAIL_ENABLED
|
||||
typedef void (*CSSAssertFailFunc)(const char *message);
|
||||
#endif
|
||||
|
||||
// CSSNode
|
||||
WIN_EXPORT CSSNodeRef CSSNodeNew();
|
||||
WIN_EXPORT void CSSNodeInit(const CSSNodeRef node);
|
||||
WIN_EXPORT void CSSNodeFree(const CSSNodeRef node);
|
||||
WIN_EXPORT void CSSNodeFreeRecursive(const CSSNodeRef node);
|
||||
WIN_EXPORT int32_t CSSNodeGetInstanceCount();
|
||||
|
||||
WIN_EXPORT void CSSNodeInsertChild(const CSSNodeRef node, const CSSNodeRef child, const uint32_t index);
|
||||
WIN_EXPORT void CSSNodeRemoveChild(const CSSNodeRef node, const CSSNodeRef child);
|
||||
@@ -203,4 +210,10 @@ CSS_NODE_LAYOUT_PROPERTY(float, Width);
|
||||
CSS_NODE_LAYOUT_PROPERTY(float, Height);
|
||||
CSS_NODE_LAYOUT_PROPERTY(CSSDirection, Direction);
|
||||
|
||||
#ifdef CSS_ASSERT_FAIL_ENABLED
|
||||
// Assert
|
||||
WIN_EXPORT void CSSAssertSetFailFunc(CSSAssertFailFunc func);
|
||||
WIN_EXPORT void CSSAssertFail(const char *message);
|
||||
#endif
|
||||
|
||||
CSS_EXTERN_C_END
|
||||
|
||||
@@ -33,8 +33,16 @@
|
||||
#define CSS_ABORT()
|
||||
#endif
|
||||
|
||||
#define CSS_ASSERT(X, message) \
|
||||
if (!(X)) { \
|
||||
fprintf(stderr, "%s\n", message); \
|
||||
CSS_ABORT(); \
|
||||
#if CSS_ASSERT_FAIL_ENABLED
|
||||
#define CSS_ERROR_FUNC(message) CSSAssertFail(message)
|
||||
#else
|
||||
#define CSS_ERROR_FUNC(message) fprintf(stderr, "%s", message)
|
||||
#endif
|
||||
|
||||
#ifndef CSS_ASSERT
|
||||
#define CSS_ASSERT(X, message) \
|
||||
if (!(X)) { \
|
||||
CSS_ERROR_FUNC(message); \
|
||||
CSS_ABORT(); \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,23 @@ RCT_EXTERN NSString *const RCTJSCThreadName;
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTJavaScriptContextCreatedNotification;
|
||||
|
||||
/**
|
||||
* A key to a reference to a JSContext class, held in the the current thread's
|
||||
* dictionary. The reference would point to the JSContext class in the JS VM
|
||||
* used in React (or ComponenetScript). It is recommended not to access it
|
||||
* through the thread's dictionary, but rather to use the `FBJSCurrentContext()`
|
||||
* accessor, which will return the current JSContext in the currently used VM.
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTFBJSContextClassKey;
|
||||
|
||||
/**
|
||||
* A key to a reference to a JSValue class, held in the the current thread's
|
||||
* dictionary. The reference would point to the JSValue class in the JS VM
|
||||
* used in React (or ComponenetScript). It is recommended not to access it
|
||||
* through the thread's dictionary, but rather to use the `FBJSValue()` accessor.
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTFBJSValueClassKey;
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* May be used to pre-create the JSContext to make RCTJSCExecutor creation less costly.
|
||||
@@ -36,6 +53,11 @@ RCT_EXTERN NSString *const RCTJavaScriptContextCreatedNotification;
|
||||
|
||||
- (instancetype)initWithUseCustomJSCLibrary:(BOOL)useCustomJSCLibrary;
|
||||
|
||||
/**
|
||||
* Marks whether the provider uses the custom implementation of JSC and not the system one.
|
||||
*/
|
||||
@property (nonatomic, readonly, assign) BOOL useCustomJSCLibrary;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
NSString *const RCTJSCThreadName = @"com.facebook.react.JavaScript";
|
||||
NSString *const RCTJavaScriptContextCreatedNotification = @"RCTJavaScriptContextCreatedNotification";
|
||||
RCT_EXTERN NSString *const RCTFBJSContextClassKey = @"_RCTFBJSContextClassKey";
|
||||
RCT_EXTERN NSString *const RCTFBJSValueClassKey = @"_RCTFBJSValueClassKey";
|
||||
|
||||
static NSString *const RCTJSCProfilerEnabledDefaultsKey = @"RCTJSCProfilerEnabled";
|
||||
|
||||
@@ -346,6 +348,12 @@ static NSThread *newJavaScriptThread(void)
|
||||
installBasicSynchronousHooksOnContext(context);
|
||||
}
|
||||
|
||||
NSMutableDictionary *threadDictionary = [[NSThread currentThread] threadDictionary];
|
||||
if (!threadDictionary[RCTFBJSContextClassKey] || !threadDictionary[RCTFBJSValueClassKey]) {
|
||||
threadDictionary[RCTFBJSContextClassKey] = self->_jscWrapper->JSContext;
|
||||
threadDictionary[RCTFBJSValueClassKey] = self->_jscWrapper->JSValue;
|
||||
}
|
||||
|
||||
__weak RCTJSCExecutor *weakSelf = self;
|
||||
|
||||
context[@"nativeRequireModuleConfig"] = ^NSArray *(NSString *moduleName) {
|
||||
@@ -357,7 +365,7 @@ static NSThread *newJavaScriptThread(void)
|
||||
RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"nativeRequireModuleConfig", @{ @"moduleName": moduleName });
|
||||
NSArray *result = [strongSelf->_bridge configForModuleName:moduleName];
|
||||
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"js_call,config");
|
||||
return result;
|
||||
return RCTNullIfNil(result);
|
||||
};
|
||||
|
||||
context[@"nativeFlushQueueImmediate"] = ^(NSArray<NSArray *> *calls){
|
||||
@@ -397,7 +405,7 @@ static NSThread *newJavaScriptThread(void)
|
||||
context[@"nativeTraceEndAsyncFlow"] = ^(__unused uint64_t tag, __unused NSString *name, int64_t cookie) {
|
||||
if (RCTProfileIsProfiling()) {
|
||||
[weakBridge.flowIDMapLock lock];
|
||||
NSUInteger newCookie = (int64_t)CFDictionaryGetValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
NSUInteger newCookie = (NSUInteger)CFDictionaryGetValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
_RCTProfileEndFlowEvent(newCookie);
|
||||
CFDictionaryRemoveValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
[weakBridge.flowIDMapLock unlock];
|
||||
@@ -936,7 +944,6 @@ RCT_EXPORT_METHOD(setContextName:(nonnull NSString *)name)
|
||||
@implementation RCTJSContextProvider
|
||||
{
|
||||
dispatch_semaphore_t _semaphore;
|
||||
BOOL _useCustomJSCLibrary;
|
||||
NSThread *_javaScriptThread;
|
||||
JSContext *_context;
|
||||
RCTJSCWrapper *_jscWrapper;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
|
||||
void __attribute__((visibility("hidden"),weak)) RCTCustomJSCInit(void *handle) {
|
||||
void __attribute__((visibility("hidden"),weak)) RCTCustomJSCInit(__unused void *handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTInvalidating.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCTAlertViewStyle) {
|
||||
RCTAlertViewStyleDefault = 0,
|
||||
RCTAlertViewStyleSecureTextInput,
|
||||
RCTAlertViewStylePlainTextInput,
|
||||
RCTAlertViewStyleLoginAndPasswordInput
|
||||
};
|
||||
|
||||
|
||||
@interface RCTAlertManager : NSObject <RCTBridgeModule, RCTInvalidating>
|
||||
|
||||
@end
|
||||
|
||||
@@ -16,22 +16,21 @@
|
||||
|
||||
@implementation RCTConvert (UIAlertViewStyle)
|
||||
|
||||
RCT_ENUM_CONVERTER(UIAlertViewStyle, (@{
|
||||
@"default": @(UIAlertViewStyleDefault),
|
||||
@"secure-text": @(UIAlertViewStyleSecureTextInput),
|
||||
@"plain-text": @(UIAlertViewStylePlainTextInput),
|
||||
@"login-password": @(UIAlertViewStyleLoginAndPasswordInput),
|
||||
}), UIAlertViewStyleDefault, integerValue)
|
||||
RCT_ENUM_CONVERTER(RCTAlertViewStyle, (@{
|
||||
@"default": @(RCTAlertViewStyleDefault),
|
||||
@"secure-text": @(RCTAlertViewStyleSecureTextInput),
|
||||
@"plain-text": @(RCTAlertViewStylePlainTextInput),
|
||||
@"login-password": @(RCTAlertViewStyleLoginAndPasswordInput),
|
||||
}), RCTAlertViewStyleDefault, integerValue)
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTAlertManager() <UIAlertViewDelegate>
|
||||
@interface RCTAlertManager()
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTAlertManager
|
||||
{
|
||||
NSMutableArray<UIAlertView *> *_alerts;
|
||||
NSMutableArray<UIAlertController *> *_alertControllers;
|
||||
NSMutableArray<RCTResponseSenderBlock> *_alertCallbacks;
|
||||
NSMutableArray<NSArray<NSString *> *> *_alertButtonKeys;
|
||||
@@ -46,9 +45,6 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
for (UIAlertView *alert in _alerts) {
|
||||
[alert dismissWithClickedButtonIndex:0 animated:YES];
|
||||
}
|
||||
for (UIAlertController *alertController in _alertControllers) {
|
||||
[alertController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
@@ -73,7 +69,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
{
|
||||
NSString *title = [RCTConvert NSString:args[@"title"]];
|
||||
NSString *message = [RCTConvert NSString:args[@"message"]];
|
||||
UIAlertViewStyle type = [RCTConvert UIAlertViewStyle:args[@"type"]];
|
||||
RCTAlertViewStyle type = [RCTConvert RCTAlertViewStyle:args[@"type"]];
|
||||
NSArray<NSDictionary *> *buttons = [RCTConvert NSDictionaryArray:args[@"buttons"]];
|
||||
NSString *defaultValue = [RCTConvert NSString:args[@"defaultValue"]];
|
||||
NSString *cancelButtonKey = [RCTConvert NSString:args[@"cancelButtonKey"]];
|
||||
@@ -85,7 +81,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
}
|
||||
|
||||
if (buttons.count == 0) {
|
||||
if (type == UIAlertViewStyleDefault) {
|
||||
if (type == RCTAlertViewStyleDefault) {
|
||||
buttons = @[@{@"0": RCTUIKitLocalizedString(@"OK")}];
|
||||
cancelButtonKey = @"0";
|
||||
} else {
|
||||
@@ -108,14 +104,14 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
switch (type) {
|
||||
case UIAlertViewStylePlainTextInput: {
|
||||
case RCTAlertViewStylePlainTextInput: {
|
||||
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.secureTextEntry = NO;
|
||||
textField.text = defaultValue;
|
||||
}];
|
||||
break;
|
||||
}
|
||||
case UIAlertViewStyleSecureTextInput: {
|
||||
case RCTAlertViewStyleSecureTextInput: {
|
||||
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.placeholder = RCTUIKitLocalizedString(@"Password");
|
||||
textField.secureTextEntry = YES;
|
||||
@@ -123,7 +119,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
}];
|
||||
break;
|
||||
}
|
||||
case UIAlertViewStyleLoginAndPasswordInput: {
|
||||
case RCTAlertViewStyleLoginAndPasswordInput: {
|
||||
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.placeholder = RCTUIKitLocalizedString(@"Login");
|
||||
textField.text = defaultValue;
|
||||
@@ -134,7 +130,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
}];
|
||||
break;
|
||||
}
|
||||
case UIAlertViewStyleDefault:
|
||||
case RCTAlertViewStyleDefault:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -156,11 +152,11 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
style:buttonStyle
|
||||
handler:^(__unused UIAlertAction *action) {
|
||||
switch (type) {
|
||||
case UIAlertViewStylePlainTextInput:
|
||||
case UIAlertViewStyleSecureTextInput:
|
||||
case RCTAlertViewStylePlainTextInput:
|
||||
case RCTAlertViewStyleSecureTextInput:
|
||||
callback(@[buttonKey, [alertController.textFields.firstObject text]]);
|
||||
break;
|
||||
case UIAlertViewStyleLoginAndPasswordInput: {
|
||||
case RCTAlertViewStyleLoginAndPasswordInput: {
|
||||
NSDictionary<NSString *, NSString *> *loginCredentials = @{
|
||||
@"login": [alertController.textFields.firstObject text],
|
||||
@"password": [alertController.textFields.lastObject text]
|
||||
@@ -168,7 +164,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
callback(@[buttonKey, loginCredentials]);
|
||||
break;
|
||||
}
|
||||
case UIAlertViewStyleDefault:
|
||||
case RCTAlertViewStyleDefault:
|
||||
callback(@[buttonKey]);
|
||||
break;
|
||||
}
|
||||
@@ -183,37 +179,4 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
[presentingController presentViewController:alertController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - UIAlertViewDelegate
|
||||
|
||||
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
NSUInteger index = [_alerts indexOfObject:alertView];
|
||||
RCTAssert(index != NSNotFound, @"Dismissed alert was not recognised");
|
||||
|
||||
RCTResponseSenderBlock callback = _alertCallbacks[index];
|
||||
NSArray<NSString *> *buttonKeys = _alertButtonKeys[index];
|
||||
|
||||
switch (alertView.alertViewStyle) {
|
||||
case UIAlertViewStylePlainTextInput:
|
||||
case UIAlertViewStyleSecureTextInput:
|
||||
callback(@[buttonKeys[buttonIndex], [alertView textFieldAtIndex:0].text]);
|
||||
break;
|
||||
case UIAlertViewStyleLoginAndPasswordInput: {
|
||||
NSDictionary<NSString *, NSString *> *loginCredentials = @{
|
||||
@"login": [alertView textFieldAtIndex:0].text,
|
||||
@"password": [alertView textFieldAtIndex:1].text,
|
||||
};
|
||||
callback(@[buttonKeys[buttonIndex], loginCredentials]);
|
||||
break;
|
||||
}
|
||||
case UIAlertViewStyleDefault:
|
||||
callback(@[buttonKeys[buttonIndex]]);
|
||||
break;
|
||||
}
|
||||
|
||||
[_alerts removeObjectAtIndex:index];
|
||||
[_alertCallbacks removeObjectAtIndex:index];
|
||||
[_alertButtonKeys removeObjectAtIndex:index];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -67,7 +67,11 @@ static NSString *RCTGetStorageDirectory()
|
||||
static NSString *storageDirectory = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
#if TARGET_OS_TV
|
||||
storageDirectory = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).firstObject;
|
||||
#else
|
||||
storageDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
|
||||
#endif
|
||||
storageDirectory = [storageDirectory stringByAppendingPathComponent:RCTStorageDirectory];
|
||||
});
|
||||
return storageDirectory;
|
||||
@@ -214,6 +218,10 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
RCTAssertThread(RCTGetMethodQueue(), @"Must be executed on storage thread");
|
||||
|
||||
#if TARGET_OS_TV
|
||||
RCTLogWarn(@"Persistent storage is not supported on tvOS, your data may be removed at any point.")
|
||||
#endif
|
||||
|
||||
NSError *error = nil;
|
||||
if (!RCTHasCreatedStorageDirectory) {
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:RCTGetStorageDirectory()
|
||||
|
||||
@@ -76,8 +76,11 @@ RCT_EXPORT_METHOD(showMessage:(NSString *)message color:(UIColor *)color backgro
|
||||
if (!self->_window && !RCTRunningInTestEnvironment()) {
|
||||
CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
|
||||
self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 22)];
|
||||
#if TARGET_OS_TV
|
||||
self->_window.windowLevel = UIWindowLevelNormal + 1;
|
||||
#else
|
||||
self->_window.windowLevel = UIWindowLevelStatusBar + 1;
|
||||
|
||||
#endif
|
||||
// set a root VC so rotation is supported
|
||||
self->_window.rootViewController = [UIViewController new];
|
||||
|
||||
|
||||
+31
-42
@@ -120,7 +120,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTDevMenu () <RCTBridgeModule, UIActionSheetDelegate, RCTInvalidating, RCTWebSocketProxyDelegate>
|
||||
@interface RCTDevMenu () <RCTBridgeModule, RCTInvalidating, RCTWebSocketProxyDelegate>
|
||||
|
||||
@property (nonatomic, strong) Class executorClass;
|
||||
|
||||
@@ -128,7 +128,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
@implementation RCTDevMenu
|
||||
{
|
||||
UIActionSheet *_actionSheet;
|
||||
UIAlertController *_actionSheet;
|
||||
NSUserDefaults *_defaults;
|
||||
NSMutableDictionary *_settings;
|
||||
NSURLSessionDataTask *_updateTask;
|
||||
@@ -409,7 +409,7 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
_presentedItems = nil;
|
||||
[_updateTask cancel];
|
||||
[_actionSheet dismissWithClickedButtonIndex:_actionSheet.cancelButtonIndex animated:YES];
|
||||
[_actionSheet dismissViewControllerAnimated:YES completion:^(void){}];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ RCT_EXPORT_MODULE()
|
||||
- (void)toggle
|
||||
{
|
||||
if (_actionSheet) {
|
||||
[_actionSheet dismissWithClickedButtonIndex:_actionSheet.cancelButtonIndex animated:YES];
|
||||
[_actionSheet dismissViewControllerAnimated:YES completion:^(void){}];
|
||||
_actionSheet = nil;
|
||||
} else {
|
||||
[self show];
|
||||
@@ -458,13 +458,11 @@ RCT_EXPORT_MODULE()
|
||||
Class jsDebuggingExecutorClass = objc_lookUpClass("RCTWebSocketExecutor");
|
||||
if (!jsDebuggingExecutorClass) {
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:[NSString stringWithFormat:@"%@ Debugger Unavailable", _webSocketExecutorName] handler:^{
|
||||
UIAlertView *alert = RCTAlertView(
|
||||
[NSString stringWithFormat:@"%@ Debugger Unavailable", self->_webSocketExecutorName],
|
||||
[NSString stringWithFormat:@"You need to include the RCTWebSocket library to enable %@ debugging", self->_webSocketExecutorName],
|
||||
nil,
|
||||
@"OK",
|
||||
nil);
|
||||
[alert show];
|
||||
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"%@ Debugger Unavailable", self->_webSocketExecutorName]
|
||||
message:[NSString stringWithFormat:@"You need to include the RCTWebSocket library to enable %@ debugging", self->_webSocketExecutorName]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[RCTPresentedViewController() presentViewController:alertController animated:YES completion:NULL];
|
||||
}]];
|
||||
} else {
|
||||
BOOL isDebuggingJS = _executorClass && _executorClass == jsDebuggingExecutorClass;
|
||||
@@ -514,55 +512,46 @@ RCT_EXPORT_METHOD(show)
|
||||
return;
|
||||
}
|
||||
|
||||
UIActionSheet *actionSheet = [UIActionSheet new];
|
||||
actionSheet.title = @"React Native: Development";
|
||||
actionSheet.delegate = self;
|
||||
|
||||
NSString *title = [NSString stringWithFormat:@"React Native: Development (%@)", [_bridge class]];
|
||||
_actionSheet = [UIAlertController alertControllerWithTitle:title
|
||||
message:@""
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
NSArray<RCTDevMenuItem *> *items = [self menuItems];
|
||||
for (RCTDevMenuItem *item in items) {
|
||||
switch (item.type) {
|
||||
case RCTDevMenuTypeButton: {
|
||||
[actionSheet addButtonWithTitle:item.title];
|
||||
[_actionSheet addAction:[UIAlertAction actionWithTitle:item.title
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
// Cancel button tappped.
|
||||
[item callHandler];
|
||||
}]];
|
||||
break;
|
||||
}
|
||||
case RCTDevMenuTypeToggle: {
|
||||
BOOL selected = [item.value boolValue];
|
||||
[actionSheet addButtonWithTitle:selected? item.selectedTitle : item.title];
|
||||
[_actionSheet addAction:[UIAlertAction actionWithTitle:(selected? item.selectedTitle : item.title)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
BOOL value = [self->_settings[item.key] boolValue];
|
||||
[self updateSetting:item.key value:@(!value)]; // will call handler
|
||||
}]];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[actionSheet addButtonWithTitle:@"Cancel"];
|
||||
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons - 1;
|
||||
[_actionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction *action) {
|
||||
}]];
|
||||
|
||||
actionSheet.actionSheetStyle = UIBarStyleBlack;
|
||||
[actionSheet showInView:RCTKeyWindow().rootViewController.view];
|
||||
_actionSheet = actionSheet;
|
||||
_presentedItems = items;
|
||||
[RCTPresentedViewController() presentViewController:_actionSheet animated:YES completion:^(void){}];
|
||||
}
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
_actionSheet = nil;
|
||||
if (buttonIndex == actionSheet.cancelButtonIndex) {
|
||||
return;
|
||||
}
|
||||
|
||||
RCTDevMenuItem *item = _presentedItems[buttonIndex];
|
||||
switch (item.type) {
|
||||
case RCTDevMenuTypeButton: {
|
||||
[item callHandler];
|
||||
break;
|
||||
}
|
||||
case RCTDevMenuTypeToggle: {
|
||||
BOOL value = [_settings[item.key] boolValue];
|
||||
[self updateSetting:item.key value:@(!value)]; // will call handler
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(reload)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)startObserving
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
#define ADD_KEYBOARD_HANDLER(NAME, SELECTOR) \
|
||||
@@ -33,6 +35,8 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
#undef ADD_KEYBOARD_HANDLER
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)supportedEvents
|
||||
@@ -94,6 +98,9 @@ static NSString *RCTAnimationNameForCurve(UIViewAnimationCurve curve)
|
||||
|
||||
static NSDictionary *RCTParseKeyboardNotification(NSNotification *notification)
|
||||
{
|
||||
#if TARGET_OS_TV
|
||||
return @{};
|
||||
#else
|
||||
NSDictionary *userInfo = notification.userInfo;
|
||||
CGRect beginFrame = [userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
|
||||
CGRect endFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
@@ -106,4 +113,5 @@ static NSDictionary *RCTParseKeyboardNotification(NSNotification *notification)
|
||||
@"duration": @(duration * 1000.0), // ms
|
||||
@"easing": RCTAnimationNameForCurve(curve),
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -60,8 +60,10 @@
|
||||
_stackTraceTableView.delegate = self;
|
||||
_stackTraceTableView.dataSource = self;
|
||||
_stackTraceTableView.backgroundColor = [UIColor clearColor];
|
||||
#if !TARGET_OS_TV
|
||||
_stackTraceTableView.separatorColor = [UIColor colorWithWhite:1 alpha:0.3];
|
||||
_stackTraceTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
#endif
|
||||
_stackTraceTableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
|
||||
[rootView addSubview:_stackTraceTableView];
|
||||
|
||||
@@ -175,9 +177,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||
[fullStackTrace appendFormat:@" %@\n", [self formatFrameSource:stackFrame]];
|
||||
}
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
UIPasteboard *pb = [UIPasteboard generalPasteboard];
|
||||
[pb setString:fullStackTrace];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString *)formatFrameSource:(RCTJSStackFrame *)stackFrame
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
|
||||
@"default": @(UIStatusBarStyleDefault),
|
||||
@"light-content": @(UIStatusBarStyleLightContent),
|
||||
@"dark-content": @(UIStatusBarStyleDefault),
|
||||
}), UIStatusBarStyleDefault, integerValue);
|
||||
|
||||
RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{
|
||||
|
||||
@@ -97,7 +97,6 @@ RCT_EXTERN NSString *const RCTUIManagerRootViewKey;
|
||||
* @param reactTag the component tag
|
||||
* @param completion the completion block that will hand over the rootView, if any.
|
||||
*
|
||||
* @return the rootView
|
||||
*/
|
||||
- (void)rootViewForReactTag:(NSNumber *)reactTag withCompletion:(void (^)(UIView *view))completion;
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ static UIViewAnimationOptions UIViewAnimationOptionsFromRCTAnimationType(RCTAnim
|
||||
// `UIKeyboardWillChangeFrameNotification`s.
|
||||
+ (void)initializeStatics
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
@@ -106,12 +107,15 @@ static UIViewAnimationOptions UIViewAnimationOptionsFromRCTAnimationType(RCTAnim
|
||||
name:UIKeyboardWillChangeFrameNotification
|
||||
object:nil];
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (void)keyboardWillChangeFrame:(NSNotification *)notification
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
NSDictionary *userInfo = notification.userInfo;
|
||||
_currentKeyboardAnimationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (instancetype)initWithDuration:(NSTimeInterval)duration dictionary:(NSDictionary *)config
|
||||
@@ -225,8 +229,9 @@ static UIViewAnimationOptions UIViewAnimationOptionsFromRCTAnimationType(RCTAnim
|
||||
NSDictionary *_componentDataByName;
|
||||
|
||||
NSMutableSet<id<RCTComponent>> *_bridgeTransactionListeners;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
UIInterfaceOrientation _currentInterfaceOrientation;
|
||||
#endif
|
||||
}
|
||||
|
||||
@synthesize bridge = _bridge;
|
||||
@@ -244,6 +249,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)interfaceOrientationWillChange:(NSNotification *)notification
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
UIInterfaceOrientation nextOrientation =
|
||||
[notification.userInfo[UIApplicationStatusBarOrientationUserInfoKey] integerValue];
|
||||
|
||||
@@ -260,6 +266,7 @@ RCT_EXPORT_MODULE()
|
||||
}
|
||||
|
||||
_currentInterfaceOrientation = nextOrientation;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
@@ -339,11 +346,13 @@ RCT_EXPORT_MODULE()
|
||||
selector:@selector(didReceiveNewContentSizeMultiplier)
|
||||
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
|
||||
object:_bridge.accessibilityManager];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(interfaceOrientationWillChange:)
|
||||
name:UIApplicationWillChangeStatusBarOrientationNotification
|
||||
object:nil];
|
||||
#endif
|
||||
|
||||
[RCTAnimation initializeStatics];
|
||||
}
|
||||
|
||||
@@ -1510,7 +1519,9 @@ RCT_EXPORT_METHOD(clearJSResponder)
|
||||
allJSConstants[name] = constantsNamespace;
|
||||
}];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
_currentInterfaceOrientation = [RCTSharedApplication() statusBarOrientation];
|
||||
#endif
|
||||
[allJSConstants addEntriesFromDictionary:@{
|
||||
@"customBubblingEventTypes": bubblingEvents,
|
||||
@"customDirectEventTypes": directEvents,
|
||||
|
||||
@@ -381,6 +381,7 @@ void RCTProfileUnhookModules(RCTBridge *bridge)
|
||||
atomically:YES
|
||||
encoding:NSUTF8StringEncoding
|
||||
error:nil];
|
||||
#if !TARGET_OS_TV
|
||||
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[[NSURL fileURLWithPath:outFile]]
|
||||
applicationActivities:nil];
|
||||
activityViewController.completionHandler = ^(__unused NSString *activityType, __unused BOOL completed) {
|
||||
@@ -392,6 +393,7 @@ void RCTProfileUnhookModules(RCTBridge *bridge)
|
||||
animated:YES
|
||||
completion:nil];
|
||||
});
|
||||
#endif
|
||||
});
|
||||
} else {
|
||||
RCTProfileInit(RCTProfilingBridge());
|
||||
@@ -677,12 +679,12 @@ NSUInteger _RCTProfileBeginFlowEvent(void)
|
||||
{
|
||||
static NSUInteger flowID = 0;
|
||||
|
||||
CHECK(@0);
|
||||
CHECK(0);
|
||||
|
||||
NSUInteger cookie = ++flowID;
|
||||
if (callbacks != NULL) {
|
||||
callbacks->begin_async_flow(1, "flow", cookie);
|
||||
return @(cookie);
|
||||
callbacks->begin_async_flow(1, "flow", (int)cookie);
|
||||
return cookie;
|
||||
}
|
||||
|
||||
NSTimeInterval time = CACurrentMediaTime();
|
||||
@@ -708,7 +710,7 @@ void _RCTProfileEndFlowEvent(NSUInteger cookie)
|
||||
CHECK();
|
||||
|
||||
if (callbacks != NULL) {
|
||||
callbacks->end_async_flow(1, "flow", cookie);
|
||||
callbacks->end_async_flow(1, "flow", (int)cookie);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -753,6 +755,7 @@ void RCTProfileSendResult(RCTBridge *bridge, NSString *route, NSData *data)
|
||||
encoding:NSUTF8StringEncoding];
|
||||
|
||||
if (message.length) {
|
||||
#if !TARGET_OS_TV
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[[UIAlertView alloc] initWithTitle:@"Profile"
|
||||
message:message
|
||||
@@ -760,6 +763,7 @@ void RCTProfileSendResult(RCTBridge *bridge, NSString *route, NSData *data)
|
||||
cancelButtonTitle:@"OK"
|
||||
otherButtonTitles:nil] show];
|
||||
});
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
000E6CEB1AB0E980000CDF4D /* RCTSourceCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 000E6CEA1AB0E980000CDF4D /* RCTSourceCode.m */; };
|
||||
001BFCD01D8381DE008E587E /* RCTMultipartStreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */; };
|
||||
008341F61D1DB34400876D9A /* RCTJSStackFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 008341F41D1DB34400876D9A /* RCTJSStackFrame.m */; };
|
||||
131B6AF41AF1093D00FFC3E0 /* RCTSegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF11AF1093D00FFC3E0 /* RCTSegmentedControl.m */; };
|
||||
131B6AF51AF1093D00FFC3E0 /* RCTSegmentedControlManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF31AF1093D00FFC3E0 /* RCTSegmentedControlManager.m */; };
|
||||
@@ -78,6 +79,91 @@
|
||||
14F7A0F01BDA714B003C6C10 /* RCTFPSGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = 14F7A0EF1BDA714B003C6C10 /* RCTFPSGraph.m */; };
|
||||
191E3EBE1C29D9AF00C180A6 /* RCTRefreshControlManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 191E3EBD1C29D9AF00C180A6 /* RCTRefreshControlManager.m */; };
|
||||
191E3EC11C29DC3800C180A6 /* RCTRefreshControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 191E3EC01C29DC3800C180A6 /* RCTRefreshControl.m */; };
|
||||
2D3B5E931D9B087300451313 /* RCTErrorInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EDCA8A41D3591E700450C31 /* RCTErrorInfo.m */; };
|
||||
2D3B5E941D9B087900451313 /* RCTBundleURLProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 68EFE4ED1CF6EB3900A1DE13 /* RCTBundleURLProvider.m */; };
|
||||
2D3B5E951D9B087C00451313 /* RCTAssert.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA4B1A601E3B00E9B192 /* RCTAssert.m */; };
|
||||
2D3B5E961D9B088500451313 /* RCTBatchedBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C2CA771B3ACB0400E6CBB2 /* RCTBatchedBridge.m */; };
|
||||
2D3B5E971D9B089000451313 /* RCTBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA5F1A601EAA00E9B192 /* RCTBridge.m */; };
|
||||
2D3B5E981D9B089500451313 /* RCTConvert.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBACB1A6023D300E9B192 /* RCTConvert.m */; };
|
||||
2D3B5E991D9B089A00451313 /* RCTDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D1E68D91CABD13900DD7465 /* RCTDisplayLink.m */; };
|
||||
2D3B5E9A1D9B089D00451313 /* RCTEventDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA661A601EF300E9B192 /* RCTEventDispatcher.m */; };
|
||||
2D3B5E9B1D9B08A000451313 /* RCTFrameUpdate.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C2CA751B3AC64F00E6CBB2 /* RCTFrameUpdate.m */; };
|
||||
2D3B5E9C1D9B08A300451313 /* RCTImageSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BB3D011BECD54500932C10 /* RCTImageSource.m */; };
|
||||
2D3B5E9D1D9B08A800451313 /* RCTJavaScriptLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 14200DA91AC179B3008EE6BA /* RCTJavaScriptLoader.m */; };
|
||||
2D3B5E9E1D9B08AD00451313 /* RCTJSStackFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 008341F41D1DB34400876D9A /* RCTJSStackFrame.m */; };
|
||||
2D3B5E9F1D9B08AF00451313 /* RCTKeyCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A1F71D1A75392D00D3D453 /* RCTKeyCommands.m */; };
|
||||
2D3B5EA01D9B08B200451313 /* RCTLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA4E1A601E3B00E9B192 /* RCTLog.m */; };
|
||||
2D3B5EA11D9B08B600451313 /* RCTModuleData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 14C2CA731B3AC64300E6CBB2 /* RCTModuleData.mm */; };
|
||||
2D3B5EA21D9B08BA00451313 /* RCTModuleMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C2CA701B3AC63800E6CBB2 /* RCTModuleMethod.m */; };
|
||||
2D3B5EA31D9B08BE00451313 /* RCTParserUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A6E20D1C19AA0C00845B82 /* RCTParserUtils.m */; };
|
||||
2D3B5EA41D9B08C200451313 /* RCTPerformanceLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 142014171B32094000CC17BA /* RCTPerformanceLogger.m */; };
|
||||
2D3B5EA51D9B08C700451313 /* RCTRootView.m in Sources */ = {isa = PBXBuildFile; fileRef = 830A229D1A66C68A008503DA /* RCTRootView.m */; };
|
||||
2D3B5EA61D9B08CA00451313 /* RCTTouchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 391E86A21C623EC800009732 /* RCTTouchEvent.m */; };
|
||||
2D3B5EA71D9B08CE00451313 /* RCTTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA971A6020BB00E9B192 /* RCTTouchHandler.m */; };
|
||||
2D3B5EA81D9B08D300451313 /* RCTUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBA501A601E3B00E9B192 /* RCTUtils.m */; };
|
||||
2D3B5EA91D9B08E300451313 /* CSSNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = 1321C8CE1D3EB50800D58318 /* CSSNodeList.c */; };
|
||||
2D3B5EAA1D9B08E600451313 /* CSSLayout.c in Sources */ = {isa = PBXBuildFile; fileRef = 133683441D37ACA10077D0C3 /* CSSLayout.c */; };
|
||||
2D3B5EAB1D9B08EC00451313 /* RCTJSCErrorHandling.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DC724311D8BF99A00808C32 /* RCTJSCErrorHandling.m */; };
|
||||
2D3B5EAC1D9B08EF00451313 /* RCTJSCExecutor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 134FCB3A1A6E7F0800051CC8 /* RCTJSCExecutor.mm */; };
|
||||
2D3B5EAD1D9B08F200451313 /* RCTJSCWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C199ED1CD2407900DAD810 /* RCTJSCWrapper.mm */; };
|
||||
2D3B5EAE1D9B08F800451313 /* RCTEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 13D9FEEA1CDCCECF00158BD7 /* RCTEventEmitter.m */; };
|
||||
2D3B5EAF1D9B08FB00451313 /* RCTAccessibilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9B20B7A1B500126007A2DA7 /* RCTAccessibilityManager.m */; };
|
||||
2D3B5EB01D9B08FE00451313 /* RCTAlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FE81A69327A00A75B9A /* RCTAlertManager.m */; };
|
||||
2D3B5EB11D9B090100451313 /* RCTAppState.m in Sources */ = {isa = PBXBuildFile; fileRef = 1372B7091AB030C200659ED6 /* RCTAppState.m */; };
|
||||
2D3B5EB21D9B090300451313 /* RCTAsyncLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 58114A4E1AAE93D500E7D092 /* RCTAsyncLocalStorage.m */; };
|
||||
2D3B5EB41D9B090A00451313 /* RCTDevLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A0C2861B74F71200B29F6F /* RCTDevLoadingView.m */; };
|
||||
2D3B5EB51D9B091100451313 /* RCTDevMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A0C2881B74F71200B29F6F /* RCTDevMenu.m */; };
|
||||
2D3B5EB61D9B091400451313 /* RCTExceptionsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FEA1A69327A00A75B9A /* RCTExceptionsManager.m */; };
|
||||
2D3B5EB71D9B091800451313 /* RCTRedBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 13F17A841B8493E5007D4C75 /* RCTRedBox.m */; };
|
||||
2D3B5EB81D9B091B00451313 /* RCTSourceCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 000E6CEA1AB0E980000CDF4D /* RCTSourceCode.m */; };
|
||||
2D3B5EBA1D9B092100451313 /* RCTI18nUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 352DCFEF1D19F4C20056D623 /* RCTI18nUtil.m */; };
|
||||
2D3B5EBB1D9B092300451313 /* RCTI18nManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B233E6E91D2D845D00BC68BA /* RCTI18nManager.m */; };
|
||||
2D3B5EBC1D9B092600451313 /* RCTKeyboardObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 13D9FEED1CDCD93000158BD7 /* RCTKeyboardObserver.m */; };
|
||||
2D3B5EBD1D9B092A00451313 /* RCTTiming.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FEE1A69327A00A75B9A /* RCTTiming.m */; };
|
||||
2D3B5EBE1D9B092D00451313 /* RCTUIManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E067491A70F434002CDEE1 /* RCTUIManager.m */; };
|
||||
2D3B5EBF1D9B093300451313 /* RCTJSCProfiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A43DF21C20B1C900794BC8 /* RCTJSCProfiler.m */; };
|
||||
2D3B5EC01D9B093600451313 /* RCTPerfMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 14F7A0EB1BDA3B3C003C6C10 /* RCTPerfMonitor.m */; };
|
||||
2D3B5EC11D9B093900451313 /* RCTFPSGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = 14F7A0EF1BDA714B003C6C10 /* RCTFPSGraph.m */; };
|
||||
2D3B5EC21D9B093B00451313 /* RCTProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 1450FF811BCFF28A00208362 /* RCTProfile.m */; };
|
||||
2D3B5EC31D9B094800451313 /* RCTProfileTrampoline-arm.S in Sources */ = {isa = PBXBuildFile; fileRef = 1450FF821BCFF28A00208362 /* RCTProfileTrampoline-arm.S */; };
|
||||
2D3B5EC41D9B094B00451313 /* RCTProfileTrampoline-arm64.S in Sources */ = {isa = PBXBuildFile; fileRef = 1450FF831BCFF28A00208362 /* RCTProfileTrampoline-arm64.S */; };
|
||||
2D3B5EC51D9B094D00451313 /* RCTProfileTrampoline-i386.S in Sources */ = {isa = PBXBuildFile; fileRef = 14BF717F1C04793D00C97D0C /* RCTProfileTrampoline-i386.S */; };
|
||||
2D3B5EC61D9B095000451313 /* RCTProfileTrampoline-x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = 1450FF851BCFF28A00208362 /* RCTProfileTrampoline-x86_64.S */; };
|
||||
2D3B5EC71D9B095600451313 /* RCTActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = B95154311D1B34B200FE7B80 /* RCTActivityIndicatorView.m */; };
|
||||
2D3B5EC81D9B095800451313 /* RCTActivityIndicatorViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B080191A69489C00A75B9A /* RCTActivityIndicatorViewManager.m */; };
|
||||
2D3B5EC91D9B095C00451313 /* RCTBorderDrawing.m in Sources */ = {isa = PBXBuildFile; fileRef = 13CC8A811B17642100940AE7 /* RCTBorderDrawing.m */; };
|
||||
2D3B5ECA1D9B095F00451313 /* RCTComponentData.m in Sources */ = {isa = PBXBuildFile; fileRef = 13AB90C01B6FA36700713B4F /* RCTComponentData.m */; };
|
||||
2D3B5ECB1D9B096200451313 /* RCTConvert+CoreLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 13456E921ADAD2DE009F94A7 /* RCTConvert+CoreLocation.m */; };
|
||||
2D3B5ECC1D9B096500451313 /* RCTConvert+MapKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 13456E951ADAD482009F94A7 /* RCTConvert+MapKit.m */; };
|
||||
2D3B5ECF1D9B096F00451313 /* RCTFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D37B5811D522B190042D5B5 /* RCTFont.mm */; };
|
||||
2D3B5ED01D9B097200451313 /* RCTMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 14435CE21AAC4AE100FC20F4 /* RCTMap.m */; };
|
||||
2D3B5ED11D9B097500451313 /* RCTMapAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B202031BFB948C00C07393 /* RCTMapAnnotation.m */; };
|
||||
2D3B5ED21D9B097800451313 /* RCTMapManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14435CE41AAC4AE100FC20F4 /* RCTMapManager.m */; };
|
||||
2D3B5ED31D9B097B00451313 /* RCTMapOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 13AFBC9F1C07247D00BBAEAA /* RCTMapOverlay.m */; };
|
||||
2D3B5ED41D9B097D00451313 /* RCTModalHostView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A1FE8B1B62640A00BE0E65 /* RCTModalHostView.m */; };
|
||||
2D3B5ED51D9B098000451313 /* RCTModalHostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83392EB21B6634E10013B15F /* RCTModalHostViewController.m */; };
|
||||
2D3B5ED61D9B098400451313 /* RCTModalHostViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A1FE8E1B62643A00BE0E65 /* RCTModalHostViewManager.m */; };
|
||||
2D3B5ED71D9B098700451313 /* RCTNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B0800D1A69489C00A75B9A /* RCTNavigator.m */; };
|
||||
2D3B5ED81D9B098A00451313 /* RCTNavigatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B0800F1A69489C00A75B9A /* RCTNavigatorManager.m */; };
|
||||
2D3B5ED91D9B098E00451313 /* RCTNavItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B080111A69489C00A75B9A /* RCTNavItem.m */; };
|
||||
2D3B5EDA1D9B099100451313 /* RCTNavItemManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B080131A69489C00A75B9A /* RCTNavItemManager.m */; };
|
||||
2D3B5EDD1D9B09A300451313 /* RCTProgressViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13513F3B1B1F43F400FCE529 /* RCTProgressViewManager.m */; };
|
||||
2D3B5EE01D9B09AD00451313 /* RCTRootShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BCE8081C99CB9D00DD7AAD /* RCTRootShadowView.m */; };
|
||||
2D3B5EE11D9B09B000451313 /* RCTScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FF71A6947C200A75B9A /* RCTScrollView.m */; };
|
||||
2D3B5EE21D9B09B400451313 /* RCTScrollViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FF91A6947C200A75B9A /* RCTScrollViewManager.m */; };
|
||||
2D3B5EE31D9B09B700451313 /* RCTSegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF11AF1093D00FFC3E0 /* RCTSegmentedControl.m */; };
|
||||
2D3B5EE41D9B09BB00451313 /* RCTSegmentedControlManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF31AF1093D00FFC3E0 /* RCTSegmentedControlManager.m */; };
|
||||
2D3B5EE51D9B09BE00451313 /* RCTShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E0674C1A70F44B002CDEE1 /* RCTShadowView.m */; };
|
||||
2D3B5EEA1D9B09CD00451313 /* RCTTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 137327E01AA5CF210034F82E /* RCTTabBar.m */; };
|
||||
2D3B5EEB1D9B09D000451313 /* RCTTabBarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 137327E21AA5CF210034F82E /* RCTTabBarItem.m */; };
|
||||
2D3B5EEC1D9B09D400451313 /* RCTTabBarItemManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 137327E41AA5CF210034F82E /* RCTTabBarItemManager.m */; };
|
||||
2D3B5EED1D9B09D700451313 /* RCTTabBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 137327E61AA5CF210034F82E /* RCTTabBarManager.m */; };
|
||||
2D3B5EEE1D9B09DA00451313 /* RCTView.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E067501A70F44B002CDEE1 /* RCTView.m */; };
|
||||
2D3B5EEF1D9B09DC00451313 /* RCTViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E0674E1A70F44B002CDEE1 /* RCTViewManager.m */; };
|
||||
2D3B5EF01D9B09E300451313 /* RCTWrapperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B080241A694A8400A75B9A /* RCTWrapperViewController.m */; };
|
||||
2D3B5EF11D9B09E700451313 /* UIView+React.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E067541A70F44B002CDEE1 /* UIView+React.m */; };
|
||||
2D537FD21DA4809D000F876C /* RCTMultipartDataTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 006FC4131D9B20820057AAAD /* RCTMultipartDataTask.m */; };
|
||||
2D8C2E331DA40441000EE098 /* RCTMultipartStreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */; };
|
||||
352DCFF01D19F4C20056D623 /* RCTI18nUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 352DCFEF1D19F4C20056D623 /* RCTI18nUtil.m */; };
|
||||
391E86A41C623EC800009732 /* RCTTouchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 391E86A21C623EC800009732 /* RCTTouchEvent.m */; };
|
||||
3D1E68DB1CABD13900DD7465 /* RCTDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D1E68D91CABD13900DD7465 /* RCTDisplayLink.m */; };
|
||||
@@ -107,6 +193,15 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2D2A28111D9B038B00D4039D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
83CBBA2C1A601D0E00E9B192 /* Copy Files */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -122,6 +217,8 @@
|
||||
/* Begin PBXFileReference section */
|
||||
000E6CE91AB0E97F000CDF4D /* RCTSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSourceCode.h; sourceTree = "<group>"; };
|
||||
000E6CEA1AB0E980000CDF4D /* RCTSourceCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSourceCode.m; sourceTree = "<group>"; };
|
||||
001BFCCE1D8381DE008E587E /* RCTMultipartStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMultipartStreamReader.h; sourceTree = "<group>"; };
|
||||
001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultipartStreamReader.m; sourceTree = "<group>"; };
|
||||
008341F41D1DB34400876D9A /* RCTJSStackFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJSStackFrame.m; sourceTree = "<group>"; };
|
||||
008341F51D1DB34400876D9A /* RCTJSStackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJSStackFrame.h; sourceTree = "<group>"; };
|
||||
131541CF1D3E4893006A0E08 /* CSSLayout-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CSSLayout-internal.h"; sourceTree = "<group>"; };
|
||||
@@ -273,6 +370,7 @@
|
||||
191E3EBD1C29D9AF00C180A6 /* RCTRefreshControlManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRefreshControlManager.m; sourceTree = "<group>"; };
|
||||
191E3EBF1C29DC3800C180A6 /* RCTRefreshControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTRefreshControl.h; sourceTree = "<group>"; };
|
||||
191E3EC01C29DC3800C180A6 /* RCTRefreshControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRefreshControl.m; sourceTree = "<group>"; };
|
||||
2D2A28131D9B038B00D4039D /* libReact-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libReact-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
352DCFEE1D19F4C20056D623 /* RCTI18nUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTI18nUtil.h; sourceTree = "<group>"; };
|
||||
352DCFEF1D19F4C20056D623 /* RCTI18nUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTI18nUtil.m; sourceTree = "<group>"; };
|
||||
391E86A21C623EC800009732 /* RCTTouchEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTouchEvent.m; sourceTree = "<group>"; };
|
||||
@@ -339,6 +437,13 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2D2A28101D9B038B00D4039D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
83CBBA2B1A601D0E00E9B192 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -555,6 +660,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
83CBBA2E1A601D0E00E9B192 /* libReact.a */,
|
||||
2D2A28131D9B038B00D4039D /* libReact-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -614,6 +720,8 @@
|
||||
14C2CA731B3AC64300E6CBB2 /* RCTModuleData.mm */,
|
||||
14C2CA6F1B3AC63800E6CBB2 /* RCTModuleMethod.h */,
|
||||
14C2CA701B3AC63800E6CBB2 /* RCTModuleMethod.m */,
|
||||
001BFCCE1D8381DE008E587E /* RCTMultipartStreamReader.h */,
|
||||
001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */,
|
||||
13A6E20F1C19ABC700845B82 /* RCTNullability.h */,
|
||||
13A6E20C1C19AA0C00845B82 /* RCTParserUtils.h */,
|
||||
13A6E20D1C19AA0C00845B82 /* RCTParserUtils.m */,
|
||||
@@ -640,6 +748,25 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2D2A28121D9B038B00D4039D /* React-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2D2A281B1D9B038B00D4039D /* Build configuration list for PBXNativeTarget "React-tvOS" */;
|
||||
buildPhases = (
|
||||
2D6948301DA3088700B3FA97 /* ShellScript */,
|
||||
2D2A280F1D9B038B00D4039D /* Sources */,
|
||||
2D2A28101D9B038B00D4039D /* Frameworks */,
|
||||
2D2A28111D9B038B00D4039D /* CopyFiles */,
|
||||
2D6948201DA3042200B3FA97 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "React-tvOS";
|
||||
productName = "React-tvOS";
|
||||
productReference = 2D2A28131D9B038B00D4039D /* libReact-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
83CBBA2D1A601D0E00E9B192 /* React */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 83CBBA3F1A601D0F00E9B192 /* Build configuration list for PBXNativeTarget "React" */;
|
||||
@@ -668,6 +795,10 @@
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
TargetAttributes = {
|
||||
2D2A28121D9B038B00D4039D = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
83CBBA2D1A601D0E00E9B192 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
@@ -687,6 +818,7 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
83CBBA2D1A601D0E00E9B192 /* React */,
|
||||
2D2A28121D9B038B00D4039D /* React-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -719,9 +851,127 @@
|
||||
shellScript = "if [[ \"$CONFIGURATION\" == \"Debug\" ]] && [[ -d \"/tmp/RCTJSCProfiler\" ]]; then\n find \"${CONFIGURATION_BUILD_DIR}\" -name '*.app' | xargs -I{} sh -c 'cp -r /tmp/RCTJSCProfiler \"$1\"' -- {}\nfi";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
2D6948201DA3042200B3FA97 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [[ \"$CONFIGURATION\" == \"Debug\" ]] && [[ -d \"/tmp/RCTJSCProfiler\" ]]; then\nfind \"${CONFIGURATION_BUILD_DIR}\" -name '*.app' | xargs -I{} sh -c 'cp -r /tmp/RCTJSCProfiler \"$1\"' -- {}\nfi";
|
||||
};
|
||||
2D6948301DA3088700B3FA97 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\nif nc -w 5 -z localhost 8081 ; then\nif ! curl -s \"http://localhost:8081/status\" | grep -q \"packager-status:running\" ; then\necho \"Port 8081 already in use, packager is either not running or not running correctly\"\nexit 2\nfi\nelse\nopen \"$SRCROOT/../packager/launchPackager.command\" || echo \"Can't start packager automatically\"\nfi\nfi";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2D2A280F1D9B038B00D4039D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D3B5EC91D9B095C00451313 /* RCTBorderDrawing.m in Sources */,
|
||||
2D3B5ED31D9B097B00451313 /* RCTMapOverlay.m in Sources */,
|
||||
2D3B5E991D9B089A00451313 /* RCTDisplayLink.m in Sources */,
|
||||
2D3B5EBF1D9B093300451313 /* RCTJSCProfiler.m in Sources */,
|
||||
2D3B5EA11D9B08B600451313 /* RCTModuleData.mm in Sources */,
|
||||
2D3B5EEA1D9B09CD00451313 /* RCTTabBar.m in Sources */,
|
||||
2D3B5EAE1D9B08F800451313 /* RCTEventEmitter.m in Sources */,
|
||||
2D3B5ECA1D9B095F00451313 /* RCTComponentData.m in Sources */,
|
||||
2D3B5EA31D9B08BE00451313 /* RCTParserUtils.m in Sources */,
|
||||
2D3B5EA01D9B08B200451313 /* RCTLog.m in Sources */,
|
||||
2D3B5EE21D9B09B400451313 /* RCTScrollViewManager.m in Sources */,
|
||||
2D3B5ECF1D9B096F00451313 /* RCTFont.mm in Sources */,
|
||||
2D3B5ED51D9B098000451313 /* RCTModalHostViewController.m in Sources */,
|
||||
2D3B5EBC1D9B092600451313 /* RCTKeyboardObserver.m in Sources */,
|
||||
2D3B5E971D9B089000451313 /* RCTBridge.m in Sources */,
|
||||
2D3B5EA21D9B08BA00451313 /* RCTModuleMethod.m in Sources */,
|
||||
2D3B5E9B1D9B08A000451313 /* RCTFrameUpdate.m in Sources */,
|
||||
2D3B5EE41D9B09BB00451313 /* RCTSegmentedControlManager.m in Sources */,
|
||||
2D3B5EE31D9B09B700451313 /* RCTSegmentedControl.m in Sources */,
|
||||
2D3B5E9D1D9B08A800451313 /* RCTJavaScriptLoader.m in Sources */,
|
||||
2D3B5EB71D9B091800451313 /* RCTRedBox.m in Sources */,
|
||||
2D3B5ED11D9B097500451313 /* RCTMapAnnotation.m in Sources */,
|
||||
2D3B5EAB1D9B08EC00451313 /* RCTJSCErrorHandling.m in Sources */,
|
||||
2D3B5EAF1D9B08FB00451313 /* RCTAccessibilityManager.m in Sources */,
|
||||
2D537FD21DA4809D000F876C /* RCTMultipartDataTask.m in Sources */,
|
||||
2D3B5EF11D9B09E700451313 /* UIView+React.m in Sources */,
|
||||
2D3B5E931D9B087300451313 /* RCTErrorInfo.m in Sources */,
|
||||
2D3B5EE01D9B09AD00451313 /* RCTRootShadowView.m in Sources */,
|
||||
2D3B5EAD1D9B08F200451313 /* RCTJSCWrapper.mm in Sources */,
|
||||
2D3B5EBA1D9B092100451313 /* RCTI18nUtil.m in Sources */,
|
||||
2D3B5EB41D9B090A00451313 /* RCTDevLoadingView.m in Sources */,
|
||||
2D3B5EED1D9B09D700451313 /* RCTTabBarManager.m in Sources */,
|
||||
2D3B5EEF1D9B09DC00451313 /* RCTViewManager.m in Sources */,
|
||||
2D3B5EA91D9B08E300451313 /* CSSNodeList.c in Sources */,
|
||||
2D3B5EE11D9B09B000451313 /* RCTScrollView.m in Sources */,
|
||||
2D3B5ED81D9B098A00451313 /* RCTNavigatorManager.m in Sources */,
|
||||
2D3B5E951D9B087C00451313 /* RCTAssert.m in Sources */,
|
||||
2D3B5ED21D9B097800451313 /* RCTMapManager.m in Sources */,
|
||||
2D3B5EB61D9B091400451313 /* RCTExceptionsManager.m in Sources */,
|
||||
2D3B5EEB1D9B09D000451313 /* RCTTabBarItem.m in Sources */,
|
||||
2D3B5E961D9B088500451313 /* RCTBatchedBridge.m in Sources */,
|
||||
2D3B5ED41D9B097D00451313 /* RCTModalHostView.m in Sources */,
|
||||
2D3B5E9F1D9B08AF00451313 /* RCTKeyCommands.m in Sources */,
|
||||
2D3B5EA51D9B08C700451313 /* RCTRootView.m in Sources */,
|
||||
2D3B5EAC1D9B08EF00451313 /* RCTJSCExecutor.mm in Sources */,
|
||||
2D3B5EB11D9B090100451313 /* RCTAppState.m in Sources */,
|
||||
2D3B5EC21D9B093B00451313 /* RCTProfile.m in Sources */,
|
||||
2D3B5EAA1D9B08E600451313 /* CSSLayout.c in Sources */,
|
||||
2D3B5ECB1D9B096200451313 /* RCTConvert+CoreLocation.m in Sources */,
|
||||
2D3B5EEE1D9B09DA00451313 /* RCTView.m in Sources */,
|
||||
2D3B5ECC1D9B096500451313 /* RCTConvert+MapKit.m in Sources */,
|
||||
2D3B5E981D9B089500451313 /* RCTConvert.m in Sources */,
|
||||
2D3B5EA71D9B08CE00451313 /* RCTTouchHandler.m in Sources */,
|
||||
2D3B5EA41D9B08C200451313 /* RCTPerformanceLogger.m in Sources */,
|
||||
2D3B5E9E1D9B08AD00451313 /* RCTJSStackFrame.m in Sources */,
|
||||
2D3B5E941D9B087900451313 /* RCTBundleURLProvider.m in Sources */,
|
||||
2D3B5EB81D9B091B00451313 /* RCTSourceCode.m in Sources */,
|
||||
2D3B5EB51D9B091100451313 /* RCTDevMenu.m in Sources */,
|
||||
2D3B5EBD1D9B092A00451313 /* RCTTiming.m in Sources */,
|
||||
2D3B5EA81D9B08D300451313 /* RCTUtils.m in Sources */,
|
||||
2D3B5EC81D9B095800451313 /* RCTActivityIndicatorViewManager.m in Sources */,
|
||||
2D3B5EC61D9B095000451313 /* RCTProfileTrampoline-x86_64.S in Sources */,
|
||||
2D3B5ED01D9B097200451313 /* RCTMap.m in Sources */,
|
||||
2D3B5EA61D9B08CA00451313 /* RCTTouchEvent.m in Sources */,
|
||||
2D8C2E331DA40441000EE098 /* RCTMultipartStreamReader.m in Sources */,
|
||||
2D3B5EF01D9B09E300451313 /* RCTWrapperViewController.m in Sources */,
|
||||
2D3B5EEC1D9B09D400451313 /* RCTTabBarItemManager.m in Sources */,
|
||||
2D3B5EB01D9B08FE00451313 /* RCTAlertManager.m in Sources */,
|
||||
2D3B5E9C1D9B08A300451313 /* RCTImageSource.m in Sources */,
|
||||
2D3B5EC31D9B094800451313 /* RCTProfileTrampoline-arm.S in Sources */,
|
||||
2D3B5ED91D9B098E00451313 /* RCTNavItem.m in Sources */,
|
||||
2D3B5EC51D9B094D00451313 /* RCTProfileTrampoline-i386.S in Sources */,
|
||||
2D3B5EC41D9B094B00451313 /* RCTProfileTrampoline-arm64.S in Sources */,
|
||||
2D3B5EBB1D9B092300451313 /* RCTI18nManager.m in Sources */,
|
||||
2D3B5EBE1D9B092D00451313 /* RCTUIManager.m in Sources */,
|
||||
2D3B5EDD1D9B09A300451313 /* RCTProgressViewManager.m in Sources */,
|
||||
2D3B5ED71D9B098700451313 /* RCTNavigator.m in Sources */,
|
||||
2D3B5EDA1D9B099100451313 /* RCTNavItemManager.m in Sources */,
|
||||
2D3B5EC11D9B093900451313 /* RCTFPSGraph.m in Sources */,
|
||||
2D3B5E9A1D9B089D00451313 /* RCTEventDispatcher.m in Sources */,
|
||||
2D3B5ED61D9B098400451313 /* RCTModalHostViewManager.m in Sources */,
|
||||
2D3B5EE51D9B09BE00451313 /* RCTShadowView.m in Sources */,
|
||||
2D3B5EC71D9B095600451313 /* RCTActivityIndicatorView.m in Sources */,
|
||||
2D3B5EB21D9B090300451313 /* RCTAsyncLocalStorage.m in Sources */,
|
||||
2D3B5EC01D9B093600451313 /* RCTPerfMonitor.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
83CBBA2A1A601D0E00E9B192 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -730,6 +980,7 @@
|
||||
13723B501A82FD3C00F88898 /* RCTStatusBarManager.m in Sources */,
|
||||
000E6CEB1AB0E980000CDF4D /* RCTSourceCode.m in Sources */,
|
||||
14A43DF31C20B1C900794BC8 /* RCTJSCProfiler.m in Sources */,
|
||||
001BFCD01D8381DE008E587E /* RCTMultipartStreamReader.m in Sources */,
|
||||
133CAE8E1B8E5CFD00F6AD92 /* RCTDatePicker.m in Sources */,
|
||||
14C2CA761B3AC64F00E6CBB2 /* RCTFrameUpdate.m in Sources */,
|
||||
13B07FEF1A69327A00A75B9A /* RCTAlertManager.m in Sources */,
|
||||
@@ -829,6 +1080,48 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2D2A28191D9B038B00D4039D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2D2A281A1D9B038B00D4039D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
83CBBA201A601CBA00E9B192 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -963,6 +1256,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2D2A281B1D9B038B00D4039D /* Build configuration list for PBXNativeTarget "React-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2D2A28191D9B038B00D4039D /* Debug */,
|
||||
2D2A281A1D9B038B00D4039D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "React" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user