views:

69

answers:

3

I've heard that including libxslt.dylib is grounds for getting your app rejected. I don't know how accurate that is.

Nevertheless, I would like to include the latest version of libxslt. I'd like to do the same thing with libxml2, as well as other libraries in the future.

What is the correct way to include a code library like this in my app?

+1  A: 

You can only dynamically link to libraries that are already present on the device.

If you want to link to an external library that is not present on the device, you will have to compile it yourself to a static library and link that instead.

Shaggy Frog
Yes. So, how do I compile libxslt as a static library, or how do I just compile it into my app? If I run ./configure, will that configure it for compilation on both my Mac *and* iOS?
Hilton Campbell
See: http://stackoverflow.com/questions/1083631/timidity-need-help-compiling-this-library-for-the-iphone
Shaggy Frog
+1  A: 

My app was rejected with the following message from Apple.


XYZ app cannot be posted to the App Store because it is using private or undocumented APIs:

Private Symbol References xsltApplyStylesheet xsltCleanupGlobals xsltFreeStylesheet xsltInit xsltParseStylesheetFile xsltSaveResultToString

As you know, as outlined in the iPhone Developer Program License Agreement section 3.3.1, the use of non-public APIs is not permitted. Before your application can be reviewed by the App Review Team, please resolve this issue and upload a new binary to iTunes Connect.


It was my understanding that the libxslt and libxml2 libraries were in fact present on the device and are available via the pull down menu in Xcode. I dynamically link link with these two libraries and my app works beautifully on the device. Hence, the libraries must be on the device. Why would I need to build these libraries from scratch as static libraries and increase the size of my app?

I can't find any clear way to work around this, aside from not using xml and xslt. That makes no sense at all!

Hilton, have you succeeded in submitting an app to iTunes that uses xslt?

Robert H. Bourdeau
I have not yet submitted my app which uses it. I did statically link the libxslt library into my app though. Hopefully their private API analyzer can distinguish between the two usages.
Hilton Campbell
A: 

Hey Hilton, any chance you could let us know how you managed to statically link the LIBXSLT library into your app please?

I'm having exactly the same issue as quite a few others but at the moment at least, I have no idea how to go about turning the dynamic library into a static one.

Thanks.

Chris Gilbert
I'm away from my code for the week and don't remember off the top of my head. I'll post as soon as I can.
Hilton Campbell