@athletic/capacitor-firebase-realtime 0.0.4 → 0.0.7
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/AthleticCapacitorFirebaseRealtime.podspec +19 -17
- package/android/src/main/java/net/athletic/firebase/realtime/CapacitorFirebaseRealtimePlugin.java +0 -3
- package/ios/Plugin/CapacitorFirebaseRealtimePlugin.m +4 -1
- package/ios/Plugin/CapacitorFirebaseRealtimePlugin.swift +4 -4
- package/package.json +1 -1
- package/android/src/main/java/net/athletic/firebase/realtime/CapacitorFirebaseRealtime.java +0 -11
- package/ios/Plugin/CapacitorFirebaseRealtime.swift +0 -8
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = 'AthleticCapacitorFirebaseRealtime'
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.license = package['license']
|
|
10
|
-
s.homepage = package['repository']['url']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '13.0'
|
|
15
|
-
s.dependency 'Capacitor'
|
|
16
|
-
s.
|
|
17
|
-
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'AthleticCapacitorFirebaseRealtime'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '13.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.dependency 'FirebaseAuth'
|
|
17
|
+
s.dependency 'FirebaseDatabase'
|
|
18
|
+
s.swift_version = '5.1'
|
|
19
|
+
end
|
package/android/src/main/java/net/athletic/firebase/realtime/CapacitorFirebaseRealtimePlugin.java
CHANGED
|
@@ -38,9 +38,6 @@ Examples here:
|
|
|
38
38
|
|
|
39
39
|
@CapacitorPlugin(name = "CapacitorFirebaseRealtime")
|
|
40
40
|
public class CapacitorFirebaseRealtimePlugin extends Plugin {
|
|
41
|
-
|
|
42
|
-
// private CapacitorFirebaseRealtime implementation = new CapacitorFirebaseRealtime();
|
|
43
|
-
|
|
44
41
|
private FirebaseAuth fireAuth;
|
|
45
42
|
private FirebaseDatabase fireDb;
|
|
46
43
|
private FirebaseUser currentUser = null;
|
|
@@ -4,5 +4,8 @@
|
|
|
4
4
|
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
5
|
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
6
|
CAP_PLUGIN(CapacitorFirebaseRealtimePlugin, "CapacitorFirebaseRealtime",
|
|
7
|
-
CAP_PLUGIN_METHOD(
|
|
7
|
+
CAP_PLUGIN_METHOD(signOut, CAPPluginReturnPromise);
|
|
8
|
+
CAP_PLUGIN_METHOD(initialize, CAPPluginReturnPromise);
|
|
9
|
+
CAP_PLUGIN_METHOD(signInWithCustomToken, CAPPluginReturnPromise);
|
|
10
|
+
CAP_PLUGIN_METHOD(updateChildren, CAPPluginReturnPromise);
|
|
8
11
|
)
|
|
@@ -10,12 +10,12 @@ import FirebaseDatabase
|
|
|
10
10
|
*/
|
|
11
11
|
@objc(CapacitorFirebaseRealtimePlugin)
|
|
12
12
|
public class CapacitorFirebaseRealtimePlugin: CAPPlugin {
|
|
13
|
-
private let implementation = CapacitorFirebaseRealtime()
|
|
14
|
-
|
|
15
13
|
private var ref: DatabaseReference!
|
|
16
14
|
|
|
17
15
|
override public func load() {
|
|
18
|
-
FirebaseApp.
|
|
16
|
+
if (FirebaseApp.app() == nil) {
|
|
17
|
+
FirebaseApp.configure()
|
|
18
|
+
}
|
|
19
19
|
ref = Database.database().reference()
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -36,7 +36,7 @@ public class CapacitorFirebaseRealtimePlugin: CAPPlugin {
|
|
|
36
36
|
if firebaseUserId > 0 && signedInUserId != firebaseUserId {
|
|
37
37
|
print("CapFire userId mismatch")
|
|
38
38
|
signOut(call)
|
|
39
|
-
firebaseUserId=0
|
|
39
|
+
firebaseUserId = 0
|
|
40
40
|
}
|
|
41
41
|
call.resolve(["signedIn": firebaseUserId])
|
|
42
42
|
}
|
package/package.json
CHANGED