Closed SPDEX closed 9 years ago
@tgrf can you take a look?
@SPDEX It looks like you are missing one of arguments to provide root dir.
Could you provide an "hello world" example on how to run on a mac app like here:
ios-class-guard MyApp.app/Contents/MacOS/MyApp
I haven't done it with Mac app. iOS looks like that: ios-class-guard \ --sdk-root /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk \ build/Release-iphonesimulator/SomeApp.app \ -O obfuscated_symbols.h \ -m obfuscated_symbols.json
in your case you need to change --sdk-root arg obviously.
There are some hardcoded paths. I assigned it to person who is responsible for that part.
On Tue, Jan 20, 2015 at 10:25 PM, Wiktor Gworek notifications@github.com wrote:
I haven't done it with Mac app. iOS looks like that: ios-class-guard \ --sdk-root /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk \ build/Release-iphonesimulator/SomeApp.app \ -O obfuscated_symbols.h \ -m obfuscated_symbols.json
in your case you need to change --sdk-root arg obviously.
— Reply to this email directly or view it on GitHub https://github.com/Polidea/ios-class-guard/issues/19#issuecomment-70736792 .
Kamil Trzciński
ayufan@ayufan.eu www.ayufan.eu
@SPDEX You have not specified SDK to be used in your case. Running iOS Class Guard like it's shown on this example ios-class-guard testApp.app/Contents/MacOS/testApp --sdk-mac=10.10 -O obfuscated_symbols.h -m obfuscated_symbols.json
(in project's directory), should resolve your problem.
Specifying --sdk-mac=SDK_VERSION_STRING
corresponding to the SDK version used in your project is obligatory.
Additional check for unspecified SDK path has been added with #21. Right now, iOS Class Guard won't crash because of missing SDK version/path.
$ ios-class-guard MyApp.app/Contents/MacOS/MyApp ios-class-guard[6578:474976] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'must provide a directory path' * First throw call stack: ( 0 CoreFoundation 0x00007fff919f464c __exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff8f4936de objc_exception_throw + 43 2 CoreFoundation 0x00007fff919f44fd +[NSException raise:format:] + 205 3 Foundation 0x00007fff958a5d4d COPY_SETTER_IMPL + 150 4 ios-class-guard 0x000000010a92a56c -[CDSystemProtocolsProcessor systemProtocolsSymbolsToExclude] + 218 5 ios-class-guard 0x000000010a8e816e main + 5738 6 libdyld.dylib 0x00007fff98d3d5c9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6