Creating Objective-C wrappers for Swift implementation

Nolaine Crusher nolainecrusher at gmail.com
Wed Mar 25 22:18:51 GMT 2020


Hi.

I've only been coding for about six months, and that's in Swift. Before
that, I knew so little about coding that even using command line apps could
pose a very daunting challenge for me.

However, the project I'm working on involves using metadata to curate
audiobook libraries. For now I'm limiting the formats my app will support
to .mp3, .aac(.m4b), and .flac. This is posing a number of challenges.

1) ffmpeg's support for metadata in general, and more obscure metadata tags
in particular, is very limited.
2) AVFoundation, while it appears willing to read .mp3 metadata, won't
export an .mp3 file on passthrough settings after editing metadata. And it
doesn't deal with FLAC at all.

For obvious reasons, TagLib is my best bet. But I don't know C++. Or even
Objective-C.

I found this build of TagLib (https://github.com/Phisto/TagLib) for MacOS,
and I found these Objective-C wrappers (https://github.com/BTRLabs/TagLibIOS)
to make TagLib usable in Swift. (however, the wrappers are for IOS, and the
project itself is a CocoaPod and I sort of hate the way CocoaPods takes
over your project.) Between the two, I was able to cobble together a sort
of Franken-code project that would work for MacOS without relying on
CocoPods, which I'm calling TagLibKit:

https://github.com/NCrusher74/TagLibKit

However, that's about as far as my monkey-see/monkey-do attempt at
emulating the code in the wrappers will take me. And unfortunately, it's
not far enough, because the TagLibIOS wrappers only wrap the text-based ID3
frames. It will handle Comments, USLT, and IPLS/TIPL frames, but not CHAP
and CTOC frames. And since I'm dealing with Audiobooks, chapters would be a
good thing to have. Admittedly, most people just separate their chapters by
file, but that's because not a lot of apps support chaptered MP3 and that
is one of the things I'm hoping to correct with my project.

I'm more than willing to do the work myself, but like I said, I don't know
C++ or ObjectiveC, so at the very least I would need a mentor who knows
TagLib and would be willing to guide me into figuring out what I need to do.

Could anyone advise me on this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20200325/77e8d147/attachment.html>


More information about the taglib-devel mailing list