Obfuscate Swift code before sending it to the Apple App Store

I find it difficult to find information about this. Android itself mentions code obfuscation as something that needs to be done before being sent to your store. But I don’t see anything about it from Apple or from any “third party” checklists before shipping. The only similar question I could find was 5 years ago about Objective-C, and I can only find 1 github library about obfuscating iOS. Is it common practice to tag Swift code when submitted to the Apple App Store? Especially to hide any private API URLs or API keys? Is there a Pro-Guard equivalent for Apple?

+6
source share
2 answers

Java is converted to bytecode that can be decompiled.

Swift is a compiled language, and the Clang compiler is optimized. In release mode, it highlights characters and does a lot of optimization, which in itself does a lot of obfuscation. There are decompilers for compiled languages, but the results are really terrible and hard to read.

+7
source

It's a bit late for the party, but simple text strings can be extracted without the need for a jailbroken device that simply issues command lines to your executable.

So yes, protect your sensitive lines in some way.

You can check my command line utility for this:

https://github.com/pabloroca/obfuscateapi

0
source

All Articles