Skip to content

Commit d978fcf

Browse files
committed
library add help
1 parent b748129 commit d978fcf

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ Run `tns help` to list all available commands. Run or `tns <Command> --help` to
198198
* `platform add <Platform>` adds a new target platform to your project.
199199
* `platform remove <Platform>` removes the selected platform from the target platforms of the project.
200200
* `platform update <Platform>` updates the NativeScript runtime for the specified platform.
201+
* `library add <Platform>` adds a locally stored native library to the current project.
201202
* `prepare <Platform>` copies cross-platform and selected platform-specific content to the subdirectory for the target platform.
202203
* `build <Platform>` builds the project for the selected target platform.
203204
* `emulate <Platform>` builds the project for the selected target platform and runs it in the native emulator, if configured.

resources/help.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ General commands:
1515
platform remove Removes the selected platform from the platforms that the project currently targets.
1616
This operation deletes all platform-specific files and subdirectories from your project.
1717
platform update Updates the NativeScript runtime for the specified platform.
18+
library add Adds a locally stored native library to the current project.
1819
prepare Copies relevant content from the app directory to the subdirectory for the selected target platform.
1920
This lets you build the project with the SDK for the selected platform and deploy it on device.
2021
build Builds the project for the selected target platform and produces an application package or an
@@ -160,6 +161,53 @@ Platform-specific usage:
160161
Updates the NativeScript runtime for the specified platform.
161162
--[/]--
162163

164+
--[library]--
165+
Usage:
166+
$ tns library <Command>
167+
168+
You must run the library command with a related command.
169+
170+
<Command> is a related command that extends the library command. You can run the following related commands:
171+
add - Adds a native library to the current project.
172+
--[/]--
173+
174+
--[library|add]--
175+
Usage:
176+
$ tns library add <Platform> <Path>
177+
178+
Platform-specific usage:
179+
$ tns library add android <Library Path>
180+
$ tns library add ios <Library Path>
181+
182+
Adds a native library to the current project. 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. Build operations might perform additional configuration changes on the platform-specific project in platforms/<platform>.
183+
184+
IMPORTANT: When adding frameworks, keep in mind the following behaviors.
185+
* When you add an iOS framework, the NativeScript CLI automatically changes your build target to iOS 8.0.
186+
* Any functionality exposed by the library will becomes available in the built application package.
187+
* The first build operation after you run this command is significantly slower.
188+
189+
<Library Path> is the file path to a locally stored framework.
190+
When you want to add an iOS framework, <Library Path> must be the complete file path to the *.framework file that you want to use.
191+
When you want to add an Android framework, <Library Path> might be any of the following:
192+
* The file path to a directory containing one or more *.jar files.
193+
* The file path to a directory containing the project.properties files for an Android library project created with Eclipse.
194+
* The complete file path to a *.jar or project.properties file.
195+
196+
Prerequisites:
197+
Before adding a framework, verify that your project meets the following requirements:
198+
* You have added the platform for which you want to add a native library by running $ tns platform add <Platform>
199+
Before adding an iOS framework, verify that your system and the framework meets the following requirements.
200+
* You have installed Mono using Homebrew.
201+
* You have Xcode 6 and the iOS 8.0 SDK installed.
202+
* The framework is a Cocoa Touch Framework with all build architectures enabled.
203+
* If the framework relies on other third-party frameworks, make sure to add these frameworks manually as well.
204+
Before adding an Android framework, verify that the framework meets the following requirements.
205+
* If you want to add an Android library project, the project must be created and developed with Eclipse.
206+
* If an Android library project depends on other libraries, make sure that these libraries are accessible locally.
207+
* If a *.jar file depends on other libraries, make sure to add the dependent libraries by storing them in the same directory and passing this directory to <Library Path>. Otherwise, make sure to add each dependent library manually as well.
208+
209+
--[/]--
210+
163211
--[prepare]--
164212

165213
Usage:

0 commit comments

Comments
 (0)