Safari - iPhone simulator debugging (via “develop”

2020-05-22 15:22发布

I am using iPhone simulator to run a UIWebview, and Safari browser (on my mac) in order to debug the js / html / css code (via "develop" menu -> iPhone Simulator -> choosing my webview).

Yestarday, the iPhone-simulator option disappeared from my "develop" menu: (as you can see, the "iphone-simulator" is missing here (it is opened in the background and working...)

enter image description here

Any idea?

Edit: I am using iOS 7 iPhone simulator + Safari 7

Edit 2: Just tried opening a website on iphone-simulator's Safari browser (in addition to the UIWebview). No luck here as well...

7条回答
做个烂人
2楼-- · 2020-05-22 15:50

I restarted my simulator from Hardware->Restart and after that simulator option came in Safari Develop Menu.

Hope it will save someone's time.

查看更多
Juvenile、少年°
3楼-- · 2020-05-22 15:52

I also faced the same issue. Solution was, closed Safari browser and Simulator and launched again. It fixed my problem. Restarting of my Mac was not required. Hope it will save someone's time.

Environment was as below:

  1. MacBook Pro OSX version : 10.13.2
  2. Safari browser version : 11.0.2 (13604.4.7.1.3)
  3. Simulator : iPhone 8 iOS version 11.2
查看更多
Viruses.
4楼-- · 2020-05-22 15:58

Sometimes running your app on different iOS version helps.

查看更多
劳资没心,怎么记你
5楼-- · 2020-05-22 16:01

If you have tried all fixes and it did not fixed your problem. Then go for below steps 1. UnInstall Xcode

  1. Install Xcode again
  2. Restart you system
  3. Download Command Line tool for Xcode (same version as xcode) you can find command line tool https://developer.apple.com/download/more/ here
  4. Install Command line tool

These steps fixed this problem for me, Hopefully it will fix someone's else as well. Good Luck :)

查看更多
老娘就宠你
6楼-- · 2020-05-22 16:06

Sometimes it is necessary to restart Safari to make it notice new simulator, unfortunately.

i0S 11, Safari 11

查看更多
一纸荒年 Trace。
7楼-- · 2020-05-22 16:13

I had exactly the same problem and I could not figure out how to solve it. Then I remembered that I actually have Safari Technology Preview installed on my Mac. And bang. The simulator device is visible in the Develop menu of the Technology Preview version.

查看更多
登录 后发表回答