ios-class-guard icon indicating copy to clipboard operation
ios-class-guard copied to clipboard

Obfuscating class base type problem (UInt32).

Open JSanestrzik opened this issue 9 years ago • 5 comments

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 ?

JSanestrzik avatar Oct 28 '15 12:10 JSanestrzik

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

Mohamed3amer avatar Jan 18 '16 11:01 Mohamed3amer

No i didn't :(

JSanestrzik avatar Jan 18 '16 11:01 JSanestrzik

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.

unicorn700 avatar Jan 18 '16 11:01 unicorn700

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

Mohamed3amer avatar Jan 18 '16 12:01 Mohamed3amer

@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.

neuralmer avatar May 09 '16 13:05 neuralmer