Apple Review had found quite a bit of private APIs to be used by my app.
I'm using ImageMagic built in the app which is the source of the trouble.
For example, the file jpeg.c which is included directly in my project is using method jpeg_set_quality. I'm linking with libjpeg (installed by brew) which I've believed should be used instead of the private API's.
I'm including the libs like this:
OTHER_LDFLAGS = -llqr-1 -llcms2 -ltiff -lfreetype -ljpeg -lglib-2.0 -lpng16 -lfontconfig -lfreetype -lheif -lwebpmux -lwebpdemux -lwebp -llzma -lopenjp2 -lxml2 -lm -lOpenEXR -lIex
If I remove -ljpeg then the compiler complains that the method is missing.
"_jpeg_set_quality", referenced from:
_WriteJPEGImage_ in jpeg.o
So that should prove that I'm using the linked version rather then private API, right?
My curious questions are:
- How do I find what lib is the called method linking to? E.g. my included lib or Apple's private lib?
- What happens if there is same name of the function in both libraries. How does the app decides which one is called?
- Could the dynamic libraries
.dylibbe the source of trouble? Shall I rather link with the static.alibs?