ERROR ITMS-90161 when trying to upload an app built with Visual Studio for Apache Cordova - visual-studio-cordova

We just started creating cross platform mobile apps using "Visual Studio Tools for Apache Cordova".
I followed the procedures described in Install Tools to Build for iOS and To run your app on an iOS device. Everything works nicely, the app gets deployed on my USB attached iPhone and runs as expected.
I then tried to upload the app to iTunes, to provide the app via TestFlight to testers and to generally see how app-submitting works:
Build the iOS app as "Release" in VS: it builds and deploys to the iPhone nicely
On the Mac: Start Application Loader, click on "Deliver your App" and navigate to "...remote-builds/builds/"xxx-buildnmb"/cordovaApp/plattforms/iOS/build/device/APPNAME.ipa"
Several checks run OK ("verifying assets, etc.), but it then stops with the error
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle xxx.yyyyyy.zzzz [Payload/xxx.yyyyyy.zzzz.app] is invalid. [Missing code-signing certificate.] For more information, visit the iOS Developer Portal."
I then discovered the Xcode Project in ".taco_home/remote-builds/taco-remote/builds/<build-number>​/cordovaApp/platform‌​s/ios/" and used Xcode to define the code signing identities in "Build Settings" and the Team information in "General", created the archive via Product-->Archive and submitted it in the Organizer - Archives. And voila it worked!
My questions:
Do I have to use Xcode to submit?
If not, what might I be missing in a) regard to building and signing apps with vs-mda-remote, and b) submitting it with Application Loader?
What are Microsoft's plans in regard to providing access the build settings from within Visual Studio (similar to the ones in Xcode)?
Thanks a lot for any pointers in the right direction.
Thomas

You need to use distribution provisioning profile to sign the package and apps are published to the App Store by using the iTunes Connect website along with the Xcode Archive Tool, which is included with the iOS SDK.

Related

No matching profiles found Xamarin forms Visual Studio Mac

I am not sure if I am doing something completely wrong, but I keep getting the following error in Visual Studio for Mac when trying to sign my Xamarin forms app "No matching profiles found"
A bit of background, I created a Xamarin Forms app for iOS and Android. I followed the steps here to create a provisioning profile etc https://learn.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/app-store-distribution/publishing-to-the-app-store?tabs=macos#:~:text=Xamarin.iOS%20apps-,Create%20and%20install%20an%20App%20Store%20provisioning%20profile,-iOS%20uses%20provisioning
I have removed and re-added my Apple developer account in Visual Studio multiple times, same on Xcode. I've manually downloaded the provisioning profile and double-clicked to install it, no change, still the same error.
I thought it might have been the app I created, so I created a brand new dummy test app, deleted my old provisioning profile and stuff from the Apple developer website, created a new identifier on the Apple developer site, set the BundleID to explicit and gave it the exact same name as the Bundle identifier in my Info.plist for the new dummy app I created. Created a new profile, downloaded with Xcode, manually, signed into and out of my apple developer account in Visual Studio for Mac and Xcode and still I get the same error, even with this new dummy app.
I have deleted the profiles from the ~/Library/MobileDevice/Provisioning Profiles folder too before re-downloading, makes no difference.
Have I missed something or am I doing something wrong? I am trying to set up the app to use TestFlight so I can limited people access it and test it, but at this stage I'm completely blocked by this.
I am using Visual Studio Mac 2022.
Thanks!
I worked out what the problem was by following this tutorial on YouTube. https://www.youtube.com/watch?v=fkBRXzotbzw
Basically I had created the wrong profile type on the Apple site when creating the provisioning profile. I should have selected App Store Distribution but I was selecting App Store Developer I think.

"A valid provisioning profile for this executable was not found" deploying app from Visual Studio 2019

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:
My Name my app development 2021-2022 (type: Development)
My Name wildcard development 2021-2022 (type: Development)
My Company my app distribution 2021-2022 (type: Ad hoc)
VS: com.mycompanyname.myapp Development (type: development)
VS: WildCard Development (type: Development)
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?
Automatic provisioning gives errors like this at times.
Delete the old certificates and the provision profiles.
Create new provisioning profiles using the new certificates.
Download them.
Make sure that you have selected the same provisioning profile.
Uninstall the app from the device.
Clean and try running it.
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
Go to Xcode --> Preferences --> Account.
In the provisioning profiles section, right click and open with
finder.
Delete all provisioning profiles from the provisioning profile
folder.
Finally, go back to Xcode and click the refresh button.
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.
Check your profile is valid
Try to generate an ipa file in release mode using development profile. Then
install the ipa in your device using Xcode (Window -> devices and
simulators -> drag ipa to device). & Ensure the ipa is working
Check your Entitlement plist and Enable/Disable push notification & try to
debug again.
If not working; please install latest version of visual studio which
support your xamarin ios version & Try debugging
If you have recently upgraded from Visual Studio 2019 to Visual Studio 2022 then you may have stumbled into the same issue as me
https://codingrob.medium.com/how-to-resolve-xamarin-ios-developer-provisioning-profile-hell-f29a998fa184
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.

