iPhone / iPad应用程序代码混淆 - 可能吗?值得? [英] iPhone/iPad App Code Obfuscation - Is it Possible? Worth it?

查看:104
本文介绍了iPhone / iPad应用程序代码混淆 - 可能吗?值得?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经研究了很多,无论是在SO还是google-ing到处,但我似乎无法找到关于iPhone / iPad应用程序的代码混淆的直接答案Objective-C。

I've researched quite a bit, both on SO, as well google-ing all over the place, but I can't seem to find a straight-forward answer in regards to code obfuscation for iPhone/iPad apps written in Objective-C.

我的问题是:


  1. 有没有办法去做吧?如果是这样,怎么样?

  2. 值得吗?

  3. 当应用程序提交给应用程序时,Apple是否允许它或者有问题?他们?


推荐答案

Objective-C似乎没有代码混淆器。但我们暂时假设一个确实存在。

There doesn't seem to a code obfuscator for Objective-C. But let's assume for a moment that one does exist.

Apple可能不会拒绝混淆的应用程序,只要它不会崩溃。主要问题是:混淆的重点是什么?通常,您希望对代码进行模糊处理以保护您的知识,例如,如果您的程序使用复制保护,您希望使潜在的破解者更难,或者如果您使用某些高级算法,则不希望业务竞争对手成为能够反编译它。

Apple will probably not reject an obfuscated app as long as it doesn't crash. The main question is: what is the point of obfuscation ? Normally, you want to obfuscate code to protect your knowledge, for example if your program uses a copy protection you want to make it harder for a potential cracker or if you're using some advanced algorithm you don't want the business competitors to be able to decompile it.

复制保护已经在iOS上得到了解决。虽然通过越狱可以复制和运行普通应用程序,但我会说实际执行此操作的用户数量相当低(至少比PC和Mac等常规计算机低很多)。你是否认为盗版是一个需要混淆的大问题?

The copy protection is already been taken care of on iOS. Although through jailbreaking a normal app can be copied and run, I'd say the actual number of users who do this is fairly low (at least a lot lower than on "regular" computers like PC and Mac). Do you expect piracy such a big problem that you need to obfuscate ?

如果你确实有重要的知识需要保护,那么混淆可能是值得的。混淆有其缺点:您无法再调试混淆的应用程序。崩溃报告将毫无用处。

If you do have important knowledge to protect then obfuscation might be worthwhile. Obfuscation has its downsides: you can't debug your obfuscated app any more. Crash reports will be useless.

您可能还想阅读文章混淆Cocoa

回到事实上似乎没有混淆器:你可以这就是诀窍:说你有这样的标题:

Back to the fact there doesn't seem to be an obfuscator: What you can do is this trick: say you have a header like this:

@interface MyClass : NSObject {
}

- (void)myMethod;

你可以这样做一个便宜的混淆:

You could do a cheap obfuscation like this:

#ifndef DEBUG
#define MyClass aqwe
#define myMethod oikl
#endif

@interface MyClass : NSObject {
}

- (void)myMethod;

这样你仍然可以在你的源代码中使用有意义的符号,但是编译器会把它变成垃圾 当没有编译进行调试时。

This way you can still use meaningful symbols in your source, but the compiler would turn it into "garbage" when not compiling for debugging.

这篇关于iPhone / iPad应用程序代码混淆 - 可能吗?值得?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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