Skip to content

Commit 68fcf8b

Browse files
authored
refactor: init only for web, without check platform (#134)
* refactor: add ios `init` unimplemented * refactor: add android `init` unimplemented
1 parent ea4668a commit 68fcf8b

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

android/src/main/java/com/codetrixstudio/capacitor/GoogleAuth/GoogleAuth.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public void load() {
5959
googleSignInClient = GoogleSignIn.getClient(this.getContext(), googleSignInOptions);
6060
}
6161

62+
@PluginMethod
63+
public void init(PluginCall call) {
64+
call.unimplemented();
65+
}
66+
6267
@PluginMethod()
6368
public void signIn(PluginCall call) {
6469
saveCall(call);

ios/Plugin/Plugin.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
CAP_PLUGIN_METHOD(signIn, CAPPluginReturnPromise);
88
CAP_PLUGIN_METHOD(refresh, CAPPluginReturnPromise);
99
CAP_PLUGIN_METHOD(signOut, CAPPluginReturnPromise);
10+
CAP_PLUGIN_METHOD(init, CAPPluginReturnPromise);
1011
)

ios/Plugin/Plugin.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public class GoogleAuth: CAPPlugin {
3434
NotificationCenter.default.addObserver(self, selector: #selector(handleOpenUrl(_ :)), name: Notification.Name(CAPNotifications.URLOpen.name()), object: nil);
3535
}
3636

37+
@objc
38+
func init(_ call: CAPPluginCall) {
39+
call.unimplemented("Not available on iOS")
40+
}
41+
3742
@objc
3843
func signIn(_ call: CAPPluginCall) {
3944
signInCall = call;

0 commit comments

Comments
 (0)