Post

Replies

Boosts

Views

Activity

CMAltimeter absolute altitude delivery BROKEN (super slow & inaccurate)
Reproducible on iOS 17.4.1 (maybe before) & iOS 17.5. Maybe iOS 17.4 but I can't test it. NSMotionUsageDescription is correctly set (and has always been) Fitness activity & motion authorization are correctly enabled The delivery for absolute altitude changes became super slow, and might be inaccurate. The only value I get is exactly the same as the GPS altitude. The accelerometer data does not seem to be taken into account anymore. This critical bug has broken two apps of mine. How could I quickly solve this? Thank you! PS: code is dead simple let operationQueue = OperationQueue() self.altimeter.startAbsoluteAltitudeUpdates(to: operationQueue) { [weak self] (data, error) in guard let self = self else { return } guard let data else { return } DispatchQueue.main.async { // Use this value for display self.altitude = Measurement(value: data.altitude, unit: UnitLength.meters) /* DEBUG VIEW */ self.updateDebugView(with: data.altitude) } }
2
0
1.5k
Jun ’24
One-way file transfer: when to cleanup the source file?
I'm using Watch Connectivity to transfer files from the Watch to its paired iOS device. File transfer is successful in my first tests, but obviously I need to erase the source file when it is - successfully - sent. When should I do that? just after initiating the file transfer, using transferFile(file: NSURL, metadata: [String : AnyObject]) when getting the returned WCSessionFileTransfer? when getting the callback func session(_ session: WCSession, didFinish fileTransfer: WCSessionFileTransfer ? --> but will the callback always be called, even if the transfer finishes while the app is in background? some other time? NB: I'd really want to avoid implementing a custom 'ack' system, thus not using any user info/application context transfer.
1
0
1.2k
Aug ’23
iOS 16.4: UISearchTextField.resignFirstResponder() --> app hangs, CPU 100%
Since iOS 16.4, my apps hangs when I dismiss the keyboard in viewWillDisappear(). Here is my code: override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) DLog("will disappear <<<<<") dismissKeyboard() } fileprivate func dismissKeyboard() { self.filenameSearchTextField.resignFirstResponder() } App hangs, CPU is 100%, memory usage is increasing. The hangs happen on the resignFirstResponder() call. What's going on here?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
865
Mar ’23
CMAltimeter absolute altitude delivery BROKEN (super slow & inaccurate)
Reproducible on iOS 17.4.1 (maybe before) & iOS 17.5. Maybe iOS 17.4 but I can't test it. NSMotionUsageDescription is correctly set (and has always been) Fitness activity & motion authorization are correctly enabled The delivery for absolute altitude changes became super slow, and might be inaccurate. The only value I get is exactly the same as the GPS altitude. The accelerometer data does not seem to be taken into account anymore. This critical bug has broken two apps of mine. How could I quickly solve this? Thank you! PS: code is dead simple let operationQueue = OperationQueue() self.altimeter.startAbsoluteAltitudeUpdates(to: operationQueue) { [weak self] (data, error) in guard let self = self else { return } guard let data else { return } DispatchQueue.main.async { // Use this value for display self.altitude = Measurement(value: data.altitude, unit: UnitLength.meters) /* DEBUG VIEW */ self.updateDebugView(with: data.altitude) } }
Replies
2
Boosts
0
Views
1.5k
Activity
Jun ’24
One-way file transfer: when to cleanup the source file?
I'm using Watch Connectivity to transfer files from the Watch to its paired iOS device. File transfer is successful in my first tests, but obviously I need to erase the source file when it is - successfully - sent. When should I do that? just after initiating the file transfer, using transferFile(file: NSURL, metadata: [String : AnyObject]) when getting the returned WCSessionFileTransfer? when getting the callback func session(_ session: WCSession, didFinish fileTransfer: WCSessionFileTransfer ? --> but will the callback always be called, even if the transfer finishes while the app is in background? some other time? NB: I'd really want to avoid implementing a custom 'ack' system, thus not using any user info/application context transfer.
Replies
1
Boosts
0
Views
1.2k
Activity
Aug ’23
iOS 16.4: UISearchTextField.resignFirstResponder() --> app hangs, CPU 100%
Since iOS 16.4, my apps hangs when I dismiss the keyboard in viewWillDisappear(). Here is my code: override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) DLog("will disappear <<<<<") dismissKeyboard() } fileprivate func dismissKeyboard() { self.filenameSearchTextField.resignFirstResponder() } App hangs, CPU is 100%, memory usage is increasing. The hangs happen on the resignFirstResponder() call. What's going on here?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
865
Activity
Mar ’23