Skip to content
This repository

No visible @interface for 'DIOSUser' declares the selector 'initwithDelegate:' #57

onepartscissors opened this Issue September 24, 2012 · 2 comments

2 participants

Ash Glover Kyle Browning
Ash Glover

Hi All

i have found and installed the right libraries of AFNetworking and DIOS-SDK that don't give me 'retain' and 'release' errors when building for iOS5 / iOS 6 (so one that works with ARC), and it's now compiling fine, however, when i try and use of of the example code from the documentation page, for example:

DIOSUser *user = [[DIOSUser alloc] initWithDelegate:self];
[user userLoginWithUsername:@"myusername" andPassword:@"mypassword"];

I get an error on the first line, which states:

No visible @interface for 'DIOSUser' declares the selector 'initwithDelegate:'

Any ideas what this is due to? I've been googling and it seems to come back to instance methods and class methods?

Kyle Browning

Thats because the Drupal IOS SDK is no longer instantiated, its all block based.

Try this code

  [DIOSUser userLoginWithUsername:@"username" andPassword:@"password" success:^(AFHTTPRequestOperation *operation, id responseObject) {
  } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
Kyle Browning kylebrowning closed this September 24, 2012
Ash Glover

Ah, thank you Kyle!

That explains it well. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.