About Sync Task Errors
In Mobile SDK 7.1 and later, sync task methods return error information consistently across platforms.
Sync tasks—sync down, sync up, resync, and clean resync ghosts—can fail for the following reasons:
- Invalid ID or name
- The requested sync operation is already running
- Sync manager is stopped or stopping
-
On iOS:
- Swift methods throw a
SyncStateobject. - Objective-C methods include an
NSError**parameter. Earlier versions of these methods are deprecated.
- Swift methods throw a
-
On Android, these methods throw
MobileSyncException.
- Objective-C
The following methods now support and
NSErrorparameter.
- Swift
The following methods now throw a
SyncStateobject.
- Objective-C
Existing sync methods that do not support an
NSErroroutput parameter are slated for removal in a future major release.
For changes to cleanResyncGhosts methods, see Handling “Ghost” Records After Sync Down Operations.