Post

Replies

Boosts

Views

Activity

Reply to magnetometer watch OS 6.2
I've also had this question and after contacting Code Level Support got the answer. Reference frame should be used to get magnetometer data. For example: self.motionManager.startDeviceMotionUpdates(using: CoreMotion.CMAttitudeReferenceFrame.xMagneticNorthZVertical, to: .main) { (deviceMotionData, error) in    guard error == nil else {          print(error!)         return     }     if let motionData = deviceMotionData {          let x = motionData.magneticField.field.x          let y = motionData.magneticField.field.y          let z = motionData.magneticField.field.z          let h = motionData.heading          print(x, y, z)          print(h )          print(motionData.magneticField.accuracy.rawValue )     } }
Topic: App & System Services SubTopic: Hardware Tags:
Dec ’21
Reply to watch app crashes when permissions for microphone and bluetooth are changed on iPhone
Are there any suggestions for workaround for this issue? Like deactivating session before requesting microphone permission?
Replies
Boosts
Views
Activity
Dec ’22
Reply to Transaction.latest(for:) returns nil in StoreKit 2
+1 with the same issue, only on WatchOS. On iOS it works correctly.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to magnetometer watch OS 6.2
I've also had this question and after contacting Code Level Support got the answer. Reference frame should be used to get magnetometer data. For example: self.motionManager.startDeviceMotionUpdates(using: CoreMotion.CMAttitudeReferenceFrame.xMagneticNorthZVertical, to: .main) { (deviceMotionData, error) in    guard error == nil else {          print(error!)         return     }     if let motionData = deviceMotionData {          let x = motionData.magneticField.field.x          let y = motionData.magneticField.field.y          let z = motionData.magneticField.field.z          let h = motionData.heading          print(x, y, z)          print(h )          print(motionData.magneticField.accuracy.rawValue )     } }
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to CoreMotion magnetometer in WatchOS
Did you come up with some solution? I'm also trying to get magnetometer data on AppleWatch 6 and 7 but isMagnetometerAvailable is false. However, an app for collecting sensor data " SensorLog " can access it.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to Update Magnetometer Data In WatchOS SwiftUI?
Similar problem. I'm trying to get magnetometer data on Apple Watch 6 or 7 but isMagnetometerAvailable returns false. At the same time, the app for logging sensor data (SensorLog) can record magnetometer on the watch in some way.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21