apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

Safari Web Inspector still doesn't show current iOS app launched in simulator or device after install cordova-ios@6.3.0. #1328

Closed SolbyteApps closed 1 year ago

SolbyteApps commented 1 year ago

Bug Report

Problem

Safari Web Inspector still doesn't show current iOS app launched in simulator or device.

What is expected to happen?

Be able to use Safari web inspector to debug the app running in iOS Simulator or device.

What does actually happen?

"No inspectable application" displayed instead of the running app in the Safari menu.

Information

This is supposed to have been fixed with cordova-ios@6.3.0 version with fix #1300 and issue #1301

Command or Code

From xcode, run app in simulator or device. From Safari, select the ‘Develop’ tab from the menu bar, then 'Simulator' or 'Device name'.

Environment, Platform, Device

Mac Mini M2, OS Ventura 13.4, iOS 16.4.1

Version information

Cordova Information:

cli: 12.0.0
  common: 5.0.0
  create: 5.0.0
  lib: 12.0.1
    common: 5.0.0
    fetch: 4.0.0
    serve: 4.0.1

Project Installed Platforms:

ios: 6.3.0

Project Installed Plugins:

cordova-plugin-add-swift-support: 2.0.2
cordova-plugin-app-version: 0.1.14
cordova-plugin-camera: 6.0.1-dev
cordova-plugin-device: 2.1.0
cordova-plugin-email-composer: 0.10.1
cordova-plugin-enable-multidex: 0.2.0
cordova-plugin-firebasex: 16.0.0
cordova-plugin-ionic-keyboard: 2.2.0
cordova-plugin-ionic-webview: 5.0.0
cordova-plugin-network-information: 3.0.0
cordova-plugin-statusbar: 2.4.2
cordova-plugin-theme-detection: 1.3.0
ionic-plugin-deeplinks: 1.0.22
mx.ferreyra.callnumber: 0.0.2
onesignal-cordova-plugin: 3.3.1

Environment:

OS: macOS Ventura 13.4 (22F66) (darwin 22.5.0) arm64
Node: v14.20.0
npm: 6.14.17

ios Environment:

xcodebuild:
  xcode 14.3
  Build version 14E222b

Checklist

SolbyteApps commented 1 year ago

I have been investigating more deeply and the error from Ionic and not from cordova-ios. Ionic uses its own webkit so its necessary to apply the same code applied to 6.3.0 in the ionic file. Sorry for the inconvenience and close this issue.

saggio89 commented 1 year ago

@SolbyteApps what code are you referring to? Is there something I can do to make this work, if even temporarily? I'm having a problem with a production app and it would be a huge help if I could inspect it!

dpogue commented 1 year ago

@saggio89 This has been fixed in cordova-ios 6.3.0 for the built-in Cordova webview.

If you are using the cordova-plugin-ionic-webview plugin rather than the built-in webview, then support for the web inspector needs to be added by the Ionic team that maintains that plugin. You can report bugs on their plugin repo here: https://github.com/ionic-team/cordova-plugin-ionic-webview

saggio89 commented 1 year ago

Thank you for pointing me in the right direction @dpogue

If anyone else stumbles across this : There is already a PR with the fix on the cordova-plugin-ionic-webview repo https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/677

I was able to fork the master branch and apply the change and update the version of "cordova-plugin-ionic-webview" to my forked version in package.json

"cordova-plugin-ionic-webview": "github:< YourGithubUsername >/cordova-plugin-ionic-webview"

Working for me now

viethung0823 commented 10 months ago

not working for me. I tried version of the PR's author "cordova-plugin-ionic-webview": "github:spoxies/cordova-plugin-ionic-webview#webkit-ios-16.4-enable-inspection"

breautek commented 10 months ago

not working for me. I tried version of the PR's author "cordova-plugin-ionic-webview": "github:spoxies/cordova-plugin-ionic-webview#webkit-ios-16.4-enable-inspection"

Asking the maintainer of the fork. Apache Cordova has no control over the webview settings when you're using a webview plugin.