Polidea / ios-class-guard

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

Obfuscating class base type problem (UInt32). #50

Open JSanestrzik opened 8 years ago

JSanestrzik commented 8 years ago

Im using a cocapods library called 'UIColor-Utilities' in the obfuscation process everything goes fine without any problems. But when compiling the obfuscated project I'm getting a error in the pods library in the category class right at the property with the type UInt32:

Unknown type name 'z1sQYfL2O' Expected a type

I've also tried to exclude the the category class from obfuscating it, but it does't seem to work:

-F '!UIColor*' -F '!UIColor+Expanded' -F '!UIColor+HSV'

Is there any solution to this issue ?

Mohamed3amer commented 8 years ago

The same issue happened with me with UISS, StompKit and Lumberjack pods libraries .. Are you found any solution for this ?

JSanestrzik commented 8 years ago

No i didn't :(

unicorn700 commented 8 years ago

may be UInt32 type is getting obfuscated when it should not be, being a system defined variable. I was also getting similar errors, i fixed those errors by removing these symbols from the obfuscation list using the -i option in obfuscation command to ignore those symbols.

Mohamed3amer commented 8 years ago

I need to exclude all open source libraries and pods from the obfuscation, i am trying to exclude them using -F option but it doesn't work

neuralmer commented 8 years ago

@evilgreed, @Mohamed3amer, and @unicorn700:

In ios-class-guard, -F class filters do not apply to categories.

We (PreEmptive Solutions) forked iOS Class Guard, creating a new product, called PreEmptive Protection for iOS - Rename (or PPiOS-Rename), that fixes this issue and a number of others.

In PPiOS-Rename, you can exclude categories with -F using the undecorated name of the category. For example, if the program reports something like Adding @category NSString+MyCategory, exclude the category with:

ppios-rename --analyze -F MyCategory path/to/your.app

Note that PPiOS-Rename changes the way the obfuscation process is integrated into the build (to make it easier to use), so you'll probably need to make changes to your build, and to pay attention to the new/changed argument names.

Please give it a try, and let us know how it works for you.