diff --git a/README.md b/README.md index 050f193..e36af72 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,15 @@ SafariViewController Cordova Plugin [![TotalDownloads][total-downloads-image]][npm-url] [![Twitter Follow][twitter-image]][twitter-url] -[npm-image]:http://img.shields.io/npm/v/cordova-plugin-safariviewcontroller.svg -[npm-url]:https://npmjs.org/package/cordova-plugin-safariviewcontroller -[downloads-image]:http://img.shields.io/npm/dm/cordova-plugin-safariviewcontroller.svg -[total-downloads-image]:http://img.shields.io/npm/dt/cordova-plugin-safariviewcontroller.svg?label=total%20downloads +[npm-image]:http://img.shields.io/npm/v/@gdevelop/cordova-plugin-safariviewcontroller.svg +[npm-url]:https://npmjs.org/package/@gdevelop/cordova-plugin-safariviewcontroller +[downloads-image]:http://img.shields.io/npm/dm/@gdevelop/cordova-plugin-safariviewcontroller.svg +[total-downloads-image]:http://img.shields.io/npm/dt/@gdevelop/cordova-plugin-safariviewcontroller.svg?label=total%20downloads [twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me [twitter-url]:https://twitter.com/eddyverbruggen +> Note: this is a fork of https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller while waiting for it to be updated. If needed, this will be cleaned and published as a npm module maintained by the GDevelop team. + ## 0. Index 1. [Description](#1-description) @@ -28,7 +30,7 @@ SafariViewController Cordova Plugin * Use the new and powerful iOS9 viewcontroller to show webcontent in your PhoneGap app * Requires XCode 7 / iOS9 SDK to build * Requires iOS9 to use, lower versions need to fall back to InAppBrowser (example below!) -* [Chrome custom tabs](https://developer.chrome.com/multidevice/android/customtabs) are Android's parallel to SafariViewController with even more customizable UI. You can give it a try with the latest version of this plugin. See [the wiki](https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/wiki) for details. +* [Chrome custom tabs](https://developer.chrome.com/multidevice/android/customtabs) are Android's parallel to SafariViewController with even more customizable UI. You can give it a try with the latest version of this plugin. See [the wiki](https://github.com/GDevelopApp/cordova-plugin-safariviewcontroller/wiki) for details. Note that I didn't decide to clobber window.open to override InAppBrowser when applicable because that would mean you could never use InAppBrowser in case you need its advanced features @@ -60,24 +62,9 @@ On iOS 10, you can use `barColor` and `controlTintColor` as well To install the plugin with the Cordova CLI from npm: ``` -$ cordova plugin add cordova-plugin-safariviewcontroller +$ cordova plugin add @gdevelop/cordova-plugin-safariviewcontroller ``` -*Note*: the plugin requires Cordova Android 7.0.0 or later. - -### Graceful fallback to InAppBrowser -** This section is kinda obsolete by now (with iOS 12 currently being the latest version) ** - -Since SafariViewController is new in iOS9 you need to have a fallback for older versions (and other platforms), -so if `available` returns false (see the snippet below) you want to open the URL in the InAppBrowser probably, -so be sure to include that plugin as well: - -``` -$ cordova plugin add cordova-plugin-inappbrowser -``` - -I'm not including it as a dependency as not all folks may have this requirement. - ## 4. Usage Check the [demo code](demo/index.html) for an easy to drop in example, otherwise copy-paste this: @@ -180,8 +167,10 @@ Do this: ## 7. Changelog + +* 2.1.0 Support for latest Java version * 2.0.0 Support AndroidX -* 1.6.0 A few changes for Android. See [these closed issues](https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/milestone/7?closed=1). +* 1.6.0 A few changes for Android. See [these closed issues](https://github.com/GDevelopApp/cordova-plugin-safariviewcontroller/milestone/7?closed=1). * 1.5.3 Hidden tabs don't get removed on `hide()` (iOS). Thanks #104! * 1.4.3 Options weren't correctly passed to native code. Thanks #19! * 1.4.2 When passing a URL not starting with http/https the error callback will be invoked. diff --git a/build/android/SafariViewController-java18.gradle b/build/android/SafariViewController-java18.gradle deleted file mode 100644 index 97efd76..0000000 --- a/build/android/SafariViewController-java18.gradle +++ /dev/null @@ -1,8 +0,0 @@ -cdvPluginPostBuildExtras.add({ - android { - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - } -}) diff --git a/package.json b/package.json index d7aa12d..41b230d 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "name": "cordova-plugin-safariviewcontroller", - "version": "2.0.0", + "name": "@gdevelop/cordova-plugin-safariviewcontroller", + "version": "2.1.0", "description": "Forget InAppBrowser for iOS - this is way better for displaying read-only web content in your PhoneGap app.", "cordova": { - "id": "cordova-plugin-safariviewcontroller", + "id": "@gdevelop/cordova-plugin-safariviewcontroller", "platforms": [ "ios" ] }, "repository": { "type": "git", - "url": "git+https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller.git" + "url": "git+https://github.com/GDevelopApp/cordova-plugin-safariviewcontroller.git" }, "keywords": [ "InAppBrowser", @@ -31,7 +31,7 @@ "author": "Eddy Verbruggen (https://github.com/EddyVerbruggen)", "license": "MIT", "bugs": { - "url": "https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/issues" + "url": "https://github.com/GDevelopApp/cordova-plugin-safariviewcontroller/issues" }, - "homepage": "https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller#readme" + "homepage": "https://github.com/GDevelopApp/cordova-plugin-safariviewcontroller#readme" } diff --git a/plugin.xml b/plugin.xml index 3b8ff63..d966f3a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ SafariViewController @@ -44,7 +44,6 @@ -