Skip to content

ryanfrancesconi/SPFKMetadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPFKMetadata

build Platforms - macOS 11+ Swift 5.9-6.0 Xcode 16+

SPFKMetadata wraps TagLib (v2.0.2), libsndfile (v1.2.2) and Core Audio metadata C/C++ frameworks for Swift compatibility. This library is currently macOS only, though will updated to include iOS soon.

The current state of metadata parsing via Swift means that no one single framework is a do-it-all solution, so this framework covers some missing functionalities from AVFoundation such as RIFF Audio Markers, Chaptering, Broadcast Wave and writing tags to file. SPFKMetadata embeds arm64/x86_64 xcframeworks for the needed dylibs and uses an intuitive Swift API to access metadata functions from each. While Apple's C++ → Swift interoperability looks promising, it doesn't yet seem ready for integration in which you don't control both sides of the integration. For this reason, open source frameworks like TagLib and libsndfile seem better bridged via Objective C++. I'm sure this will eventually change as Swift moves closer to C++ interoperability.

SPFKMetadata-logo-03-256

Installation

Swift Package Manager (SPM)

There are two targets in the package: SPFKMetadata and SPFKMetadataC. The first is pure Swift whereas the second is C++ bridged by Objective C++. For full functionality both imports are required.

  1. Add SPFKMetadata as a dependency in the usual ways.
    • In a project or framework, in Xcode:
      • Select the menu: File → Swift Packages → Add Package Dependency...
      • Enter this URL: https://github.com/ryanfrancesconi/SPFKMetadata
    • In a Swift Package, add it to the Package.swift dependencies:
      .package(url: "https://github.com/ryanfrancesconi/SPFKMetadata", branch: "main")
  2. Import the libraries:
    import SPFKMetadata
    import SPFKMetadataC

About

Spongefork (SPFK) is the personal software projects of Ryan Francesconi. Dedicated to creative sound manipulation, his first application, Spongefork, was released in 1999 for macOS 7. Since 2016 he has been the lead macOS developer at Audio Design Desk.