Following the example "ApplyScheduledUpdatesToPreplannedMapAreaViewController" in the arcgis-ios-sdk-samples app, I am having an issue syncing a map. I can download the initial map area and us it without any issues.
The problem:
I try to sync the offline map by using AGSOfflineMapSyncTask and calling the checkForUpdates. No matter what changes are made to the map area in AGOL, the checkForUpdates function returns 'none' It does not recognize that there are updates.
Question:
How do I get the AGSOfflineMapSyncTask.checkForUpdates to recognize that there are updated for the map area?
Hi.
I've spoken with the team and 24 hours is the minimum interval between updates being packaged up. Changing the packaging time will not trigger another packaging within 24 hours of the last packaging.
As for why a manual sync doesn't get the updates: what are the updates you are making? You need to update feature data in layers in your web map (and of course the services behind those layers need to be enabled for offline use).
Once you've made feature updates in the web map (add/remove/update features) then they will be picked up in an offline map sync.
If you are using scheduled updates for the sync, they won't be picked up until after the next packaging run. If you are not using scheduled updates, they should be picked up immediately.
The canyonlands sample uses an already-downloaded preplanned offline map as its "snapshot" starting point. It copies it into a working folder and opens it. The web map has scheduled packages that were generated after that offline map was downloaded, so they show up as available updates in the sample. Once you have applied the updates to the copy in the working folder, if you were to check again using that working copy, there would be no more updates available. The working copy is overwritten by the "snapshot" copy each time you run the sample.
For your map you need to:
You can still use a web map that is set up for scheduled updates with regular sync, but you have to ensure the settings when you download the offline map opt out of scheduled updates. Perhaps that's what you're seeing: maybe you downloaded the offline map without opting out of scheduled updates, and then when you sync you're trying a regular sync. That won't work (and I think I misled you there - I wasn't explicit that you need to do this with the download as well as the later sync). You could look at the AGSOfflineMapSyncResult you get back in the sync completion to see if there are errors and look at the errors on each layer to learn more.
Let me know if that helps.
Hello Nicholas,