0

I am following the code set up in the example here:

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-ios-how-to-use-client-library/#selecting

What I am trying to do is query a database I have set up on Azure and check if there is already a fb_id with my current id (self.id). However, when trying to call ReadWithCompletion, I am getting the error: "Incompatible block pointer types sending..."

My Code can be found below:

 MSQuery *query = [self.table queryWithPredicate: [NSPredicate predicateWithFormat:@"fb_id == %@", self.id]];
 [query readWithCompletion:^(NSArray *results, NSInteger count, NSError *error) {
      // Do stuff
 }];

I don't see anything wrong with the syntax of the code as I am copying it straight from the online help tutorial provided by Microsoft. I have looked through all the threads on StackOverFlow with this type of error, and it is usually given with there is a return nil where a return should be. However, that is not the case here. Any help would be greatly appreciated.

1 Answers1

0

I can answer my own question here. I posted this question on the Microsoft forums and I got this answer:

You must be using the 2.0 SDK, which introduced this breaking change to the callback type. Thanks for pointing out the doc that needs to be updated!

We will update the document, but you should follow the code in this blog post: http://azure.microsoft.com/blog/2014/10/07/mobile-services-beta-ios-sdk-released/. Basically, you need to write a completion blog like this:

[query readWithCompletion:^(MSQueryResult *result, NSError *error) { .... // completion block logic }];