<aside> ‼️ Commit addresses changes required for migrating to release 1.32.1

</aside>

Upgrade version

CocoaPods

Below is Podfile for 1.32.1 release with Face AR.

source '<https://github.com/Banuba/specs.git>'
source '<https://github.com/CocoaPods/Specs.git>'
source '[<https://github.com/sdk-banuba/banuba-sdk-podspecs.git>](<https://github.com/sdk-banuba/banuba-sdk-podspecs.git>)'
****
platform :ios, '14.0'
use_frameworks!

target 'Example' do
	pod 'BanubaARCloudSDK', '1.32.1' #optional
  pod 'BanubaVideoEditorSDK', '1.32.1'
  pod 'BanubaAudioBrowserSDK', 1.32.1' #optional
  pod 'BanubaSDK', '1.32.1'
  pod 'BanubaSDKServicing', '1.32.1'
  pod 'VideoEditor', '1.32.1'
  pod 'BanubaUtilities', '1.32.1'
  pod 'BanubaVideoEditorGallerySDK', '1.32.1' #optional
  pod 'BanubaLicenseServicingSDK', '1.32.1'
  pod 'BNBLicenseUtils', '1.32.1'
  pod 'VEExportSDK', '1.32.1'
  pod 'VEEffectsSDK', '1.32.1'
  pod 'VEPlaybackSDK', '1.32.1'
end

Integration

Prepare audio tracks

private func preparePredefinedList() -> [AudioBrowserTrack] {
    // Create your struct for audio tracks
    struct Track {
      let url: String
      let name: String
    }
    
    // Prepare the list of tracks you want to add. The order of tracks persist.
		// url - is the pass of audio file located in the project.
    let customTracks: [Track] = [
      Track(url: "file:///private/var/containers/Bundle/Application/14999CA1-708D-420A-9B26-988D8C927B2C/YourApp.app/Music/track1.mp3", name: "Awesome Track"),
      Track(url: "file:///private/var/containers/Bundle/Application/14999CA1-708D-420A-9B26-988D8C927B2C/YourApp.app/Music/track2.mp3", name: "Cool Track"),
      ...
    ]
    
    // Adapt your tracks to the SDK audio tracks
    let predefinedList: [AudioBrowserTrack] = customTracks.compactMap { track in
      let audioBrowserTrack = AudioBrowserTrack(
        uuid: UUID(),
        name: track.name,
        additionalName: nil,
        url: URL(string: track.url)!,
        coverURL: nil
      )
      // NOTE! Do not forget to ivoke this method.
      audioBrowserTrack.setupDuration()

      return audioBrowserTrack
    }
    
    return predefinedList
 }

Pass audio tracks to the SDK

Specify .predefinedList type in AudioBrowserConfig.shared.musicSource to pass list predefined tracks to the SDK and set the list to BanubaAudioBrowser.setPredefinedList

var config = VideoEditorConfig()
...
AudioBrowserConfig.shared.musicSource = .predefinedList
BanubaAudioBrowser.setPredefinedList(preparePredefinedList())