Polidea / ios-class-guard

Simple Objective-C obfuscator for Mach-O executables.
http://www.polidea.com
1.64k stars 241 forks source link

Running on Xcode 6.1 obfuscates system symbols #15

Closed pstasiak closed 9 years ago

pstasiak commented 9 years ago

When running obfuscation script on Xcode 6.1, my output file contains defines such as "NSObject", "self", "length", "isEqual" and some other names from iOS SDK. On Xcode 5 eveything works fine, application compiles and works as expected with generated preprocessor's directives. Have you got similar experience on latest Xcode?

ayufan commented 9 years ago

We identified similar issue for Xcode 6.x and working on fix

ayufan commented 9 years ago

We identified the problem: iPhone frameworks are no longer distributed as full libraries, but instead Xcode provides something named: DYLIB_STUB. These DYLIB_STUB doesn't contain Objective-C metadata only the information that such class does exist. As a workaround you can use iphonesimulator SDK to compile the application, obfuscate it using simulator's SDK and later recompile it for any architecture you need. Example: https://github.com/Polidea/ios-class-guard-example/blob/master/obfuscate_project.