iOS Appium: Identifying if touch accessibility and Dark Mode is enabled

Hi Team,
I have recently moved to Cloud Device for Mobile Automation execution and stumbled upon an issue.

As Cloud Device Provider allots device randomly for Appium execution, there are two things that are not certain about the device Settings:

  1. Is Dark Mode enabled on iOS device:
    My app does not supports Dark Mode(Banking app, so internal reasons).
    And so, I tried looking to get this device info(whether Dark mode is enabled or not) or tried to turn it off.
    Apparently, this is possible in iOS Simulator but not on real device(as per my research.)

So, question here is, Is there a way to turn OFF/ON Dark Mode on iOS real device?

  1. Touch Accessibility enabled in iOS device:
    Say for example, Touch Accessibility is enabled in iOS device and it hovers any button of the app on the screen. So, when I perform click operation, it opens the Touch Accessibility instead of clicking button. I did research but could not find anything in this context.

So, question here is, Is there a way to turn OFF/ON Touch Accessibility on iOS real device?

Please let me know if you need any more info on this to understand.

Thanks.

XCTest provides no APIs to perform such actions. XCUITest driver itself tries to use Siri to interact with theme settings on real devices as a workaround. No idea regarding Touch Accessibility though.

Thanks a lot @mykola-mokhnach

On my research, I cam across these finding. But assured to get confirmed.

Currently, I have implemented these both operations via UI(Launching the Settings all and turning changing them as desired).