Skip to content

Commit

Permalink
Updated to use Xcode 16's new provisioning profiles directory
Browse files Browse the repository at this point in the history
Starting with Xcode 16, the location of cached provisioning profiles
has moved from "~/Library/MobileDevice/Provisioning Profiles" to
"~/Library/Developer/Xcode/UserData/Provisioning Profiles"

Fixes xamarin/xamarin-macios#20771
  • Loading branch information
jstedfast committed Aug 9, 2024
1 parent 94c2c8c commit ce8955d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Xamarin.MacDev/MobileProvision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ static MobileProvision ()
if (Environment.OSVersion.Platform == PlatformID.MacOSX
|| Environment.OSVersion.Platform == PlatformID.Unix) {
string personal = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
ProfileDirectory = Path.Combine (personal, "Library", "MobileDevice", "Provisioning Profiles");

// Xcode >= 16.x uses ~/Library/Developer/Xcode/UserData/Provisioning Profiles
string profileDir = Path.Combine (personal, "Library", "Developer", "Xcode", "UserData", "Provisioning Profiles");

if (!Directory.Exists (profileDir)) {
// Xcode < 16.x uses ~/Library/MobileDevice/Provisioning Profiles
profileDir = Path.Combine (personal, "Library", "MobileDevice", "Provisioning Profiles");
}

ProfileDirectory = profileDir;
} else {
ProfileDirectory = Path.Combine (
Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData),
Expand Down

0 comments on commit ce8955d

Please sign in to comment.