The iPhone 4 and iPhone 4s simulators disappeared

2019-02-02 03:05发布

问题:

I have these iPhone simulators:

  • iPhone 5
  • iPhone 5s
  • iPhone 6
  • iPhone 6 Plus
  • iPhone 6s
  • iPhone 6s Plus
  • iPhone 7
  • iPhone 7 Plus
  • iPhone SE

What happened to the iPhone 4 and iPhone 4s?

回答1:

1) You have to download at least iOS 8.x, 9.x SDKs to be able to run iPhone 4S simulator.

2) Your deployment target should remain at least 9.x to see iPhone 4S simulator in the list of offered simulators in your project.

I have an Xcode 8 and these simulators available:



回答2:

Xcode 8 includes simulator from iPhone 5 & higher with default deployment target 10.0, but you can add a new simulator.

1.) Change "iOS Deployment target 10.0" to 9.3

2.) In "iOS Simulators" Choose Download simulators

3.) Simulator downloading like this:

Select the simulator that you will need.

4.) Wait for it to be downloaded.

5.) Add new simulator.

6.) Enjoy =D



回答3:

iOS10 will not support iPhone 4 or iPhone 4s. Hence it's removed by apple from Xcode8.

If you still want to use 7.1 ( copy the disk image from Xcode 7 ). This will work but not sure if it's allowed to do so .

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1



回答4:

I have found a quick solution - use an iPad simulator. It mimics screen size of iPhone 4. If you have a universal app - disable this feature temporary (open your target -> select 'General' tab -> scroll down to 'Deployment Info' section -> click on 'Devices' dropdown -> select 'iPhone').



标签: xcode xcode8