@capacitor-firebase/functions 6.3.0 → 7.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.
- package/CapacitorFirebaseFunctions.podspec +2 -2
- package/Package.swift +31 -0
- package/README.md +1 -1
- package/android/build.gradle +10 -10
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/firebase/functions/FirebaseFunctions.java +14 -22
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/firebase/functions/classes/results/CallResult.java +2 -0
- package/dist/plugin.cjs.js +0 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +0 -2
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/FirebaseFunctionsPlugin.swift +8 -1
- package/package.json +20 -18
- package/ios/Plugin/FirebaseFunctionsPlugin.h +0 -10
- package/ios/Plugin/FirebaseFunctionsPlugin.m +0 -10
|
@@ -11,9 +11,9 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '14.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'FirebaseFunctions', '~> 11.0'
|
|
16
|
+
s.dependency 'FirebaseFunctions', '~> 11.7.0'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
s.static_framework = true
|
|
19
19
|
end
|
package/Package.swift
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "CapacitorFirebaseFunctions",
|
|
6
|
+
platforms: [.iOS(.v14)],
|
|
7
|
+
products: [
|
|
8
|
+
.library(
|
|
9
|
+
name: "CapacitorFirebaseFunctions",
|
|
10
|
+
targets: ["FirebaseFunctionsPlugin"])
|
|
11
|
+
],
|
|
12
|
+
dependencies: [
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
|
|
14
|
+
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "11.7.0"))
|
|
15
|
+
],
|
|
16
|
+
targets: [
|
|
17
|
+
.target(
|
|
18
|
+
name: "FirebaseFunctionsPlugin",
|
|
19
|
+
dependencies: [
|
|
20
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
21
|
+
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
22
|
+
.product(name: "FirebaseCore", package: "firebase-ios-sdk"),
|
|
23
|
+
.product(name: "FirebaseFunctions", package: "firebase-ios-sdk")
|
|
24
|
+
],
|
|
25
|
+
path: "ios/Plugin"),
|
|
26
|
+
.testTarget(
|
|
27
|
+
name: "FirebaseFunctionsPluginTests",
|
|
28
|
+
dependencies: ["FirebaseFunctionsPlugin"],
|
|
29
|
+
path: "ios/PluginTests")
|
|
30
|
+
]
|
|
31
|
+
)
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Add Firebase to your project if you haven't already ([Android](https://firebase.
|
|
|
17
17
|
|
|
18
18
|
This plugin will use the following project variables (defined in your app’s `variables.gradle` file):
|
|
19
19
|
|
|
20
|
-
- `$firebaseFunctionsVersion` version of `com.google.firebase:firebase-functions` (default: `
|
|
20
|
+
- `$firebaseFunctionsVersion` version of `com.google.firebase:firebase-functions` (default: `21.1.0`)
|
|
21
21
|
|
|
22
22
|
## Configuration
|
|
23
23
|
|
package/android/build.gradle
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
6
|
-
firebaseFunctionsVersion = project.hasProperty('firebaseFunctionsVersion') ? rootProject.ext.firebaseFunctionsVersion : '
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
|
+
firebaseFunctionsVersion = project.hasProperty('firebaseFunctionsVersion') ? rootProject.ext.firebaseFunctionsVersion : '21.1.0'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
buildscript {
|
|
@@ -12,7 +12,7 @@ buildscript {
|
|
|
12
12
|
mavenCentral()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath 'com.android.tools.build:gradle:8.2
|
|
15
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -20,10 +20,10 @@ apply plugin: 'com.android.library'
|
|
|
20
20
|
|
|
21
21
|
android {
|
|
22
22
|
namespace "io.capawesome.capacitorjs.plugins.firebase.functions"
|
|
23
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
23
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
24
24
|
defaultConfig {
|
|
25
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
26
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
25
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
26
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
27
27
|
versionCode 1
|
|
28
28
|
versionName "1.0"
|
|
29
29
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -38,8 +38,8 @@ android {
|
|
|
38
38
|
abortOnError false
|
|
39
39
|
}
|
|
40
40
|
compileOptions {
|
|
41
|
-
sourceCompatibility JavaVersion.
|
|
42
|
-
targetCompatibility JavaVersion.
|
|
41
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
42
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -24,17 +24,13 @@ public class FirebaseFunctions {
|
|
|
24
24
|
getFirebaseFunctionsInstance(region)
|
|
25
25
|
.getHttpsCallable(name)
|
|
26
26
|
.call(data)
|
|
27
|
-
.addOnSuccessListener(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exception -> {
|
|
35
|
-
callback.error(exception);
|
|
36
|
-
}
|
|
37
|
-
);
|
|
27
|
+
.addOnSuccessListener(task -> {
|
|
28
|
+
CallResult result = new CallResult(task.getData());
|
|
29
|
+
callback.success(result);
|
|
30
|
+
})
|
|
31
|
+
.addOnFailureListener(exception -> {
|
|
32
|
+
callback.error(exception);
|
|
33
|
+
});
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
public void callByUrl(@NonNull CallByUrlOptions options, @NonNull NonEmptyResultCallback callback) {
|
|
@@ -44,17 +40,13 @@ public class FirebaseFunctions {
|
|
|
44
40
|
getFirebaseFunctionsInstance(null)
|
|
45
41
|
.getHttpsCallableFromUrl(url)
|
|
46
42
|
.call(data)
|
|
47
|
-
.addOnSuccessListener(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
exception -> {
|
|
55
|
-
callback.error(exception);
|
|
56
|
-
}
|
|
57
|
-
);
|
|
43
|
+
.addOnSuccessListener(task -> {
|
|
44
|
+
CallResult result = new CallResult(task.getData());
|
|
45
|
+
callback.success(result);
|
|
46
|
+
})
|
|
47
|
+
.addOnFailureListener(exception -> {
|
|
48
|
+
callback.error(exception);
|
|
49
|
+
});
|
|
58
50
|
}
|
|
59
51
|
|
|
60
52
|
public void useEmulator(@NonNull String host, int port) {
|
|
@@ -59,6 +59,8 @@ public class CallResult implements Result {
|
|
|
59
59
|
for (Object value : arrayList) {
|
|
60
60
|
if (value instanceof Map) {
|
|
61
61
|
value = createJSObjectFromMap((Map<String, Object>) value);
|
|
62
|
+
} else if (value instanceof ArrayList) {
|
|
63
|
+
value = createJSArrayFromArrayList((ArrayList) value);
|
|
62
64
|
}
|
|
63
65
|
array.put(value);
|
|
64
66
|
}
|
package/dist/plugin.cjs.js
CHANGED
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;;;AACK,MAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;AAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;AACtE,CAAC;;ACDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;AACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;AACjE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC;AAC/D,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;AAC7B,SAAS;AACT;AACA,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;AAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE;AACxC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC;AACrE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;AAC7B,SAAS;AACT;AACA,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC;AAC/E,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI;AACzC,QAAQG,kCAAwB,CAACJ,WAAS,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;AAC/D;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;AACK,UAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;IAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;IACtE,CAAC;;ICDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;IACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FirebaseFunctions = registerPlugin('FirebaseFunctions', {\n web: () => import('./web').then(m => new m.FirebaseFunctionsWeb()),\n});\nexport * from './definitions';\nexport { FirebaseFunctions };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { connectFunctionsEmulator, getFunctions, httpsCallable, httpsCallableFromURL, } from 'firebase/functions';\nexport class FirebaseFunctionsWeb extends WebPlugin {\n async callByName(options) {\n const functions = getFunctions(undefined, options.region);\n const callable = httpsCallable(functions, options.name);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async callByUrl(options) {\n const functions = getFunctions();\n const callable = httpsCallableFromURL(functions, options.url);\n const result = await callable(options.data);\n return {\n data: result.data,\n };\n }\n async useEmulator(options) {\n const functions = getFunctions(undefined, options.regionOrCustomDomain);\n const port = options.port || 5001;\n connectFunctionsEmulator(functions, options.host, port);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","functions","getFunctions","httpsCallable","httpsCallableFromURL","connectFunctionsEmulator"],"mappings":";;;AACK,UAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;IAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;IACtE,CAAC;;ICDM,MAAM,oBAAoB,SAASC,cAAS,CAAC;IACpD,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,MAAMC,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;IACjE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC;IAC/D,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACnD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS;IACT;IACA,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE;IACxC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC;IACrE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACnD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS;IACT;IACA,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAC/E,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI;IACzC,QAAQG,kCAAwB,CAACJ,WAAS,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;IAC/D;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,14 @@ import Capacitor
|
|
|
6
6
|
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
7
|
*/
|
|
8
8
|
@objc(FirebaseFunctionsPlugin)
|
|
9
|
-
public class FirebaseFunctionsPlugin: CAPPlugin {
|
|
9
|
+
public class FirebaseFunctionsPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
public let identifier = "FirebaseFunctionsPlugin"
|
|
11
|
+
public let jsName = "FirebaseFunctions"
|
|
12
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
|
+
CAPPluginMethod(name: "callByName", returnType: CAPPluginReturnPromise),
|
|
14
|
+
CAPPluginMethod(name: "callByUrl", returnType: CAPPluginReturnPromise),
|
|
15
|
+
CAPPluginMethod(name: "useEmulator", returnType: CAPPluginReturnPromise)
|
|
16
|
+
]
|
|
10
17
|
public let tag = "FirebaseFunctions"
|
|
11
18
|
public let errorNameMissing = "name must be provided."
|
|
12
19
|
public let errorHostMissing = "host must be provided."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-firebase/functions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Capacitor plugin for Firebase Cloud Functions.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"android/build.gradle",
|
|
12
12
|
"dist/",
|
|
13
13
|
"ios/Plugin/",
|
|
14
|
-
"CapacitorFirebaseFunctions.podspec"
|
|
14
|
+
"CapacitorFirebaseFunctions.podspec",
|
|
15
|
+
"Package.swift"
|
|
15
16
|
],
|
|
16
17
|
"author": "Robin Genz <mail@robingenz.dev>",
|
|
17
18
|
"license": "Apache-2.0",
|
|
@@ -49,32 +50,33 @@
|
|
|
49
50
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
50
51
|
"swiftlint": "node-swiftlint",
|
|
51
52
|
"docgen": "docgen --api FirebaseFunctionsPlugin --output-readme README.md --output-json dist/docs.json",
|
|
52
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
|
53
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
53
54
|
"clean": "rimraf ./dist",
|
|
54
55
|
"watch": "tsc --watch",
|
|
55
56
|
"ios:pod:install": "cd ios && pod install --repo-update && cd ..",
|
|
57
|
+
"ios:spm:install": "cd ios && swift package resolve && cd ..",
|
|
56
58
|
"prepublishOnly": "npm run build"
|
|
57
59
|
},
|
|
58
60
|
"devDependencies": {
|
|
59
|
-
"@capacitor/android": "
|
|
60
|
-
"@capacitor/cli": "
|
|
61
|
-
"@capacitor/core": "
|
|
61
|
+
"@capacitor/android": "7.0.0",
|
|
62
|
+
"@capacitor/cli": "7.0.0",
|
|
63
|
+
"@capacitor/core": "7.0.0",
|
|
62
64
|
"@capacitor/docgen": "0.3.0",
|
|
63
|
-
"@capacitor/ios": "
|
|
64
|
-
"@ionic/eslint-config": "0.
|
|
65
|
-
"@ionic/swiftlint-config": "
|
|
66
|
-
"eslint": "
|
|
67
|
-
"firebase": "
|
|
68
|
-
"prettier": "
|
|
69
|
-
"prettier-plugin-java": "
|
|
70
|
-
"rimraf": "
|
|
71
|
-
"rollup": "
|
|
72
|
-
"swiftlint": "
|
|
65
|
+
"@capacitor/ios": "7.0.0",
|
|
66
|
+
"@ionic/eslint-config": "0.4.0",
|
|
67
|
+
"@ionic/swiftlint-config": "2.0.0",
|
|
68
|
+
"eslint": "8.57.0",
|
|
69
|
+
"firebase": "11.2.0",
|
|
70
|
+
"prettier": "3.4.2",
|
|
71
|
+
"prettier-plugin-java": "2.6.7",
|
|
72
|
+
"rimraf": "6.0.1",
|
|
73
|
+
"rollup": "4.30.1",
|
|
74
|
+
"swiftlint": "2.0.0",
|
|
73
75
|
"typescript": "4.1.5"
|
|
74
76
|
},
|
|
75
77
|
"peerDependencies": {
|
|
76
|
-
"@capacitor/core": "
|
|
77
|
-
"firebase": "^
|
|
78
|
+
"@capacitor/core": ">=7.0.0",
|
|
79
|
+
"firebase": "^11.2.0"
|
|
78
80
|
},
|
|
79
81
|
"peerDependenciesMeta": {
|
|
80
82
|
"firebase": {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
//! Project version number for Plugin.
|
|
4
|
-
FOUNDATION_EXPORT double PluginVersionNumber;
|
|
5
|
-
|
|
6
|
-
//! Project version string for Plugin.
|
|
7
|
-
FOUNDATION_EXPORT const unsigned char PluginVersionString[];
|
|
8
|
-
|
|
9
|
-
// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
|
|
10
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import <Capacitor/Capacitor.h>
|
|
3
|
-
|
|
4
|
-
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
|
-
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
|
-
CAP_PLUGIN(FirebaseFunctionsPlugin, "FirebaseFunctions",
|
|
7
|
-
CAP_PLUGIN_METHOD(callByName, CAPPluginReturnPromise);
|
|
8
|
-
CAP_PLUGIN_METHOD(callByUrl, CAPPluginReturnPromise);
|
|
9
|
-
CAP_PLUGIN_METHOD(useEmulator, CAPPluginReturnPromise);
|
|
10
|
-
)
|