Post

Replies

Boosts

Views

Activity

watch os 9 sleep analysis is not accurate as health app
let stagePredicate = HKCategoryValueSleepAnalysis.predicateForSamples(.equalTo,value: .asleepREM)         let queryPredicate = HKSamplePredicate.sample(type: HKCategoryType(.sleepAnalysis), predicate: stagePredicate)         let sleepQuery = HKSampleQueryDescriptor(predicates: [queryPredicate], sortDescriptors: [])         do{             let sleepSample = try await sleepQuery.result(for: store)                          print("sleep sample ")             print(sleepSample) with health app on iOS , it says I did rem sleep for 59 minutes. but all sum of sleep sample time is not 59 but 3.7hours. time is also not accurate. sleepSample log is as below what may be the problem?
1
0
1.2k
Jun ’22
RealityView in swiftUI look weird on vision pro
it is way above of control panel.... the code I show usdz modeling is as below `RealityView{ content in let entity = try! await Entity(named: "idle") entity.setScale([0.15,0.15,0.15], relativeTo: entity) // Enable interactions on the entity. entity.components.set(InputTargetComponent()) entity.components.set(CollisionComponent(shapes: [.generateBox(size: [2,2,2])] ) ) content.add(entity ) }`
0
0
540
Feb ’24