Skip to Content
author's profile photo Former Member
Former Member

Delete operation in Offline mode

Hi All,

I am facing a strange problem in offline mode of app in iOS.

Scenario :

1) User successfully logs-in under network connectivity & registers with SUP.

2) Device is made to loose the network, perform Create operation on n-records. The so created records are updated on to the UI.

3) Simultaneously the perform Delete operation on x-records in offline. (observations : i see pendingChange = C on record log after performing submitPending). I remove the record entry in UI.

4) On the next successive network connectivity i perform a Automatic Sync to the SUP (identify the network reachability and perform Synchronize on a particular Sync Group). I assume that the records with submit pending set flags are sent to sup and get identified as Created & Deleted in offline mode.

Issue :

The deleted record in offline mode is received back from SUP on the online Sync.

I checked lot forums by now and didn't get any clue about how to handle the delete operation in offline mode. Can anyone help me out in this.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jun 26, 2013 at 07:17 AM

    Hi Shri,

    for create operation: pendingChange = C

    for delete operation:pendingChange = D

    for update operation:pendingChange = U

    for create you are getting PendingChange = C

    what about delete operation? are you not getting any info?

    did you put break point at frontend level? and analysed?

    that delete operation is reflecting on backend?



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 27, 2013 at 06:43 AM

    Hi Shri,

    Delete operations in offline capable SUP/SMP apps can be interesting to deal with.

    As a starting point, can I confirm that the delete method you are calling is the correct one - the reason I am asking is because as standard, MBOs have create, update and delete functions that are not linked to any back-end operations and so the effect of calling these methods will only be seen on-device.

    So when I define my delete methods, I usually have a parameter or something along those lines so its much easier to distinguish between these standard methods and your non-standard ones.

    The other side of offline deletes that is interesting (and I have seen in a few different versions of SUP) is the scenario where you are offline, the user creates a new entry and then before the device comes back online - deletes the same entry.

    When the device comes back online this actually should result in a create being called which is immediately followed by a delete on your back end system, in actual fact what can happen is a create operation which makes the device forget that it ever deleted the line in the first place - it doesnt sound like this is the problem you are having but just in case you come accross it later.

    Hope you get it sorted,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.