Incorrect BOOL return value in iOS 18 Simulator (works on device and Mac Catalyst)

Environment: Xcode 16, iOS 18 Simulator, Objective-C, Debug build.

Problem: After upgrading to iOS 18 SDK, BOOL values behave abnormally exclusively on the iOS 18 simulator:

  1. BOOL properties assigned with system API return values are truncated to negative numbers;
  2. __block BOOL variable logged as 0, but the function returns a huge negative integer after dispatch_sync, leading to wrong if condition judgment.

All code runs correctly on physical iOS devices and Mac Catalyst. I temporarily fixed it by replacing BOOL type with int to store only 0 and 1.

I just want to confirm: what changes in iOS 18 Simulator runtime or Xcode 16 compiler lead to this signed char BOOL overflow/extension issue?

Incorrect BOOL return value in iOS 18 Simulator (works on device and Mac Catalyst)
 
 
Q