@capgo/capacitor-screen-orientation 8.1.2 → 8.1.3
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.
|
@@ -17,7 +17,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
17
17
|
@CapacitorPlugin(name = "CapacitorScreenOrientation")
|
|
18
18
|
public class CapacitorScreenOrientationPlugin extends Plugin implements SensorEventListener {
|
|
19
19
|
|
|
20
|
-
private final String pluginVersion = "8.1.
|
|
20
|
+
private final String pluginVersion = "8.1.3";
|
|
21
21
|
private int currentOrientation;
|
|
22
22
|
private SensorManager sensorManager;
|
|
23
23
|
private Sensor accelerometer;
|
|
@@ -11,7 +11,7 @@ import UIKit
|
|
|
11
11
|
*/
|
|
12
12
|
@objc(CapacitorScreenOrientationPlugin)
|
|
13
13
|
public class CapacitorScreenOrientationPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
14
|
-
private let pluginVersion: String = "8.1.
|
|
14
|
+
private let pluginVersion: String = "8.1.3"
|
|
15
15
|
public let identifier = "CapacitorScreenOrientationPlugin"
|
|
16
16
|
public let jsName = "CapacitorScreenOrientation"
|
|
17
17
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -201,14 +201,7 @@ public class CapacitorScreenOrientationPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
201
201
|
// MARK: - Helper Methods
|
|
202
202
|
|
|
203
203
|
private func getCurrentOrientationType() -> String {
|
|
204
|
-
let interfaceOrientation
|
|
205
|
-
|
|
206
|
-
if #available(iOS 13.0, *) {
|
|
207
|
-
interfaceOrientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation ?? .portrait
|
|
208
|
-
} else {
|
|
209
|
-
interfaceOrientation = UIApplication.shared.statusBarOrientation
|
|
210
|
-
}
|
|
211
|
-
|
|
204
|
+
let interfaceOrientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation ?? .portrait
|
|
212
205
|
return mapInterfaceOrientationToString(interfaceOrientation)
|
|
213
206
|
}
|
|
214
207
|
|
package/package.json
CHANGED