capacitor-event-bird 0.0.2 → 0.0.4

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.
@@ -20,17 +20,7 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
20
20
  }
21
21
 
22
22
  @objc func logout(_ call: CAPPluginCall) {
23
- DispatchQueue.main.async {
24
- if let sceneDelegate = UIApplication.shared.connectedScenes
25
- .first?.delegate as? SceneDelegate {
26
- sceneDelegate.showLoginScreen()
27
- call.resolve()
28
- } else if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
29
- appDelegate.showLoginScreen()
30
- call.resolve()
31
- } else {
32
- call.reject("Unable to access root view controller")
33
- }
34
- }
23
+ NotificationCenter.default.post(name: Notification.Name("NativeLogoutEvent"), object: nil)
24
+ call.resolve()
35
25
  }
36
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-event-bird",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "returns events back to native env",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",