I am using latest Wikitude SDK 3.3.1 but I found some issues of captureScreen Method.
1) If I use custom path, the image can be saved (APP Documents folder). However,when I try to read the image, the APP crashed.
Below is my environment.
Titanium Studio, build: 3.2.3.201404181442
Titanium SDK 3.2.3GA
iOS version : 7.1.1
2) When new photo is taken, it can not replace old photo. There is an Alert saying "The operation couldn't be completed. (Cocoa error 516)"
The function works in Xcode though, but not in Titanium module.
Thank you,
A
Andreas Schacherbauer
said
about 9 years ago
Hi Johnny! 1) Which Module are you using to open the image from the app bundle? Is it a Titanium Module or a 3rd party Module? Can you open the image with a tool like iExplorer?
2) You have to give each image a new name. The Module is set up to not override existing images. If you specifically need to disable this functionality, please send a mail to ios-sdk@wikitude.com.
Best regards
Andreas
J
Johnny Smith
said
about 9 years ago
Dear Andreas,
Regarding issue 1, I am using native Titanium function to read out the image. And Yes. iExporer can open the image.
Right now I can't test your code, but just a few thoughts:
1) Titanium.Filesystem.applicationDataDirectory: Where does this directory is supposed to be in the app bundle? The Wikitude SDK will save the file into the App Sandbox 'Documents' directory. So make sure that Titanium is looking into the correct directory.
2) Add a try/catch block to capture any Titanium.Filesystem errors. They are likely throwing an exception why they cannot open the file.
I will try it out myself asap and provide you more information.
Best regards
Andreas
J
Johnny Smith
said
about 9 years ago
Hi Andreas
The issue is solved.
The workaround is to call Titanium.Filesystem.getFile outside onSuccess.
Johnny Smith