@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.
Files changed (177) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +113 -0
  3. package/app.plugin.js +1 -0
  4. package/build/ExpoSpotifySDK.types.d.ts +4 -0
  5. package/build/ExpoSpotifySDK.types.d.ts.map +1 -0
  6. package/build/ExpoSpotifySDK.types.js +2 -0
  7. package/build/ExpoSpotifySDK.types.js.map +1 -0
  8. package/build/ExpoSpotifySDKModule.d.ts +3 -0
  9. package/build/ExpoSpotifySDKModule.d.ts.map +1 -0
  10. package/build/ExpoSpotifySDKModule.js +5 -0
  11. package/build/ExpoSpotifySDKModule.js.map +1 -0
  12. package/build/ExpoSpotifySDKModule.web.d.ts +7 -0
  13. package/build/ExpoSpotifySDKModule.web.d.ts.map +1 -0
  14. package/build/ExpoSpotifySDKModule.web.js +12 -0
  15. package/build/ExpoSpotifySDKModule.web.js.map +1 -0
  16. package/build/index.d.ts +13 -0
  17. package/build/index.d.ts.map +1 -0
  18. package/build/index.js +12 -0
  19. package/build/index.js.map +1 -0
  20. package/expo-module.config.json +10 -0
  21. package/ios/ExpoSpotifyAuthDelegate.swift +11 -0
  22. package/ios/ExpoSpotifyConfiguration.swift +25 -0
  23. package/ios/ExpoSpotifySDK.podspec +30 -0
  24. package/ios/ExpoSpotifySDKModule.swift +32 -0
  25. package/ios/ExpoSpotifySessionManager+SessionManagerDelegate.swift +16 -0
  26. package/ios/ExpoSpotifySessionManager.swift +82 -0
  27. package/ios/SPTScopeSerializer.swift +44 -0
  28. package/ios/SpotifySDK/Licenses/MPMessagePack-LICENSE.md +20 -0
  29. package/ios/SpotifySDK/SpotifyiOS.xcframework/Info.plist +40 -0
  30. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h +281 -0
  31. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
  32. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
  33. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
  34. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
  35. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +54 -0
  36. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityState.h +15 -0
  37. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +76 -0
  38. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +46 -0
  39. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
  40. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
  41. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
  42. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
  43. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
  44. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
  45. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
  46. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
  47. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
  48. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +52 -0
  49. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
  50. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
  51. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTConfiguration.h +66 -0
  52. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h +33 -0
  53. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
  54. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
  55. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h +71 -0
  56. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
  57. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
  58. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
  59. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
  60. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist +0 -0
  61. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Modules/module.modulemap +6 -0
  62. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS +0 -0
  63. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemote.h +240 -0
  64. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
  65. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
  66. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
  67. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
  68. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +75 -0
  69. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +43 -0
  70. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
  71. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
  72. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
  73. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
  74. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
  75. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
  76. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
  77. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
  78. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
  79. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +47 -0
  80. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
  81. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
  82. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTConfiguration.h +63 -0
  83. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTError.h +33 -0
  84. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
  85. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
  86. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTScope.h +68 -0
  87. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
  88. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
  89. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
  90. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
  91. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Info.plist +0 -0
  92. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Modules/module.modulemap +6 -0
  93. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/SpotifyiOS +0 -0
  94. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +240 -0
  95. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
  96. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
  97. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
  98. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
  99. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +75 -0
  100. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +43 -0
  101. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
  102. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
  103. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
  104. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
  105. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
  106. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
  107. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
  108. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
  109. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
  110. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +47 -0
  111. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
  112. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
  113. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +63 -0
  114. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +33 -0
  115. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
  116. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
  117. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +68 -0
  118. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
  119. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
  120. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
  121. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
  122. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
  123. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +6 -0
  124. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
  125. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +537 -0
  126. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +281 -0
  127. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +18 -0
  128. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +18 -0
  129. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +36 -0
  130. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +65 -0
  131. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityAPI.h +54 -0
  132. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectivityState.h +15 -0
  133. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +76 -0
  134. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +46 -0
  135. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +18 -0
  136. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +25 -0
  137. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +16 -0
  138. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +19 -0
  139. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +32 -0
  140. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +32 -0
  141. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +262 -0
  142. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +40 -0
  143. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +15 -0
  144. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +52 -0
  145. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +103 -0
  146. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +15 -0
  147. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +66 -0
  148. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +33 -0
  149. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h +10 -0
  150. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +89 -0
  151. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +71 -0
  152. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +32 -0
  153. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +140 -0
  154. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +30 -0
  155. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +7 -0
  156. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
  157. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +6 -0
  158. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
  159. package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +567 -0
  160. package/package.json +58 -0
  161. package/plugin/build/android/withSpotifyAndroidAppBuildGradle.d.ts +3 -0
  162. package/plugin/build/android/withSpotifyAndroidAppBuildGradle.js +16 -0
  163. package/plugin/build/android/withSpotifyConfigAndroid.d.ts +3 -0
  164. package/plugin/build/android/withSpotifyConfigAndroid.js +16 -0
  165. package/plugin/build/index.d.ts +4 -0
  166. package/plugin/build/index.js +24 -0
  167. package/plugin/build/ios/withSpotifyConfigIOS.d.ts +3 -0
  168. package/plugin/build/ios/withSpotifyConfigIOS.js +16 -0
  169. package/plugin/build/ios/withSpotifyQueryScheme.d.ts +3 -0
  170. package/plugin/build/ios/withSpotifyQueryScheme.js +15 -0
  171. package/plugin/build/ios/withSpotifyURLScheme.d.ts +3 -0
  172. package/plugin/build/ios/withSpotifyURLScheme.js +19 -0
  173. package/plugin/build/types.d.ts +8 -0
  174. package/plugin/build/types.js +21 -0
  175. package/plugin/build/withSpotifyConfig.d.ts +3 -0
  176. package/plugin/build/withSpotifyConfig.js +11 -0
  177. package/server.js +93 -0
