I ask you all a suggestion.
I need to include some explanation videos in one of my application. That app is already submitted in the app store, so I can’t create an installer including the videos.
With ide script I can copy the movies inside the app bundle. And now here my question: how is the correct way to manage that movies once the app is built? The mac app store don’t allow the app to access files outside its container… Can my app read the movies when the user click on a help button if the movies are inside the bundle? How is the right way I can follow in this situation?
Manu thanks to all!
Can’t you embed the videos in the help file.
I’d like to don’t use a help, but only short videos to show how to do a simple thing…
In the compiler settings you can add a “build step => copy files”. In the build step choose “Destination folder” and drop your files from the Finder - Thats all. See Xojo documentation.
and Tutotial for playing movies: MoviePlayer.Play ( )
I have a similar case with a database file. I put it in the app’s resource folder and in the sandboxed version I copy the file out to SpecialFilder.ApplicationData. From there I can open it without sandbox complaining. To copy it out, I use this function:
[code]Function BinaryCopyFile(fSource As FolderItem, fTarget As FolderItem) As Boolean
Dim bs1 As BinaryStream
Dim bs2 As binaryStream
//make sure it exists before we try to read it
If fSource.exists Then
//open the folderitem as a binary file without write privelages
// To open with write privelages, use true instead of false
bs1 = BinaryStream.Open(fSource, False)
//create a binary file with the type of text (defined in the file types dialog)
bs2 = BinaryStream.Create(fTarget, True)
//make sure we have a binary stream to read from
If bs1 <> Nil And bs2 <> Nil Then
//read and write the whole binaryStream
//close the binaryStream
Catch exc as IOException
MsgBox "ERROR - failed to create the output file."