From 6e7fe5b861f866cd85e8044d0d29bba06aa3e51f Mon Sep 17 00:00:00 2001 From: Piotr Date: Thu, 8 Feb 2024 16:15:30 +0100 Subject: [PATCH 1/2] Update to Capacitor v5 --- .../community/applesignin/SignInWithApple.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java b/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java index 5a11be3..c43055b 100644 --- a/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java +++ b/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java @@ -1,20 +1,20 @@ package com.getcapacitor.community.applesignin; import com.getcapacitor.JSObject; -import com.getcapacitor.NativePlugin; import com.getcapacitor.Plugin; import com.getcapacitor.PluginCall; import com.getcapacitor.PluginMethod; +import com.getcapacitor.annotation.CapacitorPlugin; -@NativePlugin +@CapacitorPlugin(name = "Echo") public class SignInWithApple extends Plugin { - @PluginMethod + @PluginMethod() public void echo(PluginCall call) { String value = call.getString("value"); JSObject ret = new JSObject(); ret.put("value", value); - call.success(ret); + call.resolve(ret); } } From 48c28a336b9f4f50c7e1d12c985c789113ba5793 Mon Sep 17 00:00:00 2001 From: Piotr Date: Tue, 5 Nov 2024 15:13:30 +0100 Subject: [PATCH 2/2] Remove plugin name --- .../getcapacitor/community/applesignin/SignInWithApple.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java b/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java index c43055b..456f3ad 100644 --- a/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java +++ b/android/src/main/java/com/getcapacitor/community/applesignin/SignInWithApple.java @@ -6,10 +6,10 @@ import com.getcapacitor.PluginMethod; import com.getcapacitor.annotation.CapacitorPlugin; -@CapacitorPlugin(name = "Echo") +@CapacitorPlugin public class SignInWithApple extends Plugin { - @PluginMethod() + @PluginMethod public void echo(PluginCall call) { String value = call.getString("value");