Need Help with LZMA2 Compression Using SWCompression in Swift

I'm looking for assistance with compressing data using the LZMA2 algorithm from the SWCompression library in an iOS project. I've encountered issues and need guidance on how to correctly implement LZMA2 compression. Any help or code examples would be greatly appreciated!

Please help me providing information regarding this

NOTE: If I use third party library means I am getting error from testflight The app references non-public symbols in Payload/Hogs.app/Hogs: _lzma_easy_encoder, _lzma_end (ID: 305f671a-b2ee-4e14-8764-00ed9b86bfb0)

Help me solve this issue

Thanks

iOS doesn’t have a public LZMA2 API.

Regarding the third-party library you’re using, it’s hard to say what’s going on there without knowing exactly what library you’re using. Please post a link to it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Link for .a file : https://drive.google.com/file/d/1IwLGKEBHMMp9nc6nLkxwao-NDM-9yLmN/view?usp=sharing

We are required to use LZMA2 compression from the app side because our products have already been launched in the market. As an IoT company, our devices decompress the data using LZMA2. While Android supports LZMA2 compression without issues, iOS rejects our app due to this reason. Since decompression happens on the device, we must ensure that data is compressed using LZMA2 on the app side. If any additional information is needed, please let me know. Is it possible to connect with iOS developers to help resolve this issue?

It looks like you’re building your own copy of XZ Utils as a static library. That’s fine. However, iOS also contains a copy of that code, so:

  • It’s important that you link to the right copy.

  • Assuming that, you can then hide your copy of the symbols to avoid confusing the App Store ingestion process.

Regarding the first point, run nm over your app to make sure that the symbols are being resolved to your internal copy of the library. The symbols should be marked with t, T, d or D, not U.

Regarding the second point, once you’ve confirmed the above then the symbols don’t need to be visible in your app at all [1]. You can remove them using some flavour of strip.

I have links to docs for these tools in An Apple Library Primer. For a concrete example of how to tackle a problem like this — not this exact problem though — see Determining Why a Symbol is Referenced.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Because your code is calling the symbols directly, without going through the dynamic linker.

  1. If I implement this App Store will accept my app ??

  2. I need some support regarding this how to achieve this feature

  3. Can I get support from developer team

If I implement this App Store will accept my app ??

App Review has the final say as to what will or won’t be allowed on the store. I don’t work for App Review and can’t give definitive answers on their behalf.

However, you’re overall goal — using an open source library [1] by statically linked it into your app — is something that’s absolutely compatible with the App Store.

I need some support regarding this how to achieve this feature

That’s what DevForums is for. Feel free to ask follow-up questions here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] With an appropriate licence, of course (-:

Need Help with LZMA2 Compression Using SWCompression in Swift
 
 
Q