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

泄露秘密 提交于 2019-12-04 12:34:24

问题


Today I submit my iOS App to app store, but soon I got a mail from apple, it said that,

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

Private Symbol References

BZ2_bzBuffToBuffDecompress

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.

What should I do? I realy need bzip2 format support in my app.


回答1:


Since the license of bzip2 is compatible (read it, please) you can statically link against bzip2 instead of dynamically. A bit of searching lead to iOS-libarchive that will help you do that.




回答2:


From Ben Gottlieb's answer to this question:

In your Target settings window, scroll down to the "Other Linker Flags" section and make sure that -lz is in the field. This will link against the built-in zlib, and your error should go away.

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



来源:https://stackoverflow.com/questions/5124298/how-to-use-bzip2-format-in-ios-apple-tell-me-bzbufftobuffdecompress-is-private

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!