arcgis-maps-sdk-swift-samples icon indicating copy to clipboard operation
arcgis-maps-sdk-swift-samples copied to clipboard

offline expire date

Open shinriyo opened this issue 2 years ago • 11 comments

Does it have offline expire date setting?

I want to set more than 1 month.

shinriyo avatar Aug 31 '23 07:08 shinriyo

Yes, the new API does support the expiration on the mobile map package. We don't have an example written for it yet, but you can take a look at the old one here. I'll take note and prioritize this sample.

yo1995 avatar Aug 31 '23 16:08 yo1995

Thank you for replying What is the default expiration?

shinriyo avatar Aug 31 '23 17:08 shinriyo

If you author the mobile map package in ArcGIS Pro, you'll be prompt to select an expiration date when the "Enable Map Expiration" is checked. doc

image

I think I misread your question though - Unfortunately, mobile map packages created with the OfflineMapTask do not support expiration. I believe it's due to some licensing intricacy. 😥 So you'll need to author the mmpk on Pro.


Please check out the "Ideas" board for Esri Community and for the native SDKs, where the user requests will be taken into considerations in our future releases.

yo1995 avatar Aug 31 '23 17:08 yo1995

If the expiration date can be turned off I would like to turn it off.

We are looking for multilingual support and an expiration date of more than one month and have not tried this package yet.

shinriyo avatar Aug 31 '23 18:08 shinriyo

If the expiration date can be turned off I would like to turn it off.

This need to be done when the mmpk is authored, either by disabling the expiration, or specify allowExpiredAccess (allow to open). If it is specified an preventExpiredAccess (Do not allow to open) option, then it cannot be accessed after expired.

yo1995 avatar Aug 31 '23 18:08 yo1995

Will offline data be deleted automatically? Or will it remain forever unless I delete it?

shinriyo avatar Sep 01 '23 05:09 shinriyo

Will offline data be deleted automatically? Or will it remain forever unless I delete it?

It depends on where you specify the offline download directory like in this sample.

If you specify a system temporary or cache directory, then it will be purged by the system automatically.

If you specify the app's document directory or other custom folder you created, then you need to manage the files. Think the offline map data as files, and you can manage them like normal files.

  • https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
  • https://developer.apple.com/documentation/foundation/url/3988456-documentsdirectory

yo1995 avatar Sep 01 '23 18:09 yo1995

Screen Shot 2023-09-05 at 16 27 47

I ran the sample that you describe [offline download directory](https://github.com/Esri/arcgis-maps-sdk-swift-samples/blob/v.next/Shared/Samples/Generate%20offline%20map/GenerateOfflineMapView.swift#L206) l

But I can't understand what it is.

shinriyo avatar Sep 05 '23 07:09 shinriyo

I ran the sample that you describe offline download directory But I can't understand what it is.

Please read the instructions in the main README to set up an API key. When exporting an offline map using an Esri basemap service, you'll need an API key to get the tiles.

This sample uses the default generate offline map parameters which set the continuesOnErrors property to true. Therefore, the task proceeded even with the error, and the output in your screenshot is incomplete.

yo1995 avatar Sep 05 '23 18:09 yo1995

スクリーンショット 2023-09-06 16 18 20 I can't create key. Should I pay for the key? So, I can't try just sample.

shinriyo avatar Sep 06 '23 07:09 shinriyo

I can't create key. Should I pay for the key? So, I can't try just sample.

Please see the limitations of different account types. Did you follow the instructions in the root README and sign up for a developer account from the developer website?

Todo: improve the design doc and README in this repo to make it clear that offline map may still be displayed even if there is an error during generation.

yo1995 avatar Sep 06 '23 18:09 yo1995