Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/BenchmarkDotNet/Configs/DefaultConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,17 @@ public string ArtifactsPath
{
get
{
var root = OsDetector.IsAndroid() ?
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) :
Directory.GetCurrentDirectory();
string root;
if (OsDetector.IsAndroid() || OsDetector.IsIOS())
{
// On mobile platforms (Android, iOS, and Mac Catalyst), use a writable location
// because the app bundle and current directory are read-only due to sandboxing
root = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
}
else
{
root = Directory.GetCurrentDirectory();
}
return Path.Combine(root, "BenchmarkDotNet.Artifacts");
}
}
Expand Down