How to use bzip2 format in iOS? Apple will tell me bzBuffToBuffDecompress are private APIs

Today I send my iOS application to the application store, but soon I received an email from apple, he said that

cannot be sent to the App Store because it uses private or undocumented APIs:

Private Symbol References

BZ2_bzBuffToBuffDecompress

As you know, as stated in the iPhone Developer Program License Section Section 3.3.1, the use of non-public APIs is not allowed. Before the application can be viewed by the application View the command, please resolve this problem and upload the new binary file to iTunes Connect.

What should I do? I really need bzip2 format support in my application.

+5
source share
2 answers

Since the bzip2 license is compatible (please read it), you can statically refer to bzip2 instead of the dynamic one. A bit of searching will lead to iOS-libarchive , which will help you with this.

+4
source

From Ben Gottlieb the answer to this question :

In the Target Settings window, scroll down to the “other linker flags” and make sure -lz is in the box. This will be due to the built-in zlib, and your error should go away.

Except in this case, you want to use the -lbz2 flag.

+2
source

All Articles