Skip to content

Commit 06f7784

Browse files
Bump iOS sdk version and handle getAccessToken failure (#242)
* Bump iOS sdk version and handle getAccessToken failure * Add --no-fatal-infos in git action * Fix code docs
1 parent ceaea0d commit 06f7784

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Format
1515
run: dart format --set-exit-if-changed lib test example
1616
- name: Analyze
17-
run: flutter analyze lib test example
17+
run: flutter analyze lib test example --no-fatal-infos
1818
- name: Publish dry run
1919
run: flutter pub publish --dry-run
2020
- name: Build web version

ios/Classes/SwiftSpotifySdkPlugin.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,12 @@ public class SwiftSpotifySdkPlugin: NSObject, FlutterPlugin {
364364
} else {
365365
// Note: A blank string will play the user's last song or pick a random one.
366366
self.appRemote?.authorizeAndPlayURI(spotifyUri, asRadio: asRadio ?? false, additionalScopes: scopes) { success in
367-
if (!success) {
368-
self.connectionStatusHandler?.connectionResult?(FlutterError(code: "spotifyNotInstalled", message: "Spotify app is not installed", details: nil))
369-
}
367+
if (!success) {
368+
self.connectionStatusHandler?.connectionResult?(FlutterError(code: "spotifyNotInstalled", message: "Spotify app is not installed", details: nil))
369+
self.connectionStatusHandler?.tokenResult?(FlutterError(code: "spotifyNotInstalled", message: "Spotify app is not installed", details: nil))
370+
self.connectionStatusHandler?.connectionResult = nil
371+
self.connectionStatusHandler?.tokenResult = nil
372+
}
370373
}
371374
}
372375
}

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 tags/v3.0.0
9+
git -C ${REPO_NAME} checkout tags/v5.0.1
1010
find ./${REPO_NAME} -mindepth 1 -maxdepth 1 -not -name ${FRAMEWORK_NAME} -exec rm -rf '{}' \; # Keep on only the xcframework folder

lib/platform_channels.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class MethodNames {
5151
/// method name for [resume]
5252
static const String resume = 'resume';
5353

54-
/// method name for [podcastPlaybackSpeed]
54+
/// method name for [setPodcastPlaybackSpeed]
5555
static const String setPodcastPlaybackSpeed = 'setPodcastPlaybackSpeed';
5656

5757
/// method name for [skipToIndex]

lib/spotify_sdk.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ class SpotifySdk {
632632

633633
/// Sets the repeat mode
634634
///
635-
/// Set [repeatMode] to a value of [RepeatMode] either [off, track, context].
635+
/// Set [repeatMode] to a value of [RepeatMode].
636636
/// Throws a [PlatformException] if adding failed
637637
/// Throws a [MissingPluginException] if the method is not implemented on
638638
/// the native platforms.

0 commit comments

Comments
 (0)