@wwdrew/expo-spotify-sdk 0.1.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/LICENSE +3 -0
- package/README.md +113 -0
- package/app.plugin.js +1 -0
- package/build/ExpoSpotifySDK.types.d.ts +4 -0
- package/build/ExpoSpotifySDK.types.d.ts.map +1 -0
- package/build/ExpoSpotifySDK.types.js +2 -0
- package/build/ExpoSpotifySDK.types.js.map +1 -0
- package/build/ExpoSpotifySDKModule.d.ts +3 -0
- package/build/ExpoSpotifySDKModule.d.ts.map +1 -0
- package/build/ExpoSpotifySDKModule.js +5 -0
- package/build/ExpoSpotifySDKModule.js.map +1 -0
- package/build/ExpoSpotifySDKModule.web.d.ts +7 -0
- package/build/ExpoSpotifySDKModule.web.d.ts.map +1 -0
- package/build/ExpoSpotifySDKModule.web.js +12 -0
- package/build/ExpoSpotifySDKModule.web.js.map +1 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +12 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +10 -0
- package/ios/ExpoSpotifyAuthDelegate.swift +11 -0
- package/ios/ExpoSpotifyConfiguration.swift +25 -0
- package/ios/ExpoSpotifySDK.podspec +30 -0
- package/ios/ExpoSpotifySDKModule.swift +32 -0
- package/ios/ExpoSpotifySessionManager+SessionManagerDelegate.swift +16 -0
- package/ios/ExpoSpotifySessionManager.swift +82 -0
- package/ios/SPTScopeSerializer.swift +44 -0
- package/ios/SpotifySDK/Licenses/MPMessagePack-LICENSE.md +20 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/Info.plist +40 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h +281 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +54 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityState.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +76 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +46 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +52 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTConfiguration.h +66 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h +33 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h +71 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
- 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 +6 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemote.h +240 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +75 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +43 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +47 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTConfiguration.h +63 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTError.h +33 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTScope.h +68 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Modules/module.modulemap +6 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +240 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +75 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +43 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +47 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +63 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +33 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +68 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +6 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +537 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +281 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +54 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityState.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +76 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +46 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +52 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +66 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +33 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +71 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
- 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 +6 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +567 -0
- package/package.json +58 -0
- package/plugin/build/android/withSpotifyAndroidAppBuildGradle.d.ts +3 -0
- package/plugin/build/android/withSpotifyAndroidAppBuildGradle.js +16 -0
- package/plugin/build/android/withSpotifyConfigAndroid.d.ts +3 -0
- package/plugin/build/android/withSpotifyConfigAndroid.js +16 -0
- package/plugin/build/index.d.ts +4 -0
- package/plugin/build/index.js +24 -0
- package/plugin/build/ios/withSpotifyConfigIOS.d.ts +3 -0
- package/plugin/build/ios/withSpotifyConfigIOS.js +16 -0
- package/plugin/build/ios/withSpotifyQueryScheme.d.ts +3 -0
- package/plugin/build/ios/withSpotifyQueryScheme.js +15 -0
- package/plugin/build/ios/withSpotifyURLScheme.d.ts +3 -0
- package/plugin/build/ios/withSpotifyURLScheme.js +19 -0
- package/plugin/build/types.d.ts +8 -0
- package/plugin/build/types.js +21 -0
- package/plugin/build/withSpotifyConfig.d.ts +3 -0
- package/plugin/build/withSpotifyConfig.js +11 -0
- package/server.js +93 -0
package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
@class SPTAppRemote;
|
|
4
|
+
@class SPTAppRemoteConnectionParams;
|
|
5
|
+
@class SPTConfiguration;
|
|
6
|
+
|
|
7
|
+
@protocol SPTAppRemoteImageAPI;
|
|
8
|
+
@protocol SPTAppRemotePlayerAPI;
|
|
9
|
+
@protocol SPTAppRemoteUserAPI;
|
|
10
|
+
@protocol SPTAppRemoteContentAPI;
|
|
11
|
+
@protocol SPTAppRemoteConnectivityAPI;
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
extern NSString * const SPTAppRemoteAccessTokenKey;
|
|
16
|
+
extern NSString * const SPTAppRemoteErrorKey;
|
|
17
|
+
extern NSString * const SPTAppRemoteErrorDescriptionKey;
|
|
18
|
+
|
|
19
|
+
/// The severity of log messages that the App Remote should log to console.
|
|
20
|
+
typedef NS_ENUM(NSUInteger, SPTAppRemoteLogLevel) {
|
|
21
|
+
/// Do not log at all.
|
|
22
|
+
SPTAppRemoteLogLevelNone = 0,
|
|
23
|
+
/// Log debug, info and error messages.
|
|
24
|
+
SPTAppRemoteLogLevelDebug = 1,
|
|
25
|
+
/// Log info and error messages.
|
|
26
|
+
SPTAppRemoteLogLevelInfo = 2,
|
|
27
|
+
/// Log only error messages.
|
|
28
|
+
SPTAppRemoteLogLevelError = 3,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The `SPTAppRemoteDelegate` receives updates from the `SPTAppRemote` whenever something has
|
|
33
|
+
* happened with the connection.
|
|
34
|
+
*/
|
|
35
|
+
@protocol SPTAppRemoteDelegate <NSObject>
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Called when the App Remote has established connection with the Spotify app.
|
|
39
|
+
*
|
|
40
|
+
* @param appRemote The transport that has connected.
|
|
41
|
+
*/
|
|
42
|
+
- (void)appRemoteDidEstablishConnection:(SPTAppRemote *)appRemote;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Called when the connection attempt made by the App Remote failed.
|
|
46
|
+
*
|
|
47
|
+
* @param appRemote The App Remote that failed to connect.
|
|
48
|
+
* @param error The error that occurred.
|
|
49
|
+
*/
|
|
50
|
+
- (void)appRemote:(SPTAppRemote *)appRemote didFailConnectionAttemptWithError:(nullable NSError *)error;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Called when the App Remote has disconnected.
|
|
54
|
+
*
|
|
55
|
+
* @note All APIs will be released by the App Remote at this point. The will no longer be usable,
|
|
56
|
+
* and so you should release them as well.
|
|
57
|
+
*
|
|
58
|
+
* @param appRemote The App Remote that disconnected.
|
|
59
|
+
* @param error The error that caused the disconnect, or `nil` if the disconnect was explicit.
|
|
60
|
+
*/
|
|
61
|
+
- (void)appRemote:(SPTAppRemote *)appRemote didDisconnectWithError:(nullable NSError *)error;
|
|
62
|
+
|
|
63
|
+
@end
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The `SPTAppRemote` is the main entry point for interacting with the Spotify app using the Spotify App Remote for iOS.
|
|
67
|
+
*/
|
|
68
|
+
@interface SPTAppRemote : NSObject
|
|
69
|
+
|
|
70
|
+
#pragma mark Lifecycle
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Convenience Initializer for a new App Remote instance
|
|
74
|
+
*
|
|
75
|
+
* @param configuration The `SPTConfiguration` to use for client-id's and redirect URLs
|
|
76
|
+
* @param logLevel The lowest severity to log to console.
|
|
77
|
+
*
|
|
78
|
+
* @return A fresh new App Remote, ready to connect.
|
|
79
|
+
*/
|
|
80
|
+
- (instancetype)initWithConfiguration:(SPTConfiguration *)configuration logLevel:(SPTAppRemoteLogLevel)logLevel;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Designated Initializer for a new App Remote instance
|
|
84
|
+
*
|
|
85
|
+
* @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 accessToken
|
|
87
|
+
* @param logLevel The lowest severity to log to console.
|
|
88
|
+
*
|
|
89
|
+
* @return A fresh new App Remote, ready to connect.
|
|
90
|
+
*/
|
|
91
|
+
- (instancetype)initWithConfiguration:(SPTConfiguration *)configuration
|
|
92
|
+
connectionParameters:(SPTAppRemoteConnectionParams *)connectionParameters
|
|
93
|
+
logLevel:(SPTAppRemoteLogLevel)logLevel NS_DESIGNATED_INITIALIZER;
|
|
94
|
+
#pragma mark Class Methods
|
|
95
|
+
|
|
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
|
+
/**
|
|
106
|
+
* Determine the current version of the Spotify App Remote
|
|
107
|
+
*
|
|
108
|
+
* @return The current version of the Spotify App Remote
|
|
109
|
+
*/
|
|
110
|
+
+ (NSString *)appRemoteVersion;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The Spotify app iTunes item identifier for use with `SKStoreProductViewController` for installing Spotify from the App Store.
|
|
114
|
+
*
|
|
115
|
+
* @return An `NSNumber` representing the Spotify iTunes item identifier to be used for the `SKStoreProductParameterITunesItemIdentifier` key
|
|
116
|
+
*/
|
|
117
|
+
+ (NSNumber *)spotifyItunesItemIdentifier;
|
|
118
|
+
|
|
119
|
+
#pragma mark Connection
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The parameters to use during connection.
|
|
123
|
+
*/
|
|
124
|
+
@property (nonatomic, strong, readonly) SPTAppRemoteConnectionParams *connectionParameters;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* `YES` if the App Remote is connected to the Spotify application, otherwise `NO`.
|
|
128
|
+
*
|
|
129
|
+
* @note Not KVO’able.
|
|
130
|
+
*
|
|
131
|
+
* See The `SPTAppRemoteDelegate` in order to receive updates when the connection status changes.
|
|
132
|
+
*/
|
|
133
|
+
@property (nonatomic, assign, readonly, getter=isConnected) BOOL connected;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The delegate to notify for connection status changes and other events originating from the App Remote.
|
|
137
|
+
*/
|
|
138
|
+
@property (nonatomic, weak) id<SPTAppRemoteDelegate> delegate;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Attempts to connect to the Spotify application.
|
|
142
|
+
*
|
|
143
|
+
* @discussion If the Spotify app is not running you will need to use authorizeAndPlayURI: to wake it up
|
|
144
|
+
*/
|
|
145
|
+
- (void)connect;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Attempts to connect to the Spotify application with a given session identifier.
|
|
149
|
+
*
|
|
150
|
+
* @discussion If the Spotify app is not running you will need to use authorizeAndPlayURI: to wake it up.
|
|
151
|
+
*
|
|
152
|
+
* @discussion If `authorizeAndPlayURI` was used without a given session identifier, `connect` should be used instead of this method.
|
|
153
|
+
*
|
|
154
|
+
* @param sessionIdentifier The unique session identifier which was used when calling
|
|
155
|
+
* `authorizeAndPlayURI:asRadio:additionalScopes:sessionIdentifier:`
|
|
156
|
+
*/
|
|
157
|
+
- (void)connectWithSessionIdentifier:(NSUUID *)sessionIdentifier;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Disconnect from the Spotify application
|
|
161
|
+
*/
|
|
162
|
+
- (void)disconnect;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Open Spotify app to obtain access token and start playback.
|
|
166
|
+
* The passed URI will start playing unless Spotify is already playing.
|
|
167
|
+
*
|
|
168
|
+
* @param URI The URI to play. Use a blank string to attempt to play the user's last song
|
|
169
|
+
*
|
|
170
|
+
* @return `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise `NO`.
|
|
171
|
+
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
172
|
+
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
173
|
+
*/
|
|
174
|
+
- (BOOL)authorizeAndPlayURI:(NSString *)URI;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Open Spotify app to obtain access token and start playback.
|
|
178
|
+
*
|
|
179
|
+
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
180
|
+
* @param asRadio `YES` to start radio for the given URI.
|
|
181
|
+
*
|
|
182
|
+
* @return `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise `NO`.
|
|
183
|
+
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
184
|
+
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
185
|
+
*/
|
|
186
|
+
- (BOOL)authorizeAndPlayURI:(NSString *)playURI asRadio:(BOOL)asRadio;
|
|
187
|
+
|
|
188
|
+
/**
|
|
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 `app-remote-control`
|
|
194
|
+
*
|
|
195
|
+
* @return `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise `NO`.
|
|
196
|
+
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
197
|
+
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
198
|
+
*/
|
|
199
|
+
- (BOOL)authorizeAndPlayURI:(NSString *)playURI
|
|
200
|
+
asRadio:(BOOL)asRadio
|
|
201
|
+
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Open Spotify app to obtain access token and start playback.
|
|
205
|
+
*
|
|
206
|
+
* @param playURI The URI to play. Use a blank string to attempt to play the user's last song
|
|
207
|
+
* @param asRadio `YES` to start radio for the given URI.
|
|
208
|
+
* @param additionalScopes An array of scopes in addition to `app-remote-control`. Can be nil if you only need `app-remote-control`
|
|
209
|
+
* @param sessionIdentifier An optional unique identifier for this specific session, which is used for analytics purposes. Every new attempt to
|
|
210
|
+
* connect to the Spotify app should have a new identifier, but the identifier used here should then be reused for the accompanied call to
|
|
211
|
+
* `connectWithSessionIdentifier:`.
|
|
212
|
+
*
|
|
213
|
+
* @return `YES` if the Spotify app is installed and an authorization attempt can be made, otherwise `NO`.
|
|
214
|
+
* Note: The return `BOOL` here is not a measure of whether or not authentication succeeded, only a check if
|
|
215
|
+
* the Spotify app is installed and can attempt to handle the authorization request.
|
|
216
|
+
*/
|
|
217
|
+
- (BOOL)authorizeAndPlayURI:(NSString *)playURI
|
|
218
|
+
asRadio:(BOOL)asRadio
|
|
219
|
+
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes
|
|
220
|
+
sessionIdentifier:(nullable NSUUID *)sessionIdentifier;
|
|
221
|
+
/**
|
|
222
|
+
* Parse out an access token or error description from a url passed to application:openURL:options:
|
|
223
|
+
*
|
|
224
|
+
* @param url The URL returned from the Spotify app after calling authorizeAndPlayURI
|
|
225
|
+
*
|
|
226
|
+
* @return A dictionary containing the access token or error description from the provided URL.
|
|
227
|
+
* Will return nil if the URL Scheme does not match the redirect URI provided.
|
|
228
|
+
* Use `SPTAppRemoteAccessTokenKey` and `SPTAppRemoteErrorDescriptionKey` to get the appropriate values.
|
|
229
|
+
*/
|
|
230
|
+
- (nullable NSDictionary<NSString *, NSString *> *)authorizationParametersFromURL:(NSURL *)url;
|
|
231
|
+
|
|
232
|
+
#pragma mark APIs
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The API used to control the Spotify player.
|
|
236
|
+
*
|
|
237
|
+
* @note Will only be populated when the App Remote is connected. If you retain this object you must release it on
|
|
238
|
+
* disconnect.
|
|
239
|
+
*/
|
|
240
|
+
@property (nullable, nonatomic, strong, readonly) id<SPTAppRemotePlayerAPI> playerAPI;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The API used to fetch images from the Spotify app.
|
|
244
|
+
*
|
|
245
|
+
* @note Will only be populated when the App Remote is connected. If you retain this object you must release it on
|
|
246
|
+
* disconnect.
|
|
247
|
+
*/
|
|
248
|
+
@property (nullable, nonatomic, strong, readonly) id<SPTAppRemoteImageAPI> imageAPI;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The API used to fetch user data from the Spotify app.
|
|
252
|
+
*
|
|
253
|
+
* @note Will only be populated when the App Remote is connected. If you retain this object you must release it on
|
|
254
|
+
* disconnect.
|
|
255
|
+
*/
|
|
256
|
+
@property (nullable, nonatomic, strong, readonly) id<SPTAppRemoteUserAPI> userAPI;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The API used to fetch content from the Spotify app.
|
|
260
|
+
*
|
|
261
|
+
* @note Will only be populated when the App Remote is connected. If you retain this object you must release it on
|
|
262
|
+
* disconnect.
|
|
263
|
+
*/
|
|
264
|
+
@property (nullable, nonatomic, strong, readonly) id<SPTAppRemoteContentAPI> contentAPI;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The API used to get connectivity data from the Spotify app.
|
|
268
|
+
*
|
|
269
|
+
* @note Will only be populated when the App Remote is connected. If you retain this object you must release it on
|
|
270
|
+
* disconnect.
|
|
271
|
+
*/
|
|
272
|
+
@property (nullable, nonatomic, strong, readonly) id<SPTAppRemoteConnectivityAPI> connectivityAPI;
|
|
273
|
+
|
|
274
|
+
#pragma mark Unavailable initializers
|
|
275
|
+
|
|
276
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
277
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
278
|
+
|
|
279
|
+
@end
|
|
280
|
+
|
|
281
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `SPTAppRemoteAlbum` represents an Album entity.
|
|
7
|
+
*/
|
|
8
|
+
@protocol SPTAppRemoteAlbum <NSObject>
|
|
9
|
+
|
|
10
|
+
/// The name of the album.
|
|
11
|
+
@property (nonatomic, copy, readonly) NSString *name;
|
|
12
|
+
|
|
13
|
+
/// The URI of the album.
|
|
14
|
+
@property (nonatomic, copy, readonly) NSString *URI;
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `SPTAppRemoteArtist` represents an artist.
|
|
7
|
+
*/
|
|
8
|
+
@protocol SPTAppRemoteArtist <NSObject>
|
|
9
|
+
|
|
10
|
+
/// The name of the artist.
|
|
11
|
+
@property (nonatomic, copy, readonly) NSString *name;
|
|
12
|
+
|
|
13
|
+
/// The URI of the artist.
|
|
14
|
+
@property (nonatomic, copy, readonly) NSString *URI;
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common header definitions
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
6
|
+
|
|
7
|
+
/// The error domain for user facing errors that occur in the App Remote.
|
|
8
|
+
extern NSString * const SPTAppRemoteErrorDomain;
|
|
9
|
+
|
|
10
|
+
/// The error codes in the `SPTAppRemoteErrorDomain` domain.
|
|
11
|
+
typedef NS_ENUM(NSInteger, SPTAppRemoteErrorCode) {
|
|
12
|
+
/// An unknown error.
|
|
13
|
+
SPTAppRemoteUnknownError = -1,
|
|
14
|
+
|
|
15
|
+
/// The background wakeup of the Spotify app failed.
|
|
16
|
+
SPTAppRemoteBackgroundWakeupFailedError = -1000,
|
|
17
|
+
/// The connection attempt to the Spotify app failed.
|
|
18
|
+
SPTAppRemoteConnectionAttemptFailedError = -1001,
|
|
19
|
+
/// The conncetion to the Spotify app was terminated.
|
|
20
|
+
SPTAppRemoteConnectionTerminatedError = -1002,
|
|
21
|
+
/// The arguments supplied are invalid.
|
|
22
|
+
SPTAppRemoteInvalidArgumentsError = -2000,
|
|
23
|
+
/// The request has failed for some reason.
|
|
24
|
+
SPTAppRemoteRequestFailedError = -2001,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A callback block used by many App Remote API methods.
|
|
29
|
+
*
|
|
30
|
+
* @param result The result of the operation, or `nil` if the operation failed.
|
|
31
|
+
* @param error An error object, or `nil` if the operation was a success.
|
|
32
|
+
*/
|
|
33
|
+
typedef void (^SPTAppRemoteCallback)(id _Nullable result, NSError * _Nullable error);
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
36
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
/// Available image formats to receive from the Spotify app.
|
|
4
|
+
typedef NS_ENUM(NSUInteger, SPTAppRemoteConnectionParamsImageFormat) {
|
|
5
|
+
/// Any image format is acceptable. Use this if you don't care about which image format is sent.
|
|
6
|
+
SPTAppRemoteConnectionParamsImageFormatAny = 0,
|
|
7
|
+
/// JPEG image format.
|
|
8
|
+
SPTAppRemoteConnectionParamsImageFormatJPEG,
|
|
9
|
+
/// PNG image format.
|
|
10
|
+
SPTAppRemoteConnectionParamsImageFormatPNG,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
struct CGSize;
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The `SPTAppRemoteconnectionParams` represents connection parameters required in order to initiate a connection
|
|
19
|
+
* with the Spotify app.
|
|
20
|
+
*/
|
|
21
|
+
@interface SPTAppRemoteConnectionParams : NSObject
|
|
22
|
+
|
|
23
|
+
/// The access token used to authorize the user with the Spotify app.
|
|
24
|
+
@property (nonatomic, copy, readwrite, nullable) NSString *accessToken;
|
|
25
|
+
|
|
26
|
+
/// The desired size of received images. (0,0) acts as a wildcard and accepts any size.
|
|
27
|
+
@property (nonatomic, assign, readonly) struct CGSize defaultImageSize;
|
|
28
|
+
|
|
29
|
+
/// The desired image format of received images.
|
|
30
|
+
@property (nonatomic, assign, readonly) SPTAppRemoteConnectionParamsImageFormat imageFormat;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a set of new connection parameters.
|
|
34
|
+
*
|
|
35
|
+
* @discussion This is the designated initializer.
|
|
36
|
+
*
|
|
37
|
+
* @param accessToken The access token obtained after authentication.
|
|
38
|
+
* @param defaultImageSize The desired size of received images. (0,0) acts as a wildcard and accepts any size.
|
|
39
|
+
* @param imageFormat The desired image format of received images.
|
|
40
|
+
*
|
|
41
|
+
* @return A set of connection parameters ready to be used when initiating a connection to the Spotify app.
|
|
42
|
+
*/
|
|
43
|
+
- (instancetype)initWithAccessToken:(nullable NSString *)accessToken
|
|
44
|
+
defaultImageSize:(struct CGSize)defaultImageSize
|
|
45
|
+
imageFormat:(SPTAppRemoteConnectionParamsImageFormat)imageFormat NS_DESIGNATED_INITIALIZER;
|
|
46
|
+
|
|
47
|
+
#pragma mark Static properties
|
|
48
|
+
|
|
49
|
+
/// Version of the protocol
|
|
50
|
+
@property (nonatomic, assign, readonly) NSInteger protocolVersion;
|
|
51
|
+
|
|
52
|
+
/// Roles
|
|
53
|
+
@property (nonatomic, copy, readonly) NSDictionary *roles;
|
|
54
|
+
|
|
55
|
+
/// Authentication methods supported
|
|
56
|
+
@property (nonatomic, copy, readonly) NSArray *authenticationMethods;
|
|
57
|
+
|
|
58
|
+
#pragma mark Unavailable initializers
|
|
59
|
+
|
|
60
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
61
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
62
|
+
|
|
63
|
+
@end
|
|
64
|
+
|
|
65
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
#import "SPTAppRemoteCommon.h"
|
|
4
|
+
|
|
5
|
+
@protocol SPTAppRemoteConnectivityAPI;
|
|
6
|
+
@protocol SPTAppRemoteConnectivityState;
|
|
7
|
+
|
|
8
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The `SPTAppRemoteConnectivityAPIDelegate` gets notified whenever the connectivity API receives new data from subscription events.
|
|
12
|
+
*/
|
|
13
|
+
@protocol SPTAppRemoteConnectivityAPIDelegate <NSObject>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Called when the connectivity state has been updated.
|
|
17
|
+
*
|
|
18
|
+
* @param connectivityAPI The API that received updates.
|
|
19
|
+
* @param connectivityState The new connectivity state received.
|
|
20
|
+
*/
|
|
21
|
+
- (void)connectivityAPI:(id<SPTAppRemoteConnectivityAPI>)connectivityAPI didReceiveNewConnectivityState:(id<SPTAppRemoteConnectivityState>)connectivityState;
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
The @c SPTAppRemoteConnectivityAPI class is used to get connectivity data from the Spotify app.
|
|
27
|
+
*/
|
|
28
|
+
@protocol SPTAppRemoteConnectivityAPI <NSObject>
|
|
29
|
+
|
|
30
|
+
/// The delegate receiving player state updates
|
|
31
|
+
@property (nonatomic, weak) id<SPTAppRemoteConnectivityAPIDelegate> delegate;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Subscribes to connection state changes from the Spotify app.
|
|
35
|
+
*
|
|
36
|
+
* @note Implement `SPTAppRemoteConnectivityAPIDelegate` and set yourself as delegate in order to be notified when the
|
|
37
|
+
* the connection state changes.
|
|
38
|
+
*
|
|
39
|
+
* @param callback On success `result` will be `YES`
|
|
40
|
+
* On error `result` will be `nil` and error set
|
|
41
|
+
*/
|
|
42
|
+
- (void)subscribeToConnectivityState:(nullable SPTAppRemoteCallback)callback;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Stops subscribing to connection state changes from the Spotify app.
|
|
46
|
+
*
|
|
47
|
+
* @param callback On success `result` will be `YES`
|
|
48
|
+
* On error `result` will be `nil` and error set
|
|
49
|
+
*/
|
|
50
|
+
- (void)unsubscribeToConnectivityState:(nullable SPTAppRemoteCallback)callback;
|
|
51
|
+
|
|
52
|
+
@end
|
|
53
|
+
|
|
54
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
The @c SPTAppRemoteConnectivityState class represents the online/offline state of the Spotify app.
|
|
7
|
+
*/
|
|
8
|
+
@protocol SPTAppRemoteConnectivityState <NSObject>
|
|
9
|
+
|
|
10
|
+
/// Whether the Spotify app is offline or not.
|
|
11
|
+
@property (nonatomic, readonly, getter=isOffline) BOOL offline;
|
|
12
|
+
|
|
13
|
+
@end
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import "SPTAppRemoteCommon.h"
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
/// A type representing different lists of content.
|
|
7
|
+
typedef NSString * const SPTAppRemoteContentType;
|
|
8
|
+
|
|
9
|
+
extern NSString * const SPTAppRemoteContentTypeDefault;
|
|
10
|
+
extern NSString * const SPTAppRemoteContentTypeNavigation;
|
|
11
|
+
extern NSString * const SPTAppRemoteContentTypeFitness;
|
|
12
|
+
extern NSString * const SPTAppRemoteContentTypeGaming;
|
|
13
|
+
|
|
14
|
+
@protocol SPTAppRemoteContentItem;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The `SPTAppRemoteContentAPI` is used to access content from the Spotify application.
|
|
18
|
+
*/
|
|
19
|
+
@protocol SPTAppRemoteContentAPI <NSObject>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Fetches the root level of content items for the current user.
|
|
23
|
+
*
|
|
24
|
+
* @note The content returned is based on the users' home feeds, and as such may vary
|
|
25
|
+
* between different users. If the user has no network connection or Spotify is
|
|
26
|
+
* forced offline, this method will return the user's offline content, if any.
|
|
27
|
+
*
|
|
28
|
+
* Deprecated. Use fetchRecommendedContentItemsForType:flattenContainers:callback: instead.
|
|
29
|
+
*
|
|
30
|
+
* @param contentType A type that is used to retrieve content for a specific use-case.
|
|
31
|
+
* @param callback The callback to be called once the request is completed.
|
|
32
|
+
*/
|
|
33
|
+
- (void)fetchRootContentItemsForType:(SPTAppRemoteContentType)contentType
|
|
34
|
+
callback:(nullable SPTAppRemoteCallback)callback DEPRECATED_MSG_ATTRIBUTE("Deprecated. Use fetchRecommendedContentItemsForType:flattenContainers:callback: instead.");
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Fetches the children items for the provided content item.
|
|
38
|
+
*
|
|
39
|
+
* @note The `isContainer` property of the `SPTAppRemoteContentItem`
|
|
40
|
+
* indicates whether or not the item has any children.
|
|
41
|
+
*
|
|
42
|
+
* @param contentItem The content item to fetch the children for.
|
|
43
|
+
* @param callback The callback to be called once the request is completed.
|
|
44
|
+
*/
|
|
45
|
+
- (void)fetchChildrenOfContentItem:(id<SPTAppRemoteContentItem>)contentItem
|
|
46
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Fetches a list of recommended playlists for the current user.
|
|
50
|
+
*
|
|
51
|
+
* @note The playlists returned are a mix of the user's recently played feed
|
|
52
|
+
* as well as personal recommendations, and as such may vary between users. If the
|
|
53
|
+
* user is offline, this method will only return the content that is available offline, if any.
|
|
54
|
+
* @note This method is only supported by Spotify clients running version 8.4.75 and above
|
|
55
|
+
* and will fail with an `SPTAppRemoteWAMPClientNotSupportedError` otherwise.
|
|
56
|
+
*
|
|
57
|
+
* @param contentType A type that is used to retrieve content for a specific use-case.
|
|
58
|
+
* @param flattenContainers Whether or not the recommendations should be flattened into a single list or remain
|
|
59
|
+
* separated in containers.
|
|
60
|
+
* @param callback The callback to be called once the request is completed.
|
|
61
|
+
*/
|
|
62
|
+
- (void)fetchRecommendedContentItemsForType:(SPTAppRemoteContentType)contentType
|
|
63
|
+
flattenContainers:(BOOL)flattenContainers
|
|
64
|
+
callback:(nullable SPTAppRemoteCallback)callback;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
Fetches the content item for the provided URI.
|
|
68
|
+
|
|
69
|
+
@param URI A Spotify URI as string
|
|
70
|
+
@param callback The callback to be called once the request is completed.
|
|
71
|
+
*/
|
|
72
|
+
- (void)fetchContentItemForURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
|
|
73
|
+
|
|
74
|
+
@end
|
|
75
|
+
|
|
76
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import "SPTAppRemoteImageRepresentable.h"
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `SPTAppRemoteContentItem` protocol represents a track or a collection of tracks. Use the `isContainer` instance method
|
|
8
|
+
* to determine if the content item is a collection of tracks for which to grab children from.
|
|
9
|
+
*/
|
|
10
|
+
@protocol SPTAppRemoteContentItem <NSObject, SPTAppRemoteImageRepresentable>
|
|
11
|
+
|
|
12
|
+
/// The primary title of the item.
|
|
13
|
+
@property (nonatomic, copy, readonly, nullable) NSString *title;
|
|
14
|
+
|
|
15
|
+
/// The secondary title of the item.
|
|
16
|
+
@property (nonatomic, copy, readonly, nullable) NSString *subtitle;
|
|
17
|
+
|
|
18
|
+
/// The description of the item.
|
|
19
|
+
@property (nonatomic, copy, readonly, nullable) NSString *contentDescription;
|
|
20
|
+
|
|
21
|
+
/// The unique identifier of the item.
|
|
22
|
+
@property (nonatomic, copy, readonly) NSString *identifier;
|
|
23
|
+
|
|
24
|
+
/// The playback URI of this item.
|
|
25
|
+
@property (nonatomic, copy, readonly) NSString *URI;
|
|
26
|
+
|
|
27
|
+
/// `YES` if the item is available offline, or if it has any child that is available offline, otherwise `NO`.
|
|
28
|
+
@property (nonatomic, assign, readonly, getter=isAvailableOffline) BOOL availableOffline;
|
|
29
|
+
|
|
30
|
+
/// Returns `YES` if the item is directly playable, otherwise `NO`.
|
|
31
|
+
@property (nonatomic, assign, readonly, getter=isPlayable) BOOL playable;
|
|
32
|
+
|
|
33
|
+
/// Returns `YES` if the item is expected to contain children, otherwise `NO`.
|
|
34
|
+
@property (nonatomic, assign, readonly, getter=isContainer) BOOL container;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
A list of the content item's children.
|
|
38
|
+
|
|
39
|
+
@note This is not populated for all container items as some of them are fetched
|
|
40
|
+
lazily with the `fetchChildrenOfContentItem:callback:` method.
|
|
41
|
+
*/
|
|
42
|
+
@property (nonatomic, strong, readonly, nullable) NSArray<id<SPTAppRemoteContentItem>> *children;
|
|
43
|
+
|
|
44
|
+
@end
|
|
45
|
+
|
|
46
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `SPTAppRemoteCrossfadeState` represents the state of crossfade.
|
|
7
|
+
*/
|
|
8
|
+
@protocol SPTAppRemoteCrossfadeState <NSObject>
|
|
9
|
+
|
|
10
|
+
/// The on/off state of crossfade.
|
|
11
|
+
@property (nonatomic, readonly, getter=isEnabled) BOOL enabled;
|
|
12
|
+
|
|
13
|
+
/// The duration of crossfade in milliseconds. The value is meaningless if crossfade is not enabled.
|
|
14
|
+
@property (nonatomic, readonly) NSInteger duration;
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
|
|
3
|
+
#import "SPTAppRemoteCommon.h"
|
|
4
|
+
#import "SPTAppRemoteImageRepresentable.h"
|
|
5
|
+
|
|
6
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* API for fetching image data from the Spotify app
|
|
10
|
+
*/
|
|
11
|
+
@protocol SPTAppRemoteImageAPI <NSObject>
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Fetch an image with the given ID from the Spotify app.
|
|
15
|
+
*
|
|
16
|
+
* @param imageRepresentable The item containing the ID of the image to fetch.
|
|
17
|
+
* @param imageSize The size of the image to fetch.
|
|
18
|
+
* @param callback On success `result` will be an instance of `UIImage`
|
|
19
|
+
* On error `result` will be nil and error set
|
|
20
|
+
*/
|
|
21
|
+
- (void)fetchImageForItem:(id<SPTAppRemoteImageRepresentable>)imageRepresentable withSize:(CGSize)imageSize callback:(nullable SPTAppRemoteCallback)callback;
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `SPTImageRepresentable` protocol represents an object that may contain an image.
|
|
7
|
+
* If something conforms to this protocol you can pass it to `SPTAppRemoteImageAPI` fetchImageForItem: method.
|
|
8
|
+
*/
|
|
9
|
+
@protocol SPTAppRemoteImageRepresentable <NSObject>
|
|
10
|
+
|
|
11
|
+
/// The identifier of the image of the entity.
|
|
12
|
+
@property (nonatomic, strong, readonly) NSString *imageIdentifier;
|
|
13
|
+
|
|
14
|
+
@end
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_END
|