It looks like iOS 17 needs to set appearance via below API.
/*!
* Get or set the UI style of the device. Uses the `XCUIDeviceAppearance` enum to describe the UI style.
*/
@property (nonatomic) XCUIDeviceAppearance appearance API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
In my testing, iOS 16.7 worked with setAppearanceMode so it would be safe to check setAppearanceMode first, then appearance
It looks like iOS 17 needs to set appearance via below API.
In my testing, iOS 16.7 worked with
setAppearanceMode
so it would be safe to checksetAppearanceMode
first, thenappearance