the code works on iPhone… How do I make it work on Mac desktop ?
I can’t find system.TemporaryDirectory equivalent…
if platformType==“Mac OS X” then
path=system.pathForFile( “ContractView.pdf”, system.TemporaryDirectory )
else
path = system.pathForFile( “ContractView.pdf”, system.DocumentsDirectory )
end
local file = io.open( path, “w” )
file:write( thePdf )
io.close( file )
file = nil
rob
2
It appears to be:
/Users/YOURHOMEFOLDER/Library/Application Support/YOURAPPNAME/tmp
system.DocumentsDirectory is in:
/Users/YOURHOMEFOLDER/Library/Application Support/YOURAPPNAME/Documents
Rob
One way to get a definitive answer is to simply print the value of “path”:
print("path: ", path)
Which gets you:
Jul 27 12:31:45.679: testapp-tmpdir: path: /Users/username/Library/Application Support/testapp-tmpdir/tmp/ContractView.pdf
rob
5
It appears to be:
/Users/YOURHOMEFOLDER/Library/Application Support/YOURAPPNAME/tmp
system.DocumentsDirectory is in:
/Users/YOURHOMEFOLDER/Library/Application Support/YOURAPPNAME/Documents
Rob
One way to get a definitive answer is to simply print the value of “path”:
print("path: ", path)
Which gets you:
Jul 27 12:31:45.679: testapp-tmpdir: path: /Users/username/Library/Application Support/testapp-tmpdir/tmp/ContractView.pdf