My app can download file by getting the url, but the thing is, how to point the downloaded file into iPhone Files app. I try below code, it run smoothly without any error, but I dont know wheres the downloaded file located. I believe many developers facing the same issue for ios.
string pathToNewFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), folder);
Directory.CreateDirectory(pathToNewFolder);
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
string pathToNewFile = Path.Combine(pathToNewFolder, Path.GetFileName(url));
webClient.DownloadFileAsync(new Uri(url), pathToNewFile);
Environment.GetFolderPath(Environment.SpecialFolder.Personal) does not point to Files app. For image, SaveToPhotosAlbum method seems good and success, but now I want to download file such pdf/excel, etc.