Is it possible to run iOS 4.0 simulator anymore?

2019-04-24 08:52发布

I need to test a crash occurring in iOS 4.0 (not 4.3).

There's no simulator is there?

How can I test this version of iOS when the current one is iOS 5.0?

3条回答
三岁会撩人
2楼-- · 2019-04-24 09:00

In Xcode 4.2 you can click on the Scheme dropdown list (near the top left corner of the window) and at the bottom of the list is a "More simulators..." option. Click on that and you are given the ability to download simulators for older versions of iOS. If that doesn't do what you need, maybe change your target's Deployment Target?

查看更多
迷人小祖宗
3楼-- · 2019-04-24 09:10

For that, You need to obtain the iPhoneSimulator4.0.sdk folder.

The easiest way to do this is to download and install an older version of Xcode - the folder you will be looking for will be located in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

In Xcode 4.3 on lion the simulator SDKs are located inside the Xcode.app in your applications folder.

Copy the obtained iPhoneSimulator4.0.sdk into the

new location:- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

restart Xcode.

I don't know if an Xcode upgrade will remove these files in the future - it might be beneficial to keep the older SDKs in a safe place in case you need them again.

developer.apple.com might be useful

查看更多
聊天终结者
4楼-- · 2019-04-24 09:17

In Xcode 4.3 if you click next to the Run/Stop buttons to get the Simulator drop-down, you can then click "More Simulators..." and download older versions of iOS simulator.

Here's a screenshot

enter image description here

enter image description here

查看更多
登录 后发表回答