reload mmpk file internal error

429
4
03-07-2018 07:55 AM
weironglin1
New Contributor

I'm trying to keep the latest updated version of the mmpk file to my iOS app. Loading for the first time of that mmpk file is fine. After downloading the mmpk file using the network request and try to load the mmpk file, it fails and gives back an internal error. That happens only when the new mmpk with different size. Any suggestion or solution for this internal error message?

0 Kudos
4 Replies
DiveshGoyal
Esri Regular Contributor

Does the new mmpk you download have the same file name as the existing one and are you trying to overwrite the existing one on disk? If so, see if the old one is still being used by your app and if that is causing problems.

If the new mmpk has a different file name, then make sure that it is getting downloaded correctly and not getting corrupted because of a network interruption. 

Also, if you can provide the error details it might have some clues

weironglin1
New Contributor

Thanks, Divesh. The app has a checkForUpdate function to check for file update every 5 minutes, if there is a newer version, then I'm trying to delete the old file and replacing it with the new MMPK file. then load it into the map view. But I got an internal error message whenever the new MMPK is smaller than the older file.Is that a memory allocation issue? I only get an internal error from the load completion function, and I don't know what exactly is that mean.

0 Kudos
weironglin1
New Contributor

I found the issue, The file is not 100% download during the download process, that might cause the app gives an internal error. Thanks for your help.

0 Kudos
weironglin1
New Contributor

Previously, I thought it's the file incomplete issue, but it seems that is a memory problem.The below code is the popups are contained popups item and even I call dismiss to close up the popup window and reload the file, it throws an internal error. But if the popups are an empty array the mmpk file reloads successfully. Also, I try to call the clearAllPopups() to clean up the popups the app is crash. Any idea why the self?.popupsVC = nil is not working?

  self?.popupsVC = AGSPopupsViewController(popups:popups, containerStyle: .navigationBar)

0 Kudos