Skip to content

Commit

Permalink
- Whitelist package ids that contain 'test' #87
Browse files Browse the repository at this point in the history
- Allow support for iOS and Android -specific license keys #86
  • Loading branch information
EddyVerbruggen committed Sep 2, 2018
1 parent 0699a13 commit c66d395
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ This plugin has been a BEAST to implement and its maintenance is killing me alre
* You'll quickly receive a license key (and instructions) which you can use to install the plugin.
* You can now forever use this version and any future version of this plugin for this app without restrictions.

Once the license key (`abc` in this example) is received, you can add the plugin like this:

```bash
cordova plugin add cordova-plugin-native-keyboard --variable LICENSE=abc
```

Or if your iOS and Android package ids are different, use this (supported since plugin version 1.5.8):

```bash
cordova plugin add cordova-plugin-native-keyboard --variable LIC_ANDROID=abc --variable LIC_IOS=xyz
```

## I heard about a trial!?
ALL features are available without a license, but you'll be restricted to 5 minutes of usage. Just indefinitely kill and relaunch the app if you need more time ;)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-native-keyboard",
"version": "1.5.7",
"version": "1.5.8",
"description": "This plugin aims to solve common keyboard problems encountered with Cordova / PhoneGap apps. The messenger component (see screenshots) is ready for production, but this plugin will have more tricks up its sleeve. I'll document those once they're ready for primetime as well.",
"cordova": {
"id": "cordova-plugin-native-keyboard",
Expand Down
15 changes: 12 additions & 3 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-native-keyboard"
version="1.5.7">
version="1.5.8">

<name>Native Keyboard</name>

Expand Down Expand Up @@ -34,6 +34,8 @@
</js-module>

<platform name="android">
<preference name="LIC_ANDROID" default="TRIAL" />

<config-file parent="/*" target="res/xml/config.xml">
<feature name="NativeKeyboard">
<param name="android-package" value="nl.xservices.plugins.nativekeyboard.NativeKeyboard" />
Expand All @@ -54,18 +56,22 @@
<source-file src="src/android/assets/fonts/fontawesome-webfont.ttf" target-dir="assets/fonts" />
<source-file src="src/android/assets/fonts/ionicons.ttf" target-dir="assets/fonts" />
<config-file target="res/values/nativekeyboard.xml" parent="/*">
<string name="NativeKeyboardPluginLicense">$LICENSE</string>
<string name="NativeKeyboardPluginLicense">$LIC_ANDROID</string>
<string name="NativeKeyboardPluginLicenseAlt">$LICENSE</string>
</config-file>

<!-- cordova-android >= 7 -->
<source-file src="src/android/assets/fonts/fontawesome-webfont.ttf" target-dir="app/src/main/assets/fonts" />
<source-file src="src/android/assets/fonts/ionicons.ttf" target-dir="app/src/main/assets/fonts" />
<config-file target="app/src/main/res/values/nativekeyboard.xml" parent="/*">
<string name="NativeKeyboardPluginLicense">$LICENSE</string>
<string name="NativeKeyboardPluginLicense">$LIC_ANDROID</string>
<string name="NativeKeyboardPluginLicenseAlt">$LICENSE</string>
</config-file>
</platform>

<platform name="ios">
<preference name="LIC_IOS" default="TRIAL" />

<config-file target="config.xml" parent="/*">
<feature name="NativeKeyboard">
<param name="ios-package" value="CDVNativeKeyboard"/>
Expand All @@ -91,6 +97,9 @@
</config-file>

<config-file target="*-Info.plist" parent="NativeKeyboardPluginLicense">
<string>$LIC_IOS</string>
</config-file>
<config-file target="*-Info.plist" parent="NativeKeyboardPluginLicenseAlt">
<string>$LICENSE</string>
</config-file>
</platform>
Expand Down
Binary file modified src/android/lib/nativekeyboard.jar
Binary file not shown.
Binary file modified src/ios/lib/NativeKeyboard.framework/Info.plist
Binary file not shown.
Binary file modified src/ios/lib/NativeKeyboard.framework/NativeKeyboard
Binary file not shown.

0 comments on commit c66d395

Please sign in to comment.