3

Premise: I have been limited to utilizing xamarin for the early stages of this project as an attempt to speed up the dev process for beta distribution. (spoiler: it's slow and poorly documented).

So I am creating a build pipeline for app store distribution and have given all the msbuild love I can give, but I can't seem to pull the last two pieces together.

Problem: In order to include desymbolication files for iphone distribution you must build an archive, and then utilize the archive to build a signed ipa to upload to Itunes Connect. I cannot seem to find the documentation to support specifying a built archive path to create an ipa with in msbuild.

Which one of you wizards can help me and this small abused xamarin community come up with an answer? Currently my steps would be as follows.

build the archive with the following: msbuild "iOS/project.sln" /p:Configuration="Release" /p:Platform="iPhone" /p:ArchiveOnBuild=true /p:CFBundleVersion=${FORMATTED_BUILD_NUMBER} /p:CFBundleShortVersionString=${FORMATTED_BUILD_NUMBER} /t:Clean /t:Build

then build the ipa with the archive...however I don't see anything about how to include the -exportArchive tag that you would include on xcode command line.

If it's not out there yet, I'll include it once I find it.

Randy
  • 1,400
  • 2
  • 12
  • 30
  • Did you ever find this information? I am still looking for a "To archive your iOS app use the following MSBuild properties." – Rodney Littles Mar 12 '19 at 16:54
  • It seems they only provided a local archive of the desymbolication files. We ended up just keeping them on the local build machine as a solution. Unfortunately, not the ideal solution. :/ – Randy Mar 12 '19 at 17:02
  • So not to jack your thread, I seem to have an issue with any build pushed to AppCenter that doesn't come from the VS4Mac archive/sign-distribute. Does your solution have that issue? Do you use AppCenter or a comparable product to Hockey App for distribution? – Rodney Littles Mar 12 '19 at 17:42
  • Ahh interesting, no this will distribute directly to Testflight. That definitely makes it a bit more complicated. – Randy Mar 12 '19 at 18:19

2 Answers2

4

I was able to use the following command to generate and output an IPA to the directory that I indicated here:

msbuild /p:Configuration='Release' /p:Platform='iPhone' /p:IpaPackageDir=<DIRECTORY FOR IPA TO LIVE>/t:Build '../SampleApp.sln' /p:BuildIpa=true

The trick for me was to set the flag: /p:BuildIpa=true

Hope this helps!

lovelejess
  • 86
  • 6
1

Found the answer! I added the below and the archives started showing in the "Archive List" on VS4Mac! Still haven't tested the round trip to AppCenter, but it should be fine.

/p:ArchiveOnBuild=true
Rodney Littles
  • 544
  • 2
  • 11
  • Unfortunately, this does not upload to testflight. As noted above I had that parameter in my build arguments above and even though it builds locally, never got it to upload. Thanks for following up though, we ended up just keeping the symbols local and using that machine to debug any crash errors. It was a pretty bad set up. – Randy Apr 06 '19 at 00:38
  • 1
    Really? I was able to get it to AppCenter. I will continue to try and find a solution to this as it is a big deal for me, I should have end to end to test flight done in a few weeks, I will post my findings. – Rodney Littles Apr 09 '19 at 20:00
  • yeah if you notice I had tried that in my original post. It will work to AppCenter, but as in most Microsoft products, their thoroughness dies as soon as the data leaves their company. Even though it's not viable to me anymore, let me know if you find anything. Would like to have a solution for this post – Randy Jun 12 '19 at 18:35