Post

Replies

Boosts

Views

Activity

Reply to Crash on launch from all TestFlight builds, but when loading the app from Xcode
We also had unexpected crashes on launch on iOS 17 due to using NSDecimalRound. We have followed the suggestion from the known issues in the Xcode 16 RC Release notes by writing a designated class in Objective C and calling the NSDecimalRound function from objective C instead of from Swift. This prevents the crash. Below our code: // DecimalRoundFix.m #import "DecimalRoundFix.h" @implementation DecimalRoundFix +(void)round:(nonnull NSDecimal *)result number: (nonnull NSDecimal *)number scale: (NSInteger) scale roundingMode: (NSRoundingMode) roundingMode { NSDecimalRound(result, number, scale, roundingMode); } @end // DecimalRoundFix.h #import <Foundation/Foundation.h> @interface DecimalRoundFix : NSObject { } +(void)round:(nonnull NSDecimal *)result number: (nonnull NSDecimal *)number scale:(NSInteger) scale roundingMode: (NSRoundingMode) roundingMode; @end Then in your Swift code replace everywhere: NSDecimalRound(&result, &number, scale, roundingMode) with DecimalRoundFix.round(&result, number: &number, scale: scale, roundingMode:roundingMode).
Sep ’24
Reply to File transfer issue from iPhone to Watch after iOS 17.5 & WatchOS 10.5 update
Also having the same problem with WCSessionFileTransfer. The didFinish fileTransfer delegate method is never called anymore. I also successfully used the solution with sending a custom message from the Watch OS app to the iOS app once the file received. I also noticed that the WCSession keeps all oustandingFileTransfers. I clean them by checking the progress, and cancelling them manually and do some custom cleanup. for fileTransfer in session.outstandingFileTransfers { if (fileTransfer.progress.isFinished) { fileTransfer.cancel() didFinish(fileTransfer) // my method } } Hopefully Apple fixes this issue soon.
Topic: App & System Services SubTopic: General Tags:
Jun ’24
Reply to Crash on launch from all TestFlight builds, but when loading the app from Xcode
We also had unexpected crashes on launch on iOS 17 due to using NSDecimalRound. We have followed the suggestion from the known issues in the Xcode 16 RC Release notes by writing a designated class in Objective C and calling the NSDecimalRound function from objective C instead of from Swift. This prevents the crash. Below our code: // DecimalRoundFix.m #import "DecimalRoundFix.h" @implementation DecimalRoundFix +(void)round:(nonnull NSDecimal *)result number: (nonnull NSDecimal *)number scale: (NSInteger) scale roundingMode: (NSRoundingMode) roundingMode { NSDecimalRound(result, number, scale, roundingMode); } @end // DecimalRoundFix.h #import <Foundation/Foundation.h> @interface DecimalRoundFix : NSObject { } +(void)round:(nonnull NSDecimal *)result number: (nonnull NSDecimal *)number scale:(NSInteger) scale roundingMode: (NSRoundingMode) roundingMode; @end Then in your Swift code replace everywhere: NSDecimalRound(&result, &number, scale, roundingMode) with DecimalRoundFix.round(&result, number: &number, scale: scale, roundingMode:roundingMode).
Replies
Boosts
Views
Activity
Sep ’24
Reply to File transfer issue from iPhone to Watch after iOS 17.5 & WatchOS 10.5 update
Also having the same problem with WCSessionFileTransfer. The didFinish fileTransfer delegate method is never called anymore. I also successfully used the solution with sending a custom message from the Watch OS app to the iOS app once the file received. I also noticed that the WCSession keeps all oustandingFileTransfers. I clean them by checking the progress, and cancelling them manually and do some custom cleanup. for fileTransfer in session.outstandingFileTransfers { if (fileTransfer.progress.isFinished) { fileTransfer.cancel() didFinish(fileTransfer) // my method } } Hopefully Apple fixes this issue soon.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24