Compare commits

...
149 Commits
Author SHA1 Message Date
Mike Grabowski 486c507dd0 [0.36.1] Bump version numbers 2016-11-01 22:24:28 +01:00
James Ide 7aa5858ea6 Fix missing methods in Keyboard module
Summary:
They keyboard module is an instance of `NativeEventEmitter` which is an instance of `EventEmitter`. But the exported module only has a small subset of the APIs. This broke existing codebases which are using the methods not exported currently.

The PR just reassigns the variable before exporting so that the actual module is exported instead of the dummy object used for documentation. It also fixes a layout issue in the documentation.
Closes https://github.com/facebook/react-native/pull/10671

Differential Revision: D4110355

fbshipit-source-id: a6757f3ca8c2494970ba221b10a7e6e9a5f2d64d
2016-11-01 22:24:16 +01:00
Mike Grabowski ec9f38c540 [0.36.0] Bump version numbers 2016-10-25 13:07:01 +02:00
Mike Grabowski 741ac367d8 Merge branch '0.36-stable' of github.com:facebook/react-native into 0.36-stable 2016-10-25 13:06:42 +02:00
Connor McEwen 486f3b035f Prevent app from crashing when getCurrentActivity is null
Summary:
We're seeing a lot of crashes from `PermissionsModule` not being able to access the current activity, mentioned in #10009 and here: https://github.com/facebook/react-native/issues/9310#issuecomment-245657347

