Skip to content

Commit b380700

Browse files
authored
Update Spotify iOS SDK to v2.1.7 (#216)
1 parent deb4e72 commit b380700

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ios/Classes/SwiftSpotifySdkPlugin.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,13 @@ public class SwiftSpotifySdkPlugin: NSObject, FlutterPlugin {
366366
if accessToken != nil {
367367
appRemote?.connect()
368368
} else {
369+
let appRemote = self.appRemote
370+
Task {
369371
// Note: A blank string will play the user's last song or pick a random one.
370-
if self.appRemote?.authorizeAndPlayURI(spotifyUri, asRadio: asRadio ?? false, additionalScopes: scopes) == false {
371-
throw SpotifyError.spotifyNotInstalledError
372+
if await appRemote?.authorizeAndPlayURI(spotifyUri, asRadio: asRadio ?? false, additionalScopes: scopes) == false {
373+
throw SpotifyError.spotifyNotInstalledError
372374
}
373-
}
375+
}
374376
}
375377
}
376378

ios/prepare-iOS-SDK.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ FRAMEWORK_NAME="SpotifyiOS.xcframework"
66
rm -fR ${REPO_NAME}
77
mkdir ${REPO_NAME}
88
git clone https://github.com/spotify/${REPO_NAME}
9-
git -C ${REPO_NAME} checkout cdbdcb3
9+
git -C ${REPO_NAME} checkout checkout tags/v2.1.7
1010
find ./${REPO_NAME} -mindepth 1 -maxdepth 1 -not -name ${FRAMEWORK_NAME} -exec rm -rf '{}' \; # Keep on only the xcframework folder

0 commit comments

Comments
 (0)