spotify / spotifylogin Goto Github PK
View Code? Open in Web Editor NEWSwift framework for authenticating with the Spotify API
License: Apache License 2.0
Swift framework for authenticating with the Spotify API
License: Apache License 2.0
I am trying to build an application that plays Spotify songs. I am really confused about how to change BPM(Beats Per Minute,) value of Spotify songs.
First Step: Login through Spotify.
Second Step: Get Current user all album.
Third Step: get album track.
Last Step: play track.
I have done All step with Spotify Delegates. but I want to change the BPM value of the track.
Can someone please explain to me how to change the BPM value?
Is there a way that the SpotifyLogin pod can work with the SPTAuthentication class from the iOS SDK. Specifically I am curious about setting the session in SPTAuthentication from Spotify Login.
Hi, I'm reading the source code https://github.com/spotify/SpotifyLogin/blob/master/Sources/SpotifyLoginPresenter.swift, this line
UIApplication.shared.canOpenURL(appAuthenticationURL)
but as iOS 9+, there is new requirement https://useyourloaf.com/blog/querying-url-schemes-with-canopenurl/ that LSApplicationQueriesSchemes
is needed.
I think we should state this in the README
If you are filing a bug report, please include information for the topics below. Also, please make sure to only report one bug/feature request/question per issue.
A concise description of what the problem is.
Using the correct values for Client ID, Client Secret, Redirect URL, and following the tutorial exactly, the error "Safari cannot open the page because the address is invalid" is thrown on iOS 12.
iOS SDK version: iOS 12 (-sdk iphoneos12.0)
Spotify app version (if native SSO flow is involved)
Trivial, Minor, Major, Catastrophic
Major
Describe what happens when you perform the steps above.
Safari closes and app is logged in
Describe what you expected to happen when performing the steps above.
Error: "Safari cannot open the page because the address is invalid."
Please include any relevant log output that might assist in tracking down the problem.
No logs
Thanks guys for this awesome library! I'm not sure if this is a bug or I just didn't set up the app right, however I followed all instructions in the readme.
When the Spotify app is installed, SpotifyLogin does not obtain a valid session after redirecting from the Spotify app.
iOS 11.1
Spotify 8.4.28
Minor
Spotify app opens, popup says "...Authorizing" and then a check mark. Redirects back to app, however an active session is not present.
Should create an active session with an auth token after redirecting
I am in the process of writing UI tests for my application that uses SpotifyLogin. Do you have an recommendations on how to handle authenticating? XCUI does not like webviews at all and crashes whenever they are interacted with.
If you are filing a bug report, please include information for the topics below. Also, please make sure to only report one bug/feature request/question per issue.
A concise description of what the problem is.
iOS SDK version
Spotify app version (if native SSO flow is involved)
Trivial, Minor, Major, Catastrophic
Describe what happens when you perform the steps above.
Describe what you expected to happen when performing the steps above.
Please include any relevant log output that might assist in tracking down the problem.
when running the Sample test, for the following AppDelegate callback:
func application(_ app: UIApplication,
open url: URL,
options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -> Bool {
let handled = SpotifyLogin.shared.applicationOpenURL(url) { _ in }
return handled
}
I receive the following for the url content:
loginsample://?error=invalid_app_identifier&error_description=The%20app%20identifier%20is%20not%20valid%20with%20the%20client%20ID%20provided
This appears to be flagging an error regarding incorrect app id, though I have checked and rechecked and this is the ID as specified on the developer portal.
Is this an issue? The Sample app ignores the contents returned in the url
thanks.
I am using the most recent Xcode Version 10.1 (10B61)
I have snapchat and spotify social logins implements inside my app and the SpotifyLoginSuccessful notification is called after coming back to app from snapchat login. On debugging i found applicationOpenURL inside SpotifyLogin.swift is posting that notification. For now i have setup a check if url does not contain snap-kit only then the rest of the function will be called otherwise returned false. Please fix this issue, thank you the library nonetheless it is working great!
Snap library link - https://github.com/Snapchat/login-kit-sample/tree/master/ios/Pods/SnapSDK
We would like to use this to provide single sign-on and token creation for an app we're developing. Any reason why we can't?
Hi,
I am implementing your library in my app and I have a little problem.
When my application is launched I'll want to restore my stored session then check if it's valid and renew it if necessary. I want also renew my access_token when i launch my application in a new device but I want to avoid interaction by the user. Then i would like store the refresh_token in my online DB.
But i can't access to the refresh token and I can't find a function to refresh my access_token with a refresh_token.
Do you have an idea of how to do it with your library ?
Thanks
We have some properties like SPTUser and SPTProduct.premium to verify User premium account for Swift 2 Spotify Login framework.
But, I am unable to find the way to verify the User is premium or not for Swift 4 SpotifyLogin framework.
Please provide the solution for this asap.
Thanks in Advance.
checking prefix on this function does not account for possibility of url having upper case characters. quick fix is
let redirectURLString = redirectURL.absoluteString.lowercased()
If you are filing a bug report, please include information for the topics below. Also, please make sure to only report one bug/feature request/question per issue.
show_dialog
is hardcoded to true. It should be able to be set by the developer.
1.0.6
Minor
I downloaded the sample project and added in my redirectURL, client id and client secret. Added the correct URL type in the info tab. The app launches, I press the login button, it takes me to Spotify and I authorize it successfully and then takes me back to the login screen and nothing else happens. The loginSuccessful() method is never called. Please help
When trying to run the example project, it crashes.
self.setImage(UIImage(named: "spotifylogo-32.png",
in: Bundle(for: SpotifyLoginButton.self),
compatibleWith: nil)!
This line returns nil
for me.
Xcode 9 Beta 6 on macOS Sierra with latest
available version of iOS in the simulator
Major, since the only example usage of SpotifyLogin does not work.
pod install
inside the example project folder to install dependencies from CocoaPodsThe line described above returns nil
, hence the application crashes.
If you are filing a bug report, please include information for the topics below. Also, please make sure to only report one bug/feature request/question per issue.
I am getting The operation couldn’t be completed. (OSStatus error -10814.)
upon trying to login. I suspect the setup around URI is wrong. It fails with web browser and iOS app.
iOS SDK version: 0.1.6
Spotify app version (if native SSO flow is involved): 8.5.66.762
Trivial
myappmedia://
and myappmedia://callback
myappmedia
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
SpotifyLogin.shared.configure(clientID: "aaa123", clientSecret: "bbb123", redirectURL: URL(string: "myappmedia://callback")! )
return true
}
, where "aaa123" and "bbb123" are real clientID
and clientSecret
respectively.
Get The operation couldn’t be completed. (OSStatus error -10814.)
error after pressing Sign In button, and them after pressing AGREE nothing happens.
Successful sign in
2020-07-21 23:11:59.790846-0700 MyApp-iOS[70870:5832280] -canOpenURL: failed for URL: "spotify-action://authorize?utm_campaign=spotifylogin&show_dialog=true&nosignup=true&utm_medium=spotifylogin&scope=playlist-read-private%20playlist-read-collaborative%20playlist-modify-public%20playlist-modify-private&redirect_uri=myappmedia%3A%2F%2Fcallback&response_type=code&client_id= aaa123&nolinks=true&utm_source=spotify-sdk" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
I integrate SpotifyLogin Swift4 framework by pod into my project and I import "SpotifyLogin" framework into my local class.
Then I am trying to access the session by "SpotifyLogin.shared.session" , but I am receiving error "'session' is inaccessible due to 'internal' protection level" .
May I know why this is happening ?
Can you please provide a solution.
Thanks in Advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.