As far as I can tell, there is no way to ensure the Activity exists since the `ReactContext` holds a `WeakReference` to the current Activity and it appears that the lifecycle calls are happening in the right order (so not the same as #9310).

This will at least allow people to catch the error in JS and update the UI or try again as opposed to crashing the app.

I'm working on some bigger changes in #10221 but this is a smaller change and important to get fixed I think.
Closes https://github.com/facebook/react-native/pull/10351

Differential Revision: D4010242

fbshipit-source-id: 7a76973bb2b3e45817d4283917740c89a10ec0b0
2016-10-25 13:04:59 +02:00
Héctor Ramos 8491e08755 Undo markdown typo fix.
Summary:
See #10448.

Confirmed link is rendered correctly. cc foghina
Closes https://github.com/facebook/react-native/pull/10468

Differential Revision: D4047432

Pulled By: lacker

fbshipit-source-id: dfa1427d6dcd7b2e5e66ce276cae1ed10778c4ff
2016-10-20 17:36:12 -07:00
Héctor Ramos c2b60dd029 Headless JS - fix markdown typo.
Summary: Closes https://github.com/facebook/react-native/pull/10448

Differential Revision: D4039297

Pulled By: lacker

fbshipit-source-id: 21a398e3d35b2aa3d34cd35c865d36cf5a9e4b25
2016-10-18 15:09:14 -07:00
Felix Oghina 60b2b5175d add headless js guide
Summary:
**Test plan (required)**

Run the website, check everything renders.
Closes https://github.com/facebook/react-native/pull/10325

Differential Revision: D4008427

Pulled By: bestander

fbshipit-source-id: 2ba78d33efab2bf2267a806bfc8d3b0ec50f54f5
2016-10-18 15:09:05 -07:00
James Ide 44206a949f [0.36.0-rc.1] Bump version numbers 2016-10-12 22:31:37 -07:00
Pieter De Baets 64dd140c1b Cancel network requests from the correct queue
Summary: Fix suggested by sooth-sayer (https://github.com/facebook/react-native/pull/10280)

Reviewed By: mmmulani

Differential Revision: D4001618

fbshipit-source-id: cc28d19d02a29b62d2bdbddcd30f94b1c1bcfd76
2016-10-12 22:30:12 -07:00
Mike Grabowski 295867607b [0.36.0-rc.0] Bump version numbers 2016-10-10 20:45:39 +02:00
Héctor Ramos 016f47c7f5 Restore iOS, Android links on Showcase.
Summary: Closes https://github.com/facebook/react-native/pull/10292

Differential Revision: D3990986

Pulled By: bestander

fbshipit-source-id: dd9711ce0f54bdfc801aa6cf1cf0b55cb4d9c12c
2016-10-09 15:13:37 -07:00
MIYOKAWA, Nobuyoshi 5c0dec16ba replace old ATS key name to new one.
Summary:
On iOS project, ATS is disabled for 'localhost'.  But the key for this setting is old and just for early iOS9 beta.  iOS9 release and later uses new one, so I updated it.
Closes https://github.com/facebook/react-native/pull/10314

Differential Revision: D3993780

fbshipit-source-id: b749edd571c34f07989dde6af0e4ff95f5355c29
2016-10-09 12:13:37 -07:00
ronhe 79e1eacc18 Update UsingAListView.md - Add flex:1 to View
Summary:
Add flex:1 to View's style prop, so the ListView can be scrolled.
Closes https://github.com/facebook/react-native/pull/10304

Differential Revision: D3993754

Pulled By: JoelMarcey

fbshipit-source-id: 23d73b23310a5b39dea4cf3c6f3af0bf2901480f
2016-10-09 11:13:27 -07:00
Isak Dunér 770091f3c1 add null check for keyboardFrame variable in KeyboardAvoidingView component
Summary:
This is a critical change and should be pushed to stabel asap

The reason for the pull request is to prevent crashes that can occure if the function relativeKeyboardHeight(keyboardFrame: ScreenRect) got null as an input variable which sometimes does happen.
Closes https://github.com/facebook/react-native/pull/10287

Differential Revision: D3988359

Pulled By: bestander

fbshipit-source-id: 0d1052b590b2684907ea6f7d6b4fe9b89989d4dd
2016-10-08 20:28:42 -07:00
Emil Sjolander b7ded130df Dont use explicit .so file name to support more platforms
Reviewed By: dreiss

Differential Revision: D3981166

fbshipit-source-id: 0b19f73e6de48a30613419ccc54735c968701532
2016-10-08 09:28:42 -07:00
Kazuki Sakamoto 9673c885fd Introduce CSSAssertSetFailFunc and CSSAsserFail to throw managed exception
Reviewed By: emilsjolander

Differential Revision: D3982084

fbshipit-source-id: 058a87c10ca89238362be4d8759cc00dd0c9b376
2016-10-07 12:43:58 -07:00
Héctor Ramos b99343bdad Split Showcase and add mini-Showcase to homepage
Summary:
We're revamping the Showcase, and in this first PR we're focusing on two things:

1. We're splitting the list of featured apps. Those in the "pinned" list will be fairly static and PRs that add/remove apps from this list will be discouraged. Apps in the "featured" list will be held to the same standards established this past summer (funded startup or public company + engineering blog post on RN / news article from established company).

2. We're displaying the pinned apps in a small showcase at the bottom of the homepage.

Note that pinned and featured apps are displayed together in the main showcase without any separation. Pinned apps will appear first in an arbitrary order, followed by featured apps in alphabetical order. Future PRs may address how apps are displayed in the main Showcase itself.

We want to also make sure people understand some of these apps are not built entirely using React Native. Some apps are native apps with individual RN views added in.

Full Showcase with pinned apps + fea
Closes https://github.com/facebook/react-native/pull/10243

Differential Revision: D3978374

Pulled By: hramos

fbshipit-source-id: 368f4a9650ca1f1583d2cc4b364e77cde0478c89
2016-10-07 11:58:41 -07:00
Kazuki Sakamoto dd6d297c55 Introduce CSSNodeGetInstanceCount API
Reviewed By: emilsjolander

Differential Revision: D3981990

fbshipit-source-id: 98005ae1fc21d4c8802f24030fff9ffb00bd292d
2016-10-07 11:13:33 -07:00
Ovidiu Viorel Iepure f0a3a25cd2 Add destination to e2e xcode build
Summary: Closes https://github.com/facebook/react-native/pull/10286

Differential Revision: D3987787

Pulled By: bestander

fbshipit-source-id: fc6295f499bc2d47e52c855080952353568bd7b7
2016-10-07 10:14:21 -07:00
Ovidiu Viorel Iepure 3968e0ac45 Bump iOS version to 10.0
Summary: Bump iOS version for `react-native-ios-uiexplorer`.

Reviewed By: javache

Differential Revision: D3987501

fbshipit-source-id: f0a247efff89ca2785f7054b7c0ca159179cdbce
2016-10-07 08:43:35 -07:00
Pieter De Baets 5200ac1ee9 Add check for nil nativeToJS bridge
Reviewed By: mhorowitz

Differential Revision: D3980922

fbshipit-source-id: ba8ba283cd186a28cd9d5c1c35d4828829864a6a
2016-10-07 08:13:38 -07:00
Dan Caspi 1c23b70929 Add support for custom JSC across CS
Reviewed By: javache

Differential Revision: D3944510

fbshipit-source-id: 1c67c8a53a65149250a602f2ccd6b234a022897f
2016-10-07 07:58:46 -07:00
Aaron Chiu 24a83fae2f make view managers native modules
Reviewed By: achen1

Differential Revision: D3973591

fbshipit-source-id: 44886f3bf045ed64585c92eb2e291627eed86c92
2016-10-07 05:43:45 -07:00
Aaron Chiu 1296cb29eb add flag to enable lazy view managers
Reviewed By: achen1

Differential Revision: D3981171

fbshipit-source-id: 2f6b8370064a5835e2e3636d4c1a7f42cc28ccaf
2016-10-07 05:43:45 -07:00
Emil Sjolander d89f59d94a Resolve some differences between CSSNode and CSSNodeJNI
Reviewed By: lucasr

Differential Revision: D3960755

fbshipit-source-id: 3e13a9435208851a96a619c07625ef2a5402f5ec
2016-10-07 05:28:37 -07:00
Domenico Matteo b6719b247d Fix small typo in the help text
Summary:
Not much to add. My OCD spotted this 😄
Closes https://github.com/facebook/react-native/pull/10275

Differential Revision: D3984542

Pulled By: hramos

fbshipit-source-id: 2de8c8f7f5c2c518e0ec5277087095e0553c72d6
2016-10-06 20:28:37 -07:00
Neil Sarkar fea38570ff Fix minor typo in documentation of bottom property - "top" => "bottom"
Summary:
Super minor documentation fix.
Closes https://github.com/facebook/react-native/pull/10278

Differential Revision: D3984539

Pulled By: hramos

fbshipit-source-id: 81559df2173a2471152dc7725bb513a49e6d7c64
2016-10-06 16:58:35 -07:00
Aaron Chiu 8708c8bb82 make ViewManager extend BaseJavaModule
Reviewed By: achen1

Differential Revision: D3950323

fbshipit-source-id: 91fda89a9a457e0e5b6952b744eeba5e31c46a9a
2016-10-06 15:58:38 -07:00
Neil Sarkar 9311c4e6f5 Documentation: Update RunningOnDeviceAndroid.md
Summary:
Documentation change: add link to install lsusb on macs since it is not available by default.
Closes https://github.com/facebook/react-native/pull/10263

Differential Revision: D3982006

Pulled By: JoelMarcey

fbshipit-source-id: 66b191446e1b7a969ad2682efb573865e31ed91f
2016-10-06 11:14:18 -07:00
Charles Dick 217a4449d4 remove dependency between aggrow and stackRegistry
Reviewed By: bnham

Differential Revision: D3876267

fbshipit-source-id: 2ad7e70445f3f4641cde554e94de000403368233
2016-10-06 07:58:36 -07:00
Mike Lambert 1502e66c31 Allow code to check android permissions when run from a Service as well as Activity
Summary:
This allows the React JS code that's running from a Service (ie GcmListenerService) to check permissions (ie check for VIBRATE permissions before delivering notifications)

**Test plan (required)**

I've run this code from a GcmListenerService subclass, and it works correctly.
Closes https://github.com/facebook/react-native/pull/10229

Differential Revision: D3980853

fbshipit-source-id: 026b1f0c953d7093b5af2bec0b4a93ebd228f62e
2016-10-06 04:28:35 -07:00
dlowder-salesforce ccea759b71 Apple TV support 3: Run Travis CI for tvOS in separate script
Summary:
* Motivation

Fix a possible issue with Travis CI by running tvOS tests in a separate script.
Closes https://github.com/facebook/react-native/pull/10268

Differential Revision: D3980775

Pulled By: matryoshcow

fbshipit-source-id: 66dc52f4c0e5c492eb51d53fba209fc25361ce3e
2016-10-06 03:28:33 -07:00
Jani Eväkallio 467b637656 Add a debugger favicon
Summary:
I frequently spend multiple seconds scanning my open Chrome tabs for the React Native debugger tab. It would be a lot quicker to find the correct tab if the debugger UI tab had a favicon.

This commit adds favicon (blue react logo in a white circle). It's a super minor change, but would help a lot with day-to-day DX.

I chose this icon to differentiate sufficiently from other tabs developer might have open: React docs (blue logo in black square) and React Native docs (white logo in black square). If the idea of having a favicon is agreeable but you want a different asset, I'm more than happy to change it to something else.

Original asset before base-64 encoding:
![favicon-32x32](https://cloud.githubusercontent.com/assets/1203949/19117546/44b36fd2-8b11-11e6-8a94-c8956fe7533c.png)

In the wild:
<img width="335" alt="screen shot 2016-10-05 at 15 40 58" src="https://cloud.githubusercontent.com/assets/1203949/19117811/43cad316-8b12-11e6-8406-4c9b74efdaf2.png">
Closes https://github.com/facebook/react-native/pull/10252

Differential Revision: D3974983

Pulled By: hramos

fbshipit-source-id: 6b07d446dd972c4c171062134b45bc3850886349
2016-10-05 10:43:43 -07:00
Ovidiu Viorel Iepure 645540809f Revert "Add multipart response download task"
Summary:
Checking whether reverting commit 69ec19c61e fixes travis builds.

Travis run: https://travis-ci.org/facebook/react-native/builds/165087391
Closes https://github.com/facebook/react-native/pull/10250

Differential Revision: D3974738

Pulled By: bestander

fbshipit-source-id: a84759b51c2ca11e953b420515dacd597181ec65
2016-10-05 09:58:37 -07:00
David Aurelio 0b2d5317c4 Add js_file_prod rule
Reviewed By: matryoshcow

Differential Revision: D3913439

fbshipit-source-id: fe3a30fddb4d8fcabfc88caf9b1b032189812b89
2016-10-05 09:28:50 -07:00
David Aurelio aef3d8128f Add js_file rule
Reviewed By: matryoshcow

Differential Revision: D3900455

fbshipit-source-id: 61384ade035db978ef3ca258e4c0109bcb450692
2016-10-05 09:28:50 -07:00
Douglas Lowder 8622998335 Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh)
Summary:
* Motivation *

Second PR for Apple TV support.

* Test plan *

Apple TV tests have been added to scripts/objc-test.sh
Closes https://github.com/facebook/react-native/pull/10227

Differential Revision: D3974064

Pulled By: javache

fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
2016-10-05 07:28:44 -07:00
Nader Dabit 91d266ba87 Update ScrollView.js
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see
Closes https://github.com/facebook/react-native/pull/10157

Differential Revision: D3974091

Pulled By: javache

fbshipit-source-id: c756fb82422253bb9098c37fbcb5637e58e53340
2016-10-05 05:05:07 -07:00
Michał Łazowik f77185f27e Fix rest operator syntax errors
Summary:
These are caused by new [syntax checking](https://github.com/babel/babylon/blob/1285131e3eb28ab6f5f62a7c5fd3ffd7ce1e5eb8/CHANGELOG.md#v6113-2016-10-01) introduced by babylon.

"The single rest at the end only applies to binding `let { x, ...y } = obj;` and assignment `({ x, ...y } = obj).`"

I'd say this really should be cherry picked into the stable branch.

**Test plan**
1. install babylon@6.11.3
2. see that things break
3. apply patch
4. things work
5. make sure all instances were fixed (I used `\.\.\..*,.*\n.*=` in IntelliJ regex format—find all ... followed by newline followed by =)

Issue #10199
Closes https://github.com/facebook/react-native/pull/10200

Differential Revision: D3974066

Pulled By: javache

fbshipit-source-id: 3f3c1e9df01a3b3bdd61dd3863416c638d3ed98d
2016-10-05 04:43:45 -07:00
sunnylqm 1941450649 no "window" in react native
Summary:
There is no "window" in react native. And by the way fix the indent.
Closes https://github.com/facebook/react-native/pull/10182

Differential Revision: D3974090

Pulled By: javache

fbshipit-source-id: e0e47e15364abff5bcb136d988e234fc8e1f0a8b
2016-10-05 04:43:45 -07:00
leeight 9a7e4b4902 Dump invalid json when call Value::fromJSON failed
Summary:
See #9117
Closes https://github.com/facebook/react-native/pull/10231

Differential Revision: D3974063

Pulled By: javache

fbshipit-source-id: 63d3ae02ae731cd5a63fcb3a645c612c57cbb8b4
2016-10-05 04:43:45 -07:00
pedramsaleh fb355f663d Update TouchableHighlight.js
Summary:
Update to docs to indicate that TouchableHighlight must have exactly one child (i.e. not zero or more than one). Previously it was only indicated that it cannot have more than one.
Closes https://github.com/facebook/react-native/pull/10244

Differential Revision: D3970841

fbshipit-source-id: f1c4c223cfaf150fec9bbae1041567d0c81eb63b
2016-10-04 15:43:36 -07:00
Alex Kotliarskyi 69ec19c61e Add multipart response download task
Reviewed By: mmmulani

Differential Revision: D3940132

fbshipit-source-id: 7a6543223cea2523bedc585f890c9f64df0509ff
2016-10-04 15:13:35 -07:00
Felix Oghina f7cbd56d8e pass EventDispatcher to UIImplementation constructor
Summary: This way `UIImplementation` can hold on to it and use it outside of calls from the `UIManagerModule`.

Reviewed By: lexs

Differential Revision: D3899774

fbshipit-source-id: 01e4956c4540bcdf30774a3f40a625e934714ee9
2016-10-04 12:29:13 -07:00
Chace Liang 5eb28dc4f0 RC, fix cant refresh in campaign list view
Reviewed By: hedgerwang

Differential Revision: D3966351

fbshipit-source-id: 20b1621dd26c57f6367f9d2eab0be3661dee1843
2016-10-04 11:43:34 -07:00
Konstantin Raev 20ef20591f fixed mockito version
Summary:
Gradle unit tests started failing, this PR fixes mockito to be one specific version instead of loose 1.+

**Explain the **motivation** for making this change. What existing problem does the pull request solve?**

Circle CI started failing without any specific reason https://circleci.com/gh/facebook/react-native/tree/master, looks like a dependency error.

Alas it is, I can reproduce the error on master with clean caches.

**Test plan (required)**

After the fix:

```
bestander-pro:react-native bestander$ ./gradlew :ReactAndroid:testDebugUnitTest
Incremental java compilation is an incubating feature.
:ReactAndroid:preBuild UP-TO-DATE
:ReactAndroid:preDebugBuild UP-TO-DATE
:ReactAndroid:checkDebugManifest
:ReactAndroid:preDebugAndroidTestBuild UP-TO-DATE
:ReactAndroid:preDebugUnitTestBuild UP-TO-DATE
:ReactAndroid:preReleaseBuild UP-TO-DATE
:ReactAndroid:preReleaseUnitTestBuild UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:ReactAndroid:prepareComAndro
Closes https://github.com/facebook/react-native/pull/10239

Differential Revision: D3968396

Pulled By: matryoshcow

fbshipit-source-id: 63374261303fb98dc252898dfd5d3b3346597e4f
2016-10-04 10:43:35 -07:00
Jonathan Kim 2bca6acdaf Maintain whitespace in propType documentation
Summary:
When looking at PropType information for certain props the formatting puts everything on one line which makes it quite hard to read. This PR ensures that the whitespace extracted from react-docgen is preserved.

For example the documentation for [Transforms](http://facebook.github.io/react-native/releases/0.34/docs/transforms.html#transform) goes from:

<img width="717" alt="screenshot 2016-10-01 17 32 23" src="https://cloud.githubusercontent.com/assets/691952/19015498/74aaa5c8-87fd-11e6-922d-3eef38cc6452.png">

to:

<img width="707" alt="screenshot 2016-10-01 17 32 30" src="https://cloud.githubusercontent.com/assets/691952/19015500/784521a4-87fd-11e6-9c23-717d1ee31921.png">

**Test plan:**

Check PropType documentation is being rendered correctly on other components.

**N.B.** more style tweaks could be made here to make things more readable (e.g. reducing line height, monospace font) but I'll refrain from making them here in case there are explicit designs for the docs.
Closes https://github.com/facebook/react-native/pull/10197

Differential Revision: D3967759

Pulled By: hramos

fbshipit-source-id: bf3d3b2032dc6e9f5f1acf3907ecb7f57a2c57be
2016-10-04 07:58:33 -07:00
Charles Dick 286b56fbd0 Add configuration tab to aggrow
Reviewed By: bnham

Differential Revision: D3759273

fbshipit-source-id: fd09465e19fbd1b377bf8b384f9b0b241bf43288
2016-10-04 03:29:55 -07:00
Felix Oghină 9ac9ec90c3 Update docs on using onActivityResult (again)
Summary:
Update the long image picker example
Closes https://github.com/facebook/react-native/pull/10234

Differential Revision: D3967223

fbshipit-source-id: c99a98c1d83de9804406362fcddb7db0b83b08fa
2016-10-04 03:13:33 -07:00
David Aurelio bbade77fb4 Implement proper command handling for new worker tool
Reviewed By: matryoshcow

Differential Revision: D3906818

fbshipit-source-id: a192723a16094d3901de40a9914428fd6ff119a2
2016-10-04 02:59:34 -07:00
Alex Kotliarskyi b8804fdbc3 Send progress events via multipart response
Summary:
Context: I'm trying to add support for sending packager progress events to the client that is downloading the bundle over HTTP multipart response.

The idea is for the client to send `Accept: multipart/mixed` header, and if present the server will stream progress events to the client. This will ensure the change is backwards-compatible - the clients who don't know about progress events won't receive them.

In the future we can use this approach to download RAM bundle modules in one request.

Reviewed By: davidaurelio

Differential Revision: D3926984

fbshipit-source-id: 39a6e38e40a79f7a2f2cf40765a0655fb13b7918
2016-10-03 18:13:36 -07:00
Alex Kotliarskyi 8fbf0dad1f Move progress bar from Bundler to Server
Summary:
Context: I'm trying to add support for sending packager progress events to the client that is downloading the bundle over HTTP multipart response.

In order to do that I need the server to know about these events. Currently the bundler doesn't expose any hooks for monitoring the progress, so this diff introduces `onProgress` option for that.

Reviewed By: davidaurelio

Differential Revision: D3926806

fbshipit-source-id: b7d9c649df4f94ddf5082791209844610650325e
2016-10-03 18:13:36 -07:00
Alex Kotliarskyi e2b25c8c9d Add multipart response stream reader
Summary:
Packager can take a long time to load and the progress is usually displayed in another window (Terminal). I'm adding support for showing a UI inside React Native app for packager's progress when loading a bundle.

This is how it will work:

1. React Native sends request to packager with `Accept: multipart/mixed` header.
2. Packager will detect that header to detect that client supports progress events and will reply with `Content-Type: multipart/mixed`.
3. While building the bundle it will emit chunks with small metadata (like `{progress: 0.3}`). In the end it will send the last chunk with the content of the bundle.
4. RN runtime will be receiving the events, for each progress event it will update the UI. The last chunk will be the actual bundle which will end the download process.

This workflow is totally backwards-compatible -- normally RN doesn't set the `Accept` header.

Reviewed By: mmmulani

Differential Revision: D3845684

fbshipit-source-id: 5b3d2c5a4c6f4718d7e5de060d98f17491e82aba
2016-10-03 18:13:36 -07:00
Nicolas Cuillery 179a651240 Use HTML for links including closing bracket
Summary:
The markdown parser (Marked) used by the docs doesn't handle links ending with a closing bracket. The result is a broken link in the [Integration With Existing Apps](http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#our-sample-app) guide.

Using HTML makes the parser ignoring these links.

Note: this is a well-known issue of Marked: https://github.com/chjj/marked/issues/690
Note bis: The fix #9429 didn't solve the problem.
Closes https://github.com/facebook/react-native/pull/10225

Differential Revision: D3964341

fbshipit-source-id: 61564d1cbb632fa1f0c71e7c6cbdc0b9a200caa4
2016-10-03 16:13:33 -07:00
Ovidiu Viorel Iepure 6130650d93 Replacing node-haste with jest-haste-map
Summary: Modified `node-haste` implementation to use the much faster `jest-haste-map` under the hood. The underlying `fastfs` now gets passed the entire file list from the `jest-haste-map` rather than crawl the filesystem.

Reviewed By: cpojer

Differential Revision: D3724387

fbshipit-source-id: 447d58ea0edf283662ec23d1e2deee992cf8d240
2016-10-03 05:28:56 -07:00
Pieter De Baets d7d89172c2 Expose ModuleRegistry on ExecutorDelegate
Differential Revision: D3944588

fbshipit-source-id: f8450a6735e1f6283c3bfe9d2ce883327172621c
2016-10-03 05:13:38 -07:00
Felix Oghina 6d175f2c25 Android: enable foreground ripple
Reviewed By: astreet

Differential Revision: D3932066

fbshipit-source-id: ee2f019cb9ba41e32cbbd8c1cd07c9ed5263fddc
2016-10-03 04:28:46 -07:00
Felix Oghina 8915507244 show touchable feedback for short touches
Summary: Currently, for short touches (under 130ms by default), we don't trigger the highlight effect. This diff makes it so that if we're not highlighted when we invoke onPress, we highlight.

Reviewed By: astreet

Differential Revision: D3932019

fbshipit-source-id: c0ff7d4c646890507ce510f51c279c88aeba66ae
2016-10-03 04:28:46 -07:00
Pieter De Baets a1402511f5 Update .eslintrc
Reviewed By: davidaurelio

Differential Revision: D3960563

fbshipit-source-id: 1c7b238e6fa1040b0d29bafd6f878c1319b040da
2016-10-03 03:14:46 -07:00
Tim Yung 0e2591e90b RN: Fix flow-bin Dependency
Reviewed By: jeffmo

Differential Revision: D3957804

fbshipit-source-id: a05026d36e5d3eff45dbc982250d3ff887cbb581
2016-10-02 20:58:42 -07:00
Tim Yung feced42fea RN: Upgrade ESLint Packages
Reviewed By: vjeux

Differential Revision: D3946990

fbshipit-source-id: f1be05ee7efed63e54c133d790b193b61e40ea36
2016-10-01 17:58:31 -07:00
Andy a2aab625f3 Fix webview crash when trying to display local html files
Summary:
When using webview on android and trying to link to an html file located on device (using `file://`), the application would crash with an error specifying that nothing handles the fired intent. This is due to [`33a1f28`](https://github.com/facebook/react-native/commit/33a1f28654e24a47d80f6ffc75072d0158085a09) which attempts to intercept all non `http(s)` links.

This is a simple fix so hopefully it can make it into the next stable release.
Closes https://github.com/facebook/react-native/pull/9668

Differential Revision: D3956485

fbshipit-source-id: 5a752abc21802a44e3a26e88669ccb6852076992
2016-10-01 11:43:37 -07:00
Jeff Morrison 1a9853da37 fbobjc
Reviewed By: gabelevi

Differential Revision: D3949455

fbshipit-source-id: 1cbce4a85fe5b8798496752863bbca64b078aa9c
2016-10-01 11:16:21 -07:00
Pieter De Baets 86c195b3d8 Upgrade OSS folly dependency
Reviewed By: bestander

Differential Revision: D3952605

fbshipit-source-id: 70146987c07b3c9917d19d7fbf844242343f9777
2016-09-30 15:28:38 -07:00
Hoa Dinh 5a24ea0b42 Create headers symlinks for FBReactKit
Reviewed By: javache, skotchvail

Differential Revision: D3946452

fbshipit-source-id: c6354f529bec2f9635a0ecf5f65e21dc4e17b1e4
2016-09-30 14:28:41 -07:00
Tim Creasy 707aba822e Added RCTLog.h import for clarity
Summary:
Explicitly show import statements in example implementation file.  Xcode build fails unless RCTLog is imported.  Adding this clarifies this, as it is not stated anywhere else.
Closes https://github.com/facebook/react-native/pull/10117

Differential Revision: D3952631

Pulled By: javache

fbshipit-source-id: f268ff53ee2cf69aabd83c3305c5c25add338d83
2016-09-30 12:58:37 -07:00
Alexander Pantyuhov c4ac8b329c StatusBar: barStyle support for Android (API 23+)
Summary:
Android (starting from API 23) supports "light status bar", thus it is possible to extend StatusBar and make `barStyle` property work not only for iOS, but also for Android.

This PR introduces one more `barStyle` option `dark-content` in addition to two existing ones (`default` and `light-content`).
Why there are 3 options instead of 2?

Two simple reasons:
1) to make all existing applications fully compatible with these changes;
2) the default status bar on Android is dark with white text and icons, while on iOS it is light with black text and icons on it. Thus the `default` option means something like "I don't really care, just apply the default color for this platform", while two other options (`light-content` and `dark-content`) allow to accurately specify the required result.
Closes https://github.com/facebook/react-native/pull/10185

Differential Revision: D3952346

fbshipit-source-id: 999a67614abff52321fbeb06298ebf1946c3f1d1
2016-09-30 12:58:37 -07:00
Pieter De Baets 5b52dab781 Remove follySupport.h
Reviewed By: lexs

Differential Revision: D3944918

fbshipit-source-id: 702907a12e3916f9d6edde7362416188df909d70
2016-09-30 12:28:41 -07:00
Pieter De Baets 6ee319d8eb Only configure nativeInjectHMRUpdate in DEBUG builds
Reviewed By: martinbigio

Differential Revision: D3944601

fbshipit-source-id: 8b98b7ae9a10c1e95d0ae80f6bbd90675d7c3ef5
2016-09-30 12:28:41 -07:00
Michał Gregorczyk 67f9d92478 Do not use bare file descriptors
Reviewed By: nadavrot

Differential Revision: D3945330

fbshipit-source-id: f3a28e2632c7f17a0b6394f3dd3de183bc9e97af
2016-09-30 12:13:51 -07:00
AgtLucas dbc853246d Remove missing link from Modal doc
Summary:
Is okay to remove this link? It seems that we don't have the Navigator Comparison anymore.
Closes https://github.com/facebook/react-native/pull/10186

Differential Revision: D3951863

Pulled By: mmmulani

fbshipit-source-id: 170f4cc9288f84d88c3b607e3a1a85619d9776c8
2016-09-30 11:43:44 -07:00
Pieter De Baets 4b70c66a27 Use glob in cxxreact BUCK rule
Reviewed By: lexs

Differential Revision: D3944546

fbshipit-source-id: 73cb3eeff3b3f5f543e69893f5071c4bd3e78be4
2016-09-30 09:28:47 -07:00
David Aurelio 31a78f3644 Rename Activity events for more clarity
Summary: Changed “Finding dependencies” and “Building Module Graph” to “Transforming modules” and “Initializing Packager” for more clarity

Reviewed By: matryoshcow

Differential Revision: D3950811

fbshipit-source-id: 7a2e655ef7e1655244ce427e7adc8c1e5afa7329
2016-09-30 08:58:36 -07:00
Ovidiu Viorel Iepure 2817b397de Add file transform event to Activity
Summary: Add a telemetric event to the transformer.

Reviewed By: davidaurelio

Differential Revision: D3950902

fbshipit-source-id: c46e95ee93925fb0f9d1784aebdc3206baf74dc6
2016-09-30 08:43:34 -07:00
David Aurelio 90db4f3c6d Add more information to activity events
Reviewed By: matryoshcow

Differential Revision: D3950787

fbshipit-source-id: b6ac22027380a9f7cc7bcb39ecd33d5c9255301f
2016-09-30 07:43:35 -07:00
Andrei Coman 9b261dbc94 Modal statusbar cleanup
Summary:
The hack for the status bar height is not necessary any longer, so we can remove
all code related to it

Reviewed By: lexs

Differential Revision: D3943770

fbshipit-source-id: 2d70f4ea10dd76ea6e6a73bb6edccae388bde1c0
2016-09-30 03:13:36 -07:00
Dave Pack 12a97e1ecd Fix Modal size on Android tablet
Summary:
On tablets, using Display.getRotation() returned ROTATION_0 or ROTATION_180 when it was in landscape, not portrait as it does on phones. This resulted in the Modal being sized incorrectly on tablets. Using size and comparing width and height is the only way I can think of to figure out the device orientation and give the modal the correct size. With this change, all issues listed in #7708 should be resolved.

**Test plan**
Modal should correctly fill screen on Android phone and tablet in both portrait and landscape.
Closes https://github.com/facebook/react-native/pull/10159

Differential Revision: D3950369

Pulled By: andreicoman11

fbshipit-source-id: 9488c4302a76cc48e4f8a4026eb5770d40b6e3d2
2016-09-30 02:44:09 -07:00
Michał Gregorczyk b1fdac47b5 Wire compiled bundle API
Differential Revision: D3887878

fbshipit-source-id: 212fc3188f059d7378ecd61bb5e31fc87a857e8a
2016-09-29 09:13:39 -07:00
Nicolas Charpentier aa36adb116 Fix example in buck DEFS
Summary:
I noticed that the example doesn't match the definition below.

cc bestander
Closes https://github.com/facebook/react-native/pull/10175

Differential Revision: D3943967

Pulled By: bestander

fbshipit-source-id: 6941d4d663e1fd42f8723cd722eb8a5712a63dc8
2016-09-29 08:28:39 -07:00
Andrei Coman 17405b9774 Fix image example
Summary: Bundled images is ios only, legacy image was not present in android resources.

Reviewed By: javache

Differential Revision: D3930349

fbshipit-source-id: 663019351615b173621ef27dbf67ec595f8a590f
2016-09-29 07:28:55 -07:00
Andrei Coman 05de4dbb94 Fix inspector on top of Modal
Summary:
Very similar to https://github.com/facebook/react-native/pull/9600.
Does not trigger on DEV, but there are two inspectors: one underneath and one
above the modal. This looks like something we should fix, but the only solution
I've come up with so far was to mangle the event that AppContainer listens to, so that
only the AppContainer in the modal responds to it. This seems pretty ugly, I'd
rather look for something else. Wdyt?

Reviewed By: frantic

Differential Revision: D3937096

fbshipit-source-id: a6e648b6d583088514d6ba8df7851f9a8ef48f74
2016-09-29 04:58:33 -07:00
Emil Sjolander a75ec1153c Free memory used in tests to enable use of valgrind
Reviewed By: javache

Differential Revision: D3937493

fbshipit-source-id: 23c6970d7769b081575d39de583ba954fc65a397
2016-09-29 04:13:33 -07:00
Konstantin Raev 0eea9c61ee added new property to mock in chalk.js
Summary:
Tests started [failing](https://travis-ci.org/facebook/react-native/jobs/163517412) with release of new  babel that uses chalk.white.bgRed in code.
Jest does not like chalk and needs it mocked.
Removed code duplication and patched the mock.
Closes https://github.com/facebook/react-native/pull/10169

Differential Revision: D3943493

Pulled By: davidaurelio

fbshipit-source-id: 11f57f60ed909a394f15de7b9cc511400aeff510
2016-09-29 04:13:33 -07:00
Felix Oghina 3080b8d26c Android: add support for headless js tasks
Summary: Provide a base `HeadlessJsTaskService` class that can be extended to run JS in headless mode in response to some event. Added `HeadlessJsTaskEventListener` for modules that are interested in background lifecycle events, and `HeadlessJsTaskContext` that basically extends `ReactContext` without touching it. The react instance is shared with the rest of the app (e.g. activities) through the `ReactNativeHost`.

Reviewed By: astreet

Differential Revision: D3225753

fbshipit-source-id: 2c5e7679636f31e0e7842d8a67aeb95baf47c563
2016-09-29 03:58:33 -07:00
Gant Laborde 542ab8643e adds Keyboard.dismiss() function and document Keyboard
Summary:
Simple and elegant.  Now someone can dismiss a keyboard in a way that makes sense.

```js
import { Keyboard } from 'react-native'

// Hide that keyboard!
Keyboard.dismiss()
```

+ docs
Closes https://github.com/facebook/react-native/pull/9925

Differential Revision: D3935357

fbshipit-source-id: ecd2fb5c72c4dd769951d308e9bb6ee5d888052a
2016-09-28 18:13:37 -07:00
Chris Hopman eafd9b258f Use std=c++1y in xreact pertests
Reviewed By: mzlee

Differential Revision: D3935375

fbshipit-source-id: b477d865427ed56d5271477b198af633bba2f314
2016-09-28 16:29:01 -07:00
Raphael Porto 154c4890c6 Remove unnecessary View and add a space
Summary:
Only a few adjustments to the import of _react-native_.
Closes https://github.com/facebook/react-native/pull/10153

Differential Revision: D3940472

fbshipit-source-id: 3a93799ac89002e129d4c357db29a076afdf1074
2016-09-28 15:43:37 -07:00
Michael Lee fc154fcd74 Add sign-compare suppression for warning coming from gtest.h
Differential Revision: D3935414

fbshipit-source-id: 5f531cc65e74cae4cb23a0706b92dac0f3ef272d
2016-09-28 14:43:46 -07:00
Weixi Yen e4c21fe292 Adding Sleeperbot to RN Showcase
Summary:
Purpose: Adding Sleeperbot to Showcase

The top rated Fantasy Football app on Android and iOS - built mostly in React Native.

Funding Info:
https://www.crunchbase.com/organization/sleeperbot
https://angel.co/sleeperbot

Post:
https://medium.com/sleeperbot-hq/switching-to-react-native-in-production-on-ios-and-android-e6b675402712
Closes https://github.com/facebook/react-native/pull/10113

Differential Revision: D3939356

Pulled By: hramos

fbshipit-source-id: 58ee72419d36579a6d14d5fadd023541caae29f3
2016-09-28 14:28:55 -07:00
Atticus White 462ab9f988 Robin Rooms added to showcase apps
Summary:
This adds [Robin Powered's Room Display](https://robinpowered.com/features/room-display) to the showcased apps.
Closes https://github.com/facebook/react-native/pull/10148

Differential Revision: D3939340

Pulled By: hramos

fbshipit-source-id: 7344ea8ee3c813856e13ecd5612843bdeee216b4
2016-09-28 14:28:55 -07:00
Marc Horowitz 9981b8928d Make shared new bridge work in wilde/pyml
Reviewed By: javache

Differential Revision: D3926487

fbshipit-source-id: 6c40233c6140ef7ca1f78a5119e34c0979c444ee
2016-09-28 14:13:55 -07:00
Marc Horowitz af5c8a8fd2 Add support for new ios bridge to FBReactBridgeJSExecutor
Reviewed By: javache

Differential Revision: D3897535

fbshipit-source-id: 35bdaf885b03c0c95017a68b69f1f506e6943f2b
2016-09-28 14:13:55 -07:00
Marc Horowitz 441d146b7b Include the name of the bridge class in the dev menu
Reviewed By: javache

Differential Revision: D3933300

fbshipit-source-id: 933191c31731f4ad1a44dfe0854b28ef802e4dd1
2016-09-28 13:58:41 -07:00
Mattias Pfeiffer b2dac834fb Use strong reference in RCTImageLoader
Summary:
This PR is related to the multitude of crashes (#10016, #9751, #9882).

From my understanding, we should be using a strong reference when calling `decodeImageData` or we could be calling the method on a deallocated instance.

PR #9751 have mitigated this by adding a fail-safe, but I think the culprint is the weak reference, which this PR fixes.

Tested on iOS only, since it doesn't touch Android.
Closes https://github.com/facebook/react-native/pull/10147

Differential Revision: D3938763

fbshipit-source-id: 7389d4ae7a98926014401a1fe0cbbdcdd5ee6a01
2016-09-28 13:28:35 -07:00
Emil Sjolander c43a3f5d84 Default scrollview to flexShrink to allow views below it
Summary: Changing from flex -> flexGrow on Scrollview caused some layouts to break due to having views below the scrollview. Adding flexShrink allows for the behavior again.

Reviewed By: blairvanderhoof

Differential Revision: D3936963

fbshipit-source-id: 0f43e6f5148918d3d431b98d26d185bbcc1548d0
2016-09-28 10:13:37 -07:00
Jagdeep Nagpal e083f9a139 Fix missing static images when using data binding
Summary:
**Motivation**
Images not getting bundled when data binding is enabled in gradle in Android projects.
So to fix it running the bundle task before ```dataBindingProcessLayouts``` gradle task

**Test plan**

Example project with data binding enabled

https://github.com/jaggs6/rn_data_binding (master)

note in ```app/build.gradle```
```
dataBinding {
   enabled = true
}
```
when the app is running in debug you will see the following
![screenshot_1474456348](https://cloud.githubusercontent.com/assets/1941517/18708823/b11e306c-7ff4-11e6-89c9-5b74f0f5d1c6.png)

and when installing and running a release variant (```./gradlew uninstallAll clean installRelease```) you will see this

![screenshot_1474456603](https://cloud.githubusercontent.com/assets/1941517/18708926/4658991a-7ff5-11e6-9a29-78333504b20f.png)
(note the missing image)

to fix this problem I added the fix in react.gradle file and moved it into the project (branch master_working)

here is the compare https://github.com/jaggs6/rn_d
Closes https://github.com/facebook/react-native/pull/10017

Differential Revision: D3936552

Pulled By: bestander

fbshipit-source-id: 9ed9181eb331668de15745b1e06fcf6f79cebb0f
2016-09-28 04:28:38 -07:00
Andrei Coman 404b7cc069 BREAKING: Fix modal resizing on keyboard show
Summary:
This changes modal behavior to resize when the keyboard appears/disappears.
Previously, the modal would not react in any way, or it would pan above to bring the
TextInput into view. Resizing is the correct behavior for android.

This is not trivial, as in, setting the flag, because of the combination of
react native laying out all views and the system reacting to the keyboard
appearance in a weird way. Namely:
- if `windowTranslucentStatus` is not set, the system will just call
  `onSizeChanged` on the dialog's content view, and everything works nicely
- with `windowTranslucentStatus` set, the system will consider the dialog as a
  full screen view that doesn't resize. In order for it to resize, the base
  view of the layout needs to have
  `setFitsSystemWindows(true)` called on it. This is needed, so that the system
  can call layout on that base view with the new value of `paddingBottom` that
  coincides with the height of the keyboard. Neat.

We fix this by wrapping our existing content view (mHostView) in a simple
FrameLayout that has `setFitsSystemWindows` set. That way, `mHostView` will have
`onSizeChanged` called on itself with the correct new size of the dialog.

This has the fortunate consequence of our layout now also getting `paddingTop` as the size of the
status bar, which means that we can remove the JS `top` hack in Modal, which
was necessary for no view getting drawn under the status bar.

This behavior is set as default, since that is the default correct Android behavior.

Reviewed By: astreet

Differential Revision: D3913784

fbshipit-source-id: 4378ada21f466dc7ac6e357abeca10b88009ca3f
2016-09-28 02:58:37 -07:00
Marc Horowitz fc62b00880 Update tests to work better with async runJSBundle
Reviewed By: bestander

Differential Revision: D3932963

fbshipit-source-id: 16967987b3f777104ab3a41d5967ff1b2f4678db
2016-09-27 14:58:41 -07:00
David Aurelio ba8066d7f3 Disable extra-arrow-initializer rule in node directories
Reviewed By: bestander

Differential Revision: D3929929

fbshipit-source-id: a78e22104a5ac593d7f396907cb0252d1629870c
2016-09-27 13:43:37 -07:00
Lord Daniel Zautner 95b1fc42b7 Emit willfocus from immediatelyResetRouteStack
Summary:
The Navigator component inconsistently emits the `willfocus` event.

While it is emitted in `Navigator#resetTo`, `Navigator#push`, `Navigator#pop` and event `Navigator#replaceAtIndex` it is not emitted from `Navigator#immediatelyResetRouteStack`. This leads to surprising inconsistencies when working with these events.

With the PR I suggest to emit the `willfocus` event before resetting the route stack.
Closes https://github.com/facebook/react-native/pull/10125

Differential Revision: D3931284

fbshipit-source-id: 6e4f45c6d38426bcd0acc8f8c39478524032a03a
2016-09-27 11:43:32 -07:00
Emil Sjolander b32a857d60 Fix bug introduced by D3886866
Reviewed By: lucasr

Differential Revision: D3923635

fbshipit-source-id: bfeb175bb40393be63cafb6a995b22701b87ffec
2016-09-27 10:14:35 -07:00
Aaron Chiu d22a85211e remove CompositeLazyReactPackage in favor of ReactInstanceManager.Builder's existing ReactPackage list
Reviewed By: andreicoman11

Differential Revision: D3928330

fbshipit-source-id: aee8a7c31d80f5500744029676b9f2b8c87aa98a
2016-09-27 09:58:30 -07:00
Aaron Chiu 1f27dd6643 log into QPL time to create module for lazy native modules
Reviewed By: andreicoman11

Differential Revision: D3928797

fbshipit-source-id: d1c6c024c4994b237155f16e6a915b16f216d56d
2016-09-27 09:43:30 -07:00
Dan Caspi dfcfb90baa Fix [JSValue ...] & [JSContext ...] access with custom JSC
Reviewed By: bnham

Differential Revision: D3859956

fbshipit-source-id: 966aba9a267371eb553b8be574fa247b21930d1c
2016-09-27 09:43:30 -07:00
Konstantin Raev 449c195941 Temporarily disabled CatalystUIManagerTestCase.testFlexWithTextViews test
Summary:
After D3876927 this test started failing on CI.
Locally we can't reproduce it, and it will take some time to understand what this test is intended for so that we could remove the variable part.
More investigation will follow, t13583009

Reviewed By: emilsjolander

Differential Revision: D3930334

fbshipit-source-id: 279f67eb5a77b5d4250afd48c8b94c828da6925c
2016-09-27 07:13:30 -07:00
Douglas Lowder d368ebfab2 Apple TV support 1: existing Objective C code should compile for tvOS
Summary:
First commit for Apple TV support: changes to existing Objective-C code so that it will compile correctly for tvOS.
Closes https://github.com/facebook/react-native/pull/9649

Differential Revision: D3916021

Pulled By: javache

fbshipit-source-id: 34acc9daf3efff835ffe38c43ba5d4098a02c830
2016-09-27 06:28:33 -07:00
Pieter De Baets 339531065f Fix some linter warnings
Reviewed By: majak

Differential Revision: D3930059

fbshipit-source-id: dbbf67f287c46535f9c5947cd7ac101c5c91615e
2016-09-27 06:13:31 -07:00
Andrei Coman 30989dd24a Fix ReactSwipeRefreshLayout
Summary:
`ReactSwipeRefreshLayout` extends `SwipeRefreshLayout` which does not play nice with Android's touch handling system.
There are two problems:
1. `SwipeRefreshLayout` overrides and swallows `requestDisallowInterceptTouchEvent`, which means that Views underneath the `SwipeRefreshLayout` will not interact correctly with parent Views of
`SwipeRefreshLayout`. We've seen this in practice by H-ScrollViews having their touches intercepted by an enclosing ViewPager. This is fixed by passing `requestDisallowInterceptTouchEvent` up to the parents of `SwipeRefreshLayout`.
2. `SwipeRefreshLayout` overrides `onInterceptTouchEvent` and never calls `super.onInterceptTouchEvent`, therefore ignoring the value of `disallowIntercept`. That means that it will intercept some touches when it
shouldn't. One such case is again the H-ScrollView, which should receive all horizontal scrolls and stop `SwipeRefreshLayout` from intercepting any touch events after scrolling. Currently, after the H-ScrollView starts scrolling, it is still possible to get the `SwipeRefreshLayout` to detect and emit refresh events. This is fixed by checking and blocking on horizontal scrolls.

Reviewed By: foghina

Differential Revision: D3929893

fbshipit-source-id: e6f8050fb554e53318a7ca564c49c20cb5137df9
2016-09-27 04:28:34 -07:00
Martin Kralik cfae3e376d fixed crash when setting custom shadow props to null
Reviewed By: emilsjolander

Differential Revision: D3923634

fbshipit-source-id: 005e316e70fa280960c796375b2e94f9967a089d
2016-09-27 03:43:34 -07:00
Kevin Gozali 0a0dd30c6a Introduced AnimatedDivision
Summary:
Combining 2 animated values via addition, multiplication, and modulo are already supported, and this adds another one: division.
There are some cases where an animated value needs to invert (1 / x) another animated value for calculation. An example is inverting a scale (2x --> 0.5x), e.g.:

```
const a = Animated.Value(1);
const b = Animated.divide(1, a);

Animated.spring(a, {
  toValue: 2,
}).start();
```

`b` will then follow `a`'s spring animation and produce the value of `1 / a`.

The basic usage is like this:

```
<Animated.View style={{transform: [{scale: a}]}}>
  <Animated.Image style={{transform: [{scale: b}]}} />
<Animated.View>
```

In this example, the inner image won't get stretched at all because the parent's scaling gets cancelled out.

Also added this to native animated implementation.

Reviewed By: foghina, mmmulani

Differential Revision: D3922891

fbshipit-source-id: 32508956c4b65b2deb7574d50a10c85b4809b961
2016-09-26 16:43:51 -07:00
Héctor Ramos 9af620bc33 Split up releases by type
Summary:
The documentation archive page gets a lot of traffic relative to other docs, yet the current version does not provide much context on each release.

This PR attempts to clarify the purpose for each type of release, making it clear that users should mostly only care about the latest stable version.

![screencapture-localhost-8079-react-native-versions-html-1474917898998](https://cloud.githubusercontent.com/assets/165856/18848683/57cf20e0-83e4-11e6-961e-b93ab1c5fde5.png)
Closes https://github.com/facebook/react-native/pull/10118

Differential Revision: D3927320

Pulled By: JoelMarcey

fbshipit-source-id: c713e3ee65ad1a1fc23f112ec93f277fe981a5fa
2016-09-26 16:14:11 -07:00
Marc Horowitz 97e3c091f8 Sync support for new ios bridge
Reviewed By: javache

Differential Revision: D3897528

fbshipit-source-id: f30d2b1c490c1a9f7fc1f136858e6c7a146b9ca2
2016-09-26 16:14:11 -07:00
Marc Horowitz d7a2d3a957 Add API for sync function calls
Reviewed By: javache

Differential Revision: D3897526

fbshipit-source-id: cadead316996ca7c1dd2b0d60d87945f5452640c
2016-09-26 16:14:11 -07:00
Marc Horowitz 6071e8ca2c Support sync loading of the initial bundle/source
Reviewed By: javache

Differential Revision: D3897521

fbshipit-source-id: a4f234c7003a5f4be952d315eb62f382836e24dc
2016-09-26 16:14:11 -07:00
Marc Horowitz 51df83d7d5 Move batchedbridge start out of init
Reviewed By: javache

Differential Revision: D3913304

fbshipit-source-id: 7d9b5b352d95dd770757cc99dddcce510cdd4909
2016-09-26 16:14:11 -07:00
Marc Horowitz 971cda8794 Move thread jump for js loading into NativeToJSBridge, out of platform code
Reviewed By: javache

Differential Revision: D3906009

fbshipit-source-id: b9782a6c209e3c1626899dac7fd50233cdef87f3
2016-09-26 16:14:10 -07:00
Antti Moilanen 72e203bf95 Fix ScrollView's snap index when scrolling forward and user taps the screen again while still scrolling
Summary:
Currently when snapping is used with ScrollView it calculates wrong snap index if user taps the screen second time while ScrollView is still scrolling. This happens because the code only adds 1 to the snap index when translationAlongAxis is smaller than zero. When user taps screen second time the translationAlongAxis is 0 and snap index ends up being one less than it should. This causes the ScrollView to scroll one step backwards.

Bug can be reproduced with the new examples I added to UIExplorer's ScrollView in [scrollview-snap-bug-example branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example).

Fix can be verified by running the same examples with the ScrollView fix in [scrollview-snap-bug-example-with-fix branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example-with-fix).

![scrollview-bug](https://cloud.githubusercontent.com/assets/150881/14427555/10d59d1e-fffe-11
Closes https://github.com/facebook/react-native/pull/6906

Differential Revision: D3927123

Pulled By: majak

fbshipit-source-id: 38828cc60a02a754bdc3ec72fb98d8777917f15e
2016-09-26 16:14:10 -07:00
Mehdi Mulani 0ce2bbdd64 Fix Modal to handle in-call status bar
Summary: Changing the Modal's presentation style ensures that UIKit correctly adjusts its bounds when entering/exiting the in-call status bar.

Reviewed By: fkgozali

Differential Revision: D3916167

fbshipit-source-id: a0bea60751744ac082ba6ec38177fb093a8f2be5
2016-09-26 15:58:29 -07:00
Emil Sjolander b644b426af Fix RN instrumentation tests
Reviewed By: bestander

Differential Revision: D3924964

fbshipit-source-id: 8f925d4239ea3471bc3984ea05d48a5cd1b96f5a
2016-09-26 11:58:35 -07:00
Ryan Gomba 9462a73189 Value offsets
Summary:
This diff adds support for value offsets on iOS. It separates out code originally submitted in #9048.

Test plan (required)

Set up an animation with an offset, and `useNativeModule: true`. Compare results with `useNativeModule: false`.
Closes https://github.com/facebook/react-native/pull/9627

Differential Revision: D3924410

fbshipit-source-id: 8177a25a5f6b9e33f00ea66143c782aeea24507d
2016-09-26 10:28:35 -07:00
David Aurelio 7a02b400be Update source-map to v0.5.6
Summary: The newer versions of `source-map` fixed some bugs related to decoding mappings.

Reviewed By: bestander

Differential Revision: D3923727

fbshipit-source-id: cc1c87bbadeb128316965823d81ef5ca46a6845c
2016-09-26 09:13:33 -07:00
Jean Bertrand 251f65263c Fix documentations to build application in production
Summary:
The Xcode menu where you can `Edit Scheme` is called `Product` and not `Project`.

![capture d ecran 2016-09-26 a 12 20 30](https://cloud.githubusercontent.com/assets/1385737/18830997/a385fbfe-83e3-11e6-9a03-ef542b3da00d.png)
Closes https://github.com/facebook/react-native/pull/10111

Differential Revision: D3924147

Pulled By: hramos

fbshipit-source-id: 6e1f642524c91c80fcd1cd393d117c770cfae40e
2016-09-26 08:43:47 -07:00
Emil Sjolander 0a9b6bedb3 BREAKING - Fix unconstraint sizing in main axis
Summary:
This fixes measuring of items in the main axis of a container. Previously items were in a lot of cases measured with UNSPECIFIED instead of AT_MOST. This was to support scrolling containers. The correct way to handle scrolling containers is to instead provide them with their own overflow value to activate this behavior. This is also similar to how the web works.

This is a breaking change. Most of your layouts will continue to function as before however some of them might not. Typically this is due to having a `flex: 1` style where it is currently a no-op due to being measured with an undefined size but after this change it may collapse your component to take zero size due to the implicit `flexBasis: 0` now being correctly treated. Removing the bad `flex: 1` style or changing it to `flexGrow: 1` should solve most if not all layout issues your see after this diff.

Reviewed By: majak

Differential Revision: D3876927

fbshipit-source-id: 81ea1c9d6574dd4564a3333f1b3617cf84b4022f
2016-09-26 06:13:56 -07:00
Matej Matiasko 295ee16430 Fix View documentation typo
Summary:
Fix typo in View component documentation.
Closes https://github.com/facebook/react-native/pull/10097

Differential Revision: D3923619

Pulled By: davidaurelio

fbshipit-source-id: ebe63eec8ebdb36cfa7e3f501a214b9e11b17aef
2016-09-26 06:13:55 -07:00
Andrei Coman 0abaaeead0 Modal: move style to xml
Summary:
The styles that get applied to the Dialogs that are created in RN are set in
`themes.xml`, so I'm moving `windowTranslucentStatus` there as well so that we
have all of them collocated.

Reviewed By: astreet

Differential Revision: D3913402

fbshipit-source-id: 8f23e84fb017c8810634ffe8279171061292b351
2016-09-26 03:59:09 -07:00
leeight 7fd9e77837 Remove duplicate call delegate->moduleNames()
Summary: Closes https://github.com/facebook/react-native/pull/9962

Differential Revision: D3923050

fbshipit-source-id: 59e05e673835beb7409512195170c9a1e20a9ea1
2016-09-26 01:43:41 -07:00
Lord Daniel Zautner 9584480261 Remove unnecessary double test in Navigator
Summary:
_renderScene would unnecessary test if `this.state.transitionFromIndex != null` twice.

The left side and right side of the 'or' statement would always be the same.

For cleaner code I suggest to remove it.
Closes https://github.com/facebook/react-native/pull/10042

Differential Revision: D3923058

fbshipit-source-id: 7466c1f0f24eac3f9f296debd9a5e9f5320aea28
2016-09-26 01:43:41 -07:00
Guilherme Bruzzi 8adf78ffc9 FIX #9617 - Correct find local IP address when running on iOS device
Summary:
React native's reload javascript option doesn't always work on iOS devices since version 0.29, as described in https://github.com/facebook/react-native/issues/9617

It only doesn't work when you have a mac on a wireless connection, because react-native-xcode.sh can't find your IP address correctly in this case and will just fallback to use the pre-bundling option on your app.

This small change in react-native-xcode.sh fixed this issue for our project and should fix this issue for all mac users that use wireless connection and that will run a debug version of the app on a real iOS device.
Closes https://github.com/facebook/react-native/pull/9964

Differential Revision: D3923035

fbshipit-source-id: 436cfa2103e10221270034233552ce34720505d3
2016-09-26 01:28:21 -07:00
Li Zheng 2289909374 Fix ENOENT when react-native init with --verbose on Windows
Summary:
As PR #5171 was reverted in 521bd03f0a for breaking reason, ENOENT again in issues #5169 , this commit fix it ref to https://github.com/nodejs/node-v0.x-archive/issues/2318#issuecomment-249355505 , and this is the smallest change in file to fix such Windows platform specific bug tdzl2003 mkonicek snowdream sunnylqm
Closes https://github.com/facebook/react-native/pull/10086

Differential Revision: D3919761

Pulled By: bestander

fbshipit-source-id: b878bbade8142a87bd6703d485e501eb28761af5
2016-09-24 17:58:31 -07:00
Héctor Ramos 9f792c2bae Fix footer background issues in the blog index.
Summary:
Fixes #10091.

Some now unused CSS is removed here as well.
Closes https://github.com/facebook/react-native/pull/10092

Differential Revision: D3919399

Pulled By: hramos

fbshipit-source-id: ed29c4a3e1ba01d930013db04862bce3fa4c5cbb
2016-09-24 13:50:19 -07:00
KG32 100a31412f Update Upgrading.md
Summary:
Docs upgrading section - changed 0.31 to 0.34.
Closes https://github.com/facebook/react-native/pull/10085

Differential Revision: D3919253

fbshipit-source-id: b0dc34ba8d5f97dca8de2def15c7059d40eadc37
2016-09-24 11:28:31 -07:00
Konstantin Raev 3a2bb3dbc5 Disabled jest tests in e2e
Summary:
Currently too much noise is coming because of broken tests
Closes https://github.com/facebook/react-native/pull/10083

Differential Revision: D3919029

Pulled By: davidaurelio

fbshipit-source-id: e75bb38d4be1c8427dfa0c3f6df60d04582ddb2c
2016-09-24 06:13:35 -07:00
Héctor Ramos b2821c3345 Add footer
Summary:
Add footer to all pages in the website.

Preview:
![screencapture-localhost-8079-react-native-docs-network-html-1474655915887](https://cloud.githubusercontent.com/assets/165856/18797357/76a92e48-8182-11e6-8db7-74f241a9fa2c.png)
Closes https://github.com/facebook/react-native/pull/10075

Differential Revision: D3917827

Pulled By: lacker

fbshipit-source-id: f8a38feed616c4a05c29c9efef31d40ce93b5fd5
2016-09-23 19:58:32 -07:00
Aaron Chiu 1b2d9a858b add perf marker for create module
Reviewed By: andreicoman11

Differential Revision: D3910533

fbshipit-source-id: 645da63ac9fb0721f13eba05f52ae2c37a868f60
2016-09-23 16:58:30 -07:00
Erik Arvidsson 24c72f513e XMLHttpRequest.getAllResponseHeaders should use CRLF
Summary:
XMLHttpRequest.prototype.getAllResponseHeaders was previously joining
the headers with `\n`. The spec at:

https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method

step 3.2, requires the headers to be joined using `\r\n`.
Closes https://github.com/facebook/react-native/pull/10034

Differential Revision: D3917020

fbshipit-source-id: f4e920f6bebacc3aa5c52c84348157d2b530480f
2016-09-23 16:28:56 -07:00
Erik Arvidsson 1142d9d059 Remove unused/invalid Flow suppression
Summary:
The suppression comment was not formatted correctly and thus not
used.
Closes https://github.com/facebook/react-native/pull/10076

Differential Revision: D3917036

fbshipit-source-id: 92927993fb7223dc131d82096ca92017aea5f1aa
2016-09-23 16:28:56 -07:00
Ian Levesque 0cfc38a59f Ignore another autogenerated folder.
Summary:
This folder contains only autogenerated files but was missing from the gitignore.
Closes https://github.com/facebook/react-native/pull/10022

Differential Revision: D3917014

fbshipit-source-id: 0a5ab629a327d6800703e1e1a5494bdfa3464c43
2016-09-23 15:58:46 -07:00
Aaron Chiu 797ca6c219 Add ability to lazy load Native Java Modules
Summary: Utilizes the build time annotation processor ReactModuleSpecProcessor that creates ReactModuleInfos for modules annotated with ReactModule and listed in the ReactModuleList annotation of LazyReactPackages. This way we don't have to instantiate the native modules to get the name, canOverrideExistingModule, and supportsWebWorkers values of the native modules. In the NativeModuleRegistry, we either store these ReactModuleInfos inside of a ModuleHolder or if we can't get the ReactModuleInfo for a specific module we instantiate that module to get the values (as we previously did) to store in a LegacyModuleInfo.

Reviewed By: astreet

Differential Revision: D3796561

fbshipit-source-id: f8fb9b4993f59b51ce595eb2f2c3425129b28ce5
2016-09-23 15:58:46 -07:00
Michał Ordon 1f9b765f81 Remove rnpm references in favour of react-native
Summary:
No need for the references now that rnpm is baked into core.
Closes https://github.com/facebook/react-native/pull/10069

Differential Revision: D3914945

fbshipit-source-id: bdf9aac03a6544bec1f18b9a80f26638ee508e16
2016-09-23 11:58:39 -07:00
Héctor Ramos 7dff5d2e30 Load React Native Web Player from MaxCDN.
Summary:
unpkg (nee npmcdn) will [no longer serve HTML content with the text/html Content-Type](https://twitter.com/mjackson/status/779147399528718336). We need to switch to another provider to continue supporting the RN Web Player.
Closes https://github.com/facebook/react-native/pull/10072

Differential Revision: D3914585

Pulled By: lacker

fbshipit-source-id: 69833c157775f2b255f1cd11c5b52140d12a27be
2016-09-23 11:28:33 -07:00
Pieter De Baets 76c54847bb Extract native module logic from BatchedBridge
Reviewed By: lexs

Differential Revision: D3901630

fbshipit-source-id: c119ffe54a4d1e716e6ae98895e5a3a48b16cf43
2016-09-23 11:14:11 -07:00
Pieter De Baets 31b158c9fe Export native modules without RCT or RK prefix
Reviewed By: mmmulani

Differential Revision: D3901600

fbshipit-source-id: 7d4a027f0f2478e2a9ac9916326b91279bec3cb3
2016-09-23 11:14:11 -07:00
Pieter De Baets ff79224d37 Simplify ModuleConfig array format
Reviewed By: lexs, mhorowitz

Differential Revision: D3901563

fbshipit-source-id: 70aea19db1b01170be57b74ccfa1a306dfa1f362
2016-09-23 11:14:10 -07:00
Pieter De Baets acdd08aef7 Add flow-typing to MessageQueue
Reviewed By: majak

Differential Revision: D3901545

fbshipit-source-id: a9ccc3d11794830e21c778df0ae7100d79f7ee73
2016-09-23 11:14:10 -07:00
Joel Marcey 53c9dbabaf Remove survey banner.
Summary:
We have gathered enough data to determine whether our docs direction
was the right approach.
Closes https://github.com/facebook/react-native/pull/10071

Differential Revision: D3914445

Pulled By: hramos

fbshipit-source-id: 64bd507d3ac6dda5dd1b5c1be611c7a71a278ffd
2016-09-23 11:14:10 -07:00
Fred Liu 4c2fa7e4ee Remove unused state variable
Reviewed By: furdei

Differential Revision: D3909633

fbshipit-source-id: 9e4376ce3eb3e49d0330a625b44fa62a96c9ba91
2016-09-23 10:28:40 -07:00
Mike Grabowski db06fc6814 Better release script
Summary: Automatically tags and publish them upstream, less steps required in order to do the release rather than just `bump-oss-version.js`

Differential Revision: D3913826

Pulled By: bestander

fbshipit-source-id: 6e023e7ab7b486ff6e6cc8e946f19e10a7ceeef8
2016-09-23 08:28:35 -07:00
Ovidiu Viorel Iepure 23d84c8df8 Remove platform blacklists
Summary: File platform identifiers (`fileName.<platform>.js`) are no longer part of the blacklist regular expression. This allows the upcoming `jest-haste-map` to include all files for all platforms, therefore enabling Packager to build bundles for different platforms using the same `HasteMap`(jest-haste-map) instance.

Reviewed By: davidaurelio

Differential Revision: D3907508

fbshipit-source-id: d7d7f3bd93287a634a1ef0590a736d021be2aaa5
2016-09-23 08:13:46 -07:00
282 changed files with 7706 additions and 2416 deletions
+5 -2
View File
@@ -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
View File
@@ -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
+1
View File
@@ -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
View File
@@ -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 = (
@@ -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

@@ -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

+2 -1
View File
@@ -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.
+1 -1
View File
@@ -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);
+41 -1
View File
@@ -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(
+4 -8
View File
@@ -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;
@@ -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);
});
});
+124 -1
View File
@@ -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',
+16 -8
View File
@@ -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),
+2 -2
View File
@@ -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
+26 -11
View File
@@ -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,
+3 -2
View File
@@ -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 = (
+14 -5
View File
@@ -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 = (
+10 -5
View File
@@ -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>
);
@@ -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 = (
+10
View File
@@ -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:)]) {
+1 -1
View File
@@ -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 = (
+14 -1
View File
@@ -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 = (
+7 -1
View File
@@ -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]),
+67 -204
View File
@@ -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;
+12 -27
View File
@@ -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;
@@ -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 = (
+4 -1
View File
@@ -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
View File
@@ -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
+51 -15
View File
@@ -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 {
+6
View File
@@ -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
+16
View File
@@ -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
View File
@@ -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
+9
View File
@@ -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
+4
View File
@@ -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;
+6 -1
View File
@@ -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, (@{
+6 -6
View File
@@ -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;
}
+22
View File
@@ -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
+105
View File
@@ -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
-8
View File
@@ -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);
-25
View File
@@ -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
View File
@@ -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
+13
View File
@@ -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
+12 -4
View File
@@ -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
+22
View File
@@ -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
/**
+10 -3
View File
@@ -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;
+1 -1
View File
@@ -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;
}
+8
View File
@@ -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
+17 -54
View File
@@ -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
+8
View File
@@ -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()
+4 -1
View File
@@ -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
View File
@@ -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)
{
+8
View File
@@ -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
}
+4 -1
View File
@@ -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
+1
View File
@@ -18,6 +18,7 @@
RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
@"default": @(UIStatusBarStyleDefault),
@"light-content": @(UIStatusBarStyleLightContent),
@"dark-content": @(UIStatusBarStyleDefault),
}), UIStatusBarStyleDefault, integerValue);
RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{
-1
View File
@@ -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;
+13 -2
View File
@@ -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,
+8 -4
View File
@@ -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
}
}
}];
+302
View File
@@ -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