Azure iOS Offline SDK 2.0 Beta Adds Table Storage Support

Microsoft released a new beta build (Version 2.0.0) of the Azure iOS offline SDK. It provides support for accessing Table Storage when using a .NET backend Mobile Service.

The MSReadQueryBlock type definition has been updated as shown below

Old definition

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

New definition

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

The MSReadQueryBlock type definition consist of a new class, MSQueryResult. This class will store the result and its properties such as the total items and a continuation link, which is used in table storage.

Azure iOS Offline SDK 2.0

The readWithCompletion() method included with Azure iOS offline SDK has been updated as shown below

Old signature

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

New signature

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

You will be able to retrieve data from the MSQueryResult using the items property as shown below

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

Along with the release of Azure iOS offline SDK beta, Microsoft has updated offline sync tutorials and samples to incorporate the changes described above.

You can download iOS offline SDK sync samples for Windows, Xamarin, and Android from the GitHub Mobile Services samples repository.

Leave a Comment