ZipReader can't open file on iPad

740
3
Jump to solution
10-10-2019 10:24 AM
KeithLarson1
MVP

Hello,

I am trying to open a .zip file that is stored as an attachment to a feature. I give the ZipReaser object the path to the attachment, then call zipReader.refresh(), and then I check the number of files with if (zipReader.fileNames.length > 0) ... It is when I try to get the list of filenames, I get an error that says the zip file is not open and then it prints the correct path to the zip file.

I am running my app through AppStudio Player on an iPad, but running the same app on AppStudio Player on multiple windows machines, the ZipReader is able to open the file. Does ZipReader not work on iOS? Any help would be appreciated.

Thanks,

Keith

0 Kudos
1 Solution

Accepted Solutions
ErwinSoekianto
Esri Regular Contributor

Keith,

I just tested this on iPad Pro (9.7-inch) with iOS 13.1.2, running AppStudio Player 4.0.20 and we can not reproduce this issue. 

Can you give us more information about the specific iPad you tested? 

Also, we created an app to test this and it is shared publicly, it is called "ZipReader Test", you can search for this app in AppStudio Player and test it on the iPad, and let me know what you find. 

Search "ZipReader Test" on Public apps

Run the "ZipReader Test" app then click on "Click to Extract Zip File"

Thank you,

Erwin

View solution in original post

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor

Keith,

I just tested this on iPad Pro (9.7-inch) with iOS 13.1.2, running AppStudio Player 4.0.20 and we can not reproduce this issue. 

Can you give us more information about the specific iPad you tested? 

Also, we created an app to test this and it is shared publicly, it is called "ZipReader Test", you can search for this app in AppStudio Player and test it on the iPad, and let me know what you find. 

Search "ZipReader Test" on Public apps

Run the "ZipReader Test" app then click on "Click to Extract Zip File"

Thank you,

Erwin

0 Kudos
KeithLarson1
MVP

Hey Erwin,

Thanks for your response and the sample. I ran the sample on the same iPad and it works. However, I now know how to get around the unzipping issue. My app is crossplatform and the contents of the zip file are only really necessary to open in an external application which is only supported on windows, so I will move the unzipping code into the button that opens the file.

The iPad model is A1475, which is an older model from 2013. It is running iOS 11.1.2. Perhaps there is an issue with the file that I'm trying to open or the compression of the zip file, but at least I have a workaround.

Thanks again!

Keith

0 Kudos
ErwinSoekianto
Esri Regular Contributor

Glad to hear that there is a workaround!

The code for the sample can also be downloaded if you search the sample app from AppStudio Desktop if you are interested. 

0 Kudos