Closed jervaughan closed 4 years ago
@JerVaughan Can you please try the sample application which is part of this repo and see if you have problems there as well?
Hi SimonSimCity,
Yes, the sample application appears to work fine with iOS. I added the following to AppDelegate.cs, and I can see the files in the ~/Library/Developer/CoreSimulator/.../Documents/ folder on my brand new Mac Mini when running the iOS Simulator (iPhone iOS 13.7).
If I'm specifying "Environment.SpecialFolder.MyDocuments" as the PathNameForDownloadedFile, then where should I expect to see the downloaded files when I use my iPad Mini (i.e. a physical device, not iOS Simulator)?
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
CrossDownloadManager.Current.PathNameForDownloadedFile = new System.Func<IDownloadFile, string>(file => {
string fileName = (new NSUrl(file.Url, false)).LastPathComponent;
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), fileName);
});
return true;
}
FYI... I can also see the downloaded file when running the iOS Simulator on my real app too, so it is working. The sample app helped me locate where to find the files on my Mac Mini that's connected to Visual Studio.
I think I'm just confused as to where to locate the files once the IPA is distributed/installed & files are downloaded on real devices.
Additional followup... I can also see the file on my iPad Mini if it's connected to iTunes on my PC after adding the following to Info.plist:
<key>UIFileSharingEnabled</key>
<true />
So I'm getting closer, but my goal is to be able to see the downloaded file in the "Files" app on my iPad... preferably in the "On My iPad" browsing section.
Ok, this is a different topic which you'd have to look up yourself - I haven't looked into this yet. As far as I know, the iOS internal download manager downloads the file into an app internal space, but how to move it from there to another place is something I don't known how to do.
Wish you all the best. Feel free to post the solution here once you found it.
Closing this issue because the request now is out of scope of this package.
Simon,
Please take a look at this link, particularly the section in the screenshot below. Since iOS 11, you can add the following to get the app’s documents to display in the “Files” app:
<true />"
https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/file-system
[cid:image001.png@01D68C33.96E24400]
Thanks! Jeremy Vaughan Software Engineer 610.390.6860 | jeremyv@geninf.commailto:jeremyv@geninf.com [cid:image002.png@01D68C33.96E24400] ONE SMART WAY, BATON ROUGE, LA
From: Simon Schick notifications@github.com Sent: Wednesday, September 16, 2020 12:57 PM To: SimonSimCity/Xamarin-CrossDownloadManager Xamarin-CrossDownloadManager@noreply.github.com Cc: Jeremy P. Vaughan jeremyv@geninf.com; Mention mention@noreply.github.com Subject: Re: [SimonSimCity/Xamarin-CrossDownloadManager] Can't Get CrossDownloadManager to Work on iOS! (#126)
Closed #126https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/issues/126.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SimonSimCity/Xamarin-CrossDownloadManager/issues/126#event-3774186007, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP7YPIML4X6GEUIMPXANVFLSGDU6LANCNFSM4RNRWBEQ.
Simon, Please take a look at this link, particularly the section in the screenshot below. Since iOS 11, you can add the following to get the app’s documents to display in the “Files” app:
LSSupportsOpeningDocumentsInPlace " https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/file-system [cid:image001.png@01D68C33.96E24400] Thanks! Jeremy Vaughan Software Engineer 610.390.6860 | jeremyv@geninf.commailto:jeremyv@geninf.com [cid:image002.png@01D68C33.96E24400] ONE SMART WAY, BATON ROUGE, LA From: Simon Schick notifications@github.com Sent: Wednesday, September 16, 2020 12:57 PM To: SimonSimCity/Xamarin-CrossDownloadManager Xamarin-CrossDownloadManager@noreply.github.com Cc: Jeremy P. Vaughan jeremyv@geninf.com; Mention mention@noreply.github.com Subject: Re: [SimonSimCity/Xamarin-CrossDownloadManager] Can't Get CrossDownloadManager to Work on iOS! (#126) Closed #126<#126>. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#126 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP7YPIML4X6GEUIMPXANVFLSGDU6LANCNFSM4RNRWBEQ.
Hi @JerVaughan . Could you tell me if you get CrossDownloadManager to Work on iOS?. If so, could you tell me how you did it?
I am having major issues getting CrossDownloadManager to initiate for a Xamarin iOS project. The Android version of the project works fine.
When debugging with the simulator I did have an error trying to access files on a HTTP site, so I added entries for NSAppTransportSecurity to my Info.plist. This fixed the issue and allowed threads to start, but nothing is being downloaded and the threads never seem to complete.
Does the Deployment Target need to be a specific version? I feel like I've checked everything else per the documentation & reading through previous issues.
AppDeletegate.cs
PCL code (works fine on Android, does execute on iOS but doesn't do anything... even tried a public HTTPS file as shown below)
Platform:
Device: