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:
- BOOL properties assigned with system API return values are truncated to negative numbers;
__block BOOLvariable logged as 0, but the function returns a huge negative integer afterdispatch_sync, leading to wrongifcondition 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?