Closed jdanthinne closed 8 months ago
Well.. That's a good question.
The first version of the DFU library is many years old now. Initially we started with this weird name iOSDFULibrary
, which perhaps was generated automatically by Xcode... I don't remember. I do remember, however, that in SPM we had a discussion in #310 that it also supports MacOS, so the iOS in the name is misleading. Anyway, NordicDFU
seems to be way more elegant name, but it's now difficult to change on Cocoapods. It would require creating a new library.
It's the first time that someone wants to use both Cocoapods and SPM. I understand your case. Any suggestions? CC: @NickKibish @dinesharjani @sylwester-zielinski
I see the following options:
NordicDFU
- perhaps other libraries also should be renamed?I vote for option 2. The current iOSDFULibrary
can be modified to only include the new one, like a proxy, or can be deprecated. After all Find & Replace finally works in Xcode.
This is what I had to do in the end.
#if SWIFT_PACKAGE
import NordicDFU
#else
import iOSDFULibrary
#endif
Just FYI.
I just upgraded to 4.15.0 and it appears the original package name 'iOSDFULibrary' no longer works with CocoaPods. The solution is to use the new name:
import NordicDFU
Yes, this has changed in 4.14 and the migration guide is here: https://github.com/NordicSemiconductor/IOS-DFU-Library/releases/tag/4.14.0
Is there a reason why this library, when used with Cocoapods, must be imported with
import iOSDFULibrary
, and when used with SPM, must be imported withimport NordicDFU
?I'm building a SDK that I'd like to offer for Cocoapods and SPM, and having two different names makes it impossible.