Hi,
when using FileChooser and using the native Document browser on iOS to open a file, opening the result with a FileInputStream fails.
The error message from FileInputStream contains the message Operation not permitted.
I have iCloud enabled in Projucer, I’m using a Provisioning Profile that has iCloud permissions, and I have an iCloud container setup and allow iCloud Documents access. Am I missing anything?
This fails on an image file. When I open a .xml through FileChooser however and opening it with XmlDocument::parse() I have no problems and it opens as expected. XmlDocument opens an InputStream on the file internally, so is basically doing the same thing as I’m doing in my FileInputStream, but with an image selected it fails, as opposed to doing the same thing with a xml File.
Any ideas what’s going on here?
TLDR:
Why does this fail with error Operation not permitted
void loadImageFile(const File &f) //f is image file selected with native iOS document browser, path is valid { std::unique_ptr<FileInputStream> inputStream ( f.createInputStream() ); }
And this doesn’t:
void loadXmlFile(const File &f) //f is xml file selected with native iOS document browser, path is valid { auto xml = XmlDocument::parse(f); }
