Skip to Content
Former Member
Aug 31, 2015 at 04:26 PM

Get Entity SODataOfflineStore iOS - SMP3


Hi all,

I migrated the OnlineStore to the OfflineStore and I have some worries.

Requests that worked well on the OnlineStore no longer works on the OfflineStore.

I think that my definingRequest do not populate my local base.

On OnlineStore I used :

[self.onlineStore scheduleReadEntitySet:@"etplnrgrpSet"options:nil...]

And it's working fine.

On Offline I used :

SODataOfflineStoreOptions *storeOptions = [[SODataOfflineStoreOptions alloc] init]; = regData.serverHost;

storeOptions.port = regData.serverPort;

storeOptions.enableHttps = YES;

storeOptions.urlSuffix = [NSString stringWithFormat:@"/%@/%@", regData.resourcePath, regData.farmId];

storeOptions.serviceRoot = [NSString stringWithFormat:@"/%@", regData.applicationId];

storeOptions.conversationManager = self.appDelegate.logonHandler.httpConvManager;

[storeOptions addDefiningRequestWithName:@"req1" url:@"/etplnrgrpSet" retrieveStreams:false];

offlineStore = [[SODataOfflineStore alloc] init];

[offlineStore setOfflineStoreDelegate:self];

[offlineStore openStoreWithOptions:storeOptions error:&error];

And :

[self.offlineStore scheduleReadEntitySet:@"etplnrgrpSet"options:nil...]

And I receive an empty response.

Should the entity be declared in particular way on the server?

We can read the entitySet in the same way that Entity?

I tried to set definingRequest and scheduleReadEntitySet like :

[self.onlineStore scheduleReadEntitySet:@"etplnrgrpSet"options:nil...]

[storeOptions addDefiningRequestWithName:@"req1" url:@"/etplnrgrp" retrieveStreams:false];

But it's doesn't work.

The data base have too navigations property. Can I use them in OfflineStore? If so how?

How can I check that my local base well populated before making a request?

With a break point for example?