Player Object Problem When App Wrapped for Mac Store
Posted: Wed May 25, 2016 3:10 pm
I have created a cool little app to allow users to tag, comment, and organize the content of a video stored on their computer. I store all of the program files in the user's documents folder in a folder the app creates called "VAT Program Files." These are just a bunch of text files that store the various information for each video that is analyzed, such as the name of the project, and the path to the video on the user's computer, and all of the user-entered data about the video.
I submitted this to the Mac App Store and they found a bug and rejected it. I need some help resolving this bug. I am using LiveCode 8.01, though the problem occurs even when using LiveCode 8.0 or LiveCode 7.0.6. I used AppWrapper 3 to wrap it with the necessary Apple certificates.
Before I describe the bug, it's important to know first that the app works just fine as a stand-alone. It also works fine if I wrap it for web site deployment. The problem only occurs if I wrap it for Mac App Store deployment. The key difference between these three scenarios is that only the Mac App Store deployment uses the Mac's sandbox area. That is, instead of putting the "VAT Program Files" folder in the typical user's documents folder, it puts it in the documents folder found in the app's sandbox (the path is "users > johnsmith > Library > Containers > com.nowhereroad.LloydVat"). (I'm using John Smith as a convenient alias.)
OK, here's the bug:
-I open the app and start a new project.
-The first thing I'm asked is to find a video to work on. I use the "answer file" command and it generates a path to the video stored on my computer, such as this:
/Users/johnsmith/Documents/Videos/beach.mp4
The path to this video is automatically stored and saved in one of the text files saved in the folder "VAT Program Files."
-All works great as I work on the Beach project during this initial session. The videos plays perfectly. I save everything and quit the program.
-I come back and work on the project again. I open the app and open the Beach project. The app finds the video (I have a script to check if it "is there," but nothing appears loaded into the player object. The duration of the movie is 0. I put in some script that asks the user to find the video again if the duration is 0. The user finds the exact same video again (using the same answer file strategy) and the exact same path to the video is generated as before. The video now plays fine. I store the newly found path (even though it is exactly the same as the previously stored path) and continue working on the Beach project. Again, the video plays fine for the duration of the session. I save all and quit the app.
-I come back to work on the project and I have the same problem.
Again, all during the above, the path to the video has remained the same:
/Users/johnsmith/Documents/Videos/beach.mp4
(I had this path update on the screen at every step as part of my troubleshooting.)
At first, I thought I had been using a relative path to the video that was thrown off by the fact that the Mac Store deployment version was using the documents folder in the sandbox, but that doesn't seem to be the case.
All of the symptoms seem to point to something going on with the Player object. It somehow needs to be "reset" with the path to the video.
In summary, I'm stuck while tantalizing close to getting this app into the Mac App Store.
Thanks in advance - Lloyd Rieber
I submitted this to the Mac App Store and they found a bug and rejected it. I need some help resolving this bug. I am using LiveCode 8.01, though the problem occurs even when using LiveCode 8.0 or LiveCode 7.0.6. I used AppWrapper 3 to wrap it with the necessary Apple certificates.
Before I describe the bug, it's important to know first that the app works just fine as a stand-alone. It also works fine if I wrap it for web site deployment. The problem only occurs if I wrap it for Mac App Store deployment. The key difference between these three scenarios is that only the Mac App Store deployment uses the Mac's sandbox area. That is, instead of putting the "VAT Program Files" folder in the typical user's documents folder, it puts it in the documents folder found in the app's sandbox (the path is "users > johnsmith > Library > Containers > com.nowhereroad.LloydVat"). (I'm using John Smith as a convenient alias.)
OK, here's the bug:
-I open the app and start a new project.
-The first thing I'm asked is to find a video to work on. I use the "answer file" command and it generates a path to the video stored on my computer, such as this:
/Users/johnsmith/Documents/Videos/beach.mp4
The path to this video is automatically stored and saved in one of the text files saved in the folder "VAT Program Files."
-All works great as I work on the Beach project during this initial session. The videos plays perfectly. I save everything and quit the program.
-I come back and work on the project again. I open the app and open the Beach project. The app finds the video (I have a script to check if it "is there," but nothing appears loaded into the player object. The duration of the movie is 0. I put in some script that asks the user to find the video again if the duration is 0. The user finds the exact same video again (using the same answer file strategy) and the exact same path to the video is generated as before. The video now plays fine. I store the newly found path (even though it is exactly the same as the previously stored path) and continue working on the Beach project. Again, the video plays fine for the duration of the session. I save all and quit the app.
-I come back to work on the project and I have the same problem.
Again, all during the above, the path to the video has remained the same:
/Users/johnsmith/Documents/Videos/beach.mp4
(I had this path update on the screen at every step as part of my troubleshooting.)
At first, I thought I had been using a relative path to the video that was thrown off by the fact that the Mac Store deployment version was using the documents folder in the sandbox, but that doesn't seem to be the case.
All of the symptoms seem to point to something going on with the Player object. It somehow needs to be "reset" with the path to the video.
In summary, I'm stuck while tantalizing close to getting this app into the Mac App Store.
Thanks in advance - Lloyd Rieber