Xcode playground gets stuck on 'Running playground' or 'Launching simulator' and won't run the code, what to do?

前端 未结 22 1014
情歌与酒
情歌与酒 2020-12-22 16:03

Every time I create a new playground in order to test some code, Xcode gets stuck and won\'t run the code. It simply presents \'Running playground\' or \'Launching simulator

22条回答
  •  长情又很酷
    2020-12-22 16:20

    I have tried the following and it worked for me:

    1. press on the bottom "stop playground" button
    2. remove the first comment line and make import statement the first line. no space above import.
    3. press execute button

提交回复
热议问题