Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug service worker/pwa in ios11.3 mobile device?

My environment:

* Safari Technology Preview Release 51 (Safari 11.2, WebKit 13606.1.6)
* iPad with ios11.3 beta6(15e5216a)
* mac os 10.13.3

I can debug service worker in mac desktop.

I can debug service worker in Android mobile device.

But I could not found out how to debug service worker in ios11.3 mobile device?

like image 596
p2227 Avatar asked Mar 21 '18 12:03

p2227


1 Answers

After you've connected your iOS device to your computer, open the Develop menu in Safari (on your desktop). You should see the remote device listed, under there, you'll see something like the menu below.

enter image description here

For some reason, the service worker is listed under "Web", clicking that will open Safari's DevTools for the service worker.

If you don't see your device listed, you may need to enable the "Web Inspector", in the iOS settings for Safari.

I tested this on iOS 14.4, macOS 10.15, and Safari 14.03

like image 169
PeteLe Avatar answered Oct 15 '22 22:10

PeteLe