Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top