Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ios/Classes/SwiftSpotifySdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,13 @@ public class SwiftSpotifySdkPlugin: NSObject, FlutterPlugin {
if accessToken != nil {
appRemote?.connect()
} else {
let appRemote = self.appRemote
Task {
// Note: A blank string will play the user's last song or pick a random one.
if self.appRemote?.authorizeAndPlayURI(spotifyUri, asRadio: asRadio ?? false, additionalScopes: scopes) == false {
throw SpotifyError.spotifyNotInstalledError
if await appRemote?.authorizeAndPlayURI(spotifyUri, asRadio: asRadio ?? false, additionalScopes: scopes) == false {
throw SpotifyError.spotifyNotInstalledError
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion ios/prepare-iOS-SDK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ FRAMEWORK_NAME="SpotifyiOS.xcframework"
rm -fR ${REPO_NAME}
mkdir ${REPO_NAME}
git clone https://github.com/spotify/${REPO_NAME}
git -C ${REPO_NAME} checkout cdbdcb3
git -C ${REPO_NAME} checkout checkout tags/v2.1.7
find ./${REPO_NAME} -mindepth 1 -maxdepth 1 -not -name ${FRAMEWORK_NAME} -exec rm -rf '{}' \; # Keep on only the xcframework folder
Loading