Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find callback for callAPIMethod method in iOS #160

Open
rajaarun opened this issue Jul 8, 2015 · 5 comments
Open

Unable to find callback for callAPIMethod method in iOS #160

rajaarun opened this issue Jul 8, 2015 · 5 comments

Comments

@rajaarun
Copy link

rajaarun commented Jul 8, 2015

Previously i was using callApiMethod to get user detail in my application.

[[AppDelegate rdioInstance] callAPIMethod:@"findUser" withParameters:params delegate:[RDAPIRequestDelegate delegateToTarget:self loadedAction:@selector(rdioRequest:didLoadData:) failedAction:@selector(rdioRequest:didFailWithError:)]];

Since Rdio has suggested to use OAuth 2.0 i had followed the steps mentioned in the link http://www.rdio.com/developers/docs/guides/oauth2-migration/ for ios SDK

Added rdio-ios-3.0.3 SDK,
As i am not using pods, i manually downloaded AFOAuth2Manager and AFNetworking in my project
replaced the initWithConsumerKey:@"" andSecret:@"" delegate:nil to initWithClientId:@"" andSecret:@"" delegate:nil with new client id and secret key,
and also replaced the callAPIMethod function
[[AppDelegate rdioInstance] callAPIMethod:@"findUser" withParameters:params delegate:[RDAPIRequestDelegate delegateToTarget:self loadedAction:@selector(rdioRequest:didLoadData:) failedAction:@selector(rdioRequest:didFailWithError:)]]; to

[[AppDelegate rdioInstance] callAPIMethod:@"findUser" withParameters:params success:^(NSDictionary *result) { } failure:^(NSError *error) { }];

But i am not able to get the response from any block, neither the success block nor the failure block.

Also had similar issue with callAPIMethod:@"getHeavyRotation" method too. Also getting this error in console Unable to fetch credential with identifier "services.rdio.com" (Error -25300).

@dasevilla
Copy link
Contributor

Could this be an issue with threading? From the documentation

The Rdio SDK is not currently thread-safe. The current implementation expects to be called from the main thread at all times.

http://www.rdio.com/developers/docs/libraries/ios/ref-an-important-note-on-threading

@gabek
Copy link

gabek commented Jul 15, 2015

@rajaarun Could you provide a sample project that shows the issue?

@rajaarun
Copy link
Author

rajaarun commented Aug 3, 2015

Yes, here is the link for sample project.

@dasevilla
Copy link
Contributor

@rajaarun, can you try keeping the RDAPIRequest reference returned by callAPIMethod until after the success or failure blocks have run?

@dasevilla
Copy link
Contributor

As of v3.1.0, you should receive a callback

@dasevilla dasevilla added the bug label Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants