Spotify Player尝试播放歌曲时抛出歧义错误

joe*_*mow 6 spotify ios swift

我正在尝试使用Spotify API播放歌曲,我发现了Spotify permium,但是当我尝试运行下面的代码时,出现错误 Optional(Error Domain=com.spotify.ios-sdk.playback Code=1 "The operation failed due to an unspecified issue." UserInfo={NSLocalizedDescription=The operation failed due to an unspecified issue.})

func initalizePlayer(authSession: SPTSession) {
        if self.player == nil {
            self.player = SPTAudioStreamingController.sharedInstance()
            self.player!.playbackDelegate = self
            self.player?.delegate = self
            try! player!.start(withClientId: clientId)
            self.player!.login(withAccessToken: authSession.accessToken)
            print("done initalizing")
        }
    }

    public func play() {
        player?.playSpotifyURI("spotify:track:7FOJvA3PxiIU0DN3JjQ7jT", startingWith: 0, startingWithPosition: 0, callback: { (error) in
            if error != nil {
                print(error)
                return
            }
        })
    }
Run Code Online (Sandbox Code Playgroud)