Obfuscating Swift code before submission to Apple App Store

 ̄綄美尐妖づ 提交于 2020-07-02 06:24:51

问题


I'm having a hard time finding any info on this. Android themselves mention code obfuscation as something to do before submitting to their store. But I see nothing about this from Apple or from any "third party" before-submission checklists. The only similar question I could find was one 5 years ago about Objective-C, and I only can find 1 github library about iOS obfuscation. Is it a common practice to obfuscate Swift code when submitting to the Apple App Store? Especially to hide any private API URLs or API keys? Is there a Pro-Guard equivalent for Apple?


回答1:


Java gets converted into bytecode, which can be decompiled.

Swift is a compiled language, and the Clang compiler is highly optimized. In release mode it strips out symbols and does a lot of optimization that does a great deal of obfuscation all by itself. There are decompilers for compiled languages, but the results are really awful and hard to read.




回答2:


A bit late to the party, but plain text strings can be extracted with no need of a jailbroken device just issuing the command strings to your executable.

So, yes, protect your sensitive strings in some way.

You can check my command line utility for doing this:

https://github.com/pabloroca/obfuscateapi



来源:https://stackoverflow.com/questions/39802157/obfuscating-swift-code-before-submission-to-apple-app-store

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