Phonegap iOS Safari debug workflow

2020-03-30 03:49发布

I've been testing out Phonegap Build, using a similar workflow as outlined here:

Tutorial: Developing a PhoneGap Application

I can build, and deploy to my devices, but cannot get remote debugging to work through Safari, as described in the answer here:

Could you tell be debug process in Phonegap iOS application?

I have no problems debugging the app through the mobile browser, but the installed app itself does not show up in Safari's develop menu.

I am transferring my app to my phone through xCode, and have enabled debugging in the Phonegap build interface, but the Weinre debug service seems to be down. Ideally I'd like to get this working through Safari, could anyone share their debug workflow?

thanks

2条回答
干净又极端
2楼-- · 2020-03-30 03:57

Make sure Web Inspector is enabled in Settings > Safari > Advanced > WebInspector.

查看更多
成全新的幸福
3楼-- · 2020-03-30 04:13

When you say "native app", you actually mean the Phonegap app deployed to your device?

Here is how I do it. It works on both iOS Simulator and actual device:

  1. Open Settings > Safari > Advanced and make sure "Web Inspector" is enabled
  2. Connect the device and deploy the Phonegap app using Xcode
  3. Wait for the app to launch and navigate to Safari on my desktop, then find my device name in the develop menu
查看更多
登录 后发表回答