Xamarin Archive Build from msbuild/xbuild using the same certs and provisioning profiles fails to install

1.3k Views Asked by At

If I "Archive for Production" my iOS project in Xamarin Studio, I can then sign and create the IPA file. Then I upload to hockeyapp.net and my users can download and install without issue.

If I use xbuild or msbuild from the CLI with all the correct args:

xbuild App/App.iOS.csproj /p:SolutionDir="$HOME/projects/App" /p:Configuration="Ad-Hoc" /p:Platform=iPhone /target:build /p:ArchiveOnBuild=true

and then go into Xamarin Studio to sign and create the IPA, after uploading to hockeyapp.net my users can download but when it's installing, it will fail with a message about being unable to download.

I am using the latest Xamarin Studio and my certs and provisioning profiles are all fine.

Does anyone know what is the difference in the two methods that may be causing my error?

1

There are 1 best solutions below

0
KargWare On

HockeyApp is now Visual Studio App Center. But your problem still exists :-).

From msbuild I know only the configuration debug and release. I don't know if your custom configuration will pick the right provisioning profiles.

You can add CodesignKey and CodesignProvision as properties to msbuild or xbuild to enforce the cert and profile, see the example here:

xbuild … /p:CodesignKey="iPhone Distribution: My Company (0123456789)" /p:CodesignProvision="Automatic:AdHoc" /p:platform="iPhone" /p:configuration="Release"