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
* 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 Telerik NativeScript CLI copies relevant content to the platform-specific folders for each target platform.
252
+
* 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 Telerik NativeScript CLI copies relevant content to the platform-specific folders for each target platform.
254
253
* The `hooks` directory is an empty directory. In a future release of the Telerik NativeScript CLI, in `hooks`, you will be able to store scripts that are automatically executed before and after a specified command.
255
254
* The `platforms` directory is created empty. When you add a target platform to your project, the Telerik 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 Telerik 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`.
256
255
* The `tns_modules` is an empty directory. In a future release of the Telerik NativeScript CLI, in `tns_modules`, you will be able to add custom Telerik NativeScript modules to extend the functionality of the basic framework.
@@ -295,6 +294,7 @@ platforms/
295
294
```
296
295
297
296
For more information about the structure of Android native projects, see [Android Projects](http://developer.android.com/tools/projects/index.html#ApplicationProjects).
297
+
298
298
For more information about the structure iOS native projects, see [Code Organization in Xcode Projects](http://akosma.com/2009/07/28/code-organization-in-xcode-projects/).
299
299
300
300
[Back to Top][1]
@@ -316,7 +316,7 @@ For more information about working with Telerik NativeScript, see the following
316
316
317
317
### Development in `app`
318
318
319
-
The `app` directory in the root of the project is the development space for your project. Place all your common and platform-specific code in this directory. When you run `prepare <Platform>`, the Telerik NativeScript CLI copies relevant content to the platform-specific folders for each target platform.
319
+
The `app` directory in the root of the project is the development space for your project. **Place all your common and platform-specific code in this directory.** When you run `prepare <Platform>`, the Telerik NativeScript CLI copies relevant content to the platform-specific folders for each target platform.
320
320
321
321
In the `app` directory, you can use **platform-specific files** to provide customized functionality and design for each target platform. To indicate that a file is platform-specific, make sure that the file name is in the following format: `name.ios.extension` or `name.android.extension`. For example: `main.ios.js` or `main.android.js`.
322
322
@@ -326,7 +326,7 @@ You can develop shared functionality or design in common files. To indicate that
326
326
327
327
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`.
328
328
329
-
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 Telerik NativeScript CLI overrides such files during the `prepare <Platform>` operation with the content from `app`.
329
+
**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 Telerik NativeScript CLI overrides such files during the `prepare <Platform>` operation with the content from `app`.
330
330
331
331
### Development in `hooks`
332
332
@@ -351,7 +351,7 @@ tns prepare ios
351
351
352
352
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).
353
353
354
-
> **IMPORTANT:** Always run `prepare <Platform>` before running `build <Platform>`or `deploy <Platform>`. This ensures that the Telerik NativeScript CLI will build an application package with your latest code and resources.
354
+
> **IMPORTANT:** Always run `prepare <Platform>` before running `build <Platform>`, `deploy <Platform>`, or `emulate <Platform>`. This ensures that the Telerik NativeScript CLI will build an application package with your latest code and resources.
355
355
356
356
[Back to Top][1]
357
357
@@ -366,9 +366,9 @@ tns build ios
366
366
367
367
The Telerik NativeScript CLI calls the SDK for the selected target platform and uses it to build your app locally.
368
368
369
-
When you build for Android, the Telerik NativeScript CLI saves the application package as an `APK` in `platforms`->`android`->`bin`.
369
+
When you build for Android, the Telerik NativeScript CLI saves the application package as an `APK` in `platforms`→`android`→`bin`.
370
370
371
-
When you build for iOS, the Telerik NativeScript CLI saves the application package as an `IPA` in `platforms`->`ios`->`build`->`device`.
371
+
When you build for iOS, the Telerik NativeScript CLI saves the application package as an `IPA` in `platforms`→`ios`→`build`→`device`.
372
372
373
373
> **IMPORTANT:** To build your app for iOS, you need to configure a valid pair of certificate and provisioning profile 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).
374
374
@@ -409,14 +409,27 @@ tns emulate android
409
409
tns emulate ios
410
410
```
411
411
412
-
This operation launches the native device emulator for the selected target platform and runs your project in the virtual device.
412
+
This operation calls the SDK for the selected target platform, builds your app locally, launches the native device emulator for the selected target platform, and runs your project on the virtual device.
413
413
414
414
For Android, the Telerik NativeScript CLI runs your app in the earliest created virtual device or the currently running Android Virtual Device. Before running your app in the Android native emulator, make sure that you have configured at least one virtual device in the Android Virtual Device manager.
415
415
416
416
For iOS, the Telerik NativeScript CLI runs your app in the iOS Simulator.
417
417
418
418
[Back to Top][1]
419
419
420
+
## Run Your Project
421
+
422
+
You can quickly run your app on connected devices, including running Android Virtual Devices.
423
+
424
+
```Shell
425
+
tns run android
426
+
tns run ios
427
+
```
428
+
429
+
This operation runs `prepare`, `build`, and `deploy`.
0 commit comments