10.4 C
Tuesday, December 19, 2023

c# – NetMaui – iOS – Couldn’t discover part of the trail ‘/var/cellular/Containers/Knowledge/Utility/

Extra of an FYI than a query as I am positive others have discovered this and there’s no point out of it anyplace I can see:

Background: Utilizing NetMaui to construct an Android / iOS app. Testing iOS model of app utilizing two strategies:

Technique 1: iPhone plugged into home windows machine, working as Native System.

Technique 2: iPhone plugged into Mac, working paired to home windows machine, so working as distant system.

Utilizing two completely different strategies as a result of sometimes get completely different outcomes, i.e. App Badge does not show appropriately in home windows native mode, however does in distant mode, so use each strategies to trace precise points and IDE / implementation points).

Drawback: When switching between strategies, any pictures saved to native storage develop into unreachable, when trying to load a picture (var imageBytes = await File.ReadAllBytesAsync(imageUri)) it throws an exception: Couldn't discover part of the trail '/var/cellular/Containers/Knowledge/Utility/5DB9D25D-4572-4EB8-B1A2-012E44E64E86/Library/IMAGES/...

Resolution: None actually. All of it works high quality up till you run through a distinct methodology, at which level all beforehand saved information develop into unreachable and this isn’t recoverable i.e. switching again to different methodology does not restore accessbility, these information at the moment are fully unreachable eternally. Recordsdata then added utilizing the present methodology are high quality and proceed to be till the tactic is switched once more. Now that I do know that is the trigger, I am probably not anxious as it would possible solely be a testing subject. However i am positive there’s another person on the market pulling their hair out attempting to determine this out, so I assumed I might share.

  1. Checked all file paths,

  2. Checked Listing permissions,

  3. Iterated over storage to verify information nonetheless exist in right location

  4. Checked for identified points

  5. Checked all libraries and dependancies updated

  6. Cleans, Recompiles, Reboots, App deletion and reinstall

Recordsdata which are within the utility listing ought to be accessbile

Latest news
Related news


Please enter your comment!
Please enter your name here