Open app from url in Mobile safari fails with .zip extension - objective-c

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 working 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.

Related

Submitting extension to Safari Extension Gallery

I've built a safari extension but it seems like a black box in terms of submitting to the Safari Extension Gallery. I've googled it and looked at the Apple documentation but there are still several points that are unclear to me:
1) Does Safari Extension Gallery host the extension (i.e. like Chrome Web Store) or do I need to self host?
2) In the submit form, it ask for the URL. So if Apple does self host, can I just upload the built extension package to dropbox and give the dropbox URL in the form?
3) After submitting to the Extension Gallery, how long does it take for it to be approved? I heard 2-3 weeks, which is ridic compared to the 5 mins Chrome approval!

Safari extension autoinstall

I want to host an extension on my own website
When user clicks a specific button on my site, extension should install automatically just like it does from Apple - Safari - Extension section https://extensions.apple.com
You cannot do that. Inline installation of extensions from 3rd party websites is not available on Safari.
You can however just download the extension yourself and open it programmatically.
Or
You can ask the user to download the extension and double click the extension from the downloads folder. However if you take this route you will need to have some UI to educate the user.

Get download URL from UIWebView for a media file

I'm building an app that comunicate with a Web Service and I'm trying to download files from it.
I found that, after sending an appropriate request to the server, if the link of the UIWebView contains "DownloadFolder", that's the correct download link; sending an async request with that url the download works well for files like .pdf .doc .xls and so on..
The problems came when i send a request for a media file like mp3 mov and so. The webview work well and display the player, but I can't get the url from the webview.
I also noticed that in the consolle is displayed a line like this:
setting movie path: http://xxx.xxx.xxx.xxx/WEBSERVER/DownloadFolder/NAMEOFWEBSERVER/ADMIN/FA29-12-2011-12-57-04-163pitorb45sluo0g455wwc3u55.mp3
That's the URL I want to use for the download. How can i get it from code?
Thanks in advance.

How to attach a file from ipad in your application?

I have developed an application in ipad, i want to browse a file from ipad and attach it to my apps..it should not be like e-mail attachment..am sorting out the code but am gettin code for only email attachment
The only files on the iPad your app will be allowed to browse are the files inside your app's sandbox or those accessed using a framework like the Assets Library Framework. As for "attaching a file to your apps", what do you mean by that? Can you clarify?

Magic URL to force a UIWebView to load in MobileSafari instead?

I've got an application which has been launched out in the world (so I can't change that version), and I've noticed that certain 3rd-party pages seem to fail when loaded in the native UIWebView, but work fine when loaded in the regular Mobile Safari browser. I know I can change the UIWebViewDelegate to send problematic URLs off to Mobile Safari next time I release (and I plan to), but I'm hoping there's some solution for the meantime.
Ideally, I'd like to be able to change the URL I send up from my server which ordinarily would just be loaded by the UIWebView so that it causes the UIWebView to refuse to load it and pass it off to Mobile Safari instead. Does anyone know if that is possible?
Unfortunately, if your app version is coded to load a URL inside a UIWebView instance, there isn't anyway to mimic sending that URL to UIApplication's openURL: instead.