@chuseok22/capacitor-kakao-login 0.1.6 → 0.1.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const APP_VERSION = '0.1.
|
|
1
|
+
export const APP_VERSION = '0.1.7';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -20,15 +20,28 @@ public class KakaoLoginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
20
20
|
return
|
|
21
21
|
}
|
|
22
22
|
KakaoSDK.initSDK(appKey: appKey)
|
|
23
|
-
// handleOpenUrl
|
|
23
|
+
// Capacitor 8: CAPPlugin에 handleOpenUrl 오버라이드 불가 — NotificationCenter로 URL 수신
|
|
24
|
+
NotificationCenter.default.addObserver(
|
|
25
|
+
self,
|
|
26
|
+
selector: #selector(handleOpenURL(_:)),
|
|
27
|
+
name: .capacitorOpenURL,
|
|
28
|
+
object: nil
|
|
29
|
+
)
|
|
24
30
|
}
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
deinit {
|
|
33
|
+
NotificationCenter.default.removeObserver(self)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Capacitor 8 URL 라우팅: AppDelegate → ApplicationDelegateProxy → capacitorOpenURL 알림
|
|
37
|
+
// notification.object = ["url": URL, "options": [UIApplication.OpenURLOptionsKey: Any]]
|
|
38
|
+
@objc private func handleOpenURL(_ notification: Notification) {
|
|
39
|
+
guard let object = notification.object as? [String: Any],
|
|
40
|
+
let url = object["url"] as? URL else { return }
|
|
41
|
+
guard AuthApi.isKakaoTalkLoginUrl(url) else { return }
|
|
42
|
+
// capacitorOpenURL은 메인 스레드에서 발송 — MainActor.assumeIsolated 안전
|
|
43
|
+
MainActor.assumeIsolated {
|
|
44
|
+
_ = AuthController.handleOpenUrl(url: url)
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
|