5

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.

Tinyfool
  • 1,460
  • 2
  • 18
  • 40
  • WTF ? The use of SQLite is OK but bzip2 is not ? – DarkDust Feb 26 '11 at 00:54
  • Even more bizarre, I completely forgot that they allow the use zlib... prohibiting bzip2 looks more like an oversight to me now simply because they haven't added the docs in the SDK. – DarkDust Feb 26 '11 at 01:07

2 Answers2

4

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.

DarkDust
  • 90,870
  • 19
  • 190
  • 224
  • Thanks, I will try to statically link against bzip2 to see what happended. – Tinyfool Feb 26 '11 at 01:20
  • 2
    I add static bzip2 to my project, but Xcode still using dynamical version, so I change libbz2.a to libzz2.a, Xcode can not find dynamical version, so it works. – Tinyfool Feb 28 '11 at 06:16
4

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.

Community
  • 1
  • 1
Steph Thirion
  • 9,313
  • 9
  • 50
  • 58