2

Can any one tell me the steps to implement Polidea's iOS Class Guard in iOS project. I have gone through the following github link:

https://github.com/Polidea/ios-class-guard

I also gone through sample project. I only find a obfuscate_project file in it. How can I test after implementing this?

user3388273
  • 401
  • 3
  • 13
  • 1
    Could you please clarify your question? Now it seems unclear a bit. As one of creators said: "generally to test whether your code was obfuscated you have to run it through class-dump or IDA to see if Objective-C class names got mangled." – Opal Apr 28 '15 at 19:43
  • I have not obfuscate my project, i only have a sample project that is obfuscated. Can you tell me the steps to implement. The link i provided is not clear. – user3388273 Apr 29 '15 at 04:24
  • Hi @user3388273.. did you find an answer to your query? I am also using class guard for obfuscation and finding it difficult to integrate and test. Please post an answer if you were able to do it. – Shradha Aug 26 '15 at 11:35

1 Answers1

1

4.1.1.1. Installation

Execute this simple bash script in Terminal. When asked for the password, enter your account. It's needed because the utility is installed in /usr/local/bin.

$ brew install https://raw.githubusercontent.com/Polidea/homebrew/ios-class-guard/Library/Formula/ios-class-guard.rb

To install bleeding edge version:

$ brew install --HEAD https://raw.githubusercontent.com/Polidea/homebrew/ios-class-guard/Library/Formula/ios-class-guard.rb

4.1.1.2. How to use it?

A few steps are required to integrate iOS Class Guard in a project.

Download obfuscate_project into your project root path.

$ chmod +x obfuscate_project

Update the project file, scheme and configuration name in shell script obfuscate_project.sh .

Do

$ ./obfuscate_project 

every time when you want to obfuscate your project. It should be done every release. Store the json file containing symbol mapping so you can get the original symbol names in case of a crash. **Rename stored json file with release version number. **

Build, test and archive your project using Xcode or other tools.

The presented way is the simplest one. You can also add an additional target that will automatically regenerate the symbols map during compilation.

ios-class-guard will be called by shell script obfuscate_project.

============Unfortunately =============

In XCode 7.0 enviorment, we can't finish obfuscating without errors.

Community
  • 1
  • 1
Yi Jiang
  • 3,938
  • 6
  • 30
  • 62
  • FYI: New version of iOS Class Guard (0.8) with Xcode 7 support has been released. Please upgrade, should works fine now. – psci Oct 14 '15 at 13:59
  • @psci Thanks a lot! But I found I can't install class-dump now...The following build commands failed: CompileC build/class-dump.build/Release/MachObjC.build/Objects-normal/x86_64/CDLCSegment.o Source/CDLCSegment.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) – Yi Jiang Oct 14 '15 at 23:15
  • What you mean by you can't install? Is installing from brew failed? What xcodebuild version are you using? (run `xcodebuild -version`) – psci Oct 15 '15 at 07:19