Skip to content

Commit 59859ea

Browse files
committed
Merge pull request #667 from NativeScript/ikoevska/ns-120/changelog
Ikoevska/ns 120/changelog
2 parents 9ca77c1 + 082b220 commit 59859ea

File tree

5 files changed

+67
-15
lines changed

5 files changed

+67
-15
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
NativeScript CLI Changelog
22
================
33

4+
1.2.0 (2015, July 22)
5+
==
6+
7+
### New
8+
9+
* [Implemented #621](https://github.com/NativeScript/nativescript-cli/issues/621): Added the `$ tns error-reporting` command. By default, anonymous error reporting is enabled.
10+
* [Implemented #620](https://github.com/NativeScript/nativescript-cli/issues/620): Renamed the `$ tns feature-usage-tracking` command to `$ tns usage-reporting`. By default, anonymous usage reporting is enabled.
11+
* [Implemented #523](https://github.com/NativeScript/nativescript-cli/issues/523): Added the `$ tns livesync <Platform>` command. You can use it to quickly synchronize changes to connected devices without re-building and re-deploying your apps.
12+
* [Implemented #510](https://github.com/NativeScript/nativescript-cli/issues/510): Improvements and updates to the `$ tns plugin` sets of commands.
13+
* You can create and work with custom NativeScript plugins which contain Android native libraries.
14+
* You can create and work with custom NativeScript plugins which contain iOS dynamic native libraries.
15+
* The `$ tns plugin remove` command removes the Android native libraries carried by the plugin.
16+
* [Implemented #480](https://github.com/NativeScript/nativescript-cli/issues/480): Added the `$ tns doctor` command. You can use it to quickly check for any configuration issues which might prevent the NativeScript CLI from working properly.
17+
18+
### Fixed
19+
20+
* [Fixed #658](https://github.com/NativeScript/nativescript-cli/issues/658): The `$ tns platform remove` command does not remove framework data from `package.json` for the project.
21+
* [Fixed #644](https://github.com/NativeScript/nativescript-cli/issues/644): You cannot build your app for Android, if it contains a custom `styles.xml`.
22+
* [Fixed #632](https://github.com/NativeScript/nativescript-cli/issues/632): On OS X systems with custom Chrome builds, you cannot debug Android apps. To be able to debug Android apps, you need to set the name of the custom Chrome build in the `ANDROID_DEBUG_UI_MAC` setting in `config.json`.
23+
* [Fixed #629](https://github.com/NativeScript/nativescript-cli/issues/629): The `$ tns prepare` command does not populate the platform-specific directories correctly, if your project contains both an npm module, installed using `$ npm install`, and a NativeScript plugin, installed using `$ tns plugin add`.
24+
* [Fixed #574](https://github.com/NativeScript/nativescript-cli/issues/574): The `$ tns prepare ios` command does not preserve file name casing when populating the platform-specific directories.
25+
* [Fixed #538](https://github.com/NativeScript/nativescript-cli/issues/538): The NativeScript CLI interprets files whose names contain `ios` or `android` as platform-specific files and renames them, even if they are not platform-specific.
26+
* [Fixed #281](https://github.com/NativeScript/nativescript-cli/issues/281): The `$ tns platform remove` command does not print any status message when the operation is successful.
27+
* [Fixed #271](https://github.com/NativeScript/nativescript-cli/issues/271): The `$ tns create` command does not validate the path provided with the `--copy-from` option.
28+
* [Fixed #139](https://github.com/NativeScript/nativescript-cli/issues/139): The `$ tns prepare` command does not remove files from the platform-specific directories correctly.
29+
430
1.1.2 (2015, July 2)
531
==
632

PLUGINS.md

+36-10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ A NativeScript plugin is any npm package, published or not, that exposes a nativ
2323
* A `package.json` file which contains the following metadata: name, version, supported runtime versions, dependencies and others. For more information, see the [Package.json Specification](#packagejson-specification) section.
2424
* One or more CommonJS modules that expose a native API via a unified JavaScript API. For more information about Common JS modules, see the [CommonJS Wiki](http://wiki.commonjs.org/wiki/CommonJS).
2525
* `AndroidManifest.xml` and `Info.plist` which describe the permissions, features or other configurations required or used by your app for Android and iOS, respectively.
26+
* (Optional) Native Android libraries.
27+
* (Optional) Native iOS dynamic libraries.
2628

2729
The plugin must have the directory structure, described in the [Directory Structure](#directory-structure) section.
2830

@@ -31,15 +33,15 @@ The plugin must have the directory structure, described in the [Directory Struct
3133
If the NativeScript framework does not expose a native API that you need, you can develop a plugin which exposes the required functionality. When you develop a plugin, keep in mind the following requirements.
3234

3335
* The plugin must be a valid npm package.
34-
* The plugin must expose a built-in native API. Currently, you cannot expose native APIs available via custom native libraries.
36+
* The plugin must expose a built-in native API or a native API available via custom native libraries.
3537
* The plugin must be written in JavaScript or TypeScript and must comply with the CommonJS specification. If written in TypeScript, make sure to include the compiled `JavaScript` file in your plugin.
3638
* The plugin directory structure must comply with the specification described below.
3739
* The plugin must contain a valid `package.json` which complies with the specification described below.
3840
* If the plugin requires any permissions, features or other configuration specifics, it must contain `AndroidManifest.xml` and `Info.plist` file which describe them.
3941

4042
### Directory Structure
4143

42-
NativeScript plugins which consist of one CommonJS module must have the following directory structure.
44+
NativeScript plugins which consist of one CommonJS module might have the following directory structure.
4345

4446
```
4547
my-plugin/
@@ -48,11 +50,11 @@ my-plugin/
4850
└── platforms/
4951
├── android/
5052
│ └── AndroidManifest.xml
51-
└── ios
53+
└── ios/
5254
└── Info.plist
5355
```
5456

55-
NativeScript plugins which consist of multiple CommonJS modules must have the following directory structure.
57+
NativeScript plugins which consist of multiple CommonJS modules might have the following directory structure.
5658

5759
```
5860
my-plugin/
@@ -66,16 +68,36 @@ my-plugin/
6668
└── platforms/
6769
├── android/
6870
│ └── AndroidManifest.xml
69-
└── ios
71+
└── ios/
7072
└── Info.plist
7173
```
7274

73-
* `index.js`: This file is the CommonJS module which exposes the native API. You can use platform-specific `*.platform.js` files. For example: `index.ios.js` and `index.android.js`. During the plugin installation, the NativeScript CLI will copy the platform resources to the `tns_modules` subdirectory in the correct platform destination in the `platforms` directory of your project.
75+
* `index.js`: This file is the CommonJS module which exposes the native API. You can use platform-specific `*.platform.js` files. For example: `index.ios.js` and `index.android.js`. During the plugin installation, the NativeScript CLI will copy the platform resources to the `tns_modules` subdirectory in the correct platform destination in the `platforms` directory of your project.<br/>Alternatively, you can give any name to this CommonJS module. In this case, however, you need to point to this file by setting the `main` key in the `package.json` for the plugin. For more information, see [Folders as Modules](https://nodejs.org/api/modules.html#modules_folders_as_modules).
7476
* `package.json`: This file contains the metadata for your plugin. It sets the supported runtimes, the plugin name and version and any dependencies. The `package.json` specification is described in detail below.
7577
* `platforms\android\AndroidManifest.xml`: This file describes any specific configuration changes required for your plugin to work. For example: required permissions. For more information about the format of `AndroidManifest.xml`, see [App Manifest](http://developer.android.com/guide/topics/manifest/manifest-intro.html).<br/>During the plugin installation, the NativeScript CLI will merge the plugin `AndroidManifest.xml` with the `AndroidManifest.xml` for your project. The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
7678
* `platforms\ios\Info.plist`: This file describes any specific configuration changes required for your plugin to work. For example: required permissions. For more information about the format of `Info.plist`, see [About Information Property List Files](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html).<br/>During the plugin installation, the NativeScript CLI will merge the plugin `Info.plist` with the `Info.plist` for your project. The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
7779

78-
> **IMPORTANT:** Currently, you cannot add any platform-specific resources other than `AndroidManifest.xml` and `Info.plist` in the `platforms` directory of the plugin.
80+
NativeScript plugins which contain both native Android and iOS libraries might have the following directory structure.
81+
82+
```
83+
my-plugin/
84+
├── ...
85+
└── platforms/
86+
├── android/
87+
│ ├── libs/
88+
│ │ └── MyLibrary.jar
89+
│ ├── MyAndroidLibrary/
90+
│ │ ├── ...
91+
│ │ └── project.properties
92+
│ └── AndroidManifest.xml
93+
└── ios/
94+
├── MyiOSLibrary.framework
95+
└── Info.plist
96+
```
97+
98+
* `platforms\android\libs`: This directory contains any native Android libraries packaged as `*.jar` packages. During the plugin installation, the NativeScript CLI will copy these files to `lib\Android` in your project and will configure the Android project in `platforms\android` to work with the library.
99+
* `platforms\android\MyAndroidLibrary`: This directory contains a native Android library with a `project.properties` file. During the plugin installation, the NativeScript CLI will copy these files to `lib\Android` in your project and will configure the Android project in `platforms\android` to work with the library.
100+
* `platforms\ios`: This directory contains native iOS dynamic libraries (`.framework`). During the plugin installation, the NativeScript CLI will copy these files to `lib\iOS` in your project and will configure the Android project in `platforms\ios` to work with the library.
79101

80102
### Package.json Specification
81103

@@ -126,6 +148,8 @@ The installation of a NativeScript plugin mimics the installation of an npm modu
126148

127149
The NativeScript CLI takes the plugin and installs it to the `node_modules` directory in the root of your project. During this process, the NativeScript CLI resolves any dependencies described in the plugin `package.json` file and adds the plugin to the project `package.json` file in the project root.
128150

151+
If the NativeScript CLI detects any native libraries in the plugin, it copies the library files to the `lib/<platform>` folder in your project and configures the platform-specific projects in `platforms/<platform>` to work with the library.
152+
129153
Next, the NativeScript CLI runs a partial `prepare` operation for the plugin for all platforms configured for the project. During this operation, the CLI copies only the plugin to the `tns_modules` subdirectories in the `platforms\android` and `platform\ios` directories in your project. If your plugin contains platform-specific `JS` files, the CLI copies them to the respective platform subdirectory and renames them by removing the platform modifier.
130154

131155
> **TIP:** If you have not configured any platforms, when you run `$ tns platform add`, the NativeScript CLI will automatically prepare all installed plugins for the selected platform.
@@ -257,13 +281,15 @@ You must specify the plugin by the value for the `name` key in the plugin `packa
257281

258282
The removal of a NativeScript plugin mimics the removal of an npm module.
259283

260-
The NativeScript CLI removes any plugin files from the `node_modules` directory in the root of your project. During this process, the NativeScript CLI removes any dependencies described in the plugin `package.json` file and removes the plugin from the project `package.json` file in the project root.
284+
The NativeScript CLI removes any plugin files from the `node_modules` directory in the root of your project and removes any native Android libraries which have been added during the plugin installation. During this process, the NativeScript CLI removes any dependencies described in the plugin `package.json` file and removes the plugin from the project `package.json` file in the project root.
261285

262-
> **IMPROTANT:** This operation does not remove files from the `platforms\android` and `platforms\ios` directories and does not unmerge the `AndroidManifest.xml` and `Info.plist` files.
286+
> **IMPORTANT:** This operation does not remove files from the `platforms\android` and `platforms\ios` directories and native iOS libraries, and does not unmerge the `AndroidManifest.xml` and `Info.plist` files.
263287
264288
### Manual Steps After Removal
265289

266-
After the plugin removal is complete, you need to run the following command.
290+
After the plugin removal is complete, make sure to remove any leftover native library files from the `<lib>` directory in the root of the project.Update the platform-specific projects in `platforms\<platform>` to remove any dependencies on the removed native libraries.
291+
292+
Next, you need to run the following command.
267293

268294
```Shell
269295
tns prepare <Platform>

docs/man_pages/project/testing/debug-android.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Debugs your project on a connected device, in a native emulator or in Genymotion
2525
* `--debug-port` - Sets a new port on which to attach the debug tools.
2626

2727
### Attributes
28-
* `<Device ID>` is the index or name of the target device as listed by `$ tns list-devices`
28+
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
2929
* `<Port>` is an accessible port on the device to which you want to attach the debugging tools.
3030
* `<Emulator Options>` is any valid combination of options as listed by `$ tns help emulate android`
3131
* `<GenyName>` is the name of the Genymotion virtual device that you want to use as listed by `$ genyshell -c "devices list"`

docs/man_pages/project/testing/debug-ios.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml)
2222
* `--no-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari.
2323

2424
### Attributes
25-
* `<Device ID>` is the index or name of the target device as listed by `$ tns list-devices`
25+
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
2626
* `<Emulator Options>` is any valid combination of options as listed by `$ tns help emulate ios`
2727
<% } %>
2828
<% if(isHtml) { %>

docs/man_pages/project/testing/livesync.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ livesync
33

44
Usage | Synopsis
55
------|-------
6-
General | `$ tns livesync [<Platform>]`
6+
General | `$ tns livesync <Platform>`
77

8-
Synchronizes the latest changes in your project to devices. If no target platform is specified, changes are synchronized to all devices.
8+
Synchronizes the latest changes in your project to devices.
99

1010
### Attributes
11-
`<Platform>` is the target mobile platform to which you want to synchronize your changes. You can set the following target platforms.
11+
`<Platform>` is the target mobile platform to which you want to synchronize your changes. <% if(isHtml) { %>If you have connected only Android or only iOS devices, you can omit setting the target platform. If you have connected devices of multiple platforms, you must specify the target platform. <% } %>You can set the following target platforms.
1212
* `android` - Synchronizes the latest changes in your project to connected Android devices.
1313
* `ios` - Synchronizes the latest changes in your project to connected iOS devices.
1414

0 commit comments

Comments
 (0)