Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Apple iPhone/iPad/iPod

Open Pdf from Shiva

iOS Development and xCode questions

Open Pdf from Shiva

Postby Raerk » 02 Jun 2012, 13:26

Hi,

I would know if it's possible to open a pdf from shiva (by add the pdf in the UAT for after read it in the player of ios) ? i try it on window by the function system.openurl() and no problem but when i try it under ios it doesn't work...
xcode saids :
Code: Select all
Sat Jun  2 14:48:57 unknown TestFunction[243] <Warning>: play pdf
Sat Jun  2 14:48:57 unknown TestFunction[243] <Warning>: CheckCacheHeader failed due to LastModified field :  -  Mon, 16 Apr 2012 21:27:13 GMT
Sat Jun  2 14:48:58 unknown SCHelper[54] <Notice>: active (but IDLE) sessions
Sat Jun  2 14:48:58 unknown SCHelper[54] <Notice>:   0x11a950 {port = 0x1d03, caller = SpringBoard(24):com.apple.preferences, path = /Library/Preferences/SystemConfiguration/preferences.plist}
Sat Jun  2 14:49:00 unknown sandboxd[245] <Notice>: TestFunction(243) deny process-fork
Sat Jun  2 14:49:12 unknown sandboxd[245] <Notice>: TestFunction(243) deny process-fork

The only other method i found is to use system.openurl() with the pass of an online pdf... but i need to store the pdf in the app (the app must be work in offline )
Please, someone have an idea? is there an other method for do this?

Thanks,

Raerk.
Raerk
Gold Boarder
Gold Boarder
 
Posts: 171
Location: lille - france

Re: Open Pdf from Shiva

Postby Raerk » 03 Jun 2012, 11:54

i search on the web and made some tests with an ipad and it seems that it's impossible to save a pdf from internet to the ipad without passed by an other app (like office app) ...
So how game app made for read pdf? it isn't possible do to this?
anyone have an idea please?
I just need to put pdf in the app and read it :roll:
thanks
Raerk
Gold Boarder
Gold Boarder
 
Posts: 171
Location: lille - france

Re: Open Pdf from Shiva

Postby Shando69 » 03 Jun 2012, 21:03

Hi Raerk,

Take a look here (about 2/3 of the way down):

http://www.stonetrip.com/developer/forum/viewtopic.php?f=27&t=23714&p=44807&hilit=openurl#p44807

It should be something like:

Code: Select all
system.openURL ( " file:"..system.getHomeDirectory ( ).."/Documents/email.jpg", "") 


I think this was for WebOS, but I'm sure you can work out the equivalent :wink:

Regards

Shando
Love Hope Strength

Further details: http://www.lovehopestrength.co.uk/

One Cancer Centre in every Country, One Concert at a Time
User avatar
Shando69
Gold Boarder
Gold Boarder
 
Posts: 302
Location: Sunshine Coast, QLD, Australia

Re: Open Pdf from Shiva

Postby Raerk » 03 Jun 2012, 23:29

thanks shando,
during my last test i try this :
Code: Select all
system.openURL("file://" ..system.gethomedirectory() .."/test.pdf"

it seem that it's necessary to add a space before file and add documents/ before the name of the pdf ... i will try it tomorow and say you the result
thanks
Raerk
Gold Boarder
Gold Boarder
 
Posts: 171
Location: lille - france

Re: Open Pdf from Shiva

Postby Raerk » 04 Jun 2012, 18:37

I made others test with your help but it doesn't work ... :roll:
i put in the UAT my ressources (at the first screen add) and i use your code but it doesn't work
I test it with a pdf and a jpg
Everyone have an idea please?

Thanks.
Raerk
Gold Boarder
Gold Boarder
 
Posts: 171
Location: lille - france


Return to Apple iPhone/iPad/iPod