本文介绍了防止PhoneGap应用程序的调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用PhoneGap创建了一个iOS应用程序,我学会了很容易将您的iPhone连接到您的Mac,在iPhone上启用Safari调试,然后在Mac上使用Safari浏览所有的HTML和JavaScript这是应用程序的一部分。

I've created an iOS app using PhoneGap, and I learned that it's very easy to hook up your iPhone to your Mac, enable Safari debugging on the iPhone, and then use Safari on the Mac to view all the HTML and JavaScript that's part of the app.

这是伟大的调试目的,但是当我准备好部署我的应用程序的群众,真的臭味的安全性。

This is great for debugging purposes, but really stinks in terms of security when I'm ready to deploy my app to the masses. It basically means anyone can instantly see the internals of my app.

Phonegap中有没有办法禁用这种类型的调试?

Is there any way in Phonegap to disable this type of debugging?

谢谢!

推荐答案

这只能工作,因为 get-task-allow 为开发构建启用权利。分发简要资料不包含此权利,因此无法将调试器附加到从商店下载的应用程序。所以你不必担心这个。

This only works because the get-task-allow entitlement is enabled for development builds. Distribution profiles do not include this entitlement, so it's not possible to attach a debugger to an app downloaded from the store. So you don't have to worry about this.

当然,这并不意味着你的代码是隐藏的。您的javascript仍然存储在设备上,确定的用户可以找到其他方式访问它。例如,越狱设备上的用户对文件系统具有完全访问权限,并且可以在您应用的容器中窥探。

Of course that doesn't mean your code is hidden. Your javascript is still stored on the device and determined users can find another way to access it. For example users on a jailbroken device have full access to the file system and can peek inside your App's container.

这篇关于防止PhoneGap应用程序的调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 02:05