iosxcodeios-simulatorui-testingfastlane-snapshot

How to test Dynamic Type (larger font sizes) in iOS Simulator


Changing Dynamic Type settings in iOS can be done manually (Settings > General > Accessibility > Larger Text).

But this does not appear to work in the current Simulator (v9.3 at the time of writing), and doing so manually is not a solution where automation is required.

Question: Is there a way to launch an app with Dynamic Type settings to launch an app with larger font sizes?

Note: This is not only useful for UI testing, but also for the purpose of creating screenshots using Fastlane Snapshot with larger font sizes.


Solution

  • As of Xcode 8, there is a better option than the undocumented launch arguments: Accessibility Inspector. It is covered in this talk and can be found under Xcode > Open Developer Tool.

    Update for Xcode 11+

    There is a new Environment Overrides option. Find more information in this answer.

    Xcode Accessibility Inspector