@capawesome/capacitor-pixlive 0.1.0 → 0.1.1
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,4 +1,5 @@
|
|
|
1
1
|
import Foundation
|
|
2
|
+
import Capacitor
|
|
2
3
|
import VDARSDK
|
|
3
4
|
|
|
4
5
|
class CapacitorARViewController: VDARLiveAnnotationViewController {
|
|
@@ -7,11 +8,28 @@ class CapacitorARViewController: VDARLiveAnnotationViewController {
|
|
|
7
8
|
|
|
8
9
|
override func annotationViewDidBecomeEmpty() {
|
|
9
10
|
super.annotationViewDidBecomeEmpty()
|
|
11
|
+
if let bridge = findBridge(from: view.window?.rootViewController) {
|
|
12
|
+
bridge.setStatusBarVisible(true)
|
|
13
|
+
}
|
|
10
14
|
pixlive?.annotationViewDidBecomeEmpty()
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
override func annotationViewDidPresentAnnotations() {
|
|
14
18
|
super.annotationViewDidPresentAnnotations()
|
|
19
|
+
if let bridge = findBridge(from: view.window?.rootViewController) {
|
|
20
|
+
bridge.setStatusBarVisible(false)
|
|
21
|
+
}
|
|
15
22
|
pixlive?.annotationViewDidPresentAnnotations()
|
|
16
23
|
}
|
|
24
|
+
|
|
25
|
+
private func findBridge(from root: UIViewController?) -> CAPBridgeViewController? {
|
|
26
|
+
guard let root else { return nil }
|
|
27
|
+
if let b = root as? CAPBridgeViewController { return b }
|
|
28
|
+
for child in root.children {
|
|
29
|
+
if let found = findBridge(from: child) { return found }
|
|
30
|
+
}
|
|
31
|
+
if let presented = root.presentedViewController,
|
|
32
|
+
let found = findBridge(from: presented) { return found }
|
|
33
|
+
return nil
|
|
34
|
+
}
|
|
17
35
|
}
|
package/ios/Plugin/Pixlive.swift
CHANGED
|
@@ -401,13 +401,13 @@ import VDARSDK
|
|
|
401
401
|
}
|
|
402
402
|
completion(nil)
|
|
403
403
|
}
|
|
404
|
-
|
|
404
|
+
|
|
405
405
|
@objc public func getVersion(completion: @escaping (_ result: GetVersionResult?, _ error: Error?) -> Void) {
|
|
406
406
|
guard let version = VDARSDKController.vdarsdkVersion() else {
|
|
407
407
|
completion(nil, CustomError.versionNotExists)
|
|
408
408
|
return
|
|
409
409
|
}
|
|
410
|
-
|
|
410
|
+
|
|
411
411
|
completion(GetVersionResult(version: version), nil)
|
|
412
412
|
}
|
|
413
413
|
|
|
@@ -403,7 +403,7 @@ public class PixlivePlugin: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelega
|
|
|
403
403
|
rejectCall(call, error)
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
|
|
406
|
+
|
|
407
407
|
@objc func getVersion(_ call: CAPPluginCall) {
|
|
408
408
|
implementation?.getVersion(completion: { result, error in
|
|
409
409
|
if let error = error {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capawesome/capacitor-pixlive",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Unofficial Capacitor plugin for Pixlive SDK.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -63,9 +63,7 @@
|
|
|
63
63
|
"@capacitor/docgen": "0.3.1",
|
|
64
64
|
"@capacitor/ios": "8.0.0",
|
|
65
65
|
"@ionic/eslint-config": "0.4.0",
|
|
66
|
-
"@ionic/swiftlint-config": "2.0.0",
|
|
67
66
|
"eslint": "8.57.0",
|
|
68
|
-
"prettier": "3.4.2",
|
|
69
67
|
"prettier-plugin-java": "2.6.7",
|
|
70
68
|
"rimraf": "6.1.2",
|
|
71
69
|
"rollup": "4.53.3",
|
|
@@ -75,7 +73,6 @@
|
|
|
75
73
|
"peerDependencies": {
|
|
76
74
|
"@capacitor/core": ">=8.0.0"
|
|
77
75
|
},
|
|
78
|
-
"swiftlint": "@ionic/swiftlint-config",
|
|
79
76
|
"eslintConfig": {
|
|
80
77
|
"extends": "@ionic/eslint-config/recommended"
|
|
81
78
|
},
|