Cannot get Firebase working for Xamarin Forms iOS

I am using Visual Studio 2019 on Windows, developing an App using Xamarin Forms, for Android and iOS. Everything is the latest version.
I am trying to use Firebase to add Push Notification functionality. I have been able to get this functioning for the Android App, but whatever I do seems to fail / not work for iOS.
I have tried using both Xamarin.Firebase.iOS.CloudMessaging and Plugin.FirebasePushNotification with the same result. Starting from a basic app created in Visual Studio, as soon as I add the basic code for the iOS project, the app stops working and just times out after 17 seconds with running any of the project code (no breakpoints are hit).
I also tried downloading this demo app https://github.com/jfversluis/XFFCMPushNotificationsSample. I created my versions of google-services.json (Android) and GoogleService-Info.plist (iOS). The Android app runs but the iOS app does not (times out after 17 seconds).
Having tried so many different samples, examples, options, etc - I am at a complete loss as to what the issue might be. The situation is not helped by me being new to App development & Xamarin Forms!
I appreciate that I haven't added any "I tried this" code, but I'm hoping someone can help me with debugging this. Visual Studio doesn't appear to show anything, can I get more helpful info from the iPhone?
Edit:
For iOS,
I have created a Key and enabled Apple Push Notifications.
I have uploaded the key to the iOS project in Firebase (Cloud Messaging).
I have downloaded the GoogleService-Info.plist file and added it to the iOS project in Visual Studio, and set it to BundleResource
I have enabled Push Notifications in Entitlements.plist
I have enabled Background Modes & Remote Notifications in Info.plist
I am using Automatic Provisioning
I have checked that Bundle Identifier is correct
I have added FirebaseAppDelegateProxyEnabled to info.plist
EDIT 2:
I have manged to get an error message, which happens during the call to
FirebasePushNotificationManager.Initialize(options, true);
{System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.FirebasePushNotification.FirebasePushNotificationManager.Initialize (Foundation.NSDictionary options, System.Boolean autoRegistration) [0x00029] in /Users/runner/runners/2.169.1/work/1/s/Plugin.FirebasePushNotification/FirebasePushNotificationManager.ios.cs:141
at MyApp.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00014] in \MyKRing.iOS\AppDelegate.cs:34 }

Provisioning profiles not listed in visual studioo

I have developed a cross platform app with xamarin forms , after I completed development i went on to testing . I successfully deployed to an andriod device and all is good on that platform, but im struggling to deploy the app to my physical iphone iv have searched EVERYWHERE and couldn’t find any help, this is my situation:
I have created free provisioning profiles and all the necessary certification according to the Microsoft guide on free provisioning
I successfully deployed a dummy app to my physical device throught xcode(so that means provisiong was successfull ????)
But my signing ID and provisioning profile is not listed in visual studio 2019
And yes
I did pair to my mac and connected my iphone to the mac AND targeted my iphone in the build scheme
Bundle ID’s also match and my iphone is visible in VS but i my profile is not listed so i cant deploy.
And yes my apple ID is also added under tools > xamarin > apple id
Ive also tried restarting the IDE and my machine Multiple times
PLEASE PLEAAASEE help me
Create new project with your XCode.
Make sure you set the correct Bundle ID.
Try to build your XCode project (for debug and release), if anything work re-start your VS and you will see your provisioning profile.

Windows App Certification Kit "The selection criteria did not match any tests"

I am preparing my app for upload to the MS Store and am running into problems with the Windows App Certification Kit. Nearly every test performed by the kit produces the exact same FAILED test result as follows:
"The selection criteria did not match any tests.
No test cases were executed."
My app is a Windows Forms app that was packaged using the "Windows Application Packaging Project" in Visual Studio 2017 (i.e. using the latest iteration of the MS "Desktop Bridge").
I should also add that I was able to successfully install the app bundle (.appxbundle) by loading the temporary cert and double clicking on the appxbundle so I know the UWP install works perfectly.
Any ideas on how to fix issue?
Thanks!
I found the solution to my problem! It appeared to me based upon the test result text that the Windows App Certification Kit was simply failing to run any tests at all...so I decided to uninstall then reinstall the Windows Software Development Kit (which includes the Windows App Cert Kit among other things). After reinstall the Windows App Cert Kit ran correctly!...AND MY APP PASSED EVERY SINGLE TEST!!! YES!!!
Anyhow, if you experience the same problem as me, you now have the solution to your issue...uninstall then reinstall the Windows Software Development Kit.

Resources