Skip to content

Commit 7d8e995

Browse files
committed
Review 2
1 parent cde4fd6 commit 7d8e995

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

CocoaPods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ This modifies the `MYCocoaPodsApp.xcodeproj` and creates a workspace with the sa
9999
100100
## Troubleshooting
101101

102-
If there are linker errors after building, you may have to link with some native frameworks described in the CocoaPod documentation. See [`build.xcconfig` file](PLUGINS.md#buildxcconfig-specification) specification on how to do this.
102+
In case of post-build linker errors, you might need to resolve missing dependencies to native frameworks required by the installed CocoaPod. For more information about how to create the required links, see the [build.xcconfig specification](PLUGINS.md#buildxcconfig-specification).

PLUGINS.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A NativeScript plugin is any npm package, published or not, that exposes a nativ
2626
* 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).
2727
* (Optional) `AndroidManifest.xml` and `Info.plist` which describe the permissions, features or other configurations required or used by your app for Android and iOS, respectively.
2828
* (Optional) Native Android libraries and the native Android `include.gradle` configuration file which describes the native dependencies. For more information, see the [`include.gradle` Specification](#includegradle-specification) section.
29-
* (Optional) Native iOS libraries and the native `build.xcconfig` configuration file which describes the native dependencies. For more information, see the [Build.xcconfig Specification](#buildxcconfig-specification) section.
29+
* (Optional) Native iOS libraries and the native `build.xcconfig` configuration file which describes the native dependencies. For more information, see the [`build.xcconfig` Specification](#buildxcconfig-specification) section.
3030

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

@@ -62,6 +62,7 @@ NativeScript plugins which consist of multiple CommonJS modules might have the f
6262

6363
```
6464
my-plugin/
65+
├── index.js
6566
├── package.json
6667
├── MyModule1/
6768
│ ├── index1.js
@@ -71,20 +72,17 @@ my-plugin/
7172
│ └── package.json
7273
└── platforms/
7374
├── android/
74-
│ ├── res/
75-
│ └── AndroidManifest.xml
75+
│ ├── AndroidManifest.xml
76+
│ └── res/
7677
└── ios/
7778
└── Info.plist
7879
```
7980

8081
* `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).
8182
* `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.
8283
* `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 build, gradle 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.
83-
* `platforms\android\include.gradle`: This file modifies the native Android configuration of your NativeScript project such as native dependencies, build types and configurations. For more information about the format of `include.gradle`, see [`include.gradle` file](#includegradle-specification).
8484
* `platforms\android\res`: (Optional) This directory contains resources declared by the `AndroidManifest.xml` file. You can look at the folder structure [here](http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes).
8585
* `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.
86-
* `platforms\ios\Podfile`: This file describes the dependency to the library that you want to use. For more information, see [CocoaPods.md](CocoaPods.md).
87-
* `platforms\ios\build.xcconfig`: This file modifies the native iOS configuration of your NativeScript project such as native dependencies and configurations. For more information about the format of `build.xcconfig`, see [`build.xcconfig` file](#buildxcconfig-specification).
8886

8987
NativeScript plugins which contain both native Android and iOS libraries might have the following directory structure.
9088

@@ -106,11 +104,12 @@ my-plugin/
106104
```
107105

108106
* `platforms\android`: This directory contains any native Android libraries packaged as `*.jar` and `*.aar` packages. These native libraries can reside in the root of this directory or in a user-created sub-directory. During the plugin installation, the NativeScript CLI will configure the Android project in `platforms\android` to work with the plugin.
109-
* `platforms\android\res`: (Optional) This directory contains resources declared by the `AndroidManifest.xml` file. You can look at the folder structure [here](http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes).
110107
* `platforms\android\include.gradle`: This file modifies the native Android configuration of your NativeScript project such as native dependencies, build types and configurations. For more information about the format of `include.gradle`, see [`include.gradle` file](#includegradle-specification).
111108
* `platforms\ios`: This directory contains native iOS frameworks (both static and shared). During the plugin installation, the NativeScript CLI will copy these files to `lib\iOS` in your project and will configure the iOS project in `platforms\ios` to work with the frameworks. If the library is written in Swift, only APIs exposed to Objective-C are exposed to NativeScript.
109+
* `platforms\ios\build.xcconfig`: This file modifies the native iOS configuration of your NativeScript project such as native dependencies and configurations. For more information about the format of `build.xcconfig`, see [`build.xcconfig` file](#buildxcconfig-specification).
110+
* `platforms\ios\Podfile`: This file describes the dependency to the library that you want to use. For more information, see [CocoaPods.md](CocoaPods.md).
112111

113-
### `package.json` Specification
112+
### Package.json Specification
114113

115114
Every NativeScript plugin should contain a valid `package.json` file in its root. This `package.json` file must meet the following requirements.
116115

0 commit comments

Comments
 (0)