Open file (works on WP but i'm searching the equivalent for iOS)

SimonDelliseSimonDellise BEMember ✭✭

Hi,

I want to open a file (from a byte array) on my Xamarin.forms app.
Files are specifics to each OS, so i've found how to do on Windows Phone but not on iOS.

Here's my WP code :

public async Task<string> Open (string filename)
{
    StorageFolder ISFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
    try {
        StorageFile ISFile = await ISFolder.GetFileAsync (filename);
        await Windows.System.Launcher.LaunchFileAsync (ISFile);
        string str = ISFile.Path;
        return str;
    } catch (Exception ex) {
        return null;
    }
    return null;
}

Someone knows the equivalent for iOS ?

Thank you in advance,
Simon

Posts

Sign In or Register to comment.