You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the script requires at least a version **4.0 .NET framework installed**.
83
+
84
+
85
+
### Manual setup
86
+
72
87
* Windows 7 SP1 or later
73
88
* 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
* 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
130
153
* For iOS development
@@ -325,7 +348,7 @@ MyApp/
325
348
```
326
349
327
350
* 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.
329
352
330
353
[Back to Top][1]
331
354
@@ -398,9 +421,13 @@ You can develop shared functionality or design in common files. To indicate that
398
421
399
422
### Development in `platforms`
400
423
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`.
402
425
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.
404
431
405
432
[Back to Top][1]
406
433
@@ -417,8 +444,6 @@ tns prepare ios
417
444
418
445
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).
419
446
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
-
422
447
[Back to Top][1]
423
448
424
449
## Build Your Project
@@ -434,7 +459,8 @@ The NativeScript CLI calls the SDK for the selected target platform and uses it
434
459
435
460
When you build for Android, the NativeScript CLI saves the application package as an `APK` in `platforms`→`android`→`bin`.
436
461
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`→`ios`→`build`→`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`→`ios`→`build`→`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`→`ios`→`build`→`emulator`. The device build is saved as an `IPA` in `platforms`→`ios`→`build`→`device`.
438
464
439
465
> **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).
0 commit comments