Hi everyone, time to code.
In order to refresh the offline store...
This single line of code does the job.
01 [offlineStore scheduleRefreshWithDelegate:self];
Just like the other delegates so far, we need a new delegate named SODataOfflineStoreRefreshDelegate. In this example it is declared in the same class, so simply set self. This delegate has two mandatory callback methods:
And two optional callback methods:
That's all for the refresh. How about the flush?
01 [offlineStore scheduleFlushQueuedRequestsWithDelegate:self];
Yes we have a delegate for this too. It is SODataOfflineStoreFlushDelegate (yes, your wild guess is correct 🙂 ). It has two mandatory callback methods:
And two optional callback methods:
...Hope you're pleasantly surprised with its simplicity.
However...
Yes, I hear you. The question is "What if the OData Producer fails one of the queued requests during a flush?"
We'll discuss about it in the next one, stay tuned.
See you in the next blog,
Ken
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
10 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 |