Visual Studio 2019 or 2022 doesn't recognize active provision profiles for Xamarin.iOS.
My activities to resolve the issue:
Removed bin and obj folder at Visual Studio Project.
Removed old profiles on Windows from here: %LOCALAPPDATA%\Xamarin\iOS\Provisioning\Profiles
Removed profiles on Mac OS:
~/Library/MobileDevice/Provisioning\ Profiles
Removed certificates from Keychain Access on Mac OS.
Created new certificates and provision profiles at Apple Developer site.
Download and install certificates and profiles for XCode
Created new project at MacOS with the same identifier like in Visual Studio project.
Open in Visual Studio my project and connecting to MacOS.
And I observe, that Visual studio not found Developer Profile and for Release mode set old removed profile.
The option with automatic preparing is not fit, because VS just create yet a new profile.
Are there any idia to resolve it?
I resolved the issue of updating provisioning profiles as follows:
For for Release profiles:
Clear all provisioning profiles under path ~/Library/MobileDevice/Provisioning Profiles
Add developer account in XCode:
XCode -> Preferences -> Accounts -> "+" -> AppleID
then click "Download Manual Profiles"
XCode -> File -> New -> Project -> App ->
Choose Team and check Bundle Identifier.
Bundle ID must be the same like in Visual Studio project in Info.plist.
<key>CFBundleIdentifier</key>
<string>com.your_identifier</string>
Set required profiles in XCode project:
Updated VS 2019 on Windows
Updated on Mac:
Xamarin.iOS: https://aka.ms/xvs/pkg/macios/15.0.0.18
Xamarin.Mono: https://aka.ms/xvs/pkg/mono/6.12.0.107
Restart Mac OS and Re-connected to Mac from Visual Studio.
Now Release profiles were updated in VS.
For Debug provision profile:
Developer profile was not recognized, and I choose "Automatic Provisioning" in Visual studio.
The project was successfully launched for debugging.
A very important problem remained - push notifications did not work in debug and release mode.
The problem was resolved when I removed Xamarin folder from cache on Mac OS:
~/Library/Caches/Xamarin
When I rebuilt the application, push messages began work in debug and release.
Here are all the steps you can try:
1.Modify the "Scheme" to "Automatic Provisioning" and check if it works.
2.Clear all provisioning profiles under path ~/Library/MobileDevice/Provisioning Profiles.
3.Check if the bundle ID in the Mac is consistent with the bundle ID of your project.
4.Follow the document Manual provisioning for Xamarin.iOS to create new profiles.
6.Update the VS to the latest.
5.If all the steps doesn't work, try to report a problem on Developer Community.
Related
I am trying to Publish my first App for IOS Distribution, on my Macbook Air using VS Studio for Mac V17.4.2 and XCode V14.2.
I have created and downloaded the certificates and provisioning profiles.
When I try the Archive for Publish on VS I get an error:
Could not find any provisioning profiles for project on IOS
When I look at the project Bundle Signing settings I get following screen:
The bundle identfier eg com.companyname.project is the same in project properties and provisioning profile.
The signing certificates for IOS Distribution are loaded into Xcode.
Can anyone please indicate to me as how to resolve the above error.
One thing I am not sure is where VS is looking for the provisioning profile file as it is currently in my downloads folder and I have clicked on.
Thanks
Have tried looking online but could not find any solution.
So my certificates recently expired, and I had to create new ones. I created both an Apple Development and an Apple Distribution certificate from Visual Studio and they both show up as valid and/or in keychain in Apple Developer, Visual Studio, and Xcode.
I of course updated the app's development and distribution profiles to use these new certificates and made sure to re-download them to my workstation.
The iOS component of the (Xamarin.Forms) app can deploy the Debug build to both a simulator and a real device. It can also deploy the Release build on simulators. Archiving a build for publishing also worked fine. It uploaded on TestFlight and was successfully installed by a tester.
The issue is only with deploying a Release build to my test device. The Release build has been deployed successfully to this same device before, so I am very unclear as to what has happened.
The bundle signing identity and provisioning profile were set to automatic as recommended. To make sure the bundle was using the correct profile, I set them instead to the expected/correct distribution identity and profile, and the deployment still fails.
The app did use to have an iOS Distribution certificate, but that seems to have been replaced by Apple Distribution as far as I can tell. I see that iOS * certificates can still be created on Apple Developer, but they're not listed as options when creating certificates from Xcode or Visual Studio for Mac. I did try pointing the provisioning profile to an iOS Distribution certificate created online, and it still did not work.
I've also restarted Visual Studio, Xcode, the iPhone device, and my Mac workstation to no avail.
Is there something else I could be missing? I am new to app development and am very unclear as to what else "invalid provisioning profile" could mean.
Any additional help/tips/ideas would be appreciated!
Error message when deploying:
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.FSRtzC/extracted/{XAMARIN_IOS_PROJECT_NAME}.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
error MT1006: Could not install the application '{PATH TO XAMARIN_IOS_PROJECT}/bin/iPhone/Release/{XAMARIN_IOS_PROJECT_NAME}.app' on the device '{IPHONE DEVICE NAME} iPhone': AMDeviceSecureInstallApplicationBundle returned: 0xe8008015.
Application could not be uploaded to the device.
Provisioning Profile Info:
Status: Active
Type: App Store
Enabled Capabilities:
Associated Domains, Game Center, In-App Purchase, Push Notifications
Software Versions:
Visual Studio Community 2019 for Mac
Version 8.6.5 (build 23)
Apple Developer Tools
Xcode 11.5 (16139)
Build 11E608c
Xamarin.Mac
Version: 6.18.2.1 (Visual Studio Community)
Xamarin.iOS
Version: 13.18.2.1 (Visual Studio Community)
iPhone 7 Plus running iOS 13.5.1
I simply had to use a Distribution Profile of type Ad Hoc. The Distribution Profile the app was using was of type App Store as it was what was needed to create a build archive for Test Flight.
I do wish the error message had been more informative and less generic. Multiple types of issues seem to result in the same error message.
Useful References:
This provides useful info about using the Device Log and debugging Entitlements that helped me start getting somewhere. My custom Entitlements and enabled Capabilities for the Bundle Identifier matched, so I couldn't figure out what else to try initially. The Device Log gave me no info, but taking out the Entitlements file worked, and it went from there.
This reassured me that my one custom entitlement that's different between Debug and Release mode, APS Environment, is using the correct value of "production" even though it was causing the installation to fail with the (then App Store) Distribution Profile.
This provides detailed explanation on each Provisioning Profile Type.
We are building a Xamarin.Forms app on windows machines using Visual Studio 2019. We have created the developer provisioning certificates, distribution certificates, developer provisioning profiles, and distribution profiles.
We pair Visual Studio to a Mac and can deploy our applications onto iOS devices. When in xCode on the Mac, we can see the provisioning profiles are installed.
When we look in Visual Studio, at Options->Xamarin->Apple Accounts, we can see everything looks like it should:
But we can't right-click->Archive our iOS project. It always appears grayed out.
Our project is set to Release and iPhone for the Active solution platform. What else needs to be done to get the archive functionality working for iOS projects inside visual studio?
I had the same issue, after deleting all bin and obj folders and moving just the proj and sln (don't copy .git, .vs etc) to mac I was able to publish using vs for mac.
note: I had to update vs for mac, otherwise it wanted to use application loader, which is no longer supported for xcode 11.
You need to have Visual Studio 2019 version 16.3 or higher to be able to archive iOS projects.
Alternatively, you can manually upload the IPA file from a mac using this from the command line:
xcrun altool --upload-app --type ios --file "/Users/*****/*****/******.iOS.ipa" --username "Your Apple ID" --password "app-specific password"
This if question for those, who know what I am doing wrong and help for those experiencing the same issue.
I use Visual Studio 2015 on Win10 and Visual Studio Tools for Apache Cordova. I have Xcode 8 on my Mac. When setting up my projects, I follow this guide - https://taco.visualstudio.com/en-us/docs/ios-guide/. I also use a the hook available here - https://dpogue.ca/articles/cordova-xcode8.html. At this moment I am building ad-hoc application (I do believe store distribution type of application will be another issue).
Although I do all the steps mentioned in the lineked documents my builds fails with message "No suitable provisioning file found ..."(yes, I downloaded all necessary provisionig file under Acount dialog using my Xcode installation).
I found this solution - after the first build I open the project on Mac using Xcode (the project file is located under Macintosh HD/Users/MYNAME/.taco_home/remotebuilds/taco-remote/builds/BUILDNUMBER/cordovaApp/platforms/ios). I don't change anything, I only choose Build option from the Xcode menu. The project is build successfuly and since that, I am able to build the project from Visual Studio any time I need. Am I doing anything wrong? I think the compilation directly in Xcode shouldn't be necessary.
P.S. I just found, that new provisioning profile apears on my Mac, once it builds it - it's named "iOS Team Provisioning Profile: APP_ID". Probably, it's somehow related to the issue.
Finally I found the solution when building the app for app-store. It's necessary to specify provisionig file ID in your build.json. file. It's necessary to add this section INCLUDING the provisioningProfile key.
"release": {
"developmentTeam": "XXXXXXXXXXX",
"codeSignIdentity": "iPhone Distribution",
"provisioningProfile": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
"packageType": "app-store"
}
The ID is name of the provisioning file, which is stored on Mac in ~/Library/MobileDevice/Provisioning Profiles/
More info can be found How to build and upload a correctly signed iOS app to App Store and https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
I have written an IOS app using Visual Studio 2013 / Cordova and am trying to create a release build, using my organisation's Enterprise Distribution Certificate / Provisioning Profile.
On the 'build' Mac I have valid development and distribution certificates / provisioning profiles, but each time I build the Release version of the app, the build agent selects the development provisioning profile rather than the one for distribution.
I have tried to force VS to use the Distribution profile by adding a build-release.xcconfig file as outlined here , including it in my solution's res/native/ios folder, but it still uses the dev profile. I have resorted to building the app in xcode and selecting the Code Signing Identity / Provisioning Profile manually (which creates the build ok).
Has anybody any tips on how to get this working?