cordova-plugin-firebase-authentication 7.0.1 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
1
  # These are supported funding model platforms
2
2
 
3
+ github: chemerisuk
3
4
  custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FYAALBP25DP2G&source=url
package/Package.swift ADDED
@@ -0,0 +1,26 @@
1
+ // swift-tools-version:5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "cordova-plugin-firebase-authentication",
6
+ platforms: [.iOS(.v15)],
7
+ products: [
8
+ .library(name: "cordova-plugin-firebase-authentication", targets: ["FirebaseAuthenticationPlugin"])
9
+ ],
10
+ dependencies: [
11
+ .package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
12
+ .package(url: "https://github.com/firebase/firebase-ios-sdk.git", exact: "$IOS_FIREBASE_SDK_VERSION")
13
+ ],
14
+ targets: [
15
+ .target(
16
+ name: "FirebaseAuthenticationPlugin",
17
+ dependencies: [
18
+ .product(name: "Cordova", package: "cordova-ios"),
19
+ .product(name: "FirebaseAuth", package: "firebase-ios-sdk")
20
+ ],
21
+ path: "src/ios",
22
+ resources: [],
23
+ publicHeadersPath: "."
24
+ )
25
+ ]
26
+ )
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cordova plugin for [Firebase Authentication](https://firebase.google.com/docs/auth/)
2
2
 
3
- [![NPM version][npm-version]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![NPM total downloads][npm-total-downloads]][npm-url] [![Twitter][twitter-follow]][twitter-url]
3
+ [![NPM version][npm-version]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![NPM total downloads][npm-total-downloads]][npm-url] [![GitHub sponsor](https://img.shields.io/static/v1?label=sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/chemerisuk) [![Twitter][twitter-follow]][twitter-url]
4
4
 
5
5
  | [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)][donate-url] | Your help is appreciated. Create a PR, submit a bug or just grab me :beer: |
6
6
  |-|-|
@@ -54,11 +54,11 @@
54
54
 
55
55
  cordova plugin add cordova-plugin-firebase-authentication
56
56
 
57
- Use variables `IOS_FIREBASE_POD_VERSION` and `ANDROID_FIREBASE_BOM_VERSION` to override dependency versions for Firebase SDKs:
57
+ Use variables `IOS_FIREBASE_SDK_VERSION` and `ANDROID_FIREBASE_BOM_VERSION` to override dependency versions for Firebase SDKs:
58
58
 
59
59
  $ cordova plugin add cordova-plugin-firebase-authentication \
60
- --variable IOS_FIREBASE_POD_VERSION="9.3.0" \
61
- --variable ANDROID_FIREBASE_BOM_VERSION="30.3.1"
60
+ --variable IOS_FIREBASE_SDK_VERSION="12.19.1" \
61
+ --variable ANDROID_FIREBASE_BOM_VERSION="34.19.0"
62
62
 
63
63
  To use phone number authentication on iOS, your app must be able to receive silent APNs notifications from Firebase. For iOS 8.0 and above silent notifications do not require explicit user consent and is therefore unaffected by a user declining to receive APNs notifications in the app. Thus, the app does not need to request user permission to receive push notifications when implementing Firebase phone number auth.
64
64
 
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ module.exports = function(context) {
7
+ const opts = context.opts || {};
8
+ const pluginId = opts.plugin && opts.plugin.id;
9
+ const iosPlatformPath = path.join(opts.projectRoot, 'platforms', 'ios');
10
+
11
+ const iosJsonPath = path.join(iosPlatformPath, 'ios.json');
12
+ const iosJson = JSON.parse(fs.readFileSync(iosJsonPath, 'utf8'));
13
+ const pluginVariables = iosJson.installed_plugins[pluginId] || {};
14
+
15
+ const packagePaths = [
16
+ path.join(opts.plugin.dir, 'Package.swift'),
17
+ path.join(iosPlatformPath, 'packages', pluginId, 'Package.swift')
18
+ ];
19
+
20
+ packagePaths.forEach(packagePath => {
21
+ if (!fs.existsSync(packagePath)) return;
22
+
23
+ let content = fs.readFileSync(packagePath, 'utf8');
24
+
25
+ for (const varName in pluginVariables) {
26
+ content = content.replaceAll(`$${varName}`, pluginVariables[varName]);
27
+ }
28
+
29
+ fs.writeFileSync(packagePath, content, 'utf8');
30
+ });
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-firebase-authentication",
3
- "version": "7.0.1",
3
+ "version": "9.0.0",
4
4
  "description": "Cordova plugin for Firebase Authentication",
5
5
  "types": "./types/index.d.ts",
6
6
  "cordova": {
package/plugin.xml CHANGED
@@ -1,7 +1,7 @@
1
1
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2
2
  xmlns:android="http://schemas.android.com/apk/res/android"
3
3
  id="cordova-plugin-firebase-authentication"
4
- version="7.0.1">
4
+ version="9.0.0">
5
5
 
6
6
  <name>cordova-plugin-firebase-authentication</name>
7
7
  <description>Cordova plugin for Firebase Authentication</description>
@@ -20,8 +20,8 @@ xmlns:android="http://schemas.android.com/apk/res/android"
20
20
  <engine name="cordova-ios" version=">=6.0.0"/>
21
21
  </engines>
22
22
 
23
- <platform name="ios">
24
- <preference name="IOS_FIREBASE_POD_VERSION" default="9.3.0" />
23
+ <platform name="ios" package="swift">
24
+ <preference name="IOS_FIREBASE_SDK_VERSION" default="12.19.1" />
25
25
 
26
26
  <config-file target="config.xml" parent="/*">
27
27
  <feature name="FirebaseAuthentication">
@@ -38,13 +38,13 @@ xmlns:android="http://schemas.android.com/apk/res/android"
38
38
  <source url="https://cdn.cocoapods.org/"/>
39
39
  </config>
40
40
  <pods use-frameworks="true">
41
- <pod name="Firebase/Auth" spec="$IOS_FIREBASE_POD_VERSION" />
41
+ <pod name="Firebase/Auth" spec="$IOS_FIREBASE_SDK_VERSION" nospm="true"/>
42
42
  </pods>
43
43
  </podspec>
44
44
  </platform>
45
45
 
46
46
  <platform name="android">
47
- <preference name="ANDROID_FIREBASE_BOM_VERSION" default="30.3.1" />
47
+ <preference name="ANDROID_FIREBASE_BOM_VERSION" default="34.19.0" />
48
48
 
49
49
  <config-file target="res/xml/config.xml" parent="/*">
50
50
  <feature name="FirebaseAuthentication">
@@ -56,7 +56,7 @@ xmlns:android="http://schemas.android.com/apk/res/android"
56
56
  <config-file target="config.xml" parent="/*">
57
57
  <preference name="AndroidXEnabled" value="true" />
58
58
  <preference name="GradlePluginGoogleServicesEnabled" value="true" />
59
- <preference name="GradlePluginGoogleServicesVersion" value="4.3.13" />
59
+ <preference name="GradlePluginGoogleServicesVersion" value="4.4.0" />
60
60
  </config-file>
61
61
 
62
62
  <dependency id="cordova-support-android-plugin" version="~2.0.4"/>
@@ -1,6 +1,5 @@
1
- #import <Cordova/CDV.h>
2
-
3
- @import FirebaseAuth;
1
+ #import <Cordova/Cordova.h>
2
+ #import <FirebaseAuth/FirebaseAuth.h>
4
3
 
5
4
  @interface FirebaseAuthenticationPlugin : CDVPlugin
6
5
 
@@ -1,6 +1,7 @@
1
1
  #import "FirebaseAuthenticationPlugin.h"
2
2
 
3
3
  @import FirebaseCore;
4
+ @import FirebaseAuth;
4
5
 
5
6
  @implementation FirebaseAuthenticationPlugin
6
7