Question

I simply have an application linked against a static library that uses parse.com SDK. The application itself uses the SDK as well.

The problem is that linking against this library requires the -ObjC flag in order for the application to link properly and detect the categories and whatnot. The issue with this is, it causes parse.com SDK to complain that FacebookSDK is missing, (with linker errors).

This answer in the parse forums suggests using force_load, but that didn't help, since we are still missing the -ObjC flag.

Is there any way around this? My last resort is to pull the Analytics out of the library...

Was it helpful?

Solution

Alright, it's finally working.

Apparently, Xcode applies linked flags to all linked frameworks and libraries (?). In order to circumvent this limitation, I added in other linker flags:

-force_load "/Path/To/Library.a"

This is the same as what the parse forums suggested, but I had linked the parse framework with the library, which was just silly of me. I removed that, and now it works! Analytics code in the library and the application both work, without linking facebookSDK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top