@capgo/capacitor-accelerometer 8.0.3 → 8.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.
@@ -15,7 +15,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
15
15
  @CapacitorPlugin(name = "CapacitorAccelerometer")
16
16
  public class CapacitorAccelerometerPlugin extends Plugin implements SensorEventListener {
17
17
 
18
- private final String pluginVersion = "8.0.3";
18
+ private final String pluginVersion = "8.0.4";
19
19
  private static final String PERMISSION_GRANTED = "granted";
20
20
  private static final String PERMISSION_DENIED = "denied";
21
21
 
@@ -4,7 +4,7 @@ import Foundation
4
4
 
5
5
  @objc(CapacitorAccelerometerPlugin)
6
6
  public class CapacitorAccelerometerPlugin: CAPPlugin, CAPBridgedPlugin {
7
- private let pluginVersion: String = "8.0.3"
7
+ private let pluginVersion: String = "8.0.4"
8
8
  public let identifier = "CapacitorAccelerometerPlugin"
9
9
  public let jsName = "CapacitorAccelerometer"
10
10
  public let pluginMethods: [CAPPluginMethod] = [
@@ -98,20 +98,16 @@ public class CapacitorAccelerometerPlugin: CAPPlugin, CAPBridgedPlugin {
98
98
  return "denied"
99
99
  }
100
100
 
101
- if #available(iOS 11.0, *) {
102
- switch CMMotionActivityManager.authorizationStatus() {
103
- case .authorized:
104
- return "granted"
105
- case .denied, .restricted:
106
- return "denied"
107
- case .notDetermined:
108
- return "prompt"
109
- @unknown default:
110
- return "prompt"
111
- }
101
+ switch CMMotionActivityManager.authorizationStatus() {
102
+ case .authorized:
103
+ return "granted"
104
+ case .denied, .restricted:
105
+ return "denied"
106
+ case .notDetermined:
107
+ return "prompt"
108
+ @unknown default:
109
+ return "prompt"
112
110
  }
113
-
114
- return "granted"
115
111
  }
116
112
 
117
113
  @objc func getPluginVersion(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-accelerometer",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "Read device accelerometer measurements with Capacitor",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",