3

My swift application is set for certain IOS device, and runs fine in IOS simulator,

However, when changing hardware in IOS simulator, I get the error in swift Thread1: signal SIGTERM.

I can set swift for IOS device iPhone 6, IOS simulator runs iPhone 6, but can't change to other hardware (such as iPhone 4S). I can set swift for IOS device iPhone 4S, and IOS simulator runs fine for iPhone 4S, but get the error when changing hardware (such as iPhone 6 which worked fine before).

Therefore, I am pretty sure the swift application logic is correct.

How can I solve this?

ReneMusters
  • 229
  • 1
  • 3
  • 10

3 Answers3

8

This is expected behavior. There is nothing to "solve". Your app is correctly being sent SIGTERM because you requested to shutdown the running device and boot a new one (which will terminate all running processes in the existing device).

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
  • Jeremy, Thanks for the explanation. So how can I test if my app looks good on other devices, without actually running on it? Do I have to compile it for each device I want to test it for? – ReneMusters Jan 10 '15 at 20:50
  • You need to run it in the other devices. Changing the device in the sim shuts down the old device and boots the new one. You need to install your app on the other device and run it there. Choose the device you want to run on in the run destinations menu and click build and run in xcode. – Jeremy Huddleston Sequoia Jan 11 '15 at 06:56
0

While searching for this issue, i found a great help on :

https://codecrew.codewithchris.com/t/thread-1-signal-sigterm/15083

useful extract :

Do not close your simulator by close icon without terminating your app.

  1. Terminate app in simulator by clicking the stop icon in xcode.
  2. Close your simulator after that
Ritesh
  • 4,720
  • 6
  • 27
  • 41
-1

Alternatively, I found that you just need to close the simulator using cmd + q and you're good to go.

Musdon
  • 9
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Vikram Parimi Sep 16 '22 at 12:00