I have let's say 5 text files in my Xamarin Forms iOS project under:
Project Name -> Resources -> TextFiles -> File1.txt, File2.txt, File3.txt, File4.txt, File5.txt
Upon launching my app I copy the files to a working folder via NSBundle.GetPathsForResources()
from where I can start to use them.
public string GetWorkingFolder()
{
string docs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
return Path.Combine(docs, "..", "Library");
}
For release I have decided I no longer need the last 3 files, so I removed them from the Project Name -> Resources -> TextFiles project folder.
This works fine when running the app on my iphone in debug mode, only File1.txt and File2.txt remain.
When I upload the app into App Connect though and deploy it through TestFlight on my device, the 5 files are still there.
I have tried the following:
- deleted the files via my app in the working Library folder above
- uninstalled the app
- reinstalled the app
The 5 files return, which proves they are coming from the TestFlight package and not from a cached Library folder.
What is going on here? Even if the files were not deleted from the Library folder by myself, shouldn't uninstalling the app automatically remove those folders and files? How can I remove them from my package?
Any ideas?