[ad_1]
Making an attempt to get my App to work on iOS now – and wow! That is means tougher than I assumed.
OK, So I’ve a filepicker that picks a file. fairly easy (code under.) . With iOs. The file picker dialog opens, and I can click on the file I would like , however nothing occurs – till I hit cancel, then the code continues to run… (pickresult != null).. it’s null – code stops…
https://pictures.app.goo.gl/fGD5SPtCqdMYE8AS7
var customFileType =
new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>>
{
{ DevicePlatform.iOS, new[] { "com.microsoft.phrase.doc" } }, // or basic UTType values
{ DevicePlatform.Android, new[] { "software/doc" } },
{ DevicePlatform.UWP, new[] { ".doc" } },
{ DevicePlatform.Tizen, new[] { "*/*" } },
{ DevicePlatform.macOS, new[] { "doc" } }, // or basic UTType values
});
string OutupPath;
var pickResult = await FilePicker.PickAsync(new PickOptions
{
FileTypes = customFileType,
PickerTitle = "Choose Doc File"
}) ;
if (pickResult != null)
{
OutupPath = pickResult.FullPath.ToString();
App.docFilePath = OutupPath;
LoadingText = pickResult.FileName.ToString();
DbFileName = LoadingText;
}
else {
return;
}
Word – I’m creating on Win10 vs 2022. And I’m new to iOs. I simply bought my apple dev account up and operating. The Android model and Home windows model of this work flawlessly.
Unsure the place I needs to be seeking to clear up this glitch.
[ad_2]