Граф коммитов

324 Коммитов

Автор SHA1 Сообщение Дата
Ramanpreet Nara cb1171b37a Update iOS Simulator OS version to 12.4
Summary:
It looks like Sandcastle is now using version iOS v12.4 for the iOS simulator. This is causing `test-react-native-oss-ios-legocastle.sh` to fail. See [this build failure](https://our.intern.facebook.com/intern/sandcastle/job/31525197549441452/).

```
Failure Found: react-native-oss-ios - Test: Run RNTesterPods Integration Tests
stdout:
User defaults from command line:
    IDETestRunOnlyIdentifiers = (
    RNTesterUnitTests
)
    IDETestRunSkipIdentifiers = (
    "RNTesterIntegrationTests/RNTesterSnapshotTests",
    "RNTesterIntegrationTests/RNTesterIntegrationTests/testWebSocketTest"
)
Build settings from command line:
    RN_BUNDLE_PREFIX = react-native-github/
    SDKROOT = iphonesimulator12.4
stderr:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:iOS Simulator, OS:12.2, name:iPhone 6s }
	The requested device could not be found because no available devices matched the request.
	Available destinations for the "RNTester" scheme:
		{ platform:iOS Simulator, id:5E437CA6-5FB6-4AB3-BF7B-F04B2BEACE3A, OS:12.4, name:iPad (5th generation) }
		{ platform:iOS Simulator, id:054F7E3D-F1BC-48BF-8C0E-FD047CD8145D, OS:12.4, name:iPad (6th generation) }
		{ platform:iOS Simulator, id:FF1DE07E-6DB8-43DB-AF89-A788054639EB, OS:12.4, name:iPad Air }
		{ platform:iOS Simulator, id:257E7F9D-436C-4D3F-934F-AF87C3FD9C57, OS:12.4, name:iPad Air (3rd generation) }
		{ platform:iOS Simulator, id:8CA6B68A-A191-406A-B75C-6EA61762E503, OS:12.4, name:iPad Air 2 }
		{ platform:iOS Simulator, id:2250ACFE-B7C9-47F8-AB9D-76BCAD2EA623, OS:12.4, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:89BA7B06-DA47-4EB3-8154-282BC9606884, OS:12.4, name:iPad Pro (10.5-inch) }
		{ platform:iOS Simulator, id:5AFD752C-7994-4343-8936-3045D4EA4098, OS:12.4, name:iPad Pro (11-inch) }
		{ platform:iOS Simulator, id:BE6D8220-5E32-47DB-9403-91F4649851EA, OS:12.4, name:iPad Pro (12.9-inch) }
		{ platform:iOS Simulator, id:820B2496-B679-4EE9-950B-826BF129817E, OS:12.4, name:iPad Pro (12.9-inch) (2nd generation) }
		{ platform:iOS Simulator, id:0F257958-76B4-43B8-BA9D-C7E2C1137D19, OS:12.4, name:iPad Pro (12.9-inch) (3rd generation) }
		{ platform:iOS Simulator, id:CAF47FC7-A1A8-4503-958E-F6A3094650C4, OS:12.4, name:iPad mini (5th generation) }
		{ platform:iOS Simulator, id:855BEDAC-6E5F-4638-85B3-B52A538CCB44, OS:12.4, name:iPad mini 2 }
		{ platform:iOS Simulator, id:C0060E26-DBC0-4904-B60A-825FA610BA12, OS:12.4, name:iPad mini 3 }
		{ platform:iOS Simulator, id:5A56D7DD-14A7-4E1F-B672-969C67D0BC5D, OS:12.4, name:iPad mini 4 }
		{ platform:iOS Simulator, id:17E11CDB-62CD-4CFA-827C-9499233845AF, OS:12.4, name:iPhone 5s }
		{ platform:iOS Simulator, id:9D0E91A4-B302-4262-A4B8-700D77187739, OS:12.4, name:iPhone 6 }
		{ platform:iOS Simulator, id:3A02CF93-4216-4294-BCA4-8D373DEA773F, OS:12.4, name:iPhone 6 Plus }
		{ platform:iOS Simulator, id:8B07790E-16E6-4469-9523-4AD7A7C89683, OS:12.4, name:iPhone 6s }
		{ platform:iOS Simulator, id:097F6248-9244-487C-B0E3-D4BA1878B2A6, OS:12.4, name:iPhone 6s Plus }
		{ platform:iOS Simulator, id:450708A9-08E0-48A4-8581-B0B13AE5B705, OS:12.4, name:iPhone 7 }
		{ platform:iOS Simulator, id:C6A991EC-6A3A-4E9F-91F5-701F72594E00, OS:12.4, name:iPhone 7 Plus }
		{ platform:iOS Simulator, id:5F40F20C-88F4-4C00-A793-916CE9F6AB36, OS:12.4, name:iPhone 8 }
		{ platform:iOS Simulator, id:464700B3-E305-4A89-9FEC-462FC157FBF2, OS:12.4, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:66C1DB35-A629-4F2F-A312-FF589E0CEF7F, OS:12.4, name:iPhone SE }
		{ platform:iOS Simulator, id:71121451-3E76-465F-9DDC-26B935A7828B, OS:12.4, name:iPhone X }
		{ platform:iOS Simulator, id:1E0BE5F8-2075-4E19-A9F1-A307E0EF4808, OS:12.4, name:iPhone Xs }
		{ platform:iOS Simulator, id:646D550E-770B-4D00-84B1-BF711C978E80, OS:12.4, name:iPhone Xs Max }
		{ platform:iOS Simulator, id:B0511543-649C-43E8-9782-17C559C19E65, OS:12.4, name:iPhone Xʀ }
	Ineligible destinations for the "RNTester" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
```

This diff updates the version to 12.4, as suggested by the above logs.

build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

Differential Revision: D18218399

fbshipit-source-id: 6625f94f249721396ef82641f628f399ebfd5302
2019-10-29 18:10:58 -07:00
Yoga Setiawan d7c222a6a7 Update Broken Link #devcjog25 (#27025)
Summary:
Update broken link  https://github.com/facebook/react-native/blob/master/react-native-cli/CONTRIBUTING.md to https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md
## Changelog
Pull Request resolved: https://github.com/facebook/react-native/pull/27025

Differential Revision: D18173631

Pulled By: cpojer

fbshipit-source-id: c3634c43c4de7e39e56ec31ef17b9f31db517128
2019-10-28 12:11:45 -07:00
Andres Suarez aee88b6843 Tidy up license headers [3/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952693

fbshipit-source-id: 8fcb8e58a2e04e7a3169f4d525bffc00835768e6
2019-10-16 10:06:34 -07:00
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Andres Suarez e1cfeaddd4 Move non-license comments out of license header
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: cpojer

Differential Revision: D17749100

fbshipit-source-id: edca9c73a065e9fc311109cd6efeb1f75451a55a
2019-10-15 20:12:12 -07:00
Ramanpreet Nara 4c998fd05d Rename JSCallInvoker{,Holder} to CallInvoker{,Holder}
Summary:
## Motivation
The concept behind JSCallInvoker doesn't necessarily have to apply only to the JS thread. On Android, we need to re-use this abstraction to allow execution of async method calls on the NativeModules thread.

Reviewed By: PeteTheHeat

Differential Revision: D17377313

fbshipit-source-id: 3d9075cbfce0b908d800a366947cfd16a3013d1c
2019-09-20 10:52:56 -07:00
Eli White eb7dbc8532 Generate doc info for RN components
Summary:
We used to generate the documentation for the website but moved the docs to another repo.

There is some work on the docs to be able to ingest info from this repo in order to go back to generating API information. The current thinking is we will generate this JSON file and the website repo will pull it in to generate the docs.

I plan to make the script run on CI and fail if the generated file isn't updated, in a follow up PR.

Reviewed By: zackargyle

Differential Revision: D17183936

fbshipit-source-id: 99ce3fa5d7becc0ef20df5d439b175eedbe546f3
2019-09-19 18:36:25 -07:00
empyrical ca0d87db6e Update generate-rncore.sh for more recent versions of codgen (#26477)
Summary:
This pull request makes the following changes to the script `scripts/generate-rncore.js`:

 * Adds a missing argument to the call of `generate-tests.js`
 * Ran `chmod +x generate-rncore.sh` so the script is executable

## Changelog

[Internal] [Fixed] - Updated `generate-rncore.sh` for recent versions of codegen
Pull Request resolved: https://github.com/facebook/react-native/pull/26477

Test Plan: `(cd scripts && ./generate-rncore.sh)` works perfectly now.

Differential Revision: D17439772

Pulled By: TheSavior

fbshipit-source-id: 141efc54aa45aa38dc537f65e425959666f33b3a
2019-09-17 18:48:10 -07:00
Ram N 82a8080f07 Change podspec name of yoga to Yoga
Summary:
Needed to capitalize the name, since this is the convention used elsewhere too

## Changelog:

[iOS] [Changed] - Renamed yoga podspec to Yoga

Reviewed By: shergin

Differential Revision: D17127104

fbshipit-source-id: 14047bf452edda000037701f4ba7f4a02a0e717b
2019-08-30 07:12:34 -07:00
Christoph Nakazawa 88d0ac17e8 Metro Bundler -> Metro
Summary: This bothers me, we renamed the project to drop the "Metro" a while ago.

Reviewed By: rubennorte

Differential Revision: D16831281

fbshipit-source-id: bb6de412eccda61b617580f3660e3e635f2d2815
2019-08-16 10:37:10 -07:00
cpojer d7f5153cd8 Add Hermes support to React Native on Android (#25613)
Summary:
Yesterday we shipped hermesengine.dev as part of the current 0.60 release. This PR brings those changes to master.

## Changelog

[General] [Added] - Added support for Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/25613

Test Plan:
* CI is green both on GitHub and at FB
* Creating a new app from source can use Hermes on Android

Reviewed By: cpojer

Differential Revision: D16221777

Pulled By: willholen

fbshipit-source-id: aa6be10537863039cb666292465ba2e1d44b64ef
2019-07-25 23:05:53 -07:00
James Treanor ca9e108110 Remove 's.static_framework = true' requirement for podspec (#25816)
Summary:
As part of the fix for https://github.com/facebook/react-native/issues/25349 I added `s.static_framework = true` to each podspec in repo (see https://github.com/facebook/react-native/pull/25619#discussion_r306993309 for more context).

This was required to ensure the existing conditional compilation with `#if RCT_DEV` and `__has_include` still worked correctly when `use_frameworks!` is enabled.

However, fkgozali pointed out that it would be ideal if we didn't have this requirement as it could make life difficult for third-party libraries.

This removes the requirement by moving `React-DevSupport.podspec` and `React-RCTWebSocket.podspec` into `React-Core.podspec` as subspecs. This means the symbols are present when `React-Core.podspec` is built dynamically so `s.static_framework = true` isn't required.

This means that any `Podfile` that refers to `React-DevSupport` or `React-RCTWebSocket` will need to be updated to avoid errors.

## Changelog

I don't think this needs a changelog entry since its just a refinement of https://github.com/facebook/react-native/pull/25619.
Pull Request resolved: https://github.com/facebook/react-native/pull/25816

Test Plan:
Check `RNTesterPods` still works both with and without `use_frameworks!`:

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: hramos

Differential Revision: D16495030

Pulled By: fkgozali

fbshipit-source-id: 2708ac9fd20cd04cb0aea61b2e8ab0d931dfb6d5
2019-07-25 11:46:43 -07:00
James Treanor 8131b7bb7b CocoaPods frameworks compatibility: Step 2 (#25619)
Summary:
This is my proposal for fixing `use_frameworks!` compatibility without breaking all `<React/*>` imports I outlined in https://github.com/facebook/react-native/pull/25393#issuecomment-508457700. If accepted, it will fix https://github.com/facebook/react-native/issues/25349.

It builds on the changes I made in https://github.com/facebook/react-native/pull/25496 by ensuring each podspec has a unique value for `header_dir` so that framework imports do not conflict. Every podspec which should be included in the `<React/*>` namespace now includes it's headers from `React-Core.podspec`.

The following pods can still be imported with `<React/*>` and so should not have breaking changes: `React-ART`,`React-DevSupport`, `React-CoreModules`, `React-RCTActionSheet`, `React-RCTAnimation`, `React-RCTBlob`, `React-RCTImage`, `React-RCTLinking`, `React-RCTNetwork`, `React-RCTPushNotification`, `React-RCTSettings`, `React-RCTText`, `React-RCTSettings`, `React-RCTVibration`, `React-RCTWebSocket` .

There are still a few breaking changes which I hope will be acceptable:

- `React-Core.podspec` has been moved to the root of the project. Any `Podfile` that references it will need to update the path.
- ~~`React-turbomodule-core`'s headers now live under `<turbomodule/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-turbomodulesamples`'s headers now live under `<turbomodulesamples/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-TypeSaferty`'s headers now live under `<TypeSafety/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511040967.
- ~~`React-jscallinvoker`'s headers now live under `<jscallinvoker/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- Each podspec now uses `s.static_framework = true`. This means that a minimum of CocoaPods 1.5 ([released in April 2018](http://blog.cocoapods.org/CocoaPods-1.5.0/)) is now required. This is needed so that the ` __has_include` conditions can still work when frameworks are enabled.

Still to do:

- ~~Including `React-turbomodule-core` with `use_frameworks!` enabled causes the C++ import failures we saw in https://github.com/facebook/react-native/issues/25349. I'm sure it will be possible to fix this but I need to dig deeper (perhaps a custom modulemap would be needed).~~ Addressed by 33573511f0.
- I haven't got Fabric working yet. I wonder if it would be acceptable to move Fabric out of the `<React/*>` namespace since it is new? �

## Changelog

[iOS] [Fixed] - Fixed compatibility with CocoaPods frameworks.
Pull Request resolved: https://github.com/facebook/react-native/pull/25619

Test Plan:
### FB

```
buck build catalyst
```

### Sample Project

Everything should work exactly as before, where `use_frameworks!` is not in `Podfile`s. I have a branch on my [sample project](https://github.com/jtreanor/react-native-cocoapods-frameworks) here which has `use_frameworks!` in its `Podfile` to demonstrate this is fixed.

You can see that it works with these steps:

1. `git clone git@github.com:jtreanor/react-native-cocoapods-frameworks.git`
2. `git checkout fix-frameworks-subspecs`
3. `cd ios && pod install`
4. `cd .. && react-native run-ios`

The sample app will build and run successfully. To see that it still works without frameworks, remove `use_frameworks!` from the `Podfile` and do steps 3 and 4 again.

### RNTesterPods

`RNTesterPodsPods` can now work with or without `use_frameworks!`.

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: PeteTheHeat

Differential Revision: D16465247

Pulled By: PeteTheHeat

fbshipit-source-id: cad837e9cced06d30cc5b372af1c65c7780b9e7a
2019-07-24 23:27:09 -07:00
Min ho Kim 84f5ebe4f9 Fix typos (#25770)
Summary:
Fix typos mostly in comments and some string literals.

## Changelog

[General] [Fixed] - Fix typos
Pull Request resolved: https://github.com/facebook/react-native/pull/25770

Differential Revision: D16437857

Pulled By: cpojer

fbshipit-source-id: ffeb4d6b175e341381352091134f7c97d78c679f
2019-07-23 03:23:11 -07:00
Kevin Gozali c1b0f398e6 TM iOS: move jscallinvoker under ReactCommon podspec
Summary:
This essentially changes the header namespace to `<ReactCommon/`
Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: PeteTheHeat

Differential Revision: D16233125

fbshipit-source-id: 83eda4cc50ebb01efd1ce3eb18f47c97a049cffa
2019-07-12 22:44:20 -07:00
Kevin Gozali 6e7ce9c082 TM iOS: refactor header dir for TM
Summary:
For better cocoapods compatibility, refactored TM podspec to be a subspec of ReactCommon, then use `<ReactCommon/` header prefix for all TM files.

Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: hramos

Differential Revision: D16231697

fbshipit-source-id: 38d3418b19978ff54aa0c61b064ac45ac0e1c36c
2019-07-12 22:44:20 -07:00
Jeff Thomas 9645328606 Lazily create RCTVersion dict
Summary:
^

No need for a constructor here.

Reviewed By: fkgozali

Differential Revision: D15056802

fbshipit-source-id: 32a2c541e5c1fa6336b7f6f2131772198740626c
2019-07-12 16:51:28 -07:00
Kevin Gozali 0c8c95f4ae iOS: Use RCTTypeSafety header namespace instead of React
Summary: For better compatibility re: https://github.com/facebook/react-native/pull/25393, this target should just use `RCTTypeSafety`

Reviewed By: PeteTheHeat

Differential Revision: D16210888

fbshipit-source-id: 6a55d631453cc420909247a7d5a64379587225b7
2019-07-12 14:30:11 -07:00
Kevin Gozali 79a7828b91 deprecate iOS .xcodeproj (#25583)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25583

We now use CocoaPods for better maintainability.

Reviewed By: hramos

Differential Revision: D16193719

fbshipit-source-id: 26382f2da4eaba14a71771540b587fdc80b41108
2019-07-11 12:02:39 -07:00
Kevin Gozali 7dc0d4bfee iOS: removed turbo_modules_enabled from autolink
Summary: TurboModule is now included by default, so no need to have a toggle in autolink script anymore.

Reviewed By: mdvacca

Differential Revision: D16173820

fbshipit-source-id: 215ce7d188ce526b5a71df881bdc992c1ef34b34
2019-07-10 10:21:38 -07:00
thecodrr a162554f5d Remove unnecessary flag when running JS server (#25517)
Summary:
This removes the `--projectRoot` flag in `launchPackager.bat` as it was removed,  fixing [this bundler not opening issue on cli repo](https://github.com/react-native-community/cli/issues/484) when `yarn react-native run-android` is run.

This is Windows related only so should be only tested on Windows.

## Changelog

[Internal] [Fixed] - Fixed Metro Bundler not opening when running `yarn react-native run-android`
Pull Request resolved: https://github.com/facebook/react-native/pull/25517

Test Plan:
1. Create a new repo using `react-native init`
2. Edit the `launchPackager.bat` file
3. Run `yarn react-native run-android`

Differential Revision: D16162108

Pulled By: cpojer

fbshipit-source-id: c12d9853ad49f00d56b9a8254a5b2c40a358cb2e
2019-07-09 03:53:26 -07:00
Richard Hyatt 4a5a909264 iOS build - en0 and en1 used when generating ip.txt file (#25462)
Summary:
When `en0` is not assigned and `en1` is in use along with another interface present on the machine that uses a self-assigned address (169.254.xxx.xxx), the ip.txt file contains the self-assigned address. This causes the app reload/debug actions to fail when deployed to a physical device. see https://github.com/facebook/react-native/issues/25460

Code change looks at the value assigned to `en1` if `en0` is not set. If `en1` is not available on the machine or not set, then it will be empty. If both `en0` and `en1` are not set, the existing code was modified exclude addresses that are self-assigned, as they will most likely be unavailable to the connected device (iPhone, iPad, etc.).

## Changelog

[Internal] [Fixed] - en0 and en1 are used when generating the ip.txt file for iOS device debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/25462

Test Plan:
execute `ifconfig`:

```
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
XHC20: flags=0<> mtu 0
XHC0: flags=0<> mtu 0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
	ether 38:f9:d3:0d:aa:fe
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (none)
	status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=60<TSO4,TSO6>
	ether 42:00:84:a8:f6:00
	media: autoselect <full-duplex>
	status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=60<TSO4,TSO6>
	ether 42:00:84:a8:f6:01
	media: autoselect <full-duplex>
	status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=63<RXCSUM,TXCSUM,TSO4,TSO6>
	ether 42:00:84:a8:f6:00
	inet6 fe80::e:80be:b322:79b7%bridge0 prefixlen 64 secured scopeid 0x9
	inet 169.254.209.63 netmask 0xffff0000 broadcast 169.254.255.255
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x2
	member: en2 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 7 priority 0 path cost 0
	member: en3 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 8 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	ether 3a:f9:d3:9a:14:05
	media: autoselect
	status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 38:f9:d3:9a:14:05
	inet6 fe80::1444:113e:d65:5fb3%en1 prefixlen 64 secured scopeid 0xb
	inet 192.168.1.115 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
	ether 0a:f9:d3:9a:14:05
	media: autoselect
	status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
	ether 6a:fe:9d:f0:39:3f
	inet6 fe80::68fe:9dff:fef0:393f%awdl0 prefixlen 64 scopeid 0xd
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
	inet6 fe80::c992:4ed:9399:85bc%utun0 prefixlen 64 scopeid 0xe
	nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
	inet6 fe80::f5de:860a:fd07:ee87%utun1 prefixlen 64 scopeid 0xf
	nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
	inet6 fe80::3115:b6a0:6625:23ee%utun2 prefixlen 64 scopeid 0x11
	nd6 options=201<PERFORMNUD,DAD>
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether e2:33:8e:95:93:9b
	inet6 fe80::cea:8f7a:b379:ebcd%en5 prefixlen 64 secured scopeid 0x10
	inet 169.254.167.11 netmask 0xffff0000 broadcast 169.254.255.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (100baseTX <full-duplex>)
	status: active
```

execute `ipconfig getifaddr en0`:  (produces nothing)

execute `ipconfig getifaddr en1`:
```
192.168.1.115
```

execute `ipconfig getifaddr en99`:  (produces nothing - non-existent case)

existing code `ifconfig | grep 'inet ' | grep -v ' 127.' | cut -d\   -f2  | awk 'NR==1{print $1}'` yields:

```
169.254.209.63
```

modified code ` ifconfig | grep 'inet ' | grep -v ' 127.' | grep -v ' 169.254.' | cut -d\   -f2  | awk 'NR==1{print $1}'` yields:

```
192.168.1.115
```

Differential Revision: D16099639

Pulled By: cpojer

fbshipit-source-id: bd480a5f638efc58611d22cef4ba5193052b713d
2019-07-03 02:39:49 -07:00
Kevin Gozali fde8a4cf93 TM iOS: Set up CocoaPods specs for the TM specs
Summary: This defines various sub specs to support building TurboModules that implement the codegen'ed specs.

Reviewed By: PeteTheHeat

Differential Revision: D16043221

fbshipit-source-id: 27ed532be929c11c8fe648632da8a72061cbc8b0
2019-07-01 15:20:01 -07:00
Wojtek Czekalski f491898a7f Fix rncore generation for React-Fabric.podspec following 98b03fa (#25437)
Summary:
This PR adjusts rncore generation to the flow parser based approach introduced in 98b03fa.

## Changelog

[Internal] [Fixed] - Fix iOS build of RNTester with fabric_enabled
Pull Request resolved: https://github.com/facebook/react-native/pull/25437

Test Plan:
As far as I see currently there's no automated testing for the RNTester build with `fabric_enbaled` set to `true`.

The quickest way to test this PR is building RNTester using cocoapods with `fabric_enabled`.

Differential Revision: D16071362

Pulled By: cpojer

fbshipit-source-id: 05d96686ea2d7c8c04f05eb7840c9eacff5a2738
2019-07-01 03:15:54 -07:00
Héctor Ramos 9ece5bda9b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Changelog:

[iOS] [Changed] - Use RNTesterPods for iOS Tests

Reviewed By: fkgozali

Differential Revision: D16052466

fbshipit-source-id: 724b0c51008882d3c06a9074693fe23e74abe86b
2019-06-28 19:18:10 -07:00
Daryl Johnas Sison 64282fd5b9 Revert D15958209: [RN] [RNTesterPods 5] Use CocoaPods-based RNTesterPods for iOS tests
Differential Revision:
D15958209

Original commit changeset: b51fb907812c

fbshipit-source-id: f0c499d8720ac91d5933c560281788e123269478
2019-06-28 00:57:57 -07:00
Héctor Ramos 39ab66793b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Reviewed By: fkgozali

Differential Revision: D15958209

fbshipit-source-id: b51fb907812cb2d4d78cce445d39bc253ae5acf8
2019-06-27 23:57:45 -07:00
Dan Abramov a52e6d1dbb Unify "Hot Reloading" and "Reload-on-Save" into "Fast Refresh"
Summary:
We have too many options in the Dev Menu, and they're really hard to pick from. They're also somewhat conflicting. This replaces two menu choices that have a similar purpose (faster iteration cycle) with one.

"Fast Refresh" tries to only update the affected modules, but falls back to doing a full reload if the update can't be handled by the React components.

If for some reason you prefer the "Reload-on-Save" behavior, please:

- Reach out to me so I can learn more about your use case.
- As a workaround, you can add `if (__DEV__) require.Refresh.forceFullRefresh = true` to your app's entry point to always do a full refresh.

Also note that I only removed the user-facing part of "Reload-on-Save". So if you have automation depending on it, that's gonna keep working.

I moved it above Systrace since it's a more generic feature.

As a total aside nit, I renamed "Enable Inspector" and "Disable Inspector" to "Show Inspector" and "Hide Inspector" because... that's what those options do, really.

Reviewed By: rickhanlonii

Differential Revision: D15958697

fbshipit-source-id: 20e856d56f661fe4d39b5ab47d8c44754bf70f67
2019-06-24 13:54:39 -07:00
Mehdi Mulani 46bdb4161c Delete fishhook
Summary: Fishhook was used to try to hide the log messages from RCTReconnectingWebSocket but that doesn't really work anymore. Deleting it now to unblock people trying to build for iOS 13.

Reviewed By: cpojer

Differential Revision: D15779390

fbshipit-source-id: ef18575d5d92ac374e189b1267dee3a9befc3551
2019-06-12 06:19:32 -07:00
Dulmandakh 146d1f7578 Bump Android NDK to r19c (#25140)
Summary:
In 2019-6-4 version of Docker Android image, we've added Android NDK r19c. So this PR will change CI to use NDK r19c.

I'll create a PR to website once this merged.

Note: I tried to build RN with NDK 19 while I was setting up my laptop after format, and it worked.

## Changelog

[Android] [Changed] - Bump Android NDK to r19c
Pull Request resolved: https://github.com/facebook/react-native/pull/25140

Differential Revision: D15631301

Pulled By: cpojer

fbshipit-source-id: b9a5600df1dadeba328932b694493960b242c2f7
2019-06-04 13:59:36 -07:00
Héctor Ramos 4a6676dc18 Cache CocoaPods specs-repo (#25095)
Summary:
The `test_end_to_end` job has been timing out due CocoaPods taking too long to check out the Specs repo. This repo is stored at `~/.cocoapods`, therefore by caching this folder we can keep the individual e2e test run from exceeding 10 minutes w/o output.

## Changelog

[Internal] [Added] - Cache CocoaPods
Pull Request resolved: https://github.com/facebook/react-native/pull/25095

Differential Revision: D15587702

Pulled By: hramos

fbshipit-source-id: 6669ff09a5021f012ac8a829db70442d8f7f07e8
2019-05-31 16:50:15 -07:00
Héctor Ramos 171cc0edb7 Migrate to Circle CI 2.1 (#25036)
Summary:
Migrate the Circle CI configuration to the 2.1 schema and take advantage of new config reuse features.

I've enabled pipelines in the facebook/react-native Circle CI project, a requirement for Circle CI 2.1 features.

### Overview

* Use executors to provide a common set of execution environments.
* Use commands to provide reusable steps (running yarn with cache, installing Android dependencies, ...)
* Use parametrized commands/jobs to reuse job definitions for `test_js` and `test_js_lts` where the only difference is the version of node provided by the environment.
* Reduce total execution time by [storing the git repo in a cache as opposed to using workspaces](https://circleci.com/blog/persisting-data-in-workflows-when-to-use-caching-artifacts-and-workspaces/)
* Fix various flaky end-to-end test failures related to CocoaPods and the CLI.
* Move `analyze` job to `analysis` workflow and rename to `analyze_pr`
* Rename `test_javascript` as `test_js`.
* Split up end-to-end test job into `test_ios_e2e` and `test_js_e2e`.

## Changelog

[Internal] [Changed] - Migrate to Circle CI 2.1 and fix e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/25036

Differential Revision: D15565515

Pulled By: hramos

fbshipit-source-id: cfba2154a9fdc96400cbf778bd5d13e9411ee3f8
2019-05-30 15:11:13 -07:00
Rick Hanlon 9e97f71579 Organize files
Summary:
This diff reorganizes some of the code in react-native-codegen as requested in T44120025

There are two new dirs: `scr/cli` and `src/parsers`

```
buck_tests/
src/
  cli/
  generators/
  parsers/
```

We moved anything cli-ish from `buck_tests` to the `src/cli` directory:
```
src/
  cli/
    combine/
      combine_js_to_schema.sh
      combine_js_to_schema-cli.js
      combine_js_to_schema.js
    viewconfigs/
      generate-view-configs-cli.js
      generate-view-configs.js
      generate-view-configs.sh
```

And we created a new `src/parsers` directory that will contain the flow parser and the current schema parser:

```
src/
  parsers/
    flow/
      index.js
    schema/
      index.js
```

This should organize the code a little better and make it easier to contribute 👍

Reviewed By: cpojer

Differential Revision: D15414264

fbshipit-source-id: 376af2e91def033855f6ed72a9a9cc4369c33c7d
2019-05-22 06:02:03 -07:00
Héctor Ramos 9c3f4c021e Bots cleanup, avoid leaving inline reviews when N>5 (#24923)
Summary:
This PR cleans up some of our GitHub bots. The overall goal is to make the contribution process just a tad nicer.

### analysis-bot

* The bot will continue leaving GitHub Reviews when it finds lint issues, but will abstain from leaving inline comments if they would exceed 5 in number.
* The review comment left by the bot has instructions on how to reproduce the lint issues locally. This will educate PR authors on how to run lint and fix the issues without unnecessarily spamming the PR with 50+ comments, while still providing useful reviews to authors when only a handful of lint issues slip by.
* Code moved to `bots/` directory for ease of discovery and co-location with pull-bot.
* Added `yarn lint-ci` command. This seems like the right choice: it's running `yarn lint` and other linters, and it is only intended to run on CI.
* It's still possible to run `yarn lint-ci` locally, though the script will stop short of posting a review to GitHub unless the necessary envvars are provided.
* Added `yarn shellcheck` command. This can be run locally, though it requires `shellcheck` to be installed.
* Outside of this PR, I added instructions on using shellcheck to https://github.com/facebook/react-native/wiki/Development-Dependencies
* Updated Circle CI config to use these new commands, and streamlined the `analyze_pr` step.
* Documented analysis-bot in `bots/README.md`.

### pull-bot

* Bumped `danger-js` dependency. No breaking changes found in this minor bump from what I can tell.
* Documented pull-bot in `bots/README.md`.

### misc

* PR template: don't use jargon.

## Changelog

[Internal] [Changed] - GitHub Bots cleanup
Pull Request resolved: https://github.com/facebook/react-native/pull/24923

Differential Revision: D15399744

Pulled By: hramos

fbshipit-source-id: 32632e775f8554424072270e3f98542de84bfb8c
2019-05-21 19:38:54 -07:00
nossbigg 30a0a03b80 Fix ios/android e2e tests (#24974)
Summary:
Fixes broken ios/android e2e tests for CI.

Changes:
1. Use `npm pack` instead of `yarn pack` during e2e test
2. Update test string assertions in ios/android e2e tests
3. Use `Step One` as candidate for source code replacement to test for page changes (since the "Welcome to React Native" string exists in the `Header` component instead of being on `App.js`)

## Changelog

[Internal] [Fixed] - Fix ios/android e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/24974

Differential Revision: D15431539

Pulled By: cpojer

fbshipit-source-id: 054af2c2fff6bbdb2263c15d7f5cd416aaa507fd
2019-05-21 05:44:29 -07:00
zhongwuzw 5954880875 Fixes syntax of autolink script (#24882)
Summary:
Oops, fixes syntax of autolink script landed in https://github.com/facebook/react-native/pull/24867.

## Changelog

[iOS] [Fixed] - Fixes syntax of autolink script
Pull Request resolved: https://github.com/facebook/react-native/pull/24882

Differential Revision: D15371272

Pulled By: cpojer

fbshipit-source-id: 8538be040b8b116b9651dc26749ab8febad0fe7c
2019-05-16 02:48:44 -07:00
Eric Lewis 90040290ef Add Fabric/Turbo Modules flags to iOS autolinking script (#24867)
Summary:
This makes it easier to enable fabric / turbo modules with the new fancy autolinking script.

## Changelog

[iOS] [Added] - Add Fabric/Turbo Module flags to iOS autolinking script
Pull Request resolved: https://github.com/facebook/react-native/pull/24867

Differential Revision: D15368550

Pulled By: fkgozali

fbshipit-source-id: 366cd9fb8b630011f9287ae762b985e4778de423
2019-05-15 22:30:41 -07:00
Pierre Reimertz f0770b6b37 fixes Xcode path issues containing whitespace when building Release (#24810)
Summary:
Some users (me included) have projects located in quirky places, resulting whitespaces in the path.
An example, , I symlink into my iCloud drive which result in the following path

```
/Users/r/Library/Mobile Documents/com~apple~CloudDocs/_/work/{a_company}/repos.nosync/app
```

This commit quotes the variable to make sure it gets properly passed to the CLI.

For reference, similar issue that has been resolved: 7d4e94edcc
Pull Request resolved: https://github.com/facebook/react-native/pull/24810

Differential Revision: D15316898

Pulled By: cpojer

fbshipit-source-id: 4ed2c8391d65d1680e836bfce8c51dfb5763caed
2019-05-13 07:29:50 -07:00
Héctor Ramos 9bd276c06b Rename Detox job, collect all e2e steps under test_end_to_end (#24689)
Summary:
Rename test_detox_end_to_end to test_end_to_end, then move JavaScript and iOS end-to-end tests to this job.

Fixes an issue in the end-to-end tests, but does not yet bring them back fully to green.

[General] [Changed] - Collect e2e tests under test_end_to_end job
Pull Request resolved: https://github.com/facebook/react-native/pull/24689

Differential Revision: D15202242

Pulled By: hramos

fbshipit-source-id: e7a9627896d2990cb6ddd0d3a91b915781ac2417
2019-05-03 14:38:10 -07:00
Ramanpreet Nara 913ff9f5ae Fix OSS build
Summary: iOS TurboModules work in OSS. I pulled out JSCallInvoker from `React-turbomodule-core`, as a part of D15055511. In this diff, I'm adding it back in.

Reviewed By: mdvacca

Differential Revision: D15195007

fbshipit-source-id: 64ee294a68c0a63ba400b8a829864c6619d3311a
2019-05-03 13:31:21 -07:00
Héctor Ramos 845eee403e Allow arbitrary location for third-party iOS dependency cache
Summary:
RNTester currently has four third party dependencies that are fetched from the network at build time:

- glog
- double-conversion
- boost
- folly

These dependencies are cached to ~/.rncache by default. This location may not be ideal for use in CI, therefore the cache location is now made configurable via a RN_CACHE_DIR envvar.

Reviewed By: cpojer

Differential Revision: D15141391

fbshipit-source-id: b51d749412c49500a657bd18e4c9520ddb30ea2c
2019-04-30 09:49:14 -07:00
Héctor Ramos b92f30dcc5 Fix `test_javascript` e2e tests (#24658)
Summary:
Fix regression in JavaScript e2e tests.

[General] [Fixed] - Fixed JavaScript e2e tests.
Pull Request resolved: https://github.com/facebook/react-native/pull/24658

Differential Revision: D15146466

Pulled By: cpojer

fbshipit-source-id: 05baa99e3b1cdd3ef02bc3f97cf2987dd8ba80f4
2019-04-30 03:08:46 -07:00
Kacper Wiszczuk 421ffb05ae Adjust test manual e2e script to work with new init (#24583)
Summary:
Since initialisation flow changed with default template, we need to adjust the script to make it work properly.

[General] [Fixed] - Adjust text manual e2e script to work with new init.
Pull Request resolved: https://github.com/facebook/react-native/pull/24583

Differential Revision: D15062374

Pulled By: cpojer

fbshipit-source-id: 8110597b27056570784439362f12963154460613
2019-04-25 02:03:10 -07:00
Héctor Ramos 0a16b53a78 Use Xcode 10.2.0 and iOS 12.2 in iOS tests (#24572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/24572

Bumps to Xcode 10.2.0 and uses the iOS 12.2 simulator when running tests.

Changelog:

[iOS] [Changed] - iOS tests: Bump Xcode to 10.2.0, iOS to 12.2.

Reviewed By: cpojer

Differential Revision: D15049833

fbshipit-source-id: 40ee039f8be4db1365ad650b45e2e3e0a4ea80f3
2019-04-24 09:33:17 -07:00
Mike Grabowski 706f67a882 Use latest React Native CLI (#24517)
Summary:
Updates React Native to use latest CLI.

Changes:
- No more `--reactNativePath`, define it once in the configuration file. This reverts the previous PR that added this flag
- Add `platforms` and `commands` - React Native now defines platform like any other package. There's no longer concept of "out-of-tree" platform. All are treated equally. If React Native works, any other platform will work too.
- Updates `jest/hasteImpl.js` to use public CLI interface (`loadConfig`) instead of `findPlugins` and removes a weird conditional that checks for CI presence.

[INTERNAL] - Update React Native CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/24517

Differential Revision: D15044762

Pulled By: cpojer

fbshipit-source-id: 379b61e842e619312c542173219a7d326663cf24
2019-04-24 05:09:10 -07:00
Orta Therox 326248e1f8 Adds a ruby file in RN which reflects what Podspecs should be imported by default (#24555)
Summary:
Simplifies the code anyone on iOS using RN has _to see_. In this case, React Native knows that everyone probably wants all these imports (unless they're using dev mode) and so we can auto-import the pod specs for a user from inside the lib.

Basically auto-link for the React side.

[iOS] [Added] - Adds a ruby function which imports the Pods for RN, so that users only have to include this function and it can change per RN version.
Pull Request resolved: https://github.com/facebook/react-native/pull/24555

Differential Revision: D15044780

Pulled By: cpojer

fbshipit-source-id: c3702a52104706def51da6f1d11ab966d57d1edb
2019-04-23 05:49:10 -07:00
Diego Sanchez 1f6de88230 Revert D14962710: [react-native][nbtd][Sandcastle][Facebook: Run RNTester Unit Tests on Sandcastle] Use Xcode 10.2.0 and iOS 12.2 in iOS tests
Differential Revision:
D14962710

Original commit changeset: 769cfb90aacc

fbshipit-source-id: a62ded9ac74f00332006b960862db5c258daff06
2019-04-23 02:33:55 -07:00
Héctor Ramos e106112202 Use Xcode 10.2.0 and iOS 12.2 in iOS tests
Summary:
Bumps to Xcode 10.2.0 and uses the iOS 12.2 simulator when running tests.

The `testBundleURL` test is temporarily disabled to allow the iOS unit tests to run successfully in the internal Facebook CI system.

Changelog:

[iOS] [Changed] - iOS tests: Bump Xcode to 10.2.0, iOS to 12.2.

Reviewed By: TheSavior

Differential Revision: D14962710

fbshipit-source-id: 769cfb90aacce33903ab6e8dbcc5b5727deacf41
2019-04-22 23:25:00 -07:00
Héctor Ramos d65daa0d3f Add react-native-oss-e2e job to Sandcastle, running JavaScript e2e tests from open source
Summary: Remove unused path variable from open source JavaScript test script.

Reviewed By: cpojer

Differential Revision: D14899083

fbshipit-source-id: 880102d404ca72c352a20654cb12263d98945a8b
2019-04-15 11:07:54 -07:00
Héctor Ramos 5bac2b761e Run the same JavaScript test script in Sandcastle and Circle (#24422)
Summary:
Consolidate JavaScript tests from open source into a single script that can be executed by both Circle CI and Sandcastle, the internal Facebook CI.

[General] [Changed] - Switch internal and external CI to use the same script when running JavaScript tests

Pull Request resolved: https://github.com/facebook/react-native/pull/24422

Reviewed By: cpojer

Differential Revision: D14895773

fbshipit-source-id: d428929cc4e5219e02f5920259e08e0b3d24874c
2019-04-12 09:54:09 -07:00