Select to view content in your preferred language

offline attachments not sync'd

2778
2
Jump to solution
06-11-2014 02:15 AM
MattCooper
Regular Contributor
Saving and editing attachments offline seems to work fine in the local geodatabase but anytime the sync process runs it returns an attachment edit error with a non descript error message: The operation couldn???t be completed. (com.esri.arcgis.runtime.error.gdb error 0.)

Is there any way to view a more detailed error? The server logs dont show anything.  Attachments can be added with desktop and via the rest API and they will sync down to the device.  The new/updated feature is sync'd fine as well, just without attachment.

I'm creating attachments like this:

[AGSGDBAttachment attachmentWithUIImagePickerControllerInfoDictionary:info completion:^(AGSGDBAttachment *attachment) {         [self.feature addAttachment:attachment];         [self.tableView reloadData];         [self dismissViewControllerAnimated:YES completion:nil];     }];


and then saving with [self.gdbFeatureTable saveFeature:self.feature error:&err] later when the form is completed.
This works fine locally on the device.  I can get a thumbnail and view the fullsize image, etc.  the only problem is sync'ing.

Any ideas what to look into? I've checked all the sync parameters and everything looks like it should allow attachments.

Thanks,
Matt
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
Are you setting "name" property of the AGSGDBAttachment with file extension? i.e. Photo.jpg? If not, please do it and then try to sync.

Regards,
Nimesh

View solution in original post

0 Kudos
2 Replies
NimeshJarecha
Esri Regular Contributor
Are you setting "name" property of the AGSGDBAttachment with file extension? i.e. Photo.jpg? If not, please do it and then try to sync.

Regards,
Nimesh
0 Kudos
MattCooper
Regular Contributor
That did the trick.  Seems so obvious now, but not at 2AM!

Thanks!
0 Kudos