@@ -0,0 +1,19 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /**
6
+ * The `SPTAppRemoteLibraryState` represents a the state of an album or track in a users Spotify library.
7
+ */
8
+ @protocol SPTAppRemoteLibraryState <NSObject>
9
+
10
+ /// The uri of the track or album
11
+ @property (nonatomic, strong, readonly) NSString *uri;
12
+ /// `YES` album or track was added to the user's library, otherwise `NO`.
13
+ @property (nonatomic, assign, readonly) BOOL isAdded;
14
+ /// `YES` album or track can be added to the user's library, otherwise `NO`.
15
+ @property (nonatomic, assign, readonly) BOOL canAdd;
16
+
17
+ @end
18
+
19
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,32 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /// The available repeat modes.
6
+ typedef NS_ENUM(NSUInteger, SPTAppRemotePlaybackOptionsRepeatMode) {
7
+ /// Repeat is off.
8
+ SPTAppRemotePlaybackOptionsRepeatModeOff = 0,
9
+
10
+ /// Repeats the current track.
11
+ SPTAppRemotePlaybackOptionsRepeatModeTrack = 1,
12
+
13
+ /// Repeats the current context.
14
+ SPTAppRemotePlaybackOptionsRepeatModeContext = 2,
15
+ };
16
+
17
+ /**
18
+ * The `SPTAppRemotePlaybackOptions` describes a set of options used for the current playback.
19
+ *
20
+ * @discussion Use these to determine UI states.
21
+ */
22
+ @protocol SPTAppRemotePlaybackOptions <NSObject>
23
+
24
+ /// `YES` if shuffle is enabled, otherwise `NO`.
25
+ @property (nonatomic, readonly) BOOL isShuffling;
26
+
27
+ /// The current repeat mode in effect.
28
+ @property (nonatomic, readonly) SPTAppRemotePlaybackOptionsRepeatMode repeatMode;
29
+
30
+ @end
31
+
32
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,32 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /**
6
+ * The `SPTAppRemotePlaybackRestrictions` describes a set of restrictions for playback in the Spotify client.
7
+ *
8
+ * @discussion Use these to determine whether to enable or disable certain actions in the UI.
9
+ */
10
+ @protocol SPTAppRemotePlaybackRestrictions <NSObject>
11
+
12
+ /// `YES` if the user can skip to the next track, otherwise `NO`.
13
+ @property (nonatomic, readonly) BOOL canSkipNext;
14
+
15
+ /// `YES` if the user can skip to the previous track, otherwise `NO`.
16
+ @property (nonatomic, readonly) BOOL canSkipPrevious;
17
+
18
+ /// `YES` if the user can repeat the current track, otherwise `NO`.
19
+ @property (nonatomic, readonly) BOOL canRepeatTrack;
20
+
21
+ /// `YES` if the user can repeat the current context, otherwise `NO`.
22
+ @property (nonatomic, readonly) BOOL canRepeatContext;
23
+
24
+ /// `YES` if the user can toggle shuffle, otherwise `NO`.
25
+ @property (nonatomic, readonly) BOOL canToggleShuffle;
26
+
27
+ /// `YES` if the user can seek to specific positions, otherwise `NO`.
28
+ @property (nonatomic, readonly) BOOL canSeek;
29
+
30
+ @end
31
+
32
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,262 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #import "SPTAppRemoteCommon.h"
4
+ #import "SPTAppRemotePlaybackOptions.h"
5
+
6
+ @protocol SPTAppRemotePlayerState, SPTAppRemoteContentItem, SPTAppRemotePodcastPlaybackSpeed;
7
+
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ /**
11
+ * The `SPTAppRemotePlayerStateDelegate` is used to get notifications from the Spotify app when the player state is changed.
12
+ */
13
+ @protocol SPTAppRemotePlayerStateDelegate <NSObject>
14
+
15
+ /**
16
+ * Called when the player state has been updated.
17
+ *
18
+ * @param playerState The new player state.
19
+ */
20
+ - (void)playerStateDidChange:(id<SPTAppRemotePlayerState>)playerState;
21
+
22
+ @end
23
+
24
+ /**
25
+ * The `SPTAppRemotePlayerAPI` is used to interact with and control the Spotify player.
26
+ */
27
+ @protocol SPTAppRemotePlayerAPI <NSObject>
28
+
29
+ /// The delegate receiving player state updates
30
+ @property (nonatomic, weak) id<SPTAppRemotePlayerStateDelegate> delegate;
31
+
32
+ #pragma mark Player Control
33
+
34
+ /**
35
+ * Asks the Spotify player to play the entity with the given identifier.
36
+ *
37
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
38
+ * the track begins to play.
39
+ *
40
+ * @param entityIdentifier The unique identifier of the entity to play.
41
+ * @param callback On success `result` will be `YES`.
42
+ * On error `result` will be `nil` and `error` set
43
+ */
44
+ - (void)play:(NSString *)entityIdentifier callback:(nullable SPTAppRemoteCallback)callback;
45
+
46
+ /**
47
+ * Asks the Spotify player to play the entity with the given identifier.
48
+ *
49
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
50
+ * the track begins to play.
51
+ *
52
+ * @param trackUri The track URI to play.
53
+ * @param asRadio `YES` to start radio for track URI.
54
+ * @param callback On success `result` will be `YES`.
55
+ * On error `result` will be `nil` and `error` set
56
+ */
57
+ - (void)play:(NSString *)trackUri asRadio:(BOOL)asRadio callback:(SPTAppRemoteCallback)callback;
58
+
59
+ /**
60
+ * Asks the Spotify player to play the provided content item.
61
+ *
62
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
63
+ * the track begins to play.
64
+ * @note The `playable` property of the `SPTAppRemoteContentItem` indicates whether or not a content item is
65
+ * playable.
66
+ *
67
+ * @param contentItem The content item to play.
68
+ * @param callback On success `result` will be `YES`.
69
+ * On error `result` will be `nil` and error set
70
+ */
71
+ - (void)playItem:(id<SPTAppRemoteContentItem>)contentItem callback:(nullable SPTAppRemoteCallback)callback;
72
+
73
+ /**
74
+ * Asks the Spotify player to play the provided content item starting at the specified index.
75
+ *
76
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
77
+ * the track begins to play.
78
+ * @note The `playable` property of the `SPTAppRemoteContentItem` indicates whether or not a content item is
79
+ * playable.
80
+ * @note Sending an `index` parameter that is out of bounds is undefined.
81
+ *
82
+ * @param contentItem The content item to play.
83
+ * @param index The index of the track to skip to if applicable.
84
+ * @param callback On success `result` will be `YES`.
85
+ * On error `result` will be `nil` and error set
86
+ */
87
+ - (void)playItem:(id<SPTAppRemoteContentItem>)contentItem skipToTrackIndex:(NSInteger) index callback:(nullable SPTAppRemoteCallback)callback;
88
+
89
+ /**
90
+ * Asks the Spotify player to resume playback.
91
+ *
92
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
93
+ * the playback resumes.
94
+ *
95
+ * @param callback On success `result` will be `YES`.
96
+ * On error `result` will be nil and error set
97
+ */
98
+ - (void)resume:(nullable SPTAppRemoteCallback)callback;
99
+
100
+ /**
101
+ * Asks the Spotify player to pause playback.
102
+ *
103
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
104
+ * the playback pauses.
105
+ *
106
+ * @param callback On success `result` will be `YES`.
107
+ * On error `result` will be `nil` and error set
108
+ */
109
+ - (void)pause:(nullable SPTAppRemoteCallback)callback;
110
+
111
+ /**
112
+ * Asks the Spotify player to skip to the next track.
113
+ *
114
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
115
+ * the track changes.
116
+ *
117
+ * @param callback On success `result` will be `YES`.
118
+ * On error `result` will be `nil` and error set
119
+ */
120
+ - (void)skipToNext:(nullable SPTAppRemoteCallback)callback;
121
+
122
+ /**
123
+ * Asks the Spotify player to skip to the previous track.
124
+ *
125
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
126
+ * the track changes.
127
+ *
128
+ * @param callback On success `result` will be `YES`.
129
+ * On error `result` will be `nil` and `error` set
130
+ */
131
+ - (void)skipToPrevious:(nullable SPTAppRemoteCallback)callback;
132
+
133
+ /**
134
+ * Asks the Spotify player to seek to the specified position.
135
+ *
136
+ * @param position The position to seek to in milliseconds.
137
+ * @param callback On success `result` will be `YES`.
138
+ * On error `result` will be `nil` and `error` set
139
+ */
140
+ - (void)seekToPosition:(NSInteger)position callback:(nullable SPTAppRemoteCallback)callback;
141
+
142
+ /**
143
+ * Asks the Spotify player to seek forward 15 seconds.
144
+ * Note: You should only use this method if isEpisode = YES for the currently playing track
145
+ *
146
+ * @param callback On success `result` will be `YES`.
147
+ * On error `result` will be `nil` and `error` set
148
+ */
149
+ - (void)seekForward15Seconds:(nullable SPTAppRemoteCallback)callback;
150
+
151
+ /**
152
+ * Asks the Spotify player to seek backward 15 seconds.
153
+ * Note: You should only use this method if isEpisode = YES for the currently playing track
154
+ *
155
+ * @param callback On success `result` will be `YES`.
156
+ * On error `result` will be `nil` and `error` set
157
+ */
158
+ - (void)seekBackward15Seconds:(nullable SPTAppRemoteCallback)callback;
159
+
160
+ #pragma mark Playback Options
161
+
162
+ /**
163
+ * Asks the Spotify player to set shuffle mode.
164
+ *
165
+ * @param shuffle `YES` to enable shuffle, `NO` to disable.
166
+ * @param callback On success `result` will be `YES`.
167
+ * On error `result` will be `nil` and `error` will be set.
168
+ */
169
+ - (void)setShuffle:(BOOL)shuffle callback:(nullable SPTAppRemoteCallback)callback;
170
+
171
+ /**
172
+ * Asks the Spotify player to set the repeat mode.
173
+ *
174
+ * @param repeatMode The repeat mode to set.
175
+ * @param callback On success `result` will be `YES`.
176
+ * On error `result` will be `nil` and `error` will be set.
177
+ */
178
+ - (void)setRepeatMode:(SPTAppRemotePlaybackOptionsRepeatMode)repeatMode callback:(nullable SPTAppRemoteCallback)callback;
179
+
180
+ #pragma mark Player State
181
+
182
+ /**
183
+ * Asks the Spotify player for the current player state.
184
+ *
185
+ * @param callback On success `result` will be an instance of `id<SPTAppRemotePlayerState>`
186
+ * On error `result` will be nil and error set
187
+ */
188
+ - (void)getPlayerState:(nullable SPTAppRemoteCallback)callback;
189
+
190
+ /**
191
+ * Subscribes to player state changes from the Spotify app.
192
+ *
193
+ * @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
194
+ * the player state changes.
195
+ *
196
+ * @param callback On success `result` will be an instance of `id<SPTAppRemotePlayerState>`
197
+ * On error `result` will be nil and error set
198
+ */
199
+ - (void)subscribeToPlayerState:(nullable SPTAppRemoteCallback)callback;
200
+
201
+ /**
202
+ * Stops subscribing to player state changes from the Spotify app.
203
+ *
204
+ * @param callback On success `result` will be `YES`
205
+ * On error `result` will be `nil` and error set
206
+ */
207
+ - (void)unsubscribeToPlayerState:(nullable SPTAppRemoteCallback)callback;
208
+
209
+ /**
210
+ * Adds a track to the user's currently playing queue
211
+ *
212
+ * @param trackUri The track URI to add to the queue
213
+ * @param callback On success `result` will be `YES`
214
+ * On error `result` will be `nil` and error set
215
+ */
216
+ - (void)enqueueTrackUri:(NSString*)trackUri callback:(nullable SPTAppRemoteCallback)callback;
217
+
218
+ /**
219
+ * Asks the Spotify player for available podcast playback speeds
220
+ *
221
+ * @param callback On success `result` will be an `NSArray` of `SPTAppRemotePodcastPlaybackSpeed` objects
222
+ * On error `result` will be `nil` and `error` set
223
+ */
224
+ - (void)getAvailablePodcastPlaybackSpeeds:(nullable SPTAppRemoteCallback)callback;
225
+
226
+ /**
227
+ * Asks the Spotify player for the current podcast playback speed
228
+ *
229
+ * @note Podcast playback speed is seperate from other contents' playback speed. This value is only used for podcasts
230
+ *
231
+ * @param callback On success `result` will be a `SPTAppRemotePodcastPlaybackSpeed`
232
+ * On error `result` will be `nil` and `error` set
233
+ */
234
+ - (void)getCurrentPodcastPlaybackSpeed:(nullable SPTAppRemoteCallback)callback;
235
+
236
+ /**
237
+ * Set the current podcast playback speed
238
+ *
239
+ * @note This playback speed will only affect podcasts and not other types of media. If you set this
240
+ * when a podcast is not playing this will be the default value when a podcast does begin to play. For this reason
241
+ * you may get a successful callback when setting this even when a podcast is not playing and the current playback
242
+ * speed does not change.
243
+ *
244
+ * @note You should use `getAvailablePodcastPlaybackSpeeds:` to get a list of valid speeds to pass to this method
245
+ *
246
+ * @param speed The `SPTAppRemotePodcastPlaybackSpeed` to set as the current podcast playback speed
247
+ * @param callback On success `result` will be `YES`.
248
+ * On error `result` will be `nil` and `error` set
249
+ */
250
+ - (void)setPodcastPlaybackSpeed:(nonnull id<SPTAppRemotePodcastPlaybackSpeed>)speed callback:(nullable SPTAppRemoteCallback)callback;
251
+
252
+ /**
253
+ * Asks the Spotify player for the current crossfade state.
254
+ *
255
+ * @param callback On success `result` will be an instance of `id<SPTAppRemoteCrossfadeState>`
256
+ * On error `result` will be nil and error set
257
+ */
258
+ - (void)getCrossfadeState:(nullable SPTAppRemoteCallback)callback;
259
+
260
+ @end
261
+
262
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,40 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @protocol SPTAppRemoteTrack;
4
+ @protocol SPTAppRemotePlaybackOptions;
5
+ @protocol SPTAppRemotePlaybackRestrictions;
6
+
7
+ NS_ASSUME_NONNULL_BEGIN
8
+
9
+ /**
10
+ * The `SPTAppRemotePlayerState` represents the state within the Spotify player.
11
+ */
12
+ @protocol SPTAppRemotePlayerState <NSObject>
13
+
14
+ /// The track being played in the Spotify player.
15
+ @property (nonatomic, readonly) id<SPTAppRemoteTrack> track;
16
+
17
+ /// The position of the playback in the Spotify player.
18
+ @property (nonatomic, readonly) NSInteger playbackPosition;
19
+
20
+ /// The speed of the playback in the Spotify player.
21
+ @property (nonatomic, readonly) float playbackSpeed;
22
+
23
+ /// `YES` if the Spotify player is paused, otherwise `NO`.
24
+ @property (nonatomic, readonly, getter=isPaused) BOOL paused;
25
+
26
+ /// The playback restrictions currently in effect.
27
+ @property (nonatomic, readonly) id<SPTAppRemotePlaybackRestrictions> playbackRestrictions;
28
+
29
+ /// The playback options currently in effect.
30
+ @property (nonatomic, readonly) id<SPTAppRemotePlaybackOptions> playbackOptions;
31
+
32
+ /// The title of the currently playing context (e.g. the name of the playlist).
33
+ @property (nonatomic, readonly) NSString *contextTitle;
34
+
35
+ /// The URI of the currently playing context (e.g. the URI of the playlist).
36
+ @property (nonatomic, readonly) NSURL *contextURI;
37
+
38
+ @end
39
+
40
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,15 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /**
6
+ * The `SPTAppRemotePodcastPlaybackSpeed` represents playback speed(s) for podcasts
7
+ */
8
+ @protocol SPTAppRemotePodcastPlaybackSpeed <NSObject>
9
+
10
+ /// The speed multiplier representing this podcast speed. 0.5 = half speed, 2 = twice as fast, 1 = normal playback
11
+ @property (nonatomic, strong, readonly) NSNumber *value;
12
+
13
+ @end
14
+
15
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,52 @@
1
+ #import "SPTAppRemoteImageRepresentable.h"
2
+
3
+ @protocol SPTAppRemoteAlbum;
4
+ @protocol SPTAppRemoteArtist;
5
+
6
+ NS_ASSUME_NONNULL_BEGIN
7
+
8
+ /**
9
+ * The `SPTAppRemoteTrack` represents a track.
10
+ */
11
+ @protocol SPTAppRemoteTrack <NSObject, SPTAppRemoteImageRepresentable>
12
+
13
+ /// The name of the track.
14
+ @property (nonatomic, copy, readonly) NSString *name;
15
+
16
+ /// The URI of the track.
17
+ @property (nonatomic, copy, readonly) NSString *URI;
18
+
19
+ /// The duration of the track in miliseconds.
20
+ @property (nonatomic, assign, readonly) NSUInteger duration;
21
+
22
+ /// The artist of the track.
23
+ @property (nonatomic, strong, readonly) id<SPTAppRemoteArtist> artist;
24
+
25
+ /// The album of the track.
26
+ @property (nonatomic, strong, readonly) id<SPTAppRemoteAlbum> album;
27
+
28
+ /// `YES` if the user has saved the track, otherwise `NO`.
29
+ @property (nonatomic, assign, readonly, getter=isSaved) BOOL saved;
30
+
31
+ /**
32
+ * `YES` if the track is a podcast, video, or other audio episode, otherwise `NO`.
33
+ * If the track is an episode and `SPTAppRemotePlaybackRestrictions` `canSeek` is `YES` you should show
34
+ * 15 second skip buttons in your UI.
35
+ */
36
+ @property (nonatomic, assign, readonly, getter=isEpisode) BOOL episode;
37
+
38
+ /**
39
+ * `YES` if the track is a podcast, otherwise `NO`.
40
+ * If the track is a podcast and `SPTAppRemotePlaybackRestrictions` `canSeek` is `YES` you should show
41
+ * 15 second skip buttons in your UI as well as a podcast speed control to change playback speed.
42
+ */
43
+ @property (nonatomic, assign, readonly, getter=isPodcast) BOOL podcast;
44
+
45
+ /**
46
+ * `YES` if the track is an ad, otherwise `NO`.
47
+ */
48
+ @property (nonatomic, assign, readonly, getter=isAdvertisement) BOOL advertisement;
49
+
50
+ @end
51
+
52
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,103 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #import "SPTAppRemoteCommon.h"
4
+
5
+ @protocol SPTAppRemoteUserAPI;
6
+ @protocol SPTAppRemoteUserCapabilities;
7
+
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ /**
11
+ * The `SPTAppRemoteUserAPIDelegate` gets notified whenever the user API receives new data from subscription events.
12
+ */
13
+ @protocol SPTAppRemoteUserAPIDelegate <NSObject>
14
+
15
+ /**
16
+ * Called when the capabilities has been updated.
17
+ *
18
+ * @note This will only be called if there is an active capabilities subscription.
19
+ *
20
+ * @param userAPI The API that received updates.
21
+ * @param capabilities The new capabilities that was received.
22
+ */
23
+ - (void)userAPI:(id<SPTAppRemoteUserAPI>)userAPI didReceiveCapabilities:(id<SPTAppRemoteUserCapabilities>)capabilities;
24
+
25
+ @end
26
+
27
+ /**
28
+ * The `SPTAppRemoteUserAPI` is used to get user data from, and interact with user features in, the Spotify app.
29
+ */
30
+ @protocol SPTAppRemoteUserAPI <NSObject>
31
+
32
+ /// The User API delegate gets notified whenever the API receives new data from subscription events.
33
+ @property (nonatomic, weak, readwrite) id<SPTAppRemoteUserAPIDelegate> delegate;
34
+
35
+ /**
36
+ * Fetches the current users capabilities from the Spotify app.
37
+ *
38
+ * @param callback A callback block that will be invoked when the fetch request has completed.
39
+ * On success `result` will be an instance of `id<SPTAppRemoteUserCapabilities>`.
40
+ * On error `result` will be `nil` and `error` will be set.
41
+ */
42
+ - (void)fetchCapabilitiesWithCallback:(nullable SPTAppRemoteCallback)callback;
43
+
44
+ /**
45
+ * Subscribes to capability changes from the Spotify app.
46
+ *
47
+ * @note Implement `SPTAppRemoteUserAPIDelegate` and set yourself as `delegate` in order to be notified when the
48
+ * the capabilities changes.
49
+ *
50
+ * @param callback A callback block that will be invoked when the subscription request has completed.
51
+ * On success `result` will `YES`.
52
+ * On error `result` will be `nil` and `error` will be set.
53
+ */
54
+ - (void)subscribeToCapabilityChanges:(nullable SPTAppRemoteCallback)callback;
55
+
56
+ /**
57
+ * Stops subscribing to capability changes from the Spotify app.
58
+ *
59
+ * @param callback A callback block that will be invoked when the unsubscription request has completed.
60
+ * On success `result` will be `YES`.
61
+ * On error `result` will be `nil` and `error` will be set.
62
+ */
63
+ - (void)unsubscribeToCapabilityChanges:(nullable SPTAppRemoteCallback)callback;
64
+
65
+ /**
66
+ * Fetches the current users library state for a given album or track uri.
67
+ *
68
+ * @param URI The URI of the album or track we are fetching the state for
69
+ * @param callback A callback block that will be invoked when the fetch request has completed.
70
+ * On success `result` will be an instance of `id<SPTAppRemoteLibraryState>`.
71
+ * On error `result` will be `nil` and `error` will be set.
72
+ */
73
+ - (void)fetchLibraryStateForURI:(NSString *)URI callback:(SPTAppRemoteCallback)callback;
74
+
75
+ /**
76
+ * Add item to the users library.
77
+ * Currently supported uris include:
78
+ * Tracks - example: spotify:track:6rqhFgbbKwnb9MLmUQDhG6
79
+ * Albums - example: spotify:album:2VYSDvc0ZdcfkXDcYVjHs6
80
+ *
81
+ * @param URI The URI of the item to save
82
+ * @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 resulting state of the entity.
84
+ * On error `result` will be `nil` and `error` will be set.
85
+ */
86
+ - (void)addItemToLibraryWithURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
87
+
88
+ /**
89
+ * Remove item from users library.
90
+ * Currently supported uris include:
91
+ * Tracks - example: spotify:track:6rqhFgbbKwnb9MLmUQDhG6
92
+ * Albums - example: spotify:album:2VYSDvc0ZdcfkXDcYVjHs6
93
+ *
94
+ * @param URI The URI of the item to remove
95
+ * @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 resulting state of the entity.
97
+ * On error `result` will be `nil` and `error` will be set.
98
+ */
99
+ - (void)removeItemFromLibraryWithURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
100
+
101
+ @end
102
+
103
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,15 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /**
6
+ * The `SPTAppRemoteUserCapabilities` represents a set of capabilities the current user has in the Spotify app.
7
+ */
8
+ @protocol SPTAppRemoteUserCapabilities <NSObject>
9
+
10
+ /// `YES` if the user can play songs on demand, otherwise `NO`. This will differ for premium and non-premium users
11
+ @property (nonatomic, assign, readonly) BOOL canPlayOnDemand;
12
+
13
+ @end
14
+
15
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,66 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ /**
6
+ A configuration class, holding the credentials provided for your app on the Spotify Developer website.
7
+ See https://developer.spotify.com/my-applications/
8
+ */
9
+ @interface SPTConfiguration : NSObject <NSSecureCoding>
10
+
11
+ /// Your app's Client ID from developer.spotify.com
12
+ @property (nonatomic, readonly, copy) NSString *clientID;
13
+
14
+ /// Your redirect URL. This is how the Spotify app will open your application after user authorization.
15
+ @property (nonatomic, readonly, copy) NSURL *redirectURL;
16
+
17
+ /// Name of the company
18
+ @property (nonatomic, nullable, copy) NSString *companyName;
19
+
20
+ /**
21
+ The URL to use for attempting to swap an authorization code for an access token. You should only set this if your
22
+ clientID has a clientSecret and you have a backend service that holds the secret and can exchange the code and secret
23
+ for an access token.
24
+ */
25
+ @property (nonatomic, nullable, copy) NSURL *tokenSwapURL;
26
+
27
+ /**
28
+ The URL to use for attempting to renew an access token with a refresh token. You should only set this if your
29
+ clientID has a clientSecret and you have a backend service that holds the secret and can use a refresh token
30
+ to get a new access token.
31
+ */
32
+ @property (nonatomic, nullable, copy) NSURL *tokenRefreshURL;
33
+
34
+ /**
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 `SPTAppRemoteControlScope`
37
+ is not requested no audio will play. If Spotify is already playing it will continue playing even though a URI is provided.
38
+ */
39
+ @property (nonatomic, nullable, copy) NSString *playURI;
40
+
41
+ - (instancetype)init NS_UNAVAILABLE;
42
+
43
+ /**
44
+ Designated initializer for `SPTConfiguration`
45
+
46
+ @param clientID Your client ID obtained from developer.spotify.com
47
+ @param redirectURL Your redirect URL for Spotify to open your app again after authorization
48
+ @return A newly initialized `SPTConfiguration`
49
+ */
50
+ - (instancetype)initWithClientID:(NSString *)clientID
51
+ redirectURL:(NSURL *)redirectURL NS_DESIGNATED_INITIALIZER;
52
+
53
+ /**
54
+ Convenience intializer for `SPtConfiguration`
55
+
56
+ @param clientID Your client ID obtained from developer.spotify.com
57
+ @param redirectURL Your redirect URL for Spotify to open your app again after authorization
58
+ @return A newly initialized `SPTConfiguration`
59
+ */
60
+ + (instancetype)configurationWithClientID:(NSString *)clientID
61
+ redirectURL:(NSURL *)redirectURL NS_SWIFT_UNAVAILABLE("superfluous");
62
+
63
+ @end
64
+
65
+
66
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,33 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #import "SPTMacros.h"
4
+
5
+ NS_ASSUME_NONNULL_BEGIN
6
+
7
+ SPT_EXPORT NSErrorDomain const SPTLoginErrorDomain;
8
+
9
+ /// Spotify error codes, use NSUnderlyingErrorKey to see the underlying error
10
+ typedef NS_ENUM(NSUInteger, SPTErrorCode)
11
+ {
12
+ /// Unknown error code
13
+ SPTUnknownErrorCode NS_SWIFT_NAME(unknown) = 0,
14
+ /// Authorization failed
15
+ SPTAuthorizationFailedErrorCode NS_SWIFT_NAME(authorizationFailed),
16
+ /// Renew session failed
17
+ SPTRenewSessionFailedErrorCode NS_SWIFT_NAME(renewSessionFailed),
18
+ /// Failed to parse the returned JSON
19
+ SPTJSONFailedErrorCode NS_SWIFT_NAME(jsonFailed),
20
+ };
21
+
22
+ /// Spotify-specific errors. Use NSUnderlyingErrorKey to see the underlying error
23
+ @interface SPTError : NSError
24
+
25
+ + (instancetype)errorWithCode:(SPTErrorCode)code;
26
+
27
+ + (instancetype)errorWithCode:(SPTErrorCode)code description:(NSString *)description;
28
+
29
+ + (instancetype)errorWithCode:(SPTErrorCode)code underlyingError:(NSError *)error;
30
+
31
+ @end
32
+
33
+ NS_ASSUME_NONNULL_END