AnsweredAssumed Answered

AppStudio FileInfo Not Working on iOS 12

Question asked by on Mar 28, 2019
Latest reply on Mar 28, 2019 by SQuan-esristaff

I am testing my AppStudio 3.3 beta app on a 6th Gen iPad running iOS 12. In my code I am trying to access a file using the AppFramework.FileInfo object to verify that the file exists and then read its size. However, the code that works on Windows does not work on iOS. Here is my code:

function checkFile(filePath) {
   var fileInfo = Qt.createQmlObject('import ArcGIS.AppFramework 1.0; FileInfo { filePath: "' + filePath + '" }', app);

   console.log('File Exists?', fileInfo.exists, 'File Size?', fileInfo.size)


When my code runs on a file path like "var/mobile/Containers/Data/Application/F343D1DB-5FBC-488C-919A-6A6893944420/Documents/img_0050.jpg" I get the output "File Exists? false File Size? 0" in iOS. When I list the files in "var/mobile/Containers/Data/Application/F343D1DB-5FBC-488C-919A-6A6893944420/Documents" to the console using the FileFolder object I can see that img_0050.jpg is there but even the FileFolder.exists() method returns false. How can I fix this?