Use Safari Web Inspector with apps compiled for production

雨燕双飞 提交于 2019-12-05 05:54:46

There is no way to do that with a Distribution (enterprise, ad-hoc, app-store) certificate. The only way to have the inspector enabled is by using a Developer certificate.

Therefore I created a new fastlane lane that will use the developer certificate to create the ipa, then I'm uploading it to Fabric. In this way I'm able to distribute to my JS devs a version of the app that can be debugged with the Safari Web Inspector.

gym(
  scheme: "xxx",
  workspace: "xxx.xcworkspace",
  export_method: "development",
  output_directory: "build/",
  codesigning_identity: 'iPhone Developer: yay',
  use_legacy_build_api: true,
  xcargs: "-arch='armv7')

When you run your application using a Developer Provisioning Profile (i.e., via Xcode), it will automatically be inspectable. If it's downloaded via the App Store, it won't be inspectable.

There is currently no way to inspect a production application. This may be possible in the future; you can track the WebKit bugs for adding this API here:

https://bugs.webkit.org/show_bug.cgi?id=168012 https://bugs.webkit.org/show_bug.cgi?id=168013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!