@capacitor-firebase/functions 6.3.1 → 7.0.0-dev.1765885034

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.
@@ -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 = '13.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'FirebaseFunctions', '~> 11.0'
16
+ s.dependency 'FirebaseFunctions', '~> 12.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(.v15)],
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: "8.0.0"),
14
+ .package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "12.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
@@ -2,6 +2,19 @@
2
2
 
3
3
  Unofficial Capacitor plugin for [Firebase Cloud Functions](https://firebase.google.com/docs/functions/).[^1]
4
4
 
5
+ <div class="capawesome-z29o10a">
6
+ <a href="https://cloud.capawesome.io/" target="_blank">
7
+ <img alt="Deliver Live Updates to your Capacitor app with Capawesome Cloud" src="https://cloud.capawesome.io/assets/banners/cloud-deploy-real-time-app-updates.png?t=1" />
8
+ </a>
9
+ </div>
10
+
11
+ ## Compatibility
12
+
13
+ | Plugin Version | Capacitor Version | Status |
14
+ | -------------- | ----------------- | -------------- |
15
+ | 8.x.x | >=8.x.x | Active support |
16
+ | 7.x.x | 7.x.x | Deprecated |
17
+
5
18
  ## Installation
6
19
 
7
20
  ```bash
@@ -15,9 +28,11 @@ Add Firebase to your project if you haven't already ([Android](https://firebase.
15
28
 
16
29
  #### Variables
17
30
 
18
- This plugin will use the following project variables (defined in your app’s `variables.gradle` file):
31
+ If needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:
32
+
33
+ - `$firebaseFunctionsVersion` version of `com.google.firebase:firebase-functions` (default: `22.1.0`)
19
34
 
20
- - `$firebaseFunctionsVersion` version of `com.google.firebase:firebase-functions` (default: `20.4.0`)
35
+ This can be useful if you encounter dependency conflicts with other plugins in your project.
21
36
 
22
37
  ## Configuration
23
38
 
@@ -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.6.1'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
6
- firebaseFunctionsVersion = project.hasProperty('firebaseFunctionsVersion') ? rootProject.ext.firebaseFunctionsVersion : '20.4.0'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
6
+ firebaseFunctionsVersion = project.hasProperty('firebaseFunctionsVersion') ? rootProject.ext.firebaseFunctionsVersion : '22.1.0'
7
7
  }
8
8
 
9
9
  buildscript {
@@ -12,18 +12,18 @@ buildscript {
12
12
  mavenCentral()
13
13
  }
14
14
  dependencies {
15
- classpath 'com.android.tools.build:gradle:8.2.1'
15
+ classpath 'com.android.tools.build:gradle:8.13.0'
16
16
  }
17
17
  }
18
18
 
19
19
  apply plugin: 'com.android.library'
20
20
 
21
21
  android {
22
- namespace "io.capawesome.capacitorjs.plugins.firebase.functions"
23
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
22
+ namespace = "io.capawesome.capacitorjs.plugins.firebase.functions"
23
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
24
24
  defaultConfig {
25
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
26
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
25
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
26
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
27
27
  versionCode 1
28
28
  versionName "1.0"
29
29
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -35,11 +35,11 @@ android {
35
35
  }
36
36
  }
37
37
  lintOptions {
38
- abortOnError false
38
+ abortOnError = false
39
39
  }
40
40
  compileOptions {
41
- sourceCompatibility JavaVersion.VERSION_17
42
- targetCompatibility JavaVersion.VERSION_17
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
- task -> {
29
- CallResult result = new CallResult(task.getData());
30
- callback.success(result);
31
- }
32
- )
33
- .addOnFailureListener(
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
- task -> {
49
- CallResult result = new CallResult(task.getData());
50
- callback.success(result);
51
- }
52
- )
53
- .addOnFailureListener(
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
  }
@@ -50,7 +50,7 @@ export interface CallByNameOptions<RequestData = unknown> extends CallOptions<Re
50
50
  /**
51
51
  * @since 6.1.0
52
52
  */
53
- export declare type CallByNameResult<ResponseData = unknown> = CallResult<ResponseData>;
53
+ export type CallByNameResult<ResponseData = unknown> = CallResult<ResponseData>;
54
54
  /**
55
55
  * @since 6.1.0
56
56
  */
@@ -66,7 +66,7 @@ export interface CallByUrlOptions<RequestData = unknown> extends CallOptions<Req
66
66
  /**
67
67
  * @since 6.1.0
68
68
  */
69
- export declare type CallByUrlResult<ResponseData = unknown> = CallResult<ResponseData>;
69
+ export type CallByUrlResult<ResponseData = unknown> = CallResult<ResponseData>;
70
70
  /**
71
71
  * @since 6.1.0
72
72
  */
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var core = require('@capacitor/core');
6
4
  var functions = require('firebase/functions');
7
5
 
@@ -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":";;;;;;;AACK,MAAC,iBAAiB,GAAGA,mBAAc,CAAC,m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"}
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,IAAI;AACJ,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,IAAI;AACJ,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,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -36,8 +36,6 @@ var capacitorFirebaseFunctions = (function (exports, core, functions) {
36
36
 
37
37
  exports.FirebaseFunctions = FirebaseFunctions;
38
38
 
39
- Object.defineProperty(exports, '__esModule', { value: true });
40
-
41
39
  return exports;
42
40
 
43
41
  })({}, capacitorExports, functions);
@@ -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,CAAC;IAClE,QAAQ,MAAM,QAAQ,GAAGC,uBAAa,CAACF,WAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,EAAE,CAAC;IACzC,QAAQ,MAAM,QAAQ,GAAGE,8BAAoB,CAACH,WAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtE,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,MAAM,CAAC,IAAI;IAC7B,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,MAAMA,WAAS,GAAGC,sBAAY,CAAC,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChF,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;IAC1C,QAAQG,kCAAwB,CAACJ,WAAS,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChE,KAAK;IACL;;;;;;;;;;;;;;;;;"}
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,UAA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@ 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": "6.3.1",
3
+ "version": "7.0.0-dev.1765885034",
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.js",
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": "6.0.0",
60
- "@capacitor/cli": "6.0.0",
61
- "@capacitor/core": "6.0.0",
62
- "@capacitor/docgen": "0.3.0",
63
- "@capacitor/ios": "6.0.0",
64
- "@ionic/eslint-config": "0.3.0",
65
- "@ionic/swiftlint-config": "1.1.2",
66
- "eslint": "7.32.0",
67
- "firebase": "10.9.0",
68
- "prettier": "2.3.2",
69
- "prettier-plugin-java": "1.0.2",
70
- "rimraf": "3.0.2",
71
- "rollup": "2.77.2",
72
- "swiftlint": "1.0.1",
73
- "typescript": "4.1.5"
61
+ "@capacitor/android": "8.0.0",
62
+ "@capacitor/cli": "8.0.0",
63
+ "@capacitor/core": "8.0.0",
64
+ "@capacitor/docgen": "0.3.1",
65
+ "@capacitor/ios": "8.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.1.2",
73
+ "rollup": "4.53.3",
74
+ "swiftlint": "2.0.0",
75
+ "typescript": "5.9.3"
74
76
  },
75
77
  "peerDependencies": {
76
- "@capacitor/core": "^6.0.0",
77
- "firebase": "^10.9.0 || ^11.0.0"
78
+ "@capacitor/core": ">=8.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
- )