Summary:
---------
Spotted after merging #193 - `localhost` was hardcoded here.
Test Plan:
----------
Turn on Chrome Debugger w/o this PR and see `Unauthorized` error in the console.
* fix: setup_env script failure
* chore: adjust the message and remove unused windows script
* fix: adjust platform check and wording
* chore: remove dot for continuity with error
document the --simulator argument for the react-native run-ios command to allow user to launch their app on a specific iOS simulator based by its official name
Regarding the #169 issue
cc @thymikee
Summary:
---------
Current README of `react-native-cli` is outdated and totally not user friendly. We already have a contributing guide on how to run it locally, so there's no point in keeping this one. I took this opportunity to write a proper README.
cc @kelset
* fix: problem on run-android with deviceId
* fix: change the logic to find the appropriate apk file
* fix: adding logging message
* fix: added command default value
* fix: ignore non-nativetargets during ios linking
fixes issue #57
* refactor: reuse variable and reorder array methods
Makes use of the single variable nativeTargetSection and puts filter before map when filtering out non-native targets.
* refactor: use PackageManager and improve init logging
* fix: review suggestions
* refactor: improve logger once again
* refactor: bold to logs status
This is an extra for #150
Fixes exports and tweaks some tests.
The `link`, `linkAssets`, and `linkDependency` where trickier as hell, but we have all tests working.
I suggest take it easy in this review as I'm worried in a "false positive" in tests as there was a LOT of changes.
We need to improve the code coverage for changes like this have smaller chances of failing...
parse output of simulator list provided by xcode 10.2
In Xcode 10.2, the output of `xcrun simctl list --json devices`
has changed to include a namespace within each version group.
This commit makes a backwards-compatible adjustment to account
for this change in format.
To illustrate:
Before
======
```
{
"devices": {
"iOS 10.0": [
...
]
}
}
```
After
=====
```
{
"devices": {
"com.apple.CoreSimulator.SimRuntime.iOS-10-0": [
...
]
}
}
```
Fixes#107
Summary:
---------
Bugs fixed:
- "CFBundleIdentifier" printed every time "run-ios" fails, shadowing the real cause for the problem
- "run-ios" running a previous/cached version of an app (usually when there was an error during build step that was ignored)
Changes made:
- Decided to turn Flow and ESLint and apply all the changes as I am working on it. I know the diff might be strange at first sight, but if you look closely, it's just cosmetics to satisfy various rules
- I also extracted some blocks to separate utilities for better readability
- I also removed a no longer needed check for CRNA which is deprecated (and IMO, is not needed)
- Converted few functions to "async" form for better readability
- Started capturing the "stderr" of "xcodebuild" and started relying on its error code in order to avoid going to next step when it fails
- Added a new type of error to differentiate from other errors and also be able to capture additional data. Logic and styling subject to change, encapsulated inside Logger.
Test Plan:
----------
Here's how the error messages look before/now:
While try to build a project with a wrong "schema" :
Before:
<img width="882" alt="screenshot 2019-01-31 at 18 07 43" src="https://user-images.githubusercontent.com/2464966/52071369-200a4c00-2583-11e9-8700-28766daae122.png">
After:
<img width="880" alt="screenshot 2019-01-31 at 18 05 23" src="https://user-images.githubusercontent.com/2464966/52071244-d91c5680-2582-11e9-83e7-e9e549a570cc.png">
While building a project that has a typo in "AppDelegate.m":
Before:
<img width="885" alt="screenshot 2019-01-31 at 18 08 19" src="https://user-images.githubusercontent.com/2464966/52071411-344e4900-2583-11e9-8613-96ddf6c68006.png">
After:
<img width="886" alt="screenshot 2019-01-31 at 18 06 36" src="https://user-images.githubusercontent.com/2464966/52071300-f6e9bb80-2582-11e9-9c9f-3a4b67318119.png">
You can try it out by running `run-ios` command on a broken project (typo, wrong configuration) or by passing a non-existing `schema`
Summary:
---------
Fixes#129
Test Plan:
----------
I added a test that simulates Windows on POSIX machines, because we don't run our tests on Windows.
@cherniavskii can you test this on a Windows machine?