0

请帮助我在 iPhone 上打开 txt 文件。

private async  Task ExecuteOpenFileCommandAsync()
    {
        Device.BeginInvokeOnMainThread(async () =>
        {
            var customFileType =
                new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>>
                {
                    { DevicePlatform.iOS, new[] { "blablabla" } },
                    { DevicePlatform.Android, new[] { "text/plain" } }
                });
            var options = new PickOptions
            {
                PickerTitle = "Please select a file",
                FileTypes = customFileType,
            };
            await PickAndShow(options);
        });
    }

我不知道,我需要写什么而不是“blablabla”

谢谢你。

4

1 回答 1

1

我发现答案“public.text”解决了这个问题。

于 2021-01-18T10:15:13.760 回答