Testing in iOS 3.1.3 with the latest Xcode

2020-06-23 05:45发布

问题:

How do you test an app in iOS 3.1.3 with the latest Xcode build?

Is it possible to do this in the Simulator? If not, is it possible to downgrade a device to iOS 3.1.3?

回答1:

Yes, you can downgrade a device. It is not officially supported but I've done it on two 3Gs with success for testing on 3.1.3.

First find a tool called RecBoot by someone called the0rkus, runs on Intel macs only. This brings the phone out of recovery mode once you have loaded the 3.1.3 software.

Find the .ipsw file for your device, as you know it is a different file for iPhone 3/3GS or iPod Touch. Load this software to the phone via iTunes in the usual way, holding the option key while clicking "restore". Wait while it loads.

When it finishes and reboots you will find iTunes complains about this version being incorrect. Situation is the software is loaded, ready to go, but it lacks the final blessing from Apple. RecBoot brings it out of this mode, "waking" the phone into normal ready-to-activate state. Once you have gone through connection to iTunes with a SIM inserted you have a phone just as if you had never gone to 4.0.

Too bad we have to resort to a hack to test with older devices but I don't know any other way. It would be nice if the simulator could still run 3.1.3, nice if setting deployment target would flag pre-3.2 features.

You can also install the older Xcode 3.2.1 with iPhone SDK 3.1.3 but the hardware is the true test of whether your software really works. Given that, you could probably skip finding and using it - although there is no quicker way to find everything that you can't use in 3.1.3. There is no problem having multiple copies of Xcode of different versions installed but it is a good idea to uninstall them with the script provided in /Developer/Library/uninstall-devtools (read the readme included with each Xcode distribution)



回答2:

You need to test the app on a device running 3.1.3.



回答3:

The deployment target is one thing (that you set to 3.0 so that you can test on the device)

But if you are looking debugging with a specific version of the SDK, you should have the respective XCode installer.



回答4:

Does your simulator have a menu marked "hardware" with a variety of older OS version choices? (Mine does.)

Just use that.

It won't be 100% "actual device" test... but it's a WHOLE lot easier. (None of the simulators are 100% tests anyway.)