Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin fails to deploy iOS app to iOS Device

I am trying to deploy my Xamarin iOS app to iPhone. But it fails to deploy into iPhone devices where as it works fine in Simulators. I verified that Bundle Identifier and Provisioning Profiles are matching. Also I deployed another test app into iPhone devices using XCode using the same provisioning profiles. It is getting deployed successfully. Also approved the Developer as trusted in iPhone.

The Exception I see Visual Studio as below

error MT1006: Could not install the application '/Users/VarunRaja/Library/Caches/Xamarin/mtbs/builds/WK.TAA.Mfa.OTPAuthenticator.iOS/116dd0bfdd565dd44e1837c2280a6d94/bin/iPhoneSimulator/Debug/WK.TAA.Mfa.OTPAuthenticator.iOS.app' on the device 'Raja’s iPhone': AMDeviceSecureInstallApplicationBundle returned: 0xe8000067 (kAMDAPIInternalError).

I see this is coming from my Mac Agent. Visual Studio says the App is terminated.

like image 936
Raja Ranganathan Avatar asked Jan 04 '17 18:01

Raja Ranganathan


People also ask

Will Xamarin be discontinued?

In May 2020, Microsoft announced that Xamarin. Forms, a major component of its mobile app development framework, would be deprecated in November 2021 in favour of a new . Net based product called MAUI - Multiform App User Interface.

Is Xamarin good for iOS?

The framework from Microsoft fully supports 64-mode and allows for using native tools directly and thus provides the fastest user interface. Xamarin developers can run the fastest code on both Android and iOS platforms.


1 Answers

As mentioned here by Tim Wheeler, it is an indication that your device is not in your provisioning profile, or your provisioning profile is invalid.

Why?

Basically, iOS will not let you build the app on to the device for security purposes, unless you have registered the device to THAT particular app in the Apple Developer Portal. They have no issues with you installing it on a simulator, so that you can't distribute apps without using the App Store.

Fix

In order to fix this, you need to have Access to the Apple Developer Portal of the company under which the app is registered and then go to the Certificates, Identifiers and Profiles.

Go to the "Devices" tab and make sure your device is in the list. Then go to "Profiles" tab, and you might see an "Invalid" status under the Expiration column of the Provisioning Profile. Fix it, tap on your app's profile, ensure it includes your iPhone, downloaded the new one to the mac and install it.

Not fixed yet?

If that was not the issue, it could be because you have multiple provisioning profiles installed. Visual Studio is usually set to Automatically determine the appropriate provisioning profile, and it could be using the wrong one if you have a few installed. You could delete the unneeded ones, or you can go to your iOS project settings, set the bundle signing to "Manual", then choose the valid profile.

like image 90
Saamer Avatar answered Sep 27 '22 21:09

Saamer