Reputation: 1115
I get this error when I want to deploy Xamarin.Forms iOS app in my device:
Deploy Error: Could not install the application 'C:\Users\{myuser}\AppData\Local\Temp\Xamarin\HotRestart\Signing\{MyApp}.iOS.app\out\{MyApp}.iOS.ipa' on the device {My iPhone}. Details: ApplicationVerificationFailed({10 digits number}) - Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.OzsrZN/extracted/Payload/{MyApp}.iOS.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
2>Deploy failed. The app '{MyApp}.iOS.app' could not be deployed to the device '{My iPhone}'. Please check the logs for more details.
I'm using Visual Studio Professional 2019 Version 16.11.3 on Windows 10 Pro laptop. One month earlier I didn't have problems to deploy the app. My company (developer account) and my (individual account) certificates expired, so I created a new ones (development and distribution) and installed them in the macbook I use to pair with Visual Studio. Then I created provisioning profiles (development and distribution). I think that I installed the profiles using Xcode in the macbook.
In iOS project properties > iOS Bundle Signing > Bundle Signing > Scheme: Automatic Provisioning is selected. I have selected the only team I have (with my company name in it). In Custom Entitlements I have Entitlements.plist
file.
As the error I get is about provisioning profiles I think that something is wrong with the provisioning profiles. How can I check if everything is correct in apple accounts o in the macbook?
Edit for additional information:
I have 5 provisioning profiles in Apple account > Certificates, Identifiers & Profiles > Profiles:
I realized that I have 2 provisioning profiles that I didn't create and start with "VS:". And it seems that this is which is used by Visual Studio.
In Visual Studio , when I change Bundle Signing Scheme from Automatic to Manual, and again to Automatic and then select the team, Visual Studio downloads the profiles. Xamarin output window:
Resolving certificate...
Fetching valid and locally installed signing identities...
Syncing certificates for "MY COMPANY NAME" team...
Saving Apple Development certificates...
Syncing App IDs for "MY COMPANY NAME" team...
Your application is using entitlements not supported by wildcard App IDs...
* com.apple.developer.networking.wifi-info
Making sure that connected devices are registered in "MY COMPANY NAME" team...
Trying to find App IDs matching iOS platform and com.mycompanyname.myapp...
Syncing devices for "MY COMPANY NAME" team...
Processing ios devices...
Syncing provisioning profiles for "MY COMPANY NAME" team...
Saving iOS profiles...
Fetching additional data about profile's certificates and devices for VS: com.mycompanyname.myapp Development...
Downloading the list of devices and certificates for VS: com.mycompanyname.myapp Development...
Running update request for VS: com.mycompanyname.myapp Development...
Downloading provisioning profile: VS: com.mycompanyname.myapp Development...
Saving provisioning profile: VS: com.mycompanyname.myapp Development...
Is this profile a valid one?
The provisioning profiles are created using my individual account, should I create them using developer program account?
Upvotes: 1
Views: 5167
Reputation: 1638
Sometimes, This error occurs with my visual studio also, even though with valid provisioning profile. I follow below steps to resolve this issue.
Create sample Native Swift Application in XCode
with this same profile/certificate
, and try to deploy. If any issues with profile, it will throw proper error message or it will pull the necessary information and deploy into the device.
Then don't delete the application, instead, deploy your visual studio app to device. if you have any issues, please compare the Entitlement.plist
and info.plist
.
This is my way to find the exact issue.
Note: Check Certificate didn't expired and The device UDID is update in the device portal.
Upvotes: 0
Reputation: 1370
If you have recently upgraded from Visual Studio 2019 to Visual Studio 2022 then you may have stumbled into the same issue as me
TLDR: The steps are to re-install Visual Studio 2019, then upgrade to Visual Studio 2022 (without enabling any iOS SDK checkboxes in the upgrade wizard), then launch Visual Studio 2022 and upgrade those iOS SDKs through ‘Visual Studio’ > ‘Check for updates…’ instead.
Upvotes: 0
Reputation: 138
Upvotes: 0
Reputation: 1686
You could clean the prodfile in your mac, and delete the certificate in the Keychain(The blue file in the keychain), then re-created the profile.
if you use Xcode
You can also refer to this link(https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/) to check if there is a problem with your configuration process.
Upvotes: 0
Reputation: 78
Automatic provisioning gives errors like this at times.
Upvotes: 0