NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
http://www.nordicsemi.com
BSD 3-Clause "New" or "Revised" License
525 stars 214 forks source link

Bitcode and Kotlin 1.8 problems - Will there be Updates for this Library? #506

Open aetrocks opened 1 year ago

aetrocks commented 1 year ago

Hello everyone,

will there be any updated version of this library, or is this library not supported anymore?

Since Xcode 14 I get an Error Message that the Library should have Bitcode Enabled. If I use Kotlin 1.8, I get an error because of the library too. (If the Library is actively supported, I can further explain the errors or write a real issue post)

If anyone reads this and uses the library with KMM too and has a good workaround for this problem I would really be thankful. It could be, that this is only a problem when using xcframeworks and KMM, but I am not sure about it.

Thanks for your help.

Simon

philips77 commented 1 year ago

Hi, We have never tried it with KMM. For Android we have https://github.com/NordicSemiconductor/Android-DFU-Library.

This library is supported and I need to check what's going on. Of course Apple doesn't make it easy for us. Sorry!

aetrocks commented 1 year ago

At the moment I tried to build my KMM Project not static and I always run in Bitcode Problems with the DFU Library. I would be glad if I could further use the Nordic Lib for DFU because I don't want to write it from scratch myself and I am pretty satisfied with the library.

At the moment I use the latest version of the dfu library 4.13.0. If I try to build a dynamic KMM Fat Framework, I get the error: iOSDFULibrary -> does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.

If I then try to disable Bitcode completely, I can build a dynamic Fat Framework, but also cannot install the iOS App with the error: The code signature version is no longer supported.

At the moment I am on Kotlin Multiplatform 1.7.20. If I try to use kotlin 1.8.22 I get a bunch of new iOSDFULibrary errors.

I would really appreciate your help.

philips77 commented 1 year ago

Unfortunately we don't have much KMM experience (yet). Did you try adding the DFU library as a module, not using SPM, and changing settings to match your needs?

aetrocks commented 1 year ago

at the moment I added the lib with cocoapods through the KMM native cocoapods support. I think it would be an option to build the lib and disable bitcode, but this always seems a bit tacky to do.

Thanks for your fast replies, I really appreciate your help. I know that my problem is a real edge case that the library doesn't need to support and im really sorry for the inconvenience on this matter. @philips77

But since we are using pretty much nordic stuff I don't want to switch only for dfu to another library if possible.

Wichnator commented 10 months ago

Hi, I'm using this library in KMM project with disabled bitcode without any issue. I used cocoapods and Kotlin 1.8. But recently I switched the iOS part of KMM project to Swift Package Manager and upgrade Kotlin to 1.9.10 and all is working fine.