In the iOS13 adaptation process, the SDK of a lower version will be compiled and then run on a device of a higher version for compatibility and adaptation. It is troublesome and inconvenient to Debug if you pack it every time and run it on a higher version device. In fact, older versions of Xcode can be debugged on older devices, just with a few changes.

Debug older versions of Xcode on real machines

Xcode’s real machine deployment and debugging relies on a Device Support File, which is available for each firmware version and can only be debugged if the PC’s Device Support File matches the target Device’s system.

The Device Support File of the firmware corresponding to the new version is attached with the Xcode of the new version. First, download the Xcode of the new version (the latest version is Xcode 11 beta at present) and then go to (assuming the Xcode of the new version is Xcode-beta).

/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Copy the code

Copy the Device Support File of the corresponding version,

Note: copy the entire directory at once, such as the 13.0 directory shown above

Go to the directory of the old version

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Copy the code

Enter the password and restart the old version of Xcode to debug the older version of the machine.

Older versions of Xcode debug older emulators

To debug a higher version of the emulator, simply download a higher version of Xcode, open a project at random, and wait for the emulator to start.

You can then debug the emulator on the older version of Xcode.