Hello, Is it possible to load a LOCAL pdf in safari from an iOS project? I tried to load it with Application.OpenURL(file:///...../myFile.pdf) but it has no effect. I think it's for security, but I can load a local html in Android, then why not in iOS? Joel
Unity has no PDF importing or rendering, so there's not really anything you can do with it anyway. (Short of writing your own importer.) --Eric
What I want is to press a button inside unity app on ios and run safari with a local pdf. I can run safari with online pdf from ios device and I can run the browser with local html from Android (not tested with pdf). I think this should be possible with OpenURL, because it's possible in MAC OS X. Joel
but thats because on osx the pdf file might have setup this relation ship on iOS there is no default app for PDF actually, that opens as the os itself does not have a viewer. The "official pdf viewer" would be iBooks, but thats not granted to be present (not even on new devices). What you optimally would do is implement a small overlay view that just loads the pdf as pdf support is present in cocoa touch.
On iOS there is no default app for PDF, ok, but I want to use safari to open the pdf. I can open safari with my unity app and load an online pdf, for example: Application.OpenURL("http://download.unity3d.com/support/resources/files/3DPlatformTutorial.pdf") --> it works as I want because it lauches safari with the desired pdf But I want to load a local pdf, I want the same behaviour with local files, but that doesn't works: Application.OpenURL("file://" + Application.dataPath + "/Raw/myFile.pdf"); Debug: file:///var/mobile/Applications/906956AE-AD40-402E-B4D9-BBD96F3ACAA2/SolerPalau.app/Data/Raw/myFile.pdf ...so the file exists, but safari isn't launched :_( Joel
Thats access security. Applications can not access local data of other applications, only their own. But you can easily integrate a webview overlay into your app (there are a few plugins and free solutions for that) which does that cause its then your application and that one can access your files.
@dreamora: I am trying to do the same thing with a PDF. Could you please direct us to the plugins and free solutions that would be easy to integrate? I am not familiar with iOS development outside of Unity.
@gfoxworthy: I found a solution. You can use the Native Toolkit from Prime31 (free plugin). Use the function: public static void activateUIWithController( string controllerName )