Post

Replies

Boosts

Views

Activity

Prevent pausing location updates on background when stationary?
Hello, I'm trying to receive location updates on background mode but it only lasts about 10 minutes then it stops when API detected the "isStationary" is true. Is there any way to continue receiving updates even when the device is stationary? Btw app is not terminated by the user. I'm using CLLocationUpdate.liveUpdates(.otherNavigation) API. CLBackgroundActivitySession is created before calling the liveUpdates. CLLocationManager: let manager: CLLocationManager = { let manager = CLLocationManager() manager.distanceFilter = kCLDistanceFilterNone manager.desiredAccuracy = kCLLocationAccuracyThreeKilometers manager.pausesLocationUpdatesAutomatically = false manager.activityType = .other manager.showsBackgroundLocationIndicator = true manager.allowsBackgroundLocationUpdates = true return manager }() Thank you!
3
0
425
Sep ’24
Sending main actor-isolated value of type 'PurchaseAction' with later accesses to nonisolated context risks causing data races
Trying to migrate to Swift 6. However getting this error when using SwiftUI StoreKit purchase environment. Sending main actor-isolated value of type 'PurchaseAction' with later accesses to nonisolated context risks causing data races @Environment(\.purchase) private var purchase let result = try await purchase(product)
1
0
395
Sep ’24
Can't fetch products on watchOS
Same code using StoreKit 2 is working fine on iOS but, on WatchOS I can't fetch products. I also tried StoreKit config on local but no luck. Did not receive any products or error for products request. Loaded [] products Error enumerating productid current transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account
0
1
737
Jul ’22
VideoPlayer view crashes Watch Simulator
VideoPlayer view crashes the Watch Simulator. But same code works on iOS Simulator. Example code VideoPlayer(player: AVPlayer(url: URL(string: "https://bit.ly/swswift")!)) Error log -AVSystemController- +[AVSystemController sharedInstance]: Failed to allocate AVSystemController. Unable to find class NACVolumeController CoreSimulator 842.8 - Device: 41mm - Runtime: watchOS 9.0 (20R5307f) - DeviceType: Apple Watch Series 7 - 41mm
1
1
724
Jul ’22