Question

I am trying to open a file present on my box cloud in UIWebView. For this purpose, I tried to load the webView with [[boxItem.rawResponseJSON objectForKey:@"shared_link"] objectForKey:@"download_url"] as well as [[boxItem.rawResponseJSON objectForKey:@"shared_link"] objectForKey:@"url"]. With this or any other approach it is sending me the authentication challenge and not allowing me to show the file in webView.

I did some analysis on web, isn't there any way to show box file in UIWebView, other than downloading the file in local cache and showing from there?

Était-ce utile?

La solution

There are two approaches for presenting a Box file in UIWebView: 1) Use Box View API for presenting the API. 2) Use Box Content API and download a file in Bundle/Document's(local) and the present it in UIWebView.

Here is a tut for using BoxView: http://developers.box.com/viewing-your-first-document/

Login to developer.Box.com first and then u can have access to the link.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top