2
votes

I can deploy my Xamarin Forms app to an iOS simulator with no problem but now I would like to deploy to a device.

I have followed the instructions to do this here: https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/

I get to the point where I create a provisioning profile and download the .mobileprovision file, then I open the file and it opens with xcode but I get no confirmation that the file has been imported.

On a windows machine with visual studio, I try to deploy my app to a device I get the following error: Visual Studio Error

When I look for the provisioning profile in XCode there doesn't appear to be one, despite importing the provision file:

Provisioning

Does anyone have any idea what might have gone wrong here?

1
Are you certain you created a provisioning profile for your development certificate as described here? The list of provisioning profiles would normally show up in XCode if so. - Demitrian
Having spent more time on this issue, I think that the Provisioning Profile is not actually the problem here. Yes, it's not showing for unknown reasons but my actual issue was that I was trying to deploy to a device connected to my windows machine rather than the macbook. - Slade
Check the output window for more details. Also make sure your right certificate is included in the mobileprovision file, the provision file includes your devices and that the provision file is for the right app id (com.yourdomain.app). Although it is weird nothing shows up in your Xcode, are you using the right account? - Gerald Versluis

1 Answers

3
votes

I've got this working now and I'm posting an answer because I think there are a couple of things that the Xamarin instructions don't make very clear.

The first issue is that the device you want to deploy your app onto must be attached to you apple device. It won't copy the assemblies to a windows development machine and deploy from there.

The second is that you have to supply an identifier in the iOS project properties, iOS Application tab, and the identifier must match what was specified in your App Id profile.

I hope this helps others out.