Mail can't open some .zip files although a handler app is installed

Originator:simon
Number:rdar://12330955 Date Originated:19/9/2012
Status:Open Resolved:
Product:iPhone SDK Product Version:iOS 6.0
Classification:Serious Bug Reproducible:Always
 
NOTE: This appears to be a regression to the behaviour reported in bug report #12005271

Summary:

Zippity (http://itunes.apple.com/gb/app/zippity/id513855390?ls=1&mt=8) is an app for opening Zip files (also gzip, bzip2 and tar files). It registers itself as a default handler for the following UTIs:

com.pkware.zip-archive
org.gnu.gnu-zip-archive
org.gnu.gnu-zip-tar-archive
public.bzip2-archive
public.tar-archive
public.tar-bzip2-archive
public.zip-archive

When a file with a .zip file extension is received by email the user can tap the file attachment icon and choose "Open in Zippity" to open the zip file.

In iOS 6 this doesn't always work. Zippity is offered as a handler for some zip files received by email but not others.

I've attached the source for a simple demo app (ZipOpener) that illustrates the problem. I've also attached the raw message source of a message with two zip files, one of which exhibits the problem and one of which doesn't.

Steps to Reproduce:

- Install the attached demo app (ZipOpener) on a device running iOS 6
- Mail yourself a copy of the attached email 
- Open the email and tap the file attachments

Expected Results:

You should be prompted to open the files in ZipOpener

Actual Results:

ZipOpener is not offered as an option for Markdown_1.0.1.zip

Regression:

This worked fine in iOS 5. It was broken in iOS 6 beta 3 (See bug report 12005271), and appeared to be fixed in iOS 6 beta 4.

I don't know if it worked in earlier iOS 6 betas, I didn't test them I'm afraid.

Notes:

I'm unclear which UTI should be used for zip files. public.zip-archive and com.pkware.zip-archive both exist. The documentation at https://developer.apple.com/library/ios/#documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1 says the correct UTI is com.pkware.zip-archive, but UTTypeCreateAllIdentifiersForTag(kUTTagClassFilenameExtension, "zip", nil) returns only public.zip-archive. In any case, adding com.pkware.zip-archive to Zippity's UTI list doesn't solve the problem.

04-Dec-2012 09:32 AM Simon Whitaker:
Problem still exists in iOS 6.1 beta 3

Note: I've figured out the conditions under which the bug occurs. If the zip file has a dot in its filename (e.g. Foobar_1.2.zip) then Mail offers up a URL that excludes the file extension and has a UTI of public.data. Since my app (correctly) doesn't register itself for that UTI, it isn't being included in the list of handler apps offered to the user.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!