NSDecimalNumber
will crash on iOS18 when using decimalNumberByDividingBy
in some cases. For example
NSDecimalNumber* a= [NSDecimalNumber decimalNumberWithString:@"21000000000"];
NSDecimalNumber* b= [NSDecimalNumber decimalNumberWithString:@"18446744073709551615"];
NSDecimalNumber* c = [a decimalNumberByDividingBy:b]; // this line will crash
the crash error is EXC_BREAKPOINT
the crash stack is
I know some foundation implementation changed on iOS18, But are there some ways to avoid it? It appears on iOS18 only.
See this thread.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"