TagLibSwift is a Swift Package that wraps the TagLib C++ library as an XCFramework for iOS and macOS. It provides a convenient way to read and edit audio metadata in various formats.
- Xcode 12.0 or later
- CMake 3.15 or later
- iOS SDK 13.0 or later
- macOS SDK 10.15 or later
- Clone the repository with submodules:
git clone --recursive https://github.com/jeonghi/TagLibSwift.git
cd TagLibSwift- Run the build script:
./build.shThe build script performs the following steps:
- Builds TagLib for iOS (device + simulator) using ios-cmake
- Builds TagLib for macOS
- Creates a universal binary for iOS
- Generates TagLib.xcframework
The build process creates:
build-ios/: iOS build artifactsbuild-macos/: macOS build artifactsinstall/: Installed headers and librariesTagLib.xcframework/: Final XCFramework for Swift Package Manager
The project uses ios-cmake for iOS builds with the following settings:
- Platform: OS64COMBINED (Universal binary for iOS)
- Build type: Release
- Installation directory:
install/iosandinstall/macos
Before running tests, you need to generate test audio files:
cd Tests/TagLibSwiftTests/Resources
./create_test_mp3.shThis will create the necessary test MP3 files for running the test suite.
TagLibSwift is released under the MIT License. TagLib is licensed under LGPL v2.1.