Configuration
The SDK libraries are distributed from the Cocoapods repository located at https://repo.sonicmedia.io/repository/cocoapods/
Set the Cocoapods repository in your project
Create or edit a Podfile with the following SDK references
pod "DspLib.Messaging", :podspec => "https://repo.sonicmedia.io/repository/cocoapods/dsplib/1.10.0/DspLib.Messaging.podspec"
pod "WatermarkingDetector", :podspec => "https://repo.sonicmedia.io/repository/cocoapods/watermarking-detector/2.1.0/WatermarkingDetector.framework.podspec"
pod "SonicMediaSDK", :podspec => "https://repo.sonicmedia.io/repository/cocoapods/sdk/1.0.0/SonicMediaSDK.xcframework.podspec"
Add the SonicMedia SDK dependency
Run the pod commands to create the corresponding workspace with the required dependencies:
pod cache clean --all
pod deintegrate
pod install
SDK Initialization
The SDK needs to be initialized using the API Key and Server URL provided by SonicMedia.
do {
detectionService = try await SonicMedia.getDetectionService(for: Settings(apiKey: "<apikey>",
serverUrl: "<serverurl>",
handleAudioSession: true,
logLevel: .info))
} catch let error {
NSLog("Could not initialize detection service: \(error)")
}