Open app from url in Mobile safari fails with .zip extension
I have used the info in this great post How do I associate file types with an iPhone application? to get my app launching from Mail with both mydoc.foo and the compressed version mydoc.foo.zip which auto-magically decompresses into my apps sandbox.
I can open a url such as http://blah.com/shared/mydoc.foo into my app with Safari but when the url is http://blah.com/shared/mydoc.foo.zip I get the message Unable to open Document when I use the Open in MyApp button on the loaded page.
Im wondering what needs adding to my info.plist to get this particular URL workin开发者_高级运维g as Safari recognises my app as the receiver for this extension set and Mail behaves perfectly well.
Its not hitting the
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
delegate method.
Since you want to accept .zip files and the page you've linked accepts .gz files, make sure you've specified a com.pkware.zip-archive
UTI instead of org.gnu.gnu-zip-archive
.
精彩评论