Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 9 warnings regarding dylib #49

Open
nadiag1234 opened this issue Oct 21, 2015 · 2 comments
Open

iOS 9 warnings regarding dylib #49

nadiag1234 opened this issue Oct 21, 2015 · 2 comments

Comments

@nadiag1234
Copy link

Did anyone get these types of warnings -
2015-10-21 14:29:07.544 ios-class-guard[20418:1056995] Warning: Failed to load: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libobjc.A.dylib
2015-10-21 14:29:07.544 ios-class-guard[20418:1056995] Warning: Couldn't load MachOFile with ID: /usr/lib/libobjc.A.dylib, adjustedID: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libobjc.A.dylib

With the move from .dylib to .tbd I can understand why we have these warnings, but how come nobody encountered this issue, and if someone did - is there a solution?

@junketjim
Copy link

I've also encountered this - when building a target for Generic iOS device as opposed to the simulator. This causes me an issue as the obfuscation creates a different result (number of categories, etc. obfuscated) than my simulator build - resulting in something which will build and link for the simulator but won't for the device.

See here... https://www.reddit.com/r/iOSProgramming/comments/39rcby/ios_9_os_x_1011_xcode_7_development_with_dynamic/

@neuralmer
Copy link

@nadiag1234 and @junketjim:

The approach ios-class-guard takes to renaming is clever, but can produce less than intuitive compiler errors when there is a problem. In order for it to work well, the system libraries that your app uses must be analyzed. ios-class-guard will warn you if this fails. With the warnings you describe.

Apple has dramatically changed the SDKs ship with Xcode (6 and again in 7) to reduce download footprints. iPhoneSimulator SDK still works, but the iPhoneOS SDK format is unsupported. This means that analysis of an ARM binary will not work.

Make sure to look for the Forbidden keywords line:

2016-04-25 12:41:45.225 ios-class-guard[2598:64769341] Forbidden keywords = 98

This number should be > 50k for even a simple iOS project. If the number is very small, analysis of the SDK failed, and poor build results can be expected, including error messages like unexpected '@' in program.

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.

PPiOS-Rename uses the same approach to renaming, but will use iPhoneSimulator SDK in lieu of iPhoneOS SDK, even for ARM binaries.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants