AS3 save file in accessible location on iOS
NickName:adamski68 Ask DateTime:2018-08-28T00:12:48

AS3 save file in accessible location on iOS

I have written an app that creates a text file that is then used to populate a document. It all works fine on Android and Windows - the text file saves to an accessible location and can be attached to an e-mail.

On iOS the story is different. I seem to be able to save (I think) the file into the application storage directory, by using the following code.

file1 = File.applicationStorageDirectory.resolvePath("data.txt");
var stream1:FileStream = new FileStream();
stream1.open(file1, FileMode.WRITE);
stream1.writeUTFBytes(string1+"\r\n"+string2);
stream1.close();

I say I think it saves, as my popup appears to tell me that the file is saved, so it is at least working through the code. With other directory references the button does nothing.

But I cannot find any way to then navigate to that folder so that I can attach it to an e-mail. I have tried different email clients, different file managers but nothing seems to work. I thought about saving to the iCloud or google Drive, but there does not seem to be the facility to do that in iOS11.

I am sure I cannot be the only person trying to share an app generated text data file through iOS, but I cannot find any ways to do it.

Any help much appreciated.

Copyright Notice:Content Author:「adamski68」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/52043245/as3-save-file-in-accessible-location-on-ios

Answers
adamski68 2018-09-02T17:42:55

After much searching, I discovered the Distriqt Message ANE that does exactly what I need.",


More about “AS3 save file in accessible location on iOS” related questions

AS3 save file in accessible location on iOS

I have written an app that creates a text file that is then used to populate a document. It all works fine on Android and Windows - the text file saves to an accessible location and can be attached...

Show Detail

Using AS3 to download a file from a server that isn't web accessible

I have managed to create an AS3 script that uses file.download(urlRequest); - this is working fine when referencing a location that is web accessible. Is it possible to get flash to reference a loc...

Show Detail

Download a file from a URL to a user accessible location

I am building an app using Nativescript/Angular 2 I want to be able to download a file from a URL and save it to the device in a location the average user would have no problems finding it. I beli...

Show Detail

How do I save files to a user accessible location?

I am writing an application that can import and export data and I need the path to this data to be accessible to the user, but not on the SDcard. I would prefer to put it somewhere alongside the

Show Detail

AS3 mp4 save file

I would like to save an mp4 file using AS3 to a user selected directory. mp4 is a big file and I would like to download a part of the file (for instance 10 sec) and save to local directory. Does a...

Show Detail

AS3 Save Media File to server

im not good with as3 and was wondering if someone could help me with this seeing as I cant find the answer on google. I currently have this fileReference.save(recorder.output, "recordedfile.w...

Show Detail

Download local file to new folder? as3

I've searched for hours no luck. I'm new to as3 and i can't figure this out. I have a swf and i want to click a button and for it to open a "save as" box (or something similar) and save a designated

Show Detail

How to save a pdf file in iPhone memory and make it accessible by pdf file opener applications using titanium

i am new bie to titanium in my app i need to download and save a pdf file in iOS using titanium and the downloaded file can be accessible by third party pdf viewer applications.any help to achieve ...

Show Detail

Is there code in AS3 save image in desktop

Are there any code or tutorial in AS3 that could save into Jpeg format into a specific file location. I have found many articles here in stackoverflow, but it is using php. Somehow, I have this one...

Show Detail

FLEX/AS3 - Save XML to new file?

I've got an XML file that I open and do some changes with inside my app, and I need to be able to save it out to a new file. Now I'm using this code to save it to the same file: var fs:FileStream...

Show Detail