Zum Hauptinhalt wechseln

 Subscribe

We’ve just released a new beta version of the iOS offline SDK, which adds support for accessing Table Storage when using a .NET backend Mobile Service.

In order to add this support, we made a minor breaking change to the offline SDK. Note that when this SDK eventually becomes the main 2.0 SDK, you may have to change your client code when you upgrade.

The breaking change is to the type definition MSReadQueryBlock.

The old definition was:

typedef void (^MSReadQueryBlock)(NSArray *items,
                                 NSInteger totalCount,
                                 NSError *error);

The new definition is:

typedef void (^MSReadQueryBlock)(MSQueryResult *result, 
                                 NSError *error);

The type definition uses a new class, MSQueryResult, which contains the result and its properties, such as the total items and a continuation link (this is used for Table Storage).

So calls to methods such as readWithCompletion will change:

Old signature:

[query readWithCompletion:^(NSArray *results, NSInteger totalCount, NSError *error) {...}]

New signature:

[query readWithCompletion:^(MSQueryResult *result, NSError *error) {...}]

The data can be retrieved from the MSQueryResult using the items property:

[query readWithCompletion:^(MSQueryResult *result, NSError *error) {
   items = [result.items mutableCopy];
}];

We’ve updated our offline sync tutorials and samples to incorporate these changes.

We’ve also recently published a tutorial for offline sync on iOS and a companion sample. Check out the Mobile Services samples repository on GitHub for offline sync samples for Windows, Xamarin, and Android.

  • Explore

     

    Let us know what you think of Azure and what you would like to see in the future.

     

    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.

     

    Explore Azure learning


Join the conversation