混淆可重用iOS包的Objective-C代码 [英] Obfuscate Objective-C code for a reusable iOS package

查看:91
本文介绍了混淆可重用iOS包的Objective-C代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Objective-C代码混淆

我正在努力拼凑一个可在多个应用中重复使用的iOS包。我希望能够将其捆绑起来供其他人轻松插入和使用,我希望对代码进行模糊处理,以便没有人可以阅读它。

I am trying to put together an iOS package that can be reused in multiple apps. I would like to be able to bundle it up for others to easily plug in and use, and I would like to obfuscate the code so that no one can read it.

您建议在构建框架,静态库或其他解决方案之间做什么以及为什么?

What would you recommend between building a framework, a static library, or another solution to accomplish this and why?

推荐答案

框架是共享代码的标准Cocoa方法。您可以将框架作为已编译的代码库和公共标头集合进行分发,而不会使任何底层的Objective-C源代码可见。当然,一个专门的黑客仍然可以读取机器代码,但这将是一项艰巨的任务,可能不值得他们花在它上面的时间。

A framework is the standard Cocoa approach to shared code. You can distribute a framework as a compiled code library and a collection of public headers without making any of the underlying Objective-C soure code visible. Of course, a dedicated hacker could still read the machine code, but this would be a big undertaking, and probably not worth the time they would have to spend on it.

如果您真的关注敏感代码,您可以考虑使用基于Internet的服务,在该服务中,您的库会调用您控制下的远程服务器来执行某些业务逻辑。这种方法涉及更多,并没有为您的客户提供那么多的灵活性。

If you are really concerned about sensitive code, you could consider an internet-based service, in which your library calls out to a remote server under your control to perform some business logic. This approach is quite a bit more involved, and does not offer as much flexibility for your customers.

这篇关于混淆可重用iOS包的Objective-C代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