From 99ce2aee887d131c8cf3b6cce8f4d21593d531ba Mon Sep 17 00:00:00 2001 From: Florian Rival Date: Sat, 26 Jul 2025 17:29:51 +0200 Subject: [PATCH 1/3] Remove forced Java version --- build/android/SafariViewController-java18.gradle | 8 -------- plugin.xml | 1 - 2 files changed, 9 deletions(-) delete mode 100644 build/android/SafariViewController-java18.gradle 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/plugin.xml b/plugin.xml index 3b8ff63..3918d0a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -44,7 +44,6 @@ - From 2a8492f119524dc538fe1d51ad5dd844b03f371d Mon Sep 17 00:00:00 2001 From: Florian Rival Date: Sat, 26 Jul 2025 17:41:29 +0200 Subject: [PATCH 2/3] Update the package to be maintained by GDevelop --- README.md | 16 +++++++++------- package.json | 12 ++++++------ plugin.xml | 4 ++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 050f193..c9d2be0 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,7 +62,7 @@ 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. @@ -181,7 +183,7 @@ Do this: ## 7. Changelog * 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/package.json b/package.json index d7aa12d..8f34d20 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 3918d0a..b771de4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ SafariViewController From e1d9f1a88dea48b5dcb1d65b2f1d4caa5eecc070 Mon Sep 17 00:00:00 2001 From: Florian Rival Date: Sun, 27 Jul 2025 12:27:41 +0200 Subject: [PATCH 3/3] Use npm org instead --- README.md | 27 +++++++-------------------- package.json | 4 ++-- plugin.xml | 2 +- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c9d2be0..e36af72 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ SafariViewController Cordova Plugin [![TotalDownloads][total-downloads-image]][npm-url] [![Twitter Follow][twitter-image]][twitter-url] -[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 +[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 @@ -62,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 gdevelop-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: @@ -182,6 +167,8 @@ 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/GDevelopApp/cordova-plugin-safariviewcontroller/milestone/7?closed=1). * 1.5.3 Hidden tabs don't get removed on `hide()` (iOS). Thanks #104! diff --git a/package.json b/package.json index 8f34d20..41b230d 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "gdevelop-cordova-plugin-safariviewcontroller", + "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": "gdevelop-cordova-plugin-safariviewcontroller", + "id": "@gdevelop/cordova-plugin-safariviewcontroller", "platforms": [ "ios" ] diff --git a/plugin.xml b/plugin.xml index b771de4..d966f3a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,6 +1,6 @@