Skip to content

Commit 0db42d3

Browse files
author
Dimitar Kerezov
committed
Update README.md
Remove obsolete information and add references to setup scripts.
1 parent 5f3be6e commit 0db42d3

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

README.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ With the NativeScript CLI, you can target the following mobile platforms.
5959
System Requirements
6060
===
6161

62-
You can install and run the NativeScript CLI on Windows or OS X.
62+
You can install and run the NativeScript CLI on Windows, OS X or Linux.
6363

6464
* [Windows](#windows)
6565
* [OS X](#os-x)
@@ -69,6 +69,21 @@ You can install and run the NativeScript CLI on Windows or OS X.
6969

7070
> On Windows systems, you can develop, build, and deploy NativeScript projects that target Android.
7171
72+
### Setup script
73+
You can run the PowerShell setup script inside a **Command Prompt** against the production branch by running:
74+
```cmd
75+
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))"
76+
```
77+
78+
Alternatively, you can run the setup script inside a **Windows PowerShell console** by running
79+
```PowerShell
80+
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1'))
81+
```
82+
Note that the script requires at least a version **4.0 .NET framework installed**.
83+
84+
85+
### Manual setup
86+
7287
* Windows 7 SP1 or later
7388
* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release
7489
* (Optional) [Chocolatey][Chocolatey]
@@ -125,6 +140,14 @@ android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,s
125140

126141
> On OS X systems, you can develop, build, and deploy NativeScript projects that target iOS and Android.
127142
143+
### Setup script
144+
You can run the Ruby setup script inside a **terminal** against the production branch by running:
145+
```Shell
146+
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.rb)"
147+
```
148+
149+
### Manual setup
150+
128151
* OS X Mavericks
129152
* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release
130153
* For iOS development
@@ -325,7 +348,7 @@ MyApp/
325348
```
326349

327350
* The `app` directory is the **development space for your application**. You should modify all common and platform-specific code within this directory. When you run `prepare <Platform>`, the NativeScript CLI copies relevant content to the platform-specific folders for each target platform.
328-
* The `platforms` directory is created empty. When you add a target platform to your project, the NativeScript CLI creates a new subdirectory with the platform name. The subdirectory contains the ready-to-build resources of your app. When you run `prepare <Platform>`, the NativeScript CLI copies relevant content from the `app` directory to the platform-specific subdirectory for each target platform.<br/>In the `platforms` directory, you can safely modify configuration files such as `AndroidManifest.xml` and `Info.plist`.
351+
* The `platforms` directory is created empty. When you add a target platform to your project, the NativeScript CLI creates a new subdirectory with the platform name. The subdirectory contains the ready-to-build resources of your app. When you run `prepare <Platform>`, the NativeScript CLI copies relevant content from the `app` directory to the platform-specific subdirectory for each target platform.
329352

330353
[Back to Top][1]
331354

@@ -398,9 +421,13 @@ You can develop shared functionality or design in common files. To indicate that
398421

399422
### Development in `platforms`
400423

401-
In `platforms`, you can safely modify files which are part of the native project structure and do not have a corresponding source located in the `app` directory in the root. For example, `AndroidManifest.xml` and `Info.plist`.
424+
As an important note, you should edit files, located in `platforms` only in extremely rare cases, as the NativeScript CLI overrides such files during the `prepare <Platform>` operation with the content from `app`.
402425

403-
**Do not modify files and resources that have a corresponding file in the `app` directory in the root**, such as application scripts, icons, and splash screens. The NativeScript CLI overrides such files during the `prepare <Platform>` operation with the content from `app`.
426+
### Modifying configuration files
427+
428+
The NativeScript CLI will respect any platform configuration files placed inside `app/App_Resources`. Those files are respectively `app/App_Resources/AndroidManifest.xml` for Android and `app/App_Resources/Info.plist` for iOS.
429+
430+
Additionaly, you can modify `app/App_Resources/build.xcconfig` and `app/App_Resources/app.gradle` for adding/removing additional build properties for iOS and Android respectively.
404431

405432
[Back to Top][1]
406433

@@ -417,8 +444,6 @@ tns prepare ios
417444

418445
Keep in mind that `prepare` overrides changes made to the platform-specific subdirectory in `platforms`. For more information, see [Development in platforms](#development-in-platforms).
419446

420-
> **IMPORTANT:** Always run `prepare <Platform>` before running `build <Platform>`, `deploy <Platform>`, or `emulate <Platform>`. This ensures that the NativeScript CLI will build an application package with your latest code and resources.
421-
422447
[Back to Top][1]
423448

424449
## Build Your Project
@@ -434,7 +459,8 @@ The NativeScript CLI calls the SDK for the selected target platform and uses it
434459

435460
When you build for Android, the NativeScript CLI saves the application package as an `APK` in `platforms` &#8594; `android` &#8594; `bin`.
436461

437-
When you build for iOS, if the `--device` flag is not set, the NativeScript CLI builds your project for the native emulator and saves the application package as an `APP` in `platforms` &#8594; `ios` &#8594; `build` &#8594; `emulator`. If the `--device` flag is set, the NativeScript CLI builds your project for device and saves the application package as an `IPA` in `platforms` &#8594; `ios` &#8594; `build` &#8594; `device`.
462+
When you build for iOS, the NativeScript CLI will either build for a device, if there's a device attached, or for the native emulator if there are no devices attached. In order to trigger a native emulator build with an attached device, the `--emulator` flag has to be set.
463+
The native emulator build is saved as an `APP` in `platforms` &#8594; `ios` &#8594; `build` &#8594; `emulator`. The device build is saved as an `IPA` in `platforms` &#8594; `ios` &#8594; `build` &#8594; `device`.
438464

439465
> **IMPORTANT:** To build your app for an iOS device, you must configure a valid certificate and provisioning profile pair, and have that pair present on your system for code signing your application package. For more information, see [iOS Code Signing - A Complete Walkthrough](http://seventhsoulmountain.blogspot.com/2013/09/ios-code-sign-in-complete-walkthrough.html).
440466

0 commit comments

Comments
 (0)