简体   繁体   English

将Safari Web Inspector与为生产编译的应用程序一起使用

[英]Use Safari Web Inspector with apps compiled for production

Is there a way (even using private methods) to use the Safari Web Inspector in apps built for production (enterprise apps for instance). 有没有办法(甚至使用私有方法)在为生产而构建的应用程序中使用Safari Web Inspector(例如企业应用程序)。

I tried to use _setDeveloperExtrasEnabled of WKPreferences , but still no luck in firing the inspector once the app is deployed. 我尝试使用_setDeveloperExtrasEnabledWKPreferences ,但是在部署应用程序后仍然没有运气检查器。

Any other trick to help javascript developers debug their app, without having access to the source code? 还有其他任何技巧可以帮助javascript开发人员调试他们的应用程序,而无需访问源代码吗?

In other words, is there a way to distribute an app that can be inspected with the Safari Web Inspector? 换句话说,有没有办法分发可以使用Safari Web Inspector检查的应用程序? (using private methods is fine) (使用私有方法很好)

There is no way to do that with a Distribution (enterprise, ad-hoc, app-store) certificate. 使用Distribution(企业,ad-hoc,app-store)证书无法做到这一点。 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. 因此,我创建了一个新的fastlane lane,它将使用开发人员证书创建ipa,然后我将其上传到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. 通过这种方式,我可以向我的JS开发人员分发一个可以使用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 (ie, via Xcode), it will automatically be inspectable. 当您使用开发人员配置文件(即通过Xcode)运行应用程序时,它将自动检查。 If it's downloaded via the App Store, it won't be inspectable. 如果它是通过App Store下载的,则无法检查。

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: 您可以在此处跟踪WebKit错误以添加此API:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM