Commit Graph

10 Commits

Author SHA1 Message Date
Eli White aba4ec0c09 Prettier RN local-cli
Reviewed By: yungsters

Differential Revision: D7962462

fbshipit-source-id: 0afe2092af8703895de91a6d1400315c3173aa6d
2018-05-11 13:00:50 -07:00
Koen Punt 2ad34075f1 Xcode 9 supports running multiple simulators
Summary:
Since Xcode 9 you can run multiple simultaneously. And since I believe React Native advocates using the latest version of Xcode, we can safely remove this constraint.

Updated the unit tests. Furthermore it can be found in the [Xcode release notes](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/xcode_9/xcode_9.html#//apple_ref/doc/uid/TP40004626-CH8-SW12) that multiple simulators are now supported.

This can be tested with the CLI by running `react-native run-ios` twice, but with a different `--simulator` flag, e.g.;

    react-native run-ios --simulator "iPhone SE"
    react-native run-ios --simulator "iPhone X"

[IOS] [ENHANCEMENT] [local-cli/runIOS/findMatchingSimulator.js] - Allow running multiple simulators
Closes https://github.com/facebook/react-native/pull/17284

Differential Revision: D7102790

Pulled By: hramos

fbshipit-source-id: 750e7039201e28a1feda2bec1e78144fd9deff98
2018-02-27 14:11:00 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Joey Jiron afd988f85a fixed issue with runIOS not being able to launch tvOS app
Summary:
Yes.

Yes

Environment:
OS: MacOS X 10.12.6 (16G29)
Node: 8.9.4
Yarn: N/A
npm: 5.4.2
Watchman: Not Found
Xcode: 9.2 (9C40b)
Android Studio: N/A

[CLI iOS runIOS] When using `react-native-cli` to try to launch the tvOS scheme the user get's an error because the current implementation for launching simulators ignores any simulator/device who's name does not start with `iOS`

StackOverflow issue also found here :  https://stackoverflow.com/questions/48069690/how-to-select-project-to-run-tvos-version-with-npm-start

Actual command line steps
```
$npm i -g react-native-cli
...
$react-native init CoolProject
...
$cd CoolProject/
$react-native run-ios --simulator "Apple TV"  --scheme "CoolProject-tvOS"

Scanning folders for symlinks in /Users/jjiron/CoolProject/node_modules (7ms)
Found Xcode project CoolProject.xcodeproj
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find Apple TV simulator
```

The cli tool should launch the tvOS application on the simulator.

The user get's an error message saying "Could not find Apple TV simulator"

Don't ignore appletv simulators when looking for simulators to launch. Also use the correct application build when selecting which app to launch on the simulator/device.

Added automated test for `findMatchingSimulator.js` to allow tvOS simulators

[react-native-cli] Fixed issue where you cannot launch tvOS app on Apple TV simulator
Closes https://github.com/facebook/react-native/pull/17660

Differential Revision: D6806327

Pulled By: hramos

fbshipit-source-id: 1a4f37058f3c5d8223012a3e4050e7bbfaafa6c4
2018-01-29 13:48:13 -08:00
Miguel Jimenez Esun 834b9d4e6e Adding @email tags to most of the tests
Reviewed By: rafeca

Differential Revision: D6185623

fbshipit-source-id: 30df83288fe85516d8d5a1617a4fb8fea826ed6f
2017-11-02 06:25:03 -07:00
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
James Burnett 51c0e81557 remove disableAutomock from jest tests (new default) @bypass-lint
Reviewed By: cpojer

Differential Revision: D5237192

fbshipit-source-id: dccca52a91259d7fea27931f92bca94184a82d4a
2017-06-13 15:04:09 -07:00
James Burnett 3360999431 disable automock by default in as many places as possible @bypass-lint
Reviewed By: cpojer

Differential Revision: D5190858

fbshipit-source-id: d3125cf81427dbbe3362ef1f958413394a6dc51d
2017-06-08 07:45:54 -07:00
Richard Evans 0b5ff0d2b1 Make run-ios find if a device is booted better
Summary:
**Motivation**
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

**Test plan (required)**
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.
Closes https://github.com/facebook/react-native/pull/10558

Differential Revision: D4163616

Pulled By: hramos

fbshipit-source-id: 26b44fb73ef402ce252e7a754036279e15359170
2016-12-01 09:58:32 -08:00
David Gröger 48ab5eb436 cli run-ios on device
Summary:
At the moment the run-ios command from the react-native cli does only work for simulators.
The pull request adds a new option to the existing command: **"--device 'device-name'" which installs and launches an iOS application on a connected device.**
This makes it easier to build a test environment using react-native for connected devices.

I've tested my code with the following commands:
react-native run-ios --device "Not existing device"
react-native run-ios --device
react-native run-ios --device "name-of-a-simulator"
react-native run-ios --device "name-of-connected-device"

Output of the first three commands:
![example_error_output](https://cloud.githubusercontent.com/assets/9102810/17669443/f53d5948-630d-11e6-9a80-7df2f352c6a3.png)

Additional to the manual command tests i've added a test file 'parseIOSDevicesList-test.js'.

I used **ios-deploy** In order to launch and install the .app-bundle on a connected device.
ios-deploy on github:
Closes https://github.com/facebook/react-native/pull/9414

Differential Revision: D3821638

Pulled By: javache

fbshipit-source-id: c07b7bf25283a966e45613a22ed3184bb1aac714
2016-09-06 08:13:41 -07:00