I'm building an iOS app using .Net MAUI in Visual Studio 2022 for Mac and Xcode 16.2. My existing provisioning profile for an app was about to expire. So, I did install a renewed version of the profile. However, Visual Studio fails to detect it and throws this error "No matching profiles found" when I try to build the app.
I've checked if the renewed profile is valid and have verified the App ID and expiration date. I also tried reinstalling Visual Studio but the issue persists.
Interestingly, I have some other iOS apps whose profiles were installed before and Visual Studio can recognise those just fine. The issue seems to be only with the new profiles I'm installing.
This issue is happening because Xcode 16 changed the default location where provisioning profiles are installed. Visual Studio is still looking at the old path, so it fails to detect the newly installed profiles.
• Before Xcode 16, provisioning profiles were stored in:
~/Library/MobileDevice/Provisioning Profiles
• Xcode 16 moved them to:
~/Library/Developer/Xcode/UserData/Provisioning Profiles
So, whenever I try to install the renewed profile, its getting installed in the new location. To fix this, you can create a symlink that redirects Visual Studio to the new profile location.
Steps:
Quit Xcode before proceeding.
Be sure your folder ~/Library/MobileDevice is totally empty, without a folder.
Open Terminal and run the following command.
ln -s ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles ~/Library/MobileDevice
Restart Visual Studio and try building your app again.
This command ensures that provisioning profiles stored in Xcode’s directory are also accessible under ~/Library/MobileDevice, making them available to other tools and processes that expect them there.
Alternatively, If you don’t want to use a symlink, you can also manually copy profiles from the new location to the old one. Again, ensure Xcode is closed while doing this else it would auto delete the copied profiles.
Hope this helps!