diff --git a/CHANGELOG.md b/CHANGELOG.md index a038023..d8f98d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Spotify iOS SDK v2.1.7 + +What's New: + +- Add support for iOS 17.4 API for universal links in web authentication +- Fix minor issues with the web authentication flow +- Update demo apps project setup to use Xcodegen for managing Xcode project files + ## Spotify iOS SDK v2.1.6 What's New: diff --git a/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.pbxproj b/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.pbxproj deleted file mode 100644 index 95b0ae7..0000000 --- a/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.pbxproj +++ /dev/null @@ -1,403 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 09B5F63216043DA4C9DFD31F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 943F9CD39F2839BA707B2365 /* Assets.xcassets */; }; - 0F14928CFAE8D2675177871D /* My-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4E9F762B5BA7EC1BCB9B6E /* My-Extensions.swift */; }; - 1588F843D2DF78D638FDE0D2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EB3D41ECBE18D60B58C59F41 /* Main.storyboard */; }; - 15CF29876932C64F7B084FC5 /* SpotifyiOS.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D355AF5102BD2612701FDD76 /* SpotifyiOS.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 33805C1679456CC49E7A8DAB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56EB15E0A925FF93106A0AD7 /* LaunchScreen.storyboard */; }; - 6AF569070B746ACB98B15D40 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBD271FA06B37AC5E4FE21A6 /* ViewController.swift */; }; - 73E1A91BCC472B637B58EC07 /* ContentItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0544C6B1D1764990F54682F2 /* ContentItemCell.swift */; }; - 7AA5F6425AC3B7D559251911 /* SpotifyiOS.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D355AF5102BD2612701FDD76 /* SpotifyiOS.xcframework */; }; - 97DE5DD179993A740295A40F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C265CC98774B01E3B973EC7F /* SceneDelegate.swift */; }; - 9827B1FF244E6324559A6EA4 /* SpeedPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1570B1956F86C0FD67EC3C94 /* SpeedPickerViewController.swift */; }; - 9D28E985CF200EB2B83EB73C /* ConnectionStatusIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAB70440B8C04FEC0AE2CED6 /* ConnectionStatusIndicatorView.swift */; }; - A226C3ADB7D5A4FCECE7511D /* PlaybackButtonGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75022A141A59AC145AAEED18 /* PlaybackButtonGraphics.swift */; }; - A23ED279FD34913E636E6F44 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C5FC21B6E00E28A06E27DE6 /* AppDelegate.swift */; }; - A3282C1BE2C8BF6BD1C6591D /* ContentCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179308437826F759C1976E73 /* ContentCollectionViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8EC849AD51529C914A5C0F8D /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 15CF29876932C64F7B084FC5 /* SpotifyiOS.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0544C6B1D1764990F54682F2 /* ContentItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentItemCell.swift; sourceTree = ""; }; - 1570B1956F86C0FD67EC3C94 /* SpeedPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpeedPickerViewController.swift; sourceTree = ""; }; - 179308437826F759C1976E73 /* ContentCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentCollectionViewController.swift; sourceTree = ""; }; - 252C7DE24306CDE0CA9E539E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 2A3086BCA89A4379B3A2CF79 /* host.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = host.entitlements; sourceTree = ""; }; - 2A60A82594D90E38A5C94923 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 3C5FC21B6E00E28A06E27DE6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 75022A141A59AC145AAEED18 /* PlaybackButtonGraphics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybackButtonGraphics.swift; sourceTree = ""; }; - 943F9CD39F2839BA707B2365 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - AAA2E0EE42C2E146FC511077 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - AE4E9F762B5BA7EC1BCB9B6E /* My-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "My-Extensions.swift"; sourceTree = ""; }; - B09AF4864600C68BF3ADE00B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - BAB70440B8C04FEC0AE2CED6 /* ConnectionStatusIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionStatusIndicatorView.swift; sourceTree = ""; }; - C265CC98774B01E3B973EC7F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - D355AF5102BD2612701FDD76 /* SpotifyiOS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SpotifyiOS.xcframework; path = ../../SpotifyiOS.xcframework; sourceTree = ""; }; - FBD271FA06B37AC5E4FE21A6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - FDFB50C3F533DEFFA619B5DC /* NowPlayingView.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = NowPlayingView.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - B4A9EFAD052FCC8038C07637 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7AA5F6425AC3B7D559251911 /* SpotifyiOS.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 424057534BB4E90265F640CB /* Frameworks */ = { - isa = PBXGroup; - children = ( - D355AF5102BD2612701FDD76 /* SpotifyiOS.xcframework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 7F50778AD37F36BC1B770E09 /* NowPlayingView */ = { - isa = PBXGroup; - children = ( - 3C5FC21B6E00E28A06E27DE6 /* AppDelegate.swift */, - 943F9CD39F2839BA707B2365 /* Assets.xcassets */, - BAB70440B8C04FEC0AE2CED6 /* ConnectionStatusIndicatorView.swift */, - 179308437826F759C1976E73 /* ContentCollectionViewController.swift */, - 0544C6B1D1764990F54682F2 /* ContentItemCell.swift */, - 2A3086BCA89A4379B3A2CF79 /* host.entitlements */, - 252C7DE24306CDE0CA9E539E /* Info.plist */, - 56EB15E0A925FF93106A0AD7 /* LaunchScreen.storyboard */, - EB3D41ECBE18D60B58C59F41 /* Main.storyboard */, - AE4E9F762B5BA7EC1BCB9B6E /* My-Extensions.swift */, - 75022A141A59AC145AAEED18 /* PlaybackButtonGraphics.swift */, - C265CC98774B01E3B973EC7F /* SceneDelegate.swift */, - 1570B1956F86C0FD67EC3C94 /* SpeedPickerViewController.swift */, - FBD271FA06B37AC5E4FE21A6 /* ViewController.swift */, - ); - path = NowPlayingView; - sourceTree = ""; - }; - 8A66FDC3E4D086122E7624A7 /* Products */ = { - isa = PBXGroup; - children = ( - FDFB50C3F533DEFFA619B5DC /* NowPlayingView.app */, - ); - name = Products; - sourceTree = ""; - }; - DE7C390FF6CA24CC89D7B791 = { - isa = PBXGroup; - children = ( - 2A60A82594D90E38A5C94923 /* README.md */, - 7F50778AD37F36BC1B770E09 /* NowPlayingView */, - 424057534BB4E90265F640CB /* Frameworks */, - 8A66FDC3E4D086122E7624A7 /* Products */, - ); - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - B9E4CD1B0AADD5EC4DA695DD /* NowPlayingView */ = { - isa = PBXNativeTarget; - buildConfigurationList = A8248DE1527329E5E823927B /* Build configuration list for PBXNativeTarget "NowPlayingView" */; - buildPhases = ( - 28162C32155166BD01EDAD04 /* Sources */, - 9E52C30B5299B1C300D508A1 /* Resources */, - B4A9EFAD052FCC8038C07637 /* Frameworks */, - 8EC849AD51529C914A5C0F8D /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = NowPlayingView; - productName = NowPlayingView; - productReference = FDFB50C3F533DEFFA619B5DC /* NowPlayingView.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 461BB70475E5774879D635AF /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; - TargetAttributes = { - }; - }; - buildConfigurationList = 216E1984AAC1EBFB6D2D623E /* Build configuration list for PBXProject "NowPlayingView" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = DE7C390FF6CA24CC89D7B791; - projectDirPath = ""; - projectRoot = ""; - targets = ( - B9E4CD1B0AADD5EC4DA695DD /* NowPlayingView */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9E52C30B5299B1C300D508A1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 09B5F63216043DA4C9DFD31F /* Assets.xcassets in Resources */, - 33805C1679456CC49E7A8DAB /* LaunchScreen.storyboard in Resources */, - 1588F843D2DF78D638FDE0D2 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 28162C32155166BD01EDAD04 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A23ED279FD34913E636E6F44 /* AppDelegate.swift in Sources */, - 9D28E985CF200EB2B83EB73C /* ConnectionStatusIndicatorView.swift in Sources */, - A3282C1BE2C8BF6BD1C6591D /* ContentCollectionViewController.swift in Sources */, - 73E1A91BCC472B637B58EC07 /* ContentItemCell.swift in Sources */, - 0F14928CFAE8D2675177871D /* My-Extensions.swift in Sources */, - A226C3ADB7D5A4FCECE7511D /* PlaybackButtonGraphics.swift in Sources */, - 97DE5DD179993A740295A40F /* SceneDelegate.swift in Sources */, - 9827B1FF244E6324559A6EA4 /* SpeedPickerViewController.swift in Sources */, - 6AF569070B746ACB98B15D40 /* ViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 56EB15E0A925FF93106A0AD7 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - B09AF4864600C68BF3ADE00B /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; - EB3D41ECBE18D60B58C59F41 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - AAA2E0EE42C2E146FC511077 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1AFE07E5DE29F138062E3D18 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = NowPlayingView/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.testappremote; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 7F1E857E967079F4514062D6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - C036AAF2F9C209C9F3349561 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - FFB26F2EF4C87975FB63EED5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = NowPlayingView/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.testappremote; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 216E1984AAC1EBFB6D2D623E /* Build configuration list for PBXProject "NowPlayingView" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7F1E857E967079F4514062D6 /* Debug */, - C036AAF2F9C209C9F3349561 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - A8248DE1527329E5E823927B /* Build configuration list for PBXNativeTarget "NowPlayingView" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1AFE07E5DE29F138062E3D18 /* Debug */, - FFB26F2EF4C87975FB63EED5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 461BB70475E5774879D635AF /* Project object */; -} diff --git a/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/DemoProjects/NowPlayingView/NowPlayingView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DemoProjects/NowPlayingView/NowPlayingView/Info.plist b/DemoProjects/NowPlayingView/NowPlayingView/Info.plist index e5e7c52..2523c7a 100644 --- a/DemoProjects/NowPlayingView/NowPlayingView/Info.plist +++ b/DemoProjects/NowPlayingView/NowPlayingView/Info.plist @@ -29,7 +29,7 @@ CFBundleURLSchemes - <#URL_Scheme#> + spotify-ios-test-app diff --git a/DemoProjects/NowPlayingView/NowPlayingView/SceneDelegate.swift b/DemoProjects/NowPlayingView/NowPlayingView/SceneDelegate.swift index 8b0c8cf..15a8374 100644 --- a/DemoProjects/NowPlayingView/NowPlayingView/SceneDelegate.swift +++ b/DemoProjects/NowPlayingView/NowPlayingView/SceneDelegate.swift @@ -4,8 +4,8 @@ import SpotifyiOS class SceneDelegate: UIResponder, UIWindowSceneDelegate, SPTAppRemoteDelegate { - private let clientIdentifier = "<#ClientID#>" - private let redirectUri = URL(string:"<#RedirectURI#>")! + private let redirectUri = URL(string:"spotify-ios-test-app://spotify-login-callback")! + private let clientIdentifier = "<#ClientId#>" static private let kAccessTokenKey = "access-token-key" diff --git a/DemoProjects/NowPlayingView/README.md b/DemoProjects/NowPlayingView/README.md index 9813854..80d5e2b 100644 --- a/DemoProjects/NowPlayingView/README.md +++ b/DemoProjects/NowPlayingView/README.md @@ -1,3 +1,15 @@ # Now Playing View A project that demonstrates listening to and displaying the current player state, and allowing the user to control the playback. + +Steps: + +1. Install XcodeGen via `brew install xcodegen` command. +2. Run `xcodegen` in the demo project +2. Open `NowPlayingView.xcodeproj` +3. Create an app in [https://developer.spotify.com/dashboard](https://developer.spotify.com/dashboard) + - Add any name and description + - Add the redirect URI: `spotify-ios-test-app://spotify-login-callback` + - Check iOS SDK +4. Edit Settings and add the bundleId `com.spotify.SpotifyAppRemoteDemo` +3. Copy your `clientID` in `SceneDelegate.swift` diff --git a/DemoProjects/NowPlayingView/project.yml b/DemoProjects/NowPlayingView/project.yml index 192c0cb..fdb30bb 100644 --- a/DemoProjects/NowPlayingView/project.yml +++ b/DemoProjects/NowPlayingView/project.yml @@ -11,7 +11,7 @@ targets: - path: README.md buildPhase: none settings: - PRODUCT_BUNDLE_IDENTIFIER: com.testappremote + PRODUCT_BUNDLE_IDENTIFIER: com.spotify.SpotifyIosSampleApp INFOPLIST_FILE: NowPlayingView/Info.plist dependencies: - framework: ../../SpotifyiOS.xcframework diff --git a/DemoProjects/README.md b/DemoProjects/README.md index 97ccc83..66db3af 100644 --- a/DemoProjects/README.md +++ b/DemoProjects/README.md @@ -14,20 +14,4 @@ This Objective-C project focuses solely on the authentication part of the SDK. I This Swift project shows you how to use both the authentication and remote control parts of the SDK together. This is valuable if you want to be able to control playback but also need additional scopes for the Web API. You will have to run this project on a real device as it requires the Spotify iOS app be installed. You will also need a server to perform the token swap operation. -## How to use the provided Ruby script -For some of the above sample projects a server is required to perform an OAuth token swap, these instructions will help you run a sample server for testing. - -First make sure you have [Homebrew](https://brew.sh/) installed. - -We will use rbenv to manage ruby versions, if you are familiar with ruby or prefer to use a different environment management tool feel free. - -Navigate to the directory containing this readme in your terminal and run the following commands: - -1. `brew install rbenv` -2. `rbenv install $(rbenv local)` -3. `$(rbenv which gem) install sinatra encrypted_strings` - -Now to run the ruby script and have your local server running simply execute the following command: - - $(rbenv which ruby) spotify_token_swap.rb diff --git a/DemoProjects/SPTLoginSampleAppObjc/README.md b/DemoProjects/SPTLoginSampleAppObjc/README.md new file mode 100644 index 0000000..002ba7b --- /dev/null +++ b/DemoProjects/SPTLoginSampleAppObjc/README.md @@ -0,0 +1,15 @@ +# SPTLoginSampleAppObjc + +A project that focuses solely on the authentication part of the SDK. + +Steps: + +1. Install XcodeGen via `brew install xcodegen` command. +2. Run `xcodegen` in the demo project +2. Open `SPTLoginSampleAppObjc.xcodeproj` +3. Create an app in [https://developer.spotify.com/dashboard](https://developer.spotify.com/dashboard) + - Add any name and description + - Add the redirect URI: `spotify-login-sdk-test-app-objc://spotify-login-callback` + - Check iOS SDK +4. Edit Settings and add the bundleId `com.spotify.SPTLoginSampleAppObjc` +3. Copy your `clientID` in `ViewController.m` diff --git a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.pbxproj b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.pbxproj deleted file mode 100644 index e58ec7a..0000000 --- a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.pbxproj +++ /dev/null @@ -1,379 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 283476D825396E4A93D085CF /* SpotifyiOS.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A47067AC84A7D847BECF5821 /* SpotifyiOS.xcframework */; }; - 2E2D6B9477F089B7CA18E961 /* SpotifyiOS.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A47067AC84A7D847BECF5821 /* SpotifyiOS.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 5DAA54302D1CFC662B6EBE58 /* ConnectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1044EA9D2DDF2F58343C465A /* ConnectView.m */; }; - 5E9758195CAC8EF36457AE94 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1AC621FD0DBDBC5910EE73DB /* Assets.xcassets */; }; - 6D9BD8A0886B345A0172E8FF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C66BC489FCF9BD1AD9B629B /* main.m */; }; - 89DEB73D374D9431B02E0579 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 580A11F73777B16F60A99A38 /* LaunchScreen.storyboard */; }; - AF34825C8B5DF7C9F6C87C5F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 590218D2D825358380A3CCA6 /* ViewController.m */; }; - DBF068D05D331B9471DEF3CC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B365E88E631E972688C32B0 /* AppDelegate.m */; }; - DEEE436042449C487317A028 /* ConnectButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCE884334C00818031AB7E8 /* ConnectButton.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 70119CD3CD138A5461696C43 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 2E2D6B9477F089B7CA18E961 /* SpotifyiOS.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1044EA9D2DDF2F58343C465A /* ConnectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConnectView.m; sourceTree = ""; }; - 1AC621FD0DBDBC5910EE73DB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1FCE884334C00818031AB7E8 /* ConnectButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConnectButton.m; sourceTree = ""; }; - 352E2BA5C8EB6E3DB6BFD040 /* SPTLoginSampleAppObjc.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = SPTLoginSampleAppObjc.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 3544E8D149CCAF21EBEB4689 /* ConnectButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConnectButton.h; sourceTree = ""; }; - 3B365E88E631E972688C32B0 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 443FFC41D3D8E4BAED9D191C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 590218D2D825358380A3CCA6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 65DC86BCEC6C23EA00AF027B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7C66BC489FCF9BD1AD9B629B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9230FC599ACB1DC281648042 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - A47067AC84A7D847BECF5821 /* SpotifyiOS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SpotifyiOS.xcframework; path = ../../SpotifyiOS.xcframework; sourceTree = ""; }; - F07D0FE09E66EA6BB66C651D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - F4549AFFE61B8B762C554D10 /* ConnectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConnectView.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2C93472DFC1BB3C3BE54EEC2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 283476D825396E4A93D085CF /* SpotifyiOS.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2308014B4C60809EDC64A8ED /* Frameworks */ = { - isa = PBXGroup; - children = ( - A47067AC84A7D847BECF5821 /* SpotifyiOS.xcframework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 26456E0F86FF05BA6C90FE8A = { - isa = PBXGroup; - children = ( - EED6375FD2C7D61FD0671141 /* SPTLoginSampleAppObjc */, - 2308014B4C60809EDC64A8ED /* Frameworks */, - B01A7BD7C3F1F17E0743A56D /* Products */, - ); - sourceTree = ""; - }; - B01A7BD7C3F1F17E0743A56D /* Products */ = { - isa = PBXGroup; - children = ( - 352E2BA5C8EB6E3DB6BFD040 /* SPTLoginSampleAppObjc.app */, - ); - name = Products; - sourceTree = ""; - }; - EED6375FD2C7D61FD0671141 /* SPTLoginSampleAppObjc */ = { - isa = PBXGroup; - children = ( - 65DC86BCEC6C23EA00AF027B /* AppDelegate.h */, - 3B365E88E631E972688C32B0 /* AppDelegate.m */, - 1AC621FD0DBDBC5910EE73DB /* Assets.xcassets */, - 3544E8D149CCAF21EBEB4689 /* ConnectButton.h */, - 1FCE884334C00818031AB7E8 /* ConnectButton.m */, - F4549AFFE61B8B762C554D10 /* ConnectView.h */, - 1044EA9D2DDF2F58343C465A /* ConnectView.m */, - 9230FC599ACB1DC281648042 /* Info.plist */, - 580A11F73777B16F60A99A38 /* LaunchScreen.storyboard */, - 7C66BC489FCF9BD1AD9B629B /* main.m */, - F07D0FE09E66EA6BB66C651D /* ViewController.h */, - 590218D2D825358380A3CCA6 /* ViewController.m */, - ); - path = SPTLoginSampleAppObjc; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5B4944BB5607D36ECE2B3C33 /* SPTLoginSampleAppObjc */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9EB6BAABE26DEBB36D4CA28D /* Build configuration list for PBXNativeTarget "SPTLoginSampleAppObjc" */; - buildPhases = ( - 40C4D9CAA1E711F42A75D14D /* Sources */, - 51E31FE090CE387A12E3F7AD /* Resources */, - 2C93472DFC1BB3C3BE54EEC2 /* Frameworks */, - 70119CD3CD138A5461696C43 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SPTLoginSampleAppObjc; - productName = SPTLoginSampleAppObjc; - productReference = 352E2BA5C8EB6E3DB6BFD040 /* SPTLoginSampleAppObjc.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - B59EA18D477B00608A61D759 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; - TargetAttributes = { - }; - }; - buildConfigurationList = F27FE5DCCFA8F2E04354BA8D /* Build configuration list for PBXProject "SPTLoginSampleAppObjc" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 26456E0F86FF05BA6C90FE8A; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5B4944BB5607D36ECE2B3C33 /* SPTLoginSampleAppObjc */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 51E31FE090CE387A12E3F7AD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E9758195CAC8EF36457AE94 /* Assets.xcassets in Resources */, - 89DEB73D374D9431B02E0579 /* LaunchScreen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 40C4D9CAA1E711F42A75D14D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DBF068D05D331B9471DEF3CC /* AppDelegate.m in Sources */, - DEEE436042449C487317A028 /* ConnectButton.m in Sources */, - 5DAA54302D1CFC662B6EBE58 /* ConnectView.m in Sources */, - AF34825C8B5DF7C9F6C87C5F /* ViewController.m in Sources */, - 6D9BD8A0886B345A0172E8FF /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 580A11F73777B16F60A99A38 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 443FFC41D3D8E4BAED9D191C /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 120C2503917261F734CC1205 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = SPTLoginSampleAppObjc/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.spotify.SPTLoginSampleAppObjc; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 7244D3BB479FCC64DEFF474B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - A8A69D6051C9C7811AC89EFD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - C18A44F459FC11158E17CBEF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = SPTLoginSampleAppObjc/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.spotify.SPTLoginSampleAppObjc; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9EB6BAABE26DEBB36D4CA28D /* Build configuration list for PBXNativeTarget "SPTLoginSampleAppObjc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C18A44F459FC11158E17CBEF /* Debug */, - 120C2503917261F734CC1205 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - F27FE5DCCFA8F2E04354BA8D /* Build configuration list for PBXProject "SPTLoginSampleAppObjc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A8A69D6051C9C7811AC89EFD /* Debug */, - 7244D3BB479FCC64DEFF474B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = B59EA18D477B00608A61D759 /* Project object */; -} diff --git a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/Info.plist b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/Info.plist index f0d44d8..5e49189 100644 --- a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/Info.plist +++ b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/Info.plist @@ -23,7 +23,7 @@ Editor CFBundleURLSchemes - <#URL_Scheme#> + spotify-login-sdk-test-app-objc diff --git a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/ViewController.m b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/ViewController.m index aa14483..6b68fca 100644 --- a/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/ViewController.m +++ b/DemoProjects/SPTLoginSampleAppObjc/SPTLoginSampleAppObjc/ViewController.m @@ -16,7 +16,7 @@ #import "ViewController.h" static NSString * const SpotifyClientID = @"<#ClientID#>"; -static NSString * const SpotifyRedirectURLString = @"<#RedirectURI#>"; +static NSString * const SpotifyRedirectURLString = @"spotify-login-sdk-test-app-objc://spotify-login-callback"; @interface ViewController () @end diff --git a/DemoProjects/SPTLoginSampleAppSwift/README.md b/DemoProjects/SPTLoginSampleAppSwift/README.md new file mode 100644 index 0000000..e73181f --- /dev/null +++ b/DemoProjects/SPTLoginSampleAppSwift/README.md @@ -0,0 +1,29 @@ +# SPTLoginSampleAppSwift + +A project that demonstrates how to use both the authentication and remote control parts of the SDK together. + +Steps: + +1. Install XcodeGen via `brew install xcodegen` command. +2. Run `xcodegen` in the demo project +2. Open `SPTLoginSampleAppSwift.xcodeproj` +3. Create an app in [https://developer.spotify.com/dashboard](https://developer.spotify.com/dashboard) + - Add any name and description + - Add the redirect URI: `spotify-login-sdk-test-app-swift://spotify-login-callback` + - Check iOS SDK +4. Edit Settings and add the bundleId `com.spotify.SPTLoginSampleAppSwift` +3. Copy your `clientID` in `ViewController.swift` + +For this project is required to perform an OAuth token swap. + +A sample server is provided for testing. Navigate to the directory containing this README in your terminal and run the following commands: + +1. `brew install rbenv` +2. `rbenv install $(rbenv local)` +3. `$(rbenv which gem) install sinatra encrypted_strings` + +Now to run the ruby script and have your local server running simply execute the following command: + +```sh +$(rbenv which ruby) spotify_token_swap.rb +``` diff --git a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.pbxproj b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.pbxproj deleted file mode 100644 index 2d8b0fa..0000000 --- a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.pbxproj +++ /dev/null @@ -1,363 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 0E5506B796404614EC4F08E0 /* SpotifyiOS.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34294295A79EEDF3C462EF5F /* SpotifyiOS.xcframework */; }; - 29A616EE7631491F0E48D58A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A68CC4CB2B704CE7A458A272 /* LaunchScreen.storyboard */; }; - 5480A5E6075753EFF7F4210F /* ConnectButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADA1F497B1CD0F39B48C0CCE /* ConnectButton.swift */; }; - C00DE8DA2AC7F9B4F36BD6E4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BC9FA330DC6A6EFDD3F34C46 /* Assets.xcassets */; }; - C3BB036A66C249CFF4ACF989 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E6E95F085EAECC1B22122E6 /* ViewController.swift */; }; - CFB19105D828CAA7FAB75C68 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6EF47FCC24CCF50AE4E99AF /* AppDelegate.swift */; }; - D1592E4A025E967EACFFC21F /* SpotifyiOS.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 34294295A79EEDF3C462EF5F /* SpotifyiOS.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1F8FEAD45A09D16FF89FEFCD /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - D1592E4A025E967EACFFC21F /* SpotifyiOS.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0E50481F057752FE179D59F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 0E6E95F085EAECC1B22122E6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 34294295A79EEDF3C462EF5F /* SpotifyiOS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SpotifyiOS.xcframework; path = ../../SpotifyiOS.xcframework; sourceTree = ""; }; - 621A968B80156C64663B877D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - A6EF47FCC24CCF50AE4E99AF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - ADA1F497B1CD0F39B48C0CCE /* ConnectButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectButton.swift; sourceTree = ""; }; - BC9FA330DC6A6EFDD3F34C46 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - F4692622C90BD0BE25996E73 /* SPTLoginSampleAppSwift.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = SPTLoginSampleAppSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - C64F3AA09BC9983C4F9F77C4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0E5506B796404614EC4F08E0 /* SpotifyiOS.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 02A475173E05A595B33826A1 /* SPTLoginSampleAppSwift */ = { - isa = PBXGroup; - children = ( - A6EF47FCC24CCF50AE4E99AF /* AppDelegate.swift */, - BC9FA330DC6A6EFDD3F34C46 /* Assets.xcassets */, - ADA1F497B1CD0F39B48C0CCE /* ConnectButton.swift */, - 0E50481F057752FE179D59F8 /* Info.plist */, - A68CC4CB2B704CE7A458A272 /* LaunchScreen.storyboard */, - 0E6E95F085EAECC1B22122E6 /* ViewController.swift */, - ); - path = SPTLoginSampleAppSwift; - sourceTree = ""; - }; - 06BE53768C08A96808547B04 /* Products */ = { - isa = PBXGroup; - children = ( - F4692622C90BD0BE25996E73 /* SPTLoginSampleAppSwift.app */, - ); - name = Products; - sourceTree = ""; - }; - B5FD5071A6BABD186581140B = { - isa = PBXGroup; - children = ( - 02A475173E05A595B33826A1 /* SPTLoginSampleAppSwift */, - C0DC421CE4006FBB46D645D1 /* Frameworks */, - 06BE53768C08A96808547B04 /* Products */, - ); - sourceTree = ""; - }; - C0DC421CE4006FBB46D645D1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 34294295A79EEDF3C462EF5F /* SpotifyiOS.xcframework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D011B7E5EDDCAEBC0D224F8F /* SPTLoginSampleAppSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC1B16640B2486A5A622E83C /* Build configuration list for PBXNativeTarget "SPTLoginSampleAppSwift" */; - buildPhases = ( - E808A056EB71A6D408D84AB3 /* Sources */, - 4A681A9989391C4E12418F26 /* Resources */, - C64F3AA09BC9983C4F9F77C4 /* Frameworks */, - 1F8FEAD45A09D16FF89FEFCD /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SPTLoginSampleAppSwift; - productName = SPTLoginSampleAppSwift; - productReference = F4692622C90BD0BE25996E73 /* SPTLoginSampleAppSwift.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 75852633476D3A0A2464CDF1 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; - TargetAttributes = { - }; - }; - buildConfigurationList = 0AF12CCC930B2CF6147A9A82 /* Build configuration list for PBXProject "SPTLoginSampleAppSwift" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = B5FD5071A6BABD186581140B; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D011B7E5EDDCAEBC0D224F8F /* SPTLoginSampleAppSwift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 4A681A9989391C4E12418F26 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C00DE8DA2AC7F9B4F36BD6E4 /* Assets.xcassets in Resources */, - 29A616EE7631491F0E48D58A /* LaunchScreen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E808A056EB71A6D408D84AB3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CFB19105D828CAA7FAB75C68 /* AppDelegate.swift in Sources */, - 5480A5E6075753EFF7F4210F /* ConnectButton.swift in Sources */, - C3BB036A66C249CFF4ACF989 /* ViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - A68CC4CB2B704CE7A458A272 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 621A968B80156C64663B877D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 14C4E0F42BB76AC2EDA7F092 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = SPTLoginSampleAppSwift/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.spotify.SPTLoginSampleAppSwift; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 43597A5B5FCD11F5DA7BC64E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - C562A9ED0F73A09B55878D40 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"../..\"", - ); - INFOPLIST_FILE = SPTLoginSampleAppSwift/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.spotify.SPTLoginSampleAppSwift; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - F803EF0064E686AD5C35C1FE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 0AF12CCC930B2CF6147A9A82 /* Build configuration list for PBXProject "SPTLoginSampleAppSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 43597A5B5FCD11F5DA7BC64E /* Debug */, - F803EF0064E686AD5C35C1FE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - DC1B16640B2486A5A622E83C /* Build configuration list for PBXNativeTarget "SPTLoginSampleAppSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C562A9ED0F73A09B55878D40 /* Debug */, - 14C4E0F42BB76AC2EDA7F092 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 75852633476D3A0A2464CDF1 /* Project object */; -} diff --git a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/Info.plist b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/Info.plist index 7651e9f..7497f9a 100644 --- a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/Info.plist +++ b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/Info.plist @@ -25,7 +25,7 @@ Editor CFBundleURLSchemes - <#URL_Scheme#> + spotify-login-sdk-test-app-swift diff --git a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/ViewController.swift b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/ViewController.swift index 181cd3f..dc2e75b 100644 --- a/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/ViewController.swift +++ b/DemoProjects/SPTLoginSampleAppSwift/SPTLoginSampleAppSwift/ViewController.swift @@ -4,7 +4,7 @@ import SpotifyiOS class ViewController: UIViewController, SPTSessionManagerDelegate, SPTAppRemoteDelegate, SPTAppRemotePlayerStateDelegate { private let SpotifyClientID = "<#ClientID#>" - private let SpotifyRedirectURI = URL(string: "<#RedirectURI#>")! + private let SpotifyRedirectURI = URL(string: "spotify-login-sdk-test-app-swift://spotify-login-callback")! lazy var configuration: SPTConfiguration = { let configuration = SPTConfiguration(clientID: SpotifyClientID, redirectURL: SpotifyRedirectURI) diff --git a/README.md b/README.md index f95c836..407fbb8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The Spotify iOS framework allows your application to interact with the Spotify app running in the background on a user's device. Capabilities include authorizing, getting metadata for the currently playing track and context, as well as issuing playback commands. -**Please Note:** By using Spotify developer tools you accept our [Developer Terms of Use](https://beta.developer.spotify.com/terms/). +**Please Note:** By using Spotify developer tools you accept our [Developer Terms of Use](https://developer.spotify.com/terms). The Spotify iOS SDK is a set of lightweight objects that connect with the Spotify app and let you control it while all the heavy lifting of playback is offloaded to the Spotify app itself. The Spotify app takes care of playback, networking, offline caching and OS music integration, leaving you to focus on your user experience. Moving from your app to the Spotify app and vice versa is a streamlined experience where playback and metadata always stay in sync. @@ -141,7 +141,7 @@ Follow these steps to make sure you are prepared to start coding. ### Add Dependencies -1. Add the SpotifyiOS package to your project. You can either do this through Swift Package Manager (SPM), or by adding `SpotifyiOS.framework` or `SpotifyiOS.xcframework` to your Xcode project directly. +1. Add the SpotifyiOS package to your project. You can either do this through Swift Package Manager (SPM), or by adding `SpotifyiOS.xcframework` to your Xcode project directly. ![Import SpotifyiOS.framework](img/import_sdk.png) diff --git a/SpotifyiOS.xcframework/Info.plist b/SpotifyiOS.xcframework/Info.plist old mode 100644 new mode 100755 diff --git a/SpotifyiOS.xcframework/_CodeSignature/CodeDirectory b/SpotifyiOS.xcframework/_CodeSignature/CodeDirectory index 241c114..ca02320 100644 Binary files a/SpotifyiOS.xcframework/_CodeSignature/CodeDirectory and b/SpotifyiOS.xcframework/_CodeSignature/CodeDirectory differ diff --git a/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements-1 b/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements-1 index 03a20b0..07f25fa 100644 Binary files a/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements-1 and b/SpotifyiOS.xcframework/_CodeSignature/CodeRequirements-1 differ diff --git a/SpotifyiOS.xcframework/_CodeSignature/CodeResources b/SpotifyiOS.xcframework/_CodeSignature/CodeResources index 1722344..fbe8ee2 100644 --- a/SpotifyiOS.xcframework/_CodeSignature/CodeResources +++ b/SpotifyiOS.xcframework/_CodeSignature/CodeResources @@ -94,7 +94,7 @@ ios-arm64/SpotifyiOS.framework/Headers/SPTError.h - Kj+zm7PGIYwZLO3nL5NfqmfXVXk= + JUqc0KVhD8vpZ0DZkUbN915UJjA= ios-arm64/SpotifyiOS.framework/Headers/SPTLogin.h @@ -106,15 +106,15 @@ ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h - F575KcNSsah0efQcJ9NxqhMj1XU= + tVp4YLErK1kUkS2Kh3Gxpwb3qa8= ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h - tlKyXr4cYHsmCVT1Pirrn7YD35M= + 1LUreOg2FEVsSZvZJntprBecg4M= ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h - Ru7R1szm66XmkrDTW6C+oL8VPYQ= + jBP5h/OoLF5uMbXBusHi3XVN+vo= ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h @@ -122,11 +122,11 @@ ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h - N5xvK/PeuqrBrnN22o1g3Wz1s4A= + BHIpJ87aMgEqrbaWv/GuywsUkMs= ios-arm64/SpotifyiOS.framework/Info.plist - ku0mXUiM5QUhyMXE7MPKBMtmKJU= + TzCJ2TWQnUVUJ+yxG81MEW1Xa7Q= ios-arm64/SpotifyiOS.framework/Modules/module.modulemap @@ -138,7 +138,7 @@ ios-arm64/SpotifyiOS.framework/SpotifyiOS - 4LRwj0iSO79uNfwQYfST5GlByS4= + 63FAAqrydvowtujFf1n5h0PH89s= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h @@ -230,7 +230,7 @@ ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h - Kj+zm7PGIYwZLO3nL5NfqmfXVXk= + JUqc0KVhD8vpZ0DZkUbN915UJjA= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h @@ -242,15 +242,15 @@ ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h - F575KcNSsah0efQcJ9NxqhMj1XU= + tVp4YLErK1kUkS2Kh3Gxpwb3qa8= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h - tlKyXr4cYHsmCVT1Pirrn7YD35M= + 1LUreOg2FEVsSZvZJntprBecg4M= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h - Ru7R1szm66XmkrDTW6C+oL8VPYQ= + jBP5h/OoLF5uMbXBusHi3XVN+vo= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h @@ -258,11 +258,11 @@ ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h - N5xvK/PeuqrBrnN22o1g3Wz1s4A= + BHIpJ87aMgEqrbaWv/GuywsUkMs= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist - ku0mXUiM5QUhyMXE7MPKBMtmKJU= + TzCJ2TWQnUVUJ+yxG81MEW1Xa7Q= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap @@ -274,7 +274,7 @@ ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS - cm0hT4mTTpUeJkYO7LWTURaBNlg= + d0XmMGlUjE0wBI8nlpOgQy8xfQg= files2 @@ -525,11 +525,11 @@ hash - Kj+zm7PGIYwZLO3nL5NfqmfXVXk= + JUqc0KVhD8vpZ0DZkUbN915UJjA= hash2 - I3Wuh5U8eLBeuTGWV/yJYUs5Atyxua9PVcNY/2cngUw= + wIKEKH7jinNNzRlWbADSOaAOY7ulVlvKtDemSXp61BQ= ios-arm64/SpotifyiOS.framework/Headers/SPTLogin.h @@ -558,33 +558,33 @@ hash - F575KcNSsah0efQcJ9NxqhMj1XU= + tVp4YLErK1kUkS2Kh3Gxpwb3qa8= hash2 - oZRtWZZrHNdvliwGwMDUAH/E2Vm6ndbJY/bjqznGmMk= + wqgG1gJlHG+Qt4KNEnkEwUnjpdkUUins9U/Ld0D0tvM= ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h hash - tlKyXr4cYHsmCVT1Pirrn7YD35M= + 1LUreOg2FEVsSZvZJntprBecg4M= hash2 - vBWbY6+HvUhHlV9tJR+cTDCIm7PX7qYms/CZ4o6rdE8= + 8xanUmclWO91KjfvjVAUfW4zTVK7E3U28B61nRZtVYE= ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h hash - Ru7R1szm66XmkrDTW6C+oL8VPYQ= + jBP5h/OoLF5uMbXBusHi3XVN+vo= hash2 - o9lZ3nLbllUeppOrtRCVlg6ggQ2v0zqeYVq1qQdTgQY= + ZspZzsDn3/d7h7QejgACTgwD/IqN8L46Eu2ics9LeHA= ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h @@ -602,22 +602,22 @@ hash - N5xvK/PeuqrBrnN22o1g3Wz1s4A= + BHIpJ87aMgEqrbaWv/GuywsUkMs= hash2 - 6VHM2q0NuM4xt7wA7JA4jhYVgmYAHzPX2SrTrHHYLSA= + lgDUnbl0zwEgbGZZSLPF0QfdCZw37ZJYmv15Xuu6Zq4= ios-arm64/SpotifyiOS.framework/Info.plist hash - ku0mXUiM5QUhyMXE7MPKBMtmKJU= + TzCJ2TWQnUVUJ+yxG81MEW1Xa7Q= hash2 - UZnmJkFkXdrAYEEIQcADtsOP79e24t9wb2IeZUY+VNs= + UW0y+wabsgke89Mbni2yFsi0xtoUrtNvAqczkwwdp0U= ios-arm64/SpotifyiOS.framework/Modules/module.modulemap @@ -646,11 +646,11 @@ hash - 4LRwj0iSO79uNfwQYfST5GlByS4= + 63FAAqrydvowtujFf1n5h0PH89s= hash2 - bFmpS3Hvsp7EhlTZuSM17N94UuWSIhp/t5Xr95prDho= + t9FC2WNizg0DTopVTpD5ZauIOfyCOgGNj6axDLY9GN0= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h @@ -899,11 +899,11 @@ hash - Kj+zm7PGIYwZLO3nL5NfqmfXVXk= + JUqc0KVhD8vpZ0DZkUbN915UJjA= hash2 - I3Wuh5U8eLBeuTGWV/yJYUs5Atyxua9PVcNY/2cngUw= + wIKEKH7jinNNzRlWbADSOaAOY7ulVlvKtDemSXp61BQ= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h @@ -932,33 +932,33 @@ hash - F575KcNSsah0efQcJ9NxqhMj1XU= + tVp4YLErK1kUkS2Kh3Gxpwb3qa8= hash2 - oZRtWZZrHNdvliwGwMDUAH/E2Vm6ndbJY/bjqznGmMk= + wqgG1gJlHG+Qt4KNEnkEwUnjpdkUUins9U/Ld0D0tvM= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h hash - tlKyXr4cYHsmCVT1Pirrn7YD35M= + 1LUreOg2FEVsSZvZJntprBecg4M= hash2 - vBWbY6+HvUhHlV9tJR+cTDCIm7PX7qYms/CZ4o6rdE8= + 8xanUmclWO91KjfvjVAUfW4zTVK7E3U28B61nRZtVYE= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h hash - Ru7R1szm66XmkrDTW6C+oL8VPYQ= + jBP5h/OoLF5uMbXBusHi3XVN+vo= hash2 - o9lZ3nLbllUeppOrtRCVlg6ggQ2v0zqeYVq1qQdTgQY= + ZspZzsDn3/d7h7QejgACTgwD/IqN8L46Eu2ics9LeHA= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h @@ -976,22 +976,22 @@ hash - N5xvK/PeuqrBrnN22o1g3Wz1s4A= + BHIpJ87aMgEqrbaWv/GuywsUkMs= hash2 - 6VHM2q0NuM4xt7wA7JA4jhYVgmYAHzPX2SrTrHHYLSA= + lgDUnbl0zwEgbGZZSLPF0QfdCZw37ZJYmv15Xuu6Zq4= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist hash - ku0mXUiM5QUhyMXE7MPKBMtmKJU= + TzCJ2TWQnUVUJ+yxG81MEW1Xa7Q= hash2 - UZnmJkFkXdrAYEEIQcADtsOP79e24t9wb2IeZUY+VNs= + UW0y+wabsgke89Mbni2yFsi0xtoUrtNvAqczkwwdp0U= ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap @@ -1020,11 +1020,11 @@ hash - cm0hT4mTTpUeJkYO7LWTURaBNlg= + d0XmMGlUjE0wBI8nlpOgQy8xfQg= hash2 - w/cOUic/wBWxVgD/f1kOIoGPziEam4voNyTYZ0egmvY= + odQ891GTbRYt8ZBKrDWbzZFid8Fr1jggp1uGkfDOGDo= diff --git a/SpotifyiOS.xcframework/_CodeSignature/CodeSignature b/SpotifyiOS.xcframework/_CodeSignature/CodeSignature index 81a6c79..584864a 100644 Binary files a/SpotifyiOS.xcframework/_CodeSignature/CodeSignature and b/SpotifyiOS.xcframework/_CodeSignature/CodeSignature differ diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h index a470cd1..6bae873 100644 --- a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h +++ b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTError.h @@ -7,8 +7,7 @@ NS_ASSUME_NONNULL_BEGIN SPT_EXPORT NSErrorDomain const SPTLoginErrorDomain; /// Spotify error codes, use NSUnderlyingErrorKey to see the underlying error -typedef NS_ENUM(NSUInteger, SPTErrorCode) -{ +typedef NS_ENUM(NSUInteger, SPTErrorCode) { /// Unknown error code SPTUnknownErrorCode NS_SWIFT_NAME(unknown) = 0, /// Authorization failed diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h index 2712de7..ed17f11 100644 --- a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h +++ b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTScope.h @@ -1,32 +1,33 @@ +#import + // (Objective-C identifier, Swift name, string value, bit flag) -#define SPT_SCOPE_LIST \ -SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0)) \ -SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \ -SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2)) \ -SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3)) \ -SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4)) \ -SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5)) \ -SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6)) \ -SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7)) \ -SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8)) \ -SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9)) \ -SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10)) \ -SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11)) \ -SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12)) \ -SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13)) \ -SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14)) \ -SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15)) \ -SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16)) \ -SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17)) \ -SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18)) \ -SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19)) +#define SPT_SCOPE_LIST \ + SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0)) \ + SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \ + SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2)) \ + SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3)) \ + SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4)) \ + SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5)) \ + SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6)) \ + SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7)) \ + SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8)) \ + SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9)) \ + SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10)) \ + SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11)) \ + SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12)) \ + SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13)) \ + SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14)) \ + SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15)) \ + SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16)) \ + SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17)) \ + SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18)) \ + SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19)) /** `SPTScope` represents the OAuth scopes that declare how your app wants to access a user's account. See https://developer.spotify.com/web-api/using-scopes/ for more information. */ -typedef NS_OPTIONS(NSUInteger, SPTScope) -{ +typedef NS_OPTIONS(NSUInteger, SPTScope) { /// Read access to user's private playlists. SPTPlaylistReadPrivateScope NS_SWIFT_NAME(playlistReadPrivate) = (1 << 0), /// Include collaborative playlists when requesting a user's playlists. @@ -48,7 +49,7 @@ typedef NS_OPTIONS(NSUInteger, SPTScope) /// Read access to user’s email address. SPTUserReadEmailScope NS_SWIFT_NAME(userReadEmail) = (1 << 9), /// Read access to user’s subscription details (type of user account). - SPTUserReadPrivateScope NS_SWIFT_NAME(userReadPrivate) = (1 << 10), + SPTUserReadPrivateScope NS_SWIFT_NAME(userReadPrivate) = (1 << 10), /// Read access to a user's top artists and tracks. SPTUserTopReadScope NS_SWIFT_NAME(userTopRead) = (1 << 11), /// Upload user generated content images @@ -68,4 +69,3 @@ typedef NS_OPTIONS(NSUInteger, SPTScope) /// Indicate that the application intends to use OIDC to verify the user's identity SPTOpenIdScope NS_SWIFT_NAME(openid) = (1 << 19), }; - diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h index 6dbe849..4d8e889 100644 --- a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h +++ b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSession.h @@ -20,7 +20,8 @@ NS_ASSUME_NONNULL_BEGIN /** Check whether the session has expired. `YES` if expired; `NO` otherwise. - Note: The session is considered expired once the current date and time is equal to or greater than the expiration date and time. + Note: The session is considered expired once the current date and time is equal to or greater than the expiration date + and time. */ @property (nonatomic, readonly, getter=isExpired) BOOL expired; diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h index be0f092..f8c868c 100644 --- a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h +++ b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h @@ -7,15 +7,14 @@ NS_ASSUME_NONNULL_BEGIN @protocol SPTSessionManagerDelegate; /// Options for determining the most suitable method for authorization -typedef NS_OPTIONS(NSUInteger, SPTAuthorizationOptions) -{ +typedef NS_OPTIONS(NSUInteger, SPTAuthorizationOptions) { /// Authorize using a suitable method. If Spotify is installed the app will be used instead of a web view SPTDefaultAuthorizationOption NS_SWIFT_NAME(default) = (0), /// Authorize using only the Spotify client. If Spotify is not installed authorization will fail. SPTClientAuthorizationOption NS_SWIFT_NAME(clientOnly) = (1 << 0), } NS_SWIFT_NAME(AuthorizationOptions); -typedef NSString * const SPTAuthorizationCode; +typedef NSString *const SPTAuthorizationCode; /// This class manages a Spotify user session, in the form of `SPTSession`. @@ -24,14 +23,16 @@ typedef NSString * const SPTAuthorizationCode; /// The `SPTSession` for the `SPTSessionManager` to manage. If no user has been authenticated this will be nil @property (nullable, nonatomic, strong) SPTSession *session; -/// The `SPTSessionManagerDelegate` to notify of initiating a session, renewing a session, and/or errors related to a session -@property (nullable, nonatomic, weak) id delegate; +/// The `SPTSessionManagerDelegate` to notify of initiating a session, renewing a session, and/or errors related to a +/// session +@property (nullable, nonatomic, weak) id delegate; /** Determine if the Spotify app is installed. Will be `YES` if the Spotify app is installed (and the URL scheme is whitelisted), otherwise is `NO`. - Note: You must whitelist the "spotify" URL scheme in your info.plist LSApplicationQueriesSchemes or this will always be NO + Note: You must whitelist the "spotify" URL scheme in your info.plist LSApplicationQueriesSchemes or this will always be + NO */ @property (nonatomic, readonly, getter=isSpotifyAppInstalled) BOOL spotifyAppInstalled; @@ -46,7 +47,8 @@ typedef NSString * const SPTAuthorizationCode; /** Initiate the authorization process - @param scope The scope to request, e.g. `SPTPlaylistReadPrivateScope`|`SPTUserReadEmailScope` if you wish to request read access to private playlists, and read access to the user's email address. + @param scope The scope to request, e.g. `SPTPlaylistReadPrivateScope`|`SPTUserReadEmailScope` if you wish to request + read access to private playlists, and read access to the user's email address. @param options Options bitmask that informs authorization behavior. @param campaign The campaign identifier, to help attribute where the account linking was initiated from. See `SPTSessionManagerDelegate` for messages regarding changes in session state. @@ -57,8 +59,10 @@ typedef NSString * const SPTAuthorizationCode; /** Initiate the authorization process - @note Prefer `initiateSessionWithScope:options:campaign` instead, unless you need additional scopes that aren't listed in `SPTScope` - @param scope The scope to request, e.g. `"playlist-read-private user-read-email"` if you wish to request read access to private playlists, and read access to the user's email address. + @note Prefer `initiateSessionWithScope:options:campaign` instead, unless you need additional scopes that aren't listed + in `SPTScope` + @param scope The scope to request, e.g. `"playlist-read-private user-read-email"` if you wish to request read access to + private playlists, and read access to the user's email address. @param options Options bitmask that informs authorization behavior. @param campaign The campaign identifier, to help attribute where the account linking was initiated from. See `SPTSessionManagerDelegate` for messages regarding changes in session state. @@ -72,25 +76,28 @@ typedef NSString * const SPTAuthorizationCode; /** Create an `SPTSessionManager` with the provided configuration. - + @param configuration An `SPTConfiguration` object. @param delegate An optional delegate conforming to `SPTSessionManagerDelegate`. @return An `SPTSessionManager` with the desired configuration. */ - (instancetype)initWithConfiguration:(SPTConfiguration *)configuration - delegate:(nullable id )delegate; + delegate:(nullable id)delegate; + (instancetype)sessionManagerWithConfiguration:(SPTConfiguration *)configuration - delegate:(nullable id )delegate; + delegate:(nullable id)delegate; /** Handle openURL callbacks from the `AppDelegate` @param application The `UIApplication` passed into the matching `AppDelegate` method @param URL The URL to attempt to parse the access token from @param options The options passed in to the matching `AppDelegate` method - @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise returns `NO`. + @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise + returns `NO`. */ -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)URL options:(NSDictionary *)options; +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)URL + options:(NSDictionary *)options; /** Handle continueUserActivity callbacks from the `AppDelegate` @@ -98,9 +105,13 @@ typedef NSString * const SPTAuthorizationCode; @param application The `UIApplication` passed into the matching `AppDelegate` method @param userActivity An object encapsulating a user activity supported by this responder. @param restorationHandler A block to execute if your app creates objects to perform the task the user was performing - @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise returns `NO`. + @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise + returns `NO`. */ -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray> * __nullable restorableObjects))restorationHandler; +- (BOOL)application:(UIApplication *)application + continueUserActivity:(NSUserActivity *)userActivity + restorationHandler: + (void (^)(NSArray> *__nullable restorableObjects))restorationHandler; @end @@ -113,7 +124,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` that initiated the session. @param session The initiated `SPTSession` object. */ -- (void)sessionManager:(SPTSessionManager *)manager didInitiateSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didInitiate:)); +- (void)sessionManager:(SPTSessionManager *)manager + didInitiateSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didInitiate:)); /** This message is sent when the manager failed to initiate or renew a session. @@ -121,7 +133,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` instance. @param error The `NSError` that occured. */ -- (void)sessionManager:(SPTSessionManager *)manager didFailWithError:(NSError *)error NS_SWIFT_NAME(sessionManager(manager:didFailWith:)); +- (void)sessionManager:(SPTSessionManager *)manager + didFailWithError:(NSError *)error NS_SWIFT_NAME(sessionManager(manager:didFailWith:)); @optional @@ -131,7 +144,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` instance. @param session The renewed `SPTSession` object. */ -- (void)sessionManager:(SPTSessionManager *)manager didRenewSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didRenew:)); +- (void)sessionManager:(SPTSessionManager *)manager + didRenewSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didRenew:)); /** Sent when the `SPTSessionManager` has obtained an authorization code, @@ -142,7 +156,9 @@ typedef NSString * const SPTAuthorizationCode; @param code An OAuth authorization code. @return `NO` to request the access token yourself; `YES` to let `SPTSessionManager` handle it. */ -- (BOOL)sessionManager:(SPTSessionManager *)manager shouldRequestAccessTokenWithAuthorizationCode:(SPTAuthorizationCode)code NS_SWIFT_NAME(sessionManager(manager:shouldRequestAccessTokenWith:)); +- (BOOL)sessionManager:(SPTSessionManager *)manager + shouldRequestAccessTokenWithAuthorizationCode:(SPTAuthorizationCode)code + NS_SWIFT_NAME(sessionManager(manager:shouldRequestAccessTokenWith:)); @end diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h index 9bec06a..578ede5 100644 --- a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h +++ b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyiOS.h @@ -1,7 +1,7 @@ #ifndef _SPOTIFYIOS_ #define _SPOTIFYIOS_ -#import "SpotifyAppRemote.h" #import "SPTLogin.h" +#import "SpotifyAppRemote.h" #endif /* _SPOTIFYIOS_ */ \ No newline at end of file diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist old mode 100644 new mode 100755 index 2f4e4a0..bcda781 Binary files a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist and b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist differ diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Modules/module.modulemap b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Modules/module.modulemap old mode 100644 new mode 100755 diff --git a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS old mode 100644 new mode 100755 index 809f488..e8d7769 Binary files a/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS and b/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS differ diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h index a470cd1..6bae873 100644 --- a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +++ b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h @@ -7,8 +7,7 @@ NS_ASSUME_NONNULL_BEGIN SPT_EXPORT NSErrorDomain const SPTLoginErrorDomain; /// Spotify error codes, use NSUnderlyingErrorKey to see the underlying error -typedef NS_ENUM(NSUInteger, SPTErrorCode) -{ +typedef NS_ENUM(NSUInteger, SPTErrorCode) { /// Unknown error code SPTUnknownErrorCode NS_SWIFT_NAME(unknown) = 0, /// Authorization failed diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h index 2712de7..ed17f11 100644 --- a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +++ b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h @@ -1,32 +1,33 @@ +#import + // (Objective-C identifier, Swift name, string value, bit flag) -#define SPT_SCOPE_LIST \ -SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0)) \ -SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \ -SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2)) \ -SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3)) \ -SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4)) \ -SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5)) \ -SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6)) \ -SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7)) \ -SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8)) \ -SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9)) \ -SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10)) \ -SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11)) \ -SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12)) \ -SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13)) \ -SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14)) \ -SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15)) \ -SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16)) \ -SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17)) \ -SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18)) \ -SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19)) +#define SPT_SCOPE_LIST \ + SPT_SCOPE(SPTPlaylistReadPrivateScope, playlistReadPrivate, "playlist-read-private", (1 << 0)) \ + SPT_SCOPE(SPTPlaylistReadCollaborativeScope, playlistReadCollaborative, "playlist-read-collaborative", (1 << 1)) \ + SPT_SCOPE(SPTPlaylistModifyPublicScope, playlistModifyPublic, "playlist-modify-public", (1 << 2)) \ + SPT_SCOPE(SPTPlaylistModifyPrivateScope, playlistModifyPrivate, "playlist-modify-private", (1 << 3)) \ + SPT_SCOPE(SPTUserFollowReadScope, userFollowRead, "user-follow-read", (1 << 4)) \ + SPT_SCOPE(SPTUserFollowModifyScope, userFollowModify, "user-follow-modify", (1 << 5)) \ + SPT_SCOPE(SPTUserLibraryReadScope, userLibraryRead, "user-library-read", (1 << 6)) \ + SPT_SCOPE(SPTUserLibraryModifyScope, userLibraryModify, "user-library-modify", (1 << 7)) \ + SPT_SCOPE(SPTUserReadBirthDateScope, userReadBirthDate, "user-read-birthdate", (1 << 8)) \ + SPT_SCOPE(SPTUserReadEmailScope, userReadEmail, "user-read-email", (1 << 9)) \ + SPT_SCOPE(SPTUserReadPrivateScope, userReadPrivate, "user-read-private", (1 << 10)) \ + SPT_SCOPE(SPTUserTopReadScope, userTopRead, "user-top-read", (1 << 11)) \ + SPT_SCOPE(SPTUGCImageUploadScope, ugcImageUpload, "ugc-image-upload", (1 << 12)) \ + SPT_SCOPE(SPTStreamingScope, streaming, "streaming", (1 << 13)) \ + SPT_SCOPE(SPTAppRemoteControlScope, appRemoteControl, "app-remote-control", (1 << 14)) \ + SPT_SCOPE(SPTUserReadPlaybackStateScope, userReadPlaybackState, "user-read-playback-state", (1 << 15)) \ + SPT_SCOPE(SPTUserModifyPlaybackStateScope, userModifyPlaybackState, "user-modify-playback-state", (1 << 16)) \ + SPT_SCOPE(SPTUserReadCurrentlyPlayingScope, userReadCurrentlyPlaying, "user-read-currently-playing", (1 << 17)) \ + SPT_SCOPE(SPTUserReadRecentlyPlayedScope, userReadRecentlyPlayed, "user-read-recently-played", (1 << 18)) \ + SPT_SCOPE(SPTOpenIdScope, openid, "openid", (1 << 19)) /** `SPTScope` represents the OAuth scopes that declare how your app wants to access a user's account. See https://developer.spotify.com/web-api/using-scopes/ for more information. */ -typedef NS_OPTIONS(NSUInteger, SPTScope) -{ +typedef NS_OPTIONS(NSUInteger, SPTScope) { /// Read access to user's private playlists. SPTPlaylistReadPrivateScope NS_SWIFT_NAME(playlistReadPrivate) = (1 << 0), /// Include collaborative playlists when requesting a user's playlists. @@ -48,7 +49,7 @@ typedef NS_OPTIONS(NSUInteger, SPTScope) /// Read access to user’s email address. SPTUserReadEmailScope NS_SWIFT_NAME(userReadEmail) = (1 << 9), /// Read access to user’s subscription details (type of user account). - SPTUserReadPrivateScope NS_SWIFT_NAME(userReadPrivate) = (1 << 10), + SPTUserReadPrivateScope NS_SWIFT_NAME(userReadPrivate) = (1 << 10), /// Read access to a user's top artists and tracks. SPTUserTopReadScope NS_SWIFT_NAME(userTopRead) = (1 << 11), /// Upload user generated content images @@ -68,4 +69,3 @@ typedef NS_OPTIONS(NSUInteger, SPTScope) /// Indicate that the application intends to use OIDC to verify the user's identity SPTOpenIdScope NS_SWIFT_NAME(openid) = (1 << 19), }; - diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h index 6dbe849..4d8e889 100644 --- a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +++ b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h @@ -20,7 +20,8 @@ NS_ASSUME_NONNULL_BEGIN /** Check whether the session has expired. `YES` if expired; `NO` otherwise. - Note: The session is considered expired once the current date and time is equal to or greater than the expiration date and time. + Note: The session is considered expired once the current date and time is equal to or greater than the expiration date + and time. */ @property (nonatomic, readonly, getter=isExpired) BOOL expired; diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h index be0f092..f8c868c 100644 --- a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +++ b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h @@ -7,15 +7,14 @@ NS_ASSUME_NONNULL_BEGIN @protocol SPTSessionManagerDelegate; /// Options for determining the most suitable method for authorization -typedef NS_OPTIONS(NSUInteger, SPTAuthorizationOptions) -{ +typedef NS_OPTIONS(NSUInteger, SPTAuthorizationOptions) { /// Authorize using a suitable method. If Spotify is installed the app will be used instead of a web view SPTDefaultAuthorizationOption NS_SWIFT_NAME(default) = (0), /// Authorize using only the Spotify client. If Spotify is not installed authorization will fail. SPTClientAuthorizationOption NS_SWIFT_NAME(clientOnly) = (1 << 0), } NS_SWIFT_NAME(AuthorizationOptions); -typedef NSString * const SPTAuthorizationCode; +typedef NSString *const SPTAuthorizationCode; /// This class manages a Spotify user session, in the form of `SPTSession`. @@ -24,14 +23,16 @@ typedef NSString * const SPTAuthorizationCode; /// The `SPTSession` for the `SPTSessionManager` to manage. If no user has been authenticated this will be nil @property (nullable, nonatomic, strong) SPTSession *session; -/// The `SPTSessionManagerDelegate` to notify of initiating a session, renewing a session, and/or errors related to a session -@property (nullable, nonatomic, weak) id delegate; +/// The `SPTSessionManagerDelegate` to notify of initiating a session, renewing a session, and/or errors related to a +/// session +@property (nullable, nonatomic, weak) id delegate; /** Determine if the Spotify app is installed. Will be `YES` if the Spotify app is installed (and the URL scheme is whitelisted), otherwise is `NO`. - Note: You must whitelist the "spotify" URL scheme in your info.plist LSApplicationQueriesSchemes or this will always be NO + Note: You must whitelist the "spotify" URL scheme in your info.plist LSApplicationQueriesSchemes or this will always be + NO */ @property (nonatomic, readonly, getter=isSpotifyAppInstalled) BOOL spotifyAppInstalled; @@ -46,7 +47,8 @@ typedef NSString * const SPTAuthorizationCode; /** Initiate the authorization process - @param scope The scope to request, e.g. `SPTPlaylistReadPrivateScope`|`SPTUserReadEmailScope` if you wish to request read access to private playlists, and read access to the user's email address. + @param scope The scope to request, e.g. `SPTPlaylistReadPrivateScope`|`SPTUserReadEmailScope` if you wish to request + read access to private playlists, and read access to the user's email address. @param options Options bitmask that informs authorization behavior. @param campaign The campaign identifier, to help attribute where the account linking was initiated from. See `SPTSessionManagerDelegate` for messages regarding changes in session state. @@ -57,8 +59,10 @@ typedef NSString * const SPTAuthorizationCode; /** Initiate the authorization process - @note Prefer `initiateSessionWithScope:options:campaign` instead, unless you need additional scopes that aren't listed in `SPTScope` - @param scope The scope to request, e.g. `"playlist-read-private user-read-email"` if you wish to request read access to private playlists, and read access to the user's email address. + @note Prefer `initiateSessionWithScope:options:campaign` instead, unless you need additional scopes that aren't listed + in `SPTScope` + @param scope The scope to request, e.g. `"playlist-read-private user-read-email"` if you wish to request read access to + private playlists, and read access to the user's email address. @param options Options bitmask that informs authorization behavior. @param campaign The campaign identifier, to help attribute where the account linking was initiated from. See `SPTSessionManagerDelegate` for messages regarding changes in session state. @@ -72,25 +76,28 @@ typedef NSString * const SPTAuthorizationCode; /** Create an `SPTSessionManager` with the provided configuration. - + @param configuration An `SPTConfiguration` object. @param delegate An optional delegate conforming to `SPTSessionManagerDelegate`. @return An `SPTSessionManager` with the desired configuration. */ - (instancetype)initWithConfiguration:(SPTConfiguration *)configuration - delegate:(nullable id )delegate; + delegate:(nullable id)delegate; + (instancetype)sessionManagerWithConfiguration:(SPTConfiguration *)configuration - delegate:(nullable id )delegate; + delegate:(nullable id)delegate; /** Handle openURL callbacks from the `AppDelegate` @param application The `UIApplication` passed into the matching `AppDelegate` method @param URL The URL to attempt to parse the access token from @param options The options passed in to the matching `AppDelegate` method - @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise returns `NO`. + @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise + returns `NO`. */ -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)URL options:(NSDictionary *)options; +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)URL + options:(NSDictionary *)options; /** Handle continueUserActivity callbacks from the `AppDelegate` @@ -98,9 +105,13 @@ typedef NSString * const SPTAuthorizationCode; @param application The `UIApplication` passed into the matching `AppDelegate` method @param userActivity An object encapsulating a user activity supported by this responder. @param restorationHandler A block to execute if your app creates objects to perform the task the user was performing - @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise returns `NO`. + @return Returns `YES` if `SPTSessionManager` recognizes the URL and will attempt to parse an access token, otherwise + returns `NO`. */ -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray> * __nullable restorableObjects))restorationHandler; +- (BOOL)application:(UIApplication *)application + continueUserActivity:(NSUserActivity *)userActivity + restorationHandler: + (void (^)(NSArray> *__nullable restorableObjects))restorationHandler; @end @@ -113,7 +124,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` that initiated the session. @param session The initiated `SPTSession` object. */ -- (void)sessionManager:(SPTSessionManager *)manager didInitiateSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didInitiate:)); +- (void)sessionManager:(SPTSessionManager *)manager + didInitiateSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didInitiate:)); /** This message is sent when the manager failed to initiate or renew a session. @@ -121,7 +133,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` instance. @param error The `NSError` that occured. */ -- (void)sessionManager:(SPTSessionManager *)manager didFailWithError:(NSError *)error NS_SWIFT_NAME(sessionManager(manager:didFailWith:)); +- (void)sessionManager:(SPTSessionManager *)manager + didFailWithError:(NSError *)error NS_SWIFT_NAME(sessionManager(manager:didFailWith:)); @optional @@ -131,7 +144,8 @@ typedef NSString * const SPTAuthorizationCode; @param manager The `SPTSessionManager` instance. @param session The renewed `SPTSession` object. */ -- (void)sessionManager:(SPTSessionManager *)manager didRenewSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didRenew:)); +- (void)sessionManager:(SPTSessionManager *)manager + didRenewSession:(SPTSession *)session NS_SWIFT_NAME(sessionManager(manager:didRenew:)); /** Sent when the `SPTSessionManager` has obtained an authorization code, @@ -142,7 +156,9 @@ typedef NSString * const SPTAuthorizationCode; @param code An OAuth authorization code. @return `NO` to request the access token yourself; `YES` to let `SPTSessionManager` handle it. */ -- (BOOL)sessionManager:(SPTSessionManager *)manager shouldRequestAccessTokenWithAuthorizationCode:(SPTAuthorizationCode)code NS_SWIFT_NAME(sessionManager(manager:shouldRequestAccessTokenWith:)); +- (BOOL)sessionManager:(SPTSessionManager *)manager + shouldRequestAccessTokenWithAuthorizationCode:(SPTAuthorizationCode)code + NS_SWIFT_NAME(sessionManager(manager:shouldRequestAccessTokenWith:)); @end diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h index 9bec06a..578ede5 100644 --- a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +++ b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h @@ -1,7 +1,7 @@ #ifndef _SPOTIFYIOS_ #define _SPOTIFYIOS_ -#import "SpotifyAppRemote.h" #import "SPTLogin.h" +#import "SpotifyAppRemote.h" #endif /* _SPOTIFYIOS_ */ \ No newline at end of file diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist old mode 100644 new mode 100755 index 2f4e4a0..bcda781 Binary files a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist and b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist differ diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap old mode 100644 new mode 100755 diff --git a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS old mode 100644 new mode 100755 index f963291..da7e8f8 Binary files a/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS and b/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS differ diff --git a/docs/html/Blocks/SPTAppRemoteCallback.html b/docs/html/Blocks/SPTAppRemoteCallback.html index e598638..ff72c1e 100755 --- a/docs/html/Blocks/SPTAppRemoteCallback.html +++ b/docs/html/Blocks/SPTAppRemoteCallback.html @@ -80,7 +80,7 @@

SPTAppRemoteCallback Block Reference