@wwdrew/expo-spotify-sdk 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/expo/modules/spotifysdk/ExpoSpotifySDKModule.kt +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/Info.plist +5 -9
- package/ios/SpotifySDK/SpotifyiOS.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/_CodeSignature/CodeResources +1118 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h +43 -41
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +9 -8
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +4 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +8 -6
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +12 -7
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +4 -5
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTConfiguration.h +4 -4
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h +1 -2
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTMacros.h +59 -23
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h +25 -25
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h +2 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h +51 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +11 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h +2 -2
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Modules/module.modulemap +0 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +43 -41
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +9 -8
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +4 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +8 -6
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +12 -7
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +4 -5
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +4 -4
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +1 -2
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +59 -23
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +25 -25
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +2 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +51 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +11 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +2 -2
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +0 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/package.json +2 -2
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +0 -454
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h
CHANGED
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
|
|
13
13
|
NS_ASSUME_NONNULL_BEGIN
|
|
14
14
|
|
|
15
|
-
extern NSString *
|
|
16
|
-
extern NSString *
|
|
17
|
-
extern NSString *
|
|
15
|
+
extern NSString *const SPTAppRemoteAccessTokenKey;
|
|
16
|
+
extern NSString *const SPTAppRemoteErrorKey;
|
|
17
|
+
extern NSString *const SPTAppRemoteErrorDescriptionKey;
|
|
18
18
|
|
|
19
19
|
/// The severity of log messages that the App Remote should log to console.
|
|
20
20
|
typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
21
21
|
/// Do not log at all.
|
|
22
|
-
SPTAppRemoteLogLevelNone
|
|
22
|
+
SPTAppRemoteLogLevelNone = 0,
|
|
23
23
|
/// Log debug, info and error messages.
|
|
24
24
|
SPTAppRemoteLogLevelDebug = 1,
|
|
25
25
|
/// Log info and error messages.
|
|
26
|
-
SPTAppRemoteLogLevelInfo
|
|
26
|
+
SPTAppRemoteLogLevelInfo = 2,
|
|
27
27
|
/// Log only error messages.
|
|
28
28
|
SPTAppRemoteLogLevelError = 3,
|
|
29
29
|
};
|
|
@@ -63,7 +63,8 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
63
63
|
@end
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* The `SPTAppRemote` is the main entry point for interacting with the Spotify app using the Spotify App Remote for
|
|
66
|
+
* The `SPTAppRemote` is the main entry point for interacting with the Spotify app using the Spotify App Remote for
|
|
67
|
+
* iOS.
|
|
67
68
|
*/
|
|
68
69
|
@interface SPTAppRemote : NSObject
|
|
69
70
|
|
|
@@ -83,7 +84,8 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
83
84
|
* Designated Initializer for a new App Remote instance
|
|
84
85
|
*
|
|
85
86
|
* @param configuration The `SPTConfiguration` to use for client-id's and redirect URLs
|
|
86
|
-
* @param connectionParameters `SPTAppRemoteConnectionParams` for custom image sizes and types, and to hold the
|
|
87
|
+
* @param connectionParameters `SPTAppRemoteConnectionParams` for custom image sizes and types, and to hold the
|
|
88
|
+
* accessToken
|
|
87
89
|
* @param logLevel The lowest severity to log to console.
|
|
88
90
|
*
|
|
89
91
|
* @return A fresh new App Remote, ready to connect.
|
|
@@ -93,15 +95,6 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
93
95
|
logLevel:(SPTAppRemoteLogLevel)logLevel NS_DESIGNATED_INITIALIZER;
|
|
94
96
|
#pragma mark Class Methods
|
|
95
97
|
|
|
96
|
-
/**
|
|
97
|
-
* Checks if the Spotify app is active on the user's device. You can use this to determine if maybe you should prompt
|
|
98
|
-
* the user to connect to Spotify (because you know they are already using Spotify if it is active). The Spotify app
|
|
99
|
-
* will be considered active if music is playing or the app is active in the background.
|
|
100
|
-
*
|
|
101
|
-
* @param completion Completion block for determining the result of the check. YES if Spotify is active, othewise NO.
|
|
102
|
-
*/
|
|
103
|
-
+ (void)checkIfSpotifyAppIsActive:(void (^)(BOOL active))completion;
|
|
104
|
-
|
|
105
98
|
/**
|
|
106
99
|
* Determine the current version of the Spotify App Remote
|
|
107
100
|
*
|
|
@@ -110,9 +103,11 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
110
103
|
+ (NSString *)appRemoteVersion;
|
|
111
104
|
|
|
112
105
|
/**
|
|
113
|
-
* The Spotify app iTunes item identifier for use with `SKStoreProductViewController` for installing Spotify from the
|
|
106
|
+
* The Spotify app iTunes item identifier for use with `SKStoreProductViewController` for installing Spotify from the
|
|
107
|
+
* App Store.
|
|
114
108
|
*
|
|
115
|
-
* @return An `NSNumber` representing the Spotify iTunes item identifier to be used for the
|
|
109
|
+
* @return An `NSNumber` representing the Spotify iTunes item identifier to be used for the
|
|
110
|
+
* `SKStoreProductParameterITunesItemIdentifier` key
|
|
116
111
|
*/
|
|
117
112
|
+ (NSNumber *)spotifyItunesItemIdentifier;
|
|
118
113
|
|
|
@@ -149,7 +144,8 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
149
144
|
*
|
|
150
145
|
* @discussion If the Spotify app is not running you will need to use authorizeAndPlayURI: to wake it up.
|
|
151
146
|
*
|
|
152
|
-
* @discussion If `authorizeAndPlayURI` was used without a given session identifier, `connect` should be used instead of
|
|
147
|
+
* @discussion If `authorizeAndPlayURI` was used without a given session identifier, `connect` should be used instead of
|
|
148
|
+
* this method.
|
|
153
149
|
*
|
|
154
150
|
* @param sessionIdentifier The unique session identifier which was used when calling
|
|
155
151
|
* `authorizeAndPlayURI:asRadio:additionalScopes:sessionIdentifier:`
|
|
@@ -166,62 +162,68 @@ typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
|
166
162
|
* The passed URI will start playing unless Spotify is already playing.
|
|
167
163
|
*
|
|
168
164
|
* @param URI The URI to play. Use a blank string to attempt to play the user's last song
|
|
169
|
-
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
165
|
+
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
166
|
+
* `NO`.
|
|
170
167
|
*
|
|
171
168
|
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
172
169
|
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
173
170
|
*/
|
|
174
|
-
- (void)authorizeAndPlayURI:(NSString *)URI completionHandler:(void (^
|
|
171
|
+
- (void)authorizeAndPlayURI:(NSString *)URI completionHandler:(void (^__nullable)(BOOL success))completionHandler;
|
|
175
172
|
|
|
176
173
|
/**
|
|
177
174
|
* Open Spotify app to obtain access token and start playback.
|
|
178
175
|
*
|
|
179
176
|
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
180
177
|
* @param asRadio `YES` to start radio for the given URI.
|
|
181
|
-
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
178
|
+
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
179
|
+
* `NO`.
|
|
182
180
|
*
|
|
183
181
|
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
184
182
|
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
185
183
|
*/
|
|
186
184
|
- (void)authorizeAndPlayURI:(NSString *)playURI
|
|
187
185
|
asRadio:(BOOL)asRadio
|
|
188
|
-
completionHandler:(void (^
|
|
186
|
+
completionHandler:(void (^__nullable)(BOOL success))completionHandler;
|
|
189
187
|
|
|
190
188
|
/**
|
|
191
|
-
* Open Spotify app to obtain access token and start playback.
|
|
192
|
-
*
|
|
193
|
-
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
194
|
-
* @param asRadio `YES` to start radio for the given URI.
|
|
195
|
-
* @param additionalScopes An array of scopes in addition to `app-remote-control`. Can be nil if you only need
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
|
|
189
|
+
* Open Spotify app to obtain access token and start playback.
|
|
190
|
+
*
|
|
191
|
+
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
192
|
+
* @param asRadio `YES` to start radio for the given URI.
|
|
193
|
+
* @param additionalScopes An array of scopes in addition to `app-remote-control`. Can be nil if you only need
|
|
194
|
+
* `app-remote-control`
|
|
195
|
+
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
196
|
+
* `NO`.
|
|
197
|
+
*
|
|
198
|
+
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
199
|
+
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
200
|
+
*/
|
|
201
201
|
- (void)authorizeAndPlayURI:(NSString *)playURI
|
|
202
202
|
asRadio:(BOOL)asRadio
|
|
203
203
|
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes
|
|
204
|
-
completionHandler:(void (^
|
|
204
|
+
completionHandler:(void (^__nullable)(BOOL success))completionHandler;
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* Open Spotify app to obtain access token and start playback.
|
|
208
208
|
*
|
|
209
209
|
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
210
210
|
* @param asRadio `YES` to start radio for the given URI.
|
|
211
|
-
* @param additionalScopes An array of scopes in addition to `app-remote-control`. Can be nil if you only need
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
211
|
+
* @param additionalScopes An array of scopes in addition to `app-remote-control`. Can be nil if you only need
|
|
212
|
+
* `app-remote-control`
|
|
213
|
+
* @param sessionIdentifier An optional unique identifier for this specific session, which is used for analytics
|
|
214
|
+
* purposes. Every new attempt to connect to the Spotify app should have a new identifier, but the identifier used here
|
|
215
|
+
* should then be reused for the accompanied call to `connectWithSessionIdentifier:`.
|
|
216
|
+
* @param completionHandler `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise
|
|
217
|
+
* `NO`.
|
|
216
218
|
*
|
|
217
219
|
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
218
220
|
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
219
|
-
*/
|
|
221
|
+
*/
|
|
220
222
|
- (void)authorizeAndPlayURI:(NSString *)playURI
|
|
221
223
|
asRadio:(BOOL)asRadio
|
|
222
224
|
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes
|
|
223
225
|
sessionIdentifier:(nullable NSUUID *)sessionIdentifier
|
|
224
|
-
completionHandler:(void (^
|
|
226
|
+
completionHandler:(void (^__nullable)(BOOL success))completionHandler;
|
|
225
227
|
/**
|
|
226
228
|
* Parse out an access token or error description from a url passed to application:openURL:options:
|
|
227
229
|
*
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Common header definitions
|
|
3
5
|
*/
|
|
@@ -5,23 +7,23 @@
|
|
|
5
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
6
8
|
|
|
7
9
|
/// The error domain for user facing errors that occur in the App Remote.
|
|
8
|
-
extern NSString *
|
|
10
|
+
extern NSString *const SPTAppRemoteErrorDomain;
|
|
9
11
|
|
|
10
12
|
/// The error codes in the `SPTAppRemoteErrorDomain` domain.
|
|
11
13
|
typedef NS_ENUM(NSInteger, SPTAppRemoteErrorCode) {
|
|
12
14
|
/// An unknown error.
|
|
13
|
-
SPTAppRemoteUnknownError
|
|
15
|
+
SPTAppRemoteUnknownError = -1,
|
|
14
16
|
|
|
15
17
|
/// The background wakeup of the Spotify app failed.
|
|
16
|
-
SPTAppRemoteBackgroundWakeupFailedError
|
|
18
|
+
SPTAppRemoteBackgroundWakeupFailedError = -1000,
|
|
17
19
|
/// The connection attempt to the Spotify app failed.
|
|
18
20
|
SPTAppRemoteConnectionAttemptFailedError = -1001,
|
|
19
21
|
/// The conncetion to the Spotify app was terminated.
|
|
20
|
-
SPTAppRemoteConnectionTerminatedError
|
|
22
|
+
SPTAppRemoteConnectionTerminatedError = -1002,
|
|
21
23
|
/// The arguments supplied are invalid.
|
|
22
|
-
SPTAppRemoteInvalidArgumentsError
|
|
24
|
+
SPTAppRemoteInvalidArgumentsError = -2000,
|
|
23
25
|
/// The request has failed for some reason.
|
|
24
|
-
SPTAppRemoteRequestFailedError
|
|
26
|
+
SPTAppRemoteRequestFailedError = -2001,
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
/**
|
|
@@ -30,7 +32,6 @@ typedef NS_ENUM(NSInteger, SPTAppRemoteErrorCode) {
|
|
|
30
32
|
* @param result The result of the operation, or `nil` if the operation failed.
|
|
31
33
|
* @param error An error object, or `nil` if the operation was a success.
|
|
32
34
|
*/
|
|
33
|
-
typedef void (^SPTAppRemoteCallback)(id _Nullable result, NSError *
|
|
35
|
+
typedef void (^SPTAppRemoteCallback)(id _Nullable result, NSError *_Nullable error);
|
|
34
36
|
|
|
35
37
|
NS_ASSUME_NONNULL_END
|
|
36
|
-
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
2
|
#import "SPTAppRemoteCommon.h"
|
|
4
3
|
|
|
5
4
|
@protocol SPTAppRemoteConnectivityAPI;
|
|
@@ -8,7 +7,8 @@
|
|
|
8
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
|
-
* The `SPTAppRemoteConnectivityAPIDelegate` gets notified whenever the connectivity API receives new data from
|
|
10
|
+
* The `SPTAppRemoteConnectivityAPIDelegate` gets notified whenever the connectivity API receives new data from
|
|
11
|
+
* subscription events.
|
|
12
12
|
*/
|
|
13
13
|
@protocol SPTAppRemoteConnectivityAPIDelegate <NSObject>
|
|
14
14
|
|
|
@@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
18
18
|
* @param connectivityAPI The API that received updates.
|
|
19
19
|
* @param connectivityState The new connectivity state received.
|
|
20
20
|
*/
|
|
21
|
-
- (void)connectivityAPI:(id<SPTAppRemoteConnectivityAPI>)connectivityAPI
|
|
21
|
+
- (void)connectivityAPI:(id<SPTAppRemoteConnectivityAPI>)connectivityAPI
|
|
22
|
+
didReceiveNewConnectivityState:(id<SPTAppRemoteConnectivityState>)connectivityState;
|
|
22
23
|
|
|
23
24
|
@end
|
|
24
25
|
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
NS_ASSUME_NONNULL_BEGIN
|
|
5
5
|
|
|
6
6
|
/// A type representing different lists of content.
|
|
7
|
-
typedef NSString *
|
|
7
|
+
typedef NSString *const SPTAppRemoteContentType;
|
|
8
8
|
|
|
9
|
-
extern NSString *
|
|
10
|
-
extern NSString *
|
|
11
|
-
extern NSString *
|
|
12
|
-
extern NSString *
|
|
9
|
+
extern NSString *const SPTAppRemoteContentTypeDefault;
|
|
10
|
+
extern NSString *const SPTAppRemoteContentTypeNavigation;
|
|
11
|
+
extern NSString *const SPTAppRemoteContentTypeFitness;
|
|
12
|
+
extern NSString *const SPTAppRemoteContentTypeGaming;
|
|
13
13
|
|
|
14
14
|
@protocol SPTAppRemoteContentItem;
|
|
15
15
|
|
|
@@ -31,7 +31,9 @@ extern NSString * const SPTAppRemoteContentTypeGaming;
|
|
|
31
31
|
* @param callback The callback to be called once the request is completed.
|
|
32
32
|
*/
|
|
33
33
|
- (void)fetchRootContentItemsForType:(SPTAppRemoteContentType)contentType
|
|
34
|
-
callback:(nullable SPTAppRemoteCallback)callback
|
|
34
|
+
callback:(nullable SPTAppRemoteCallback)callback
|
|
35
|
+
DEPRECATED_MSG_ATTRIBUTE(
|
|
36
|
+
"Deprecated. Use fetchRecommendedContentItemsForType:flattenContainers:callback: instead.");
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Fetches the children items for the provided content item.
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
NS_ASSUME_NONNULL_BEGIN
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The `SPTAppRemoteContentItem` protocol represents a track or a collection of tracks. Use the `isContainer` instance
|
|
8
|
-
* to determine if the content item is a collection of tracks for which to grab children from.
|
|
7
|
+
* The `SPTAppRemoteContentItem` protocol represents a track or a collection of tracks. Use the `isContainer` instance
|
|
8
|
+
* method to determine if the content item is a collection of tracks for which to grab children from.
|
|
9
9
|
*/
|
|
10
10
|
@protocol SPTAppRemoteContentItem <NSObject, SPTAppRemoteImageRepresentable>
|
|
11
11
|
|
|
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
33
33
|
/// Returns `YES` if the item is expected to contain children, otherwise `NO`.
|
|
34
34
|
@property (nonatomic, assign, readonly, getter=isContainer) BOOL container;
|
|
35
35
|
|
|
36
|
-
/// Returns `YES` if the item is pinned in Your Library, otherwise `NO`.
|
|
36
|
+
/// Returns `YES` if the item is pinned in Your Library, otherwise `NO`.
|
|
37
37
|
@property (nonatomic, assign, readonly, getter=isPinned) BOOL pinnned;
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
1
|
#import "SPTAppRemoteCommon.h"
|
|
4
2
|
#import "SPTAppRemoteImageRepresentable.h"
|
|
5
3
|
|
|
@@ -18,7 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
18
16
|
* @param callback On success `result` will be an instance of `UIImage`
|
|
19
17
|
* On error `result` will be nil and error set
|
|
20
18
|
*/
|
|
21
|
-
- (void)fetchImageForItem:(id<SPTAppRemoteImageRepresentable>)imageRepresentable
|
|
19
|
+
- (void)fetchImageForItem:(id<SPTAppRemoteImageRepresentable>)imageRepresentable
|
|
20
|
+
withSize:(CGSize)imageSize
|
|
21
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
22
22
|
|
|
23
23
|
@end
|
|
24
24
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
2
|
#import "SPTAppRemoteCommon.h"
|
|
4
3
|
#import "SPTAppRemotePlaybackOptions.h"
|
|
5
4
|
|
|
6
|
-
@protocol SPTAppRemotePlayerState
|
|
5
|
+
@protocol SPTAppRemotePlayerState
|
|
6
|
+
, SPTAppRemoteContentItem, SPTAppRemotePodcastPlaybackSpeed;
|
|
7
7
|
|
|
8
8
|
NS_ASSUME_NONNULL_BEGIN
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The `SPTAppRemotePlayerStateDelegate` is used to get notifications from the Spotify app when the player state is
|
|
11
|
+
* The `SPTAppRemotePlayerStateDelegate` is used to get notifications from the Spotify app when the player state is
|
|
12
|
+
* changed.
|
|
12
13
|
*/
|
|
13
14
|
@protocol SPTAppRemotePlayerStateDelegate <NSObject>
|
|
14
15
|
|
|
@@ -84,7 +85,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
84
85
|
* @param callback On success `result` will be `YES`.
|
|
85
86
|
* On error `result` will be `nil` and error set
|
|
86
87
|
*/
|
|
87
|
-
- (void)playItem:(id<SPTAppRemoteContentItem>)contentItem
|
|
88
|
+
- (void)playItem:(id<SPTAppRemoteContentItem>)contentItem
|
|
89
|
+
skipToTrackIndex:(NSInteger)index
|
|
90
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
88
91
|
|
|
89
92
|
/**
|
|
90
93
|
* Asks the Spotify player to resume playback.
|
|
@@ -175,7 +178,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
175
178
|
* @param callback On success `result` will be `YES`.
|
|
176
179
|
* On error `result` will be `nil` and `error` will be set.
|
|
177
180
|
*/
|
|
178
|
-
- (void)setRepeatMode:(SPTAppRemotePlaybackOptionsRepeatMode)repeatMode
|
|
181
|
+
- (void)setRepeatMode:(SPTAppRemotePlaybackOptionsRepeatMode)repeatMode
|
|
182
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
179
183
|
|
|
180
184
|
#pragma mark Player State
|
|
181
185
|
|
|
@@ -213,7 +217,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
213
217
|
* @param callback On success `result` will be `YES`
|
|
214
218
|
* On error `result` will be `nil` and error set
|
|
215
219
|
*/
|
|
216
|
-
- (void)enqueueTrackUri:(NSString*)trackUri callback:(nullable SPTAppRemoteCallback)callback;
|
|
220
|
+
- (void)enqueueTrackUri:(NSString *)trackUri callback:(nullable SPTAppRemoteCallback)callback;
|
|
217
221
|
|
|
218
222
|
/**
|
|
219
223
|
* Asks the Spotify player for available podcast playback speeds
|
|
@@ -247,7 +251,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
247
251
|
* @param callback On success `result` will be `YES`.
|
|
248
252
|
* On error `result` will be `nil` and `error` set
|
|
249
253
|
*/
|
|
250
|
-
- (void)setPodcastPlaybackSpeed:(nonnull id<SPTAppRemotePodcastPlaybackSpeed>)speed
|
|
254
|
+
- (void)setPodcastPlaybackSpeed:(nonnull id<SPTAppRemotePodcastPlaybackSpeed>)speed
|
|
255
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
251
256
|
|
|
252
257
|
/**
|
|
253
258
|
* Asks the Spotify player for the current crossfade state.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
2
|
#import "SPTAppRemoteCommon.h"
|
|
4
3
|
|
|
5
4
|
@protocol SPTAppRemoteUserAPI;
|
|
@@ -80,8 +79,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
80
79
|
*
|
|
81
80
|
* @param URI The URI of the item to save
|
|
82
81
|
* @param callback A callback block that will be invoked when the fetch request has completed.
|
|
83
|
-
* On success `result` will be an instance of `id<SPTAppRemoteLibraryState>` that indicates the
|
|
84
|
-
*
|
|
82
|
+
* On success `result` will be an instance of `id<SPTAppRemoteLibraryState>` that indicates the
|
|
83
|
+
* resulting state of the entity. On error `result` will be `nil` and `error` will be set.
|
|
85
84
|
*/
|
|
86
85
|
- (void)addItemToLibraryWithURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
|
|
87
86
|
|
|
@@ -93,8 +92,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
93
92
|
*
|
|
94
93
|
* @param URI The URI of the item to remove
|
|
95
94
|
* @param callback A callback block that will be invoked when the fetch request has completed.
|
|
96
|
-
* On success `result` will be an instance of `id<SPTAppRemoteLibraryState>` that indicates the
|
|
97
|
-
*
|
|
95
|
+
* On success `result` will be an instance of `id<SPTAppRemoteLibraryState>` that indicates the
|
|
96
|
+
* resulting state of the entity. On error `result` will be `nil` and `error` will be set.
|
|
98
97
|
*/
|
|
99
98
|
- (void)removeItemFromLibraryWithURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
|
|
100
99
|
|
|
@@ -33,8 +33,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
If requesting the `SPTAppRemoteControlScope` you can provide an optional uri to begin playing after a successful
|
|
36
|
-
authentication. To continue the user's last session set this to a blank string @"". If this value is `nil` or
|
|
37
|
-
is not requested no audio will play. If Spotify is already playing it will continue playing
|
|
36
|
+
authentication. To continue the user's last session set this to a blank string @"". If this value is `nil` or
|
|
37
|
+
`SPTAppRemoteControlScope` is not requested no audio will play. If Spotify is already playing it will continue playing
|
|
38
|
+
even though a URI is provided.
|
|
38
39
|
*/
|
|
39
40
|
@property (nonatomic, nullable, copy) NSString *playURI;
|
|
40
41
|
|
|
@@ -47,8 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
47
48
|
@param redirectURL Your redirect URL for Spotify to open your app again after authorization
|
|
48
49
|
@return A newly initialized `SPTConfiguration`
|
|
49
50
|
*/
|
|
50
|
-
- (instancetype)initWithClientID:(NSString *)clientID
|
|
51
|
-
redirectURL:(NSURL *)redirectURL NS_DESIGNATED_INITIALIZER;
|
|
51
|
+
- (instancetype)initWithClientID:(NSString *)clientID redirectURL:(NSURL *)redirectURL NS_DESIGNATED_INITIALIZER;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
Convenience intializer for `SPtConfiguration`
|
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h
CHANGED
|
@@ -7,8 +7,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
7
7
|
SPT_EXPORT NSErrorDomain const SPTLoginErrorDomain;
|
|
8
8
|
|
|
9
9
|
/// Spotify error codes, use NSUnderlyingErrorKey to see the underlying error
|
|
10
|
-
typedef NS_ENUM(NSUInteger, SPTErrorCode)
|
|
11
|
-
{
|
|
10
|
+
typedef NS_ENUM(NSUInteger, SPTErrorCode) {
|
|
12
11
|
/// Unknown error code
|
|
13
12
|
SPTUnknownErrorCode NS_SWIFT_NAME(unknown) = 0,
|
|
14
13
|
/// Authorization failed
|
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTMacros.h
CHANGED
|
@@ -48,42 +48,78 @@
|
|
|
48
48
|
} while (0);
|
|
49
49
|
\endcode
|
|
50
50
|
*/
|
|
51
|
-
#define SPT_OPTIONAL_MESSAGE_SEND(RECEIVER, RESULT, ...)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
#define SPT_OPTIONAL_MESSAGE_SEND(RECEIVER, RESULT, ...) \
|
|
52
|
+
do { \
|
|
53
|
+
if ([RECEIVER respondsToSelector:@selector(SPT_CONCAT_SELECTOR(__VA_ARGS__))]) \
|
|
54
|
+
*(RESULT) = [RECEIVER SPT_CONCAT_METHOD(__VA_ARGS__)]; \
|
|
55
|
+
} while (0)
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
58
|
Like SPT_OPTIONAL_MESSAGE_SEND but ignores the return value.
|
|
58
59
|
@param RECEIVER The object to which the message will be sent.
|
|
59
60
|
@param ... 0-4 arguments.
|
|
60
61
|
*/
|
|
61
|
-
#define SPT_OPTIONAL_MESSAGE_SEND_(RECEIVER, ...)
|
|
62
|
-
|
|
63
|
-
[RECEIVER
|
|
64
|
-
|
|
62
|
+
#define SPT_OPTIONAL_MESSAGE_SEND_(RECEIVER, ...) \
|
|
63
|
+
do { \
|
|
64
|
+
if ([RECEIVER respondsToSelector:@selector(SPT_CONCAT_SELECTOR(__VA_ARGS__))]) \
|
|
65
|
+
[RECEIVER SPT_CONCAT_METHOD(__VA_ARGS__)]; \
|
|
66
|
+
} while (0)
|
|
65
67
|
|
|
66
68
|
// Some boilerplate for SPT_OPTIONAL_MESSAGE_SEND[_]
|
|
67
|
-
#define SPT_CONCAT_METHOD8(A, _1, B, _2, C, _3, D, _4)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#define
|
|
69
|
+
#define SPT_CONCAT_METHOD8(A, _1, B, _2, C, _3, D, _4) \
|
|
70
|
+
A: \
|
|
71
|
+
_1 B : _2 C : _3 D : _4
|
|
72
|
+
#define SPT_CONCAT_METHOD6(A, _1, B, _2, C, _3) \
|
|
73
|
+
A: \
|
|
74
|
+
_1 B : _2 C : _3
|
|
75
|
+
#define SPT_CONCAT_METHOD4(A, _1, B, _2) \
|
|
76
|
+
A: \
|
|
77
|
+
_1 B : _2
|
|
78
|
+
#define SPT_CONCAT_METHOD2(A, _1) \
|
|
79
|
+
A: \
|
|
80
|
+
_1
|
|
71
81
|
#define SPT_CONCAT_METHOD1(A) A
|
|
72
82
|
|
|
73
|
-
#define SPT_CONCAT_SELECTOR8(A, _1, B, _2, C, _3, D, _4)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
#define SPT_CONCAT_SELECTOR8(A, _1, B, _2, C, _3, D, _4) \
|
|
84
|
+
A: \
|
|
85
|
+
B: \
|
|
86
|
+
C: \
|
|
87
|
+
D:
|
|
88
|
+
#define SPT_CONCAT_SELECTOR6(A, _1, B, _2, C, _3) \
|
|
89
|
+
A: \
|
|
90
|
+
B: \
|
|
91
|
+
C:
|
|
92
|
+
#define SPT_CONCAT_SELECTOR4(A, _1, B, _2) \
|
|
93
|
+
A: \
|
|
94
|
+
B:
|
|
95
|
+
#define SPT_CONCAT_SELECTOR2(A, _1) \
|
|
96
|
+
A:
|
|
77
97
|
#define SPT_CONCAT_SELECTOR1(A) A
|
|
78
98
|
|
|
79
99
|
#define SPT_PICK_CONCAT_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, NAME, ...) NAME
|
|
80
100
|
|
|
81
|
-
#define SPT_CONCAT_METHOD(...)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
101
|
+
#define SPT_CONCAT_METHOD(...) \
|
|
102
|
+
SPT_PICK_CONCAT_MACRO(__VA_ARGS__, \
|
|
103
|
+
SPT_CONCAT_METHOD8, \
|
|
104
|
+
SPT_CONCAT_METHOD7, \
|
|
105
|
+
SPT_CONCAT_METHOD6, \
|
|
106
|
+
SPT_CONCAT_METHOD5, \
|
|
107
|
+
SPT_CONCAT_METHOD4, \
|
|
108
|
+
SPT_CONCAT_METHOD3, \
|
|
109
|
+
SPT_CONCAT_METHOD2, \
|
|
110
|
+
SPT_CONCAT_METHOD1) \
|
|
111
|
+
(__VA_ARGS__)
|
|
112
|
+
|
|
113
|
+
#define SPT_CONCAT_SELECTOR(...) \
|
|
114
|
+
SPT_PICK_CONCAT_MACRO(__VA_ARGS__, \
|
|
115
|
+
SPT_CONCAT_SELECTOR8, \
|
|
116
|
+
SPT_CONCAT_SELECTOR7, \
|
|
117
|
+
SPT_CONCAT_SELECTOR6, \
|
|
118
|
+
SPT_CONCAT_SELECTOR5, \
|
|
119
|
+
SPT_CONCAT_SELECTOR4, \
|
|
120
|
+
SPT_CONCAT_SELECTOR3, \
|
|
121
|
+
SPT_CONCAT_SELECTOR2, \
|
|
122
|
+
SPT_CONCAT_SELECTOR1) \
|
|
123
|
+
(__VA_ARGS__)
|
|
88
124
|
|
|
89
125
|
#endif // SPT_MACROS
|
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
1
3
|
// (Objective-C identifier, Swift name, string value, bit flag)
|
|
2
|
-
#define SPT_SCOPE_LIST
|
|
3
|
-
SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0))
|
|
4
|
-
SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \
|
|
5
|
-
SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2))
|
|
6
|
-
SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3))
|
|
7
|
-
SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4))
|
|
8
|
-
SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5))
|
|
9
|
-
SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6))
|
|
10
|
-
SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7))
|
|
11
|
-
SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8))
|
|
12
|
-
SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9))
|
|
13
|
-
SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10))
|
|
14
|
-
SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11))
|
|
15
|
-
SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12))
|
|
16
|
-
SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13))
|
|
17
|
-
SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14))
|
|
18
|
-
SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15))
|
|
19
|
-
SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16))
|
|
20
|
-
SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17))
|
|
21
|
-
SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18))
|
|
22
|
-
SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19))
|
|
4
|
+
#define SPT_SCOPE_LIST \
|
|
5
|
+
SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0)) \
|
|
6
|
+
SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \
|
|
7
|
+
SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2)) \
|
|
8
|
+
SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3)) \
|
|
9
|
+
SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4)) \
|
|
10
|
+
SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5)) \
|
|
11
|
+
SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6)) \
|
|
12
|
+
SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7)) \
|
|
13
|
+
SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8)) \
|
|
14
|
+
SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9)) \
|
|
15
|
+
SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10)) \
|
|
16
|
+
SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11)) \
|
|
17
|
+
SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12)) \
|
|
18
|
+
SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13)) \
|
|
19
|
+
SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14)) \
|
|
20
|
+
SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15)) \
|
|
21
|
+
SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16)) \
|
|
22
|
+
SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17)) \
|
|
23
|
+
SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18)) \
|
|
24
|
+
SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19))
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
`SPTScope` represents the OAuth scopes that declare how your app wants to access a user's account.
|
|
26
28
|
See https://developer.spotify.com/web-api/using-scopes/ for more information.
|
|
27
29
|
*/
|
|
28
|
-
typedef NS_OPTIONS(NSUInteger, SPTScope)
|
|
29
|
-
{
|
|
30
|
+
typedef NS_OPTIONS(NSUInteger, SPTScope) {
|
|
30
31
|
/// Read access to user's private playlists.
|
|
31
32
|
SPTPlaylistReadPrivateScope NS_SWIFT_NAME(playlistReadPrivate) = (1 << 0),
|
|
32
33
|
/// Include collaborative playlists when requesting a user's playlists.
|
|
@@ -48,7 +49,7 @@ typedef NS_OPTIONS(NSUInteger, SPTScope)
|
|
|
48
49
|
/// Read access to user’s email address.
|
|
49
50
|
SPTUserReadEmailScope NS_SWIFT_NAME(userReadEmail) = (1 << 9),
|
|
50
51
|
/// Read access to user’s subscription details (type of user account).
|
|
51
|
-
SPTUserReadPrivateScope
|
|
52
|
+
SPTUserReadPrivateScope NS_SWIFT_NAME(userReadPrivate) = (1 << 10),
|
|
52
53
|
/// Read access to a user's top artists and tracks.
|
|
53
54
|
SPTUserTopReadScope NS_SWIFT_NAME(userTopRead) = (1 << 11),
|
|
54
55
|
/// Upload user generated content images
|
|
@@ -68,4 +69,3 @@ typedef NS_OPTIONS(NSUInteger, SPTScope)
|
|
|
68
69
|
/// Indicate that the application intends to use OIDC to verify the user's identity
|
|
69
70
|
SPTOpenIdScope NS_SWIFT_NAME(openid) = (1 << 19),
|
|
70
71
|
};
|
|
71
|
-
|
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h
CHANGED
|
@@ -20,7 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
Check whether the session has expired. `YES` if expired; `NO` otherwise.
|
|
23
|
-
Note: The session is considered expired once the current date and time is equal to or greater than the expiration date
|
|
23
|
+
Note: The session is considered expired once the current date and time is equal to or greater than the expiration date
|
|
24
|
+
and time.
|
|
24
25
|
*/
|
|
25
26
|
@property (nonatomic, readonly, getter=isExpired) BOOL expired;
|
|
26
27
|
|