Is there good documentation for building Xamarin Apps using VSTS and deploying to HockeyApp?

AndrewZaslowAndrewZaslow USUniversity

It seems that Microsoft/Xamarin is pushing using VSTS and HockeyApp as the preferred mechanism for CI for Xamarin Apps. The problem that I have is that there doesn't appear to be any good, comprehensive, and up to date documentation on how to do this.

There have been a number of recent blog entries about how to do this, but they are somewhat inconsistent and also tend to be simple step by step recipes for just getting a basic build and deployment working without discussing higher level considerations such as release management.

Some of the things I'd like to see described would be:

  • Can unit tests (NUnit or whatever) be run for iOS builds on Macs?
  • Overall approach to handling a Xamarin Forms app with multiple (Android, iOS, UWP) targets.
  • Best practices for UWP apps -- i.e. deploying to HockeyApp and packaging with regard to ARM vs x86 builds.
  • Does the VSTS release system translate to mobile app builds and if so how best to leverage it.
  • Designing for different types of builds from quick "gated check-in" type builds for developer check-ins, QA deployments, and final deployments to the various stores.
  • Managing version numbers for the same app on different platforms (pros and cons of different approachs).
  • Updating version numbers in code when running a build.

There are plenty of more questions that I have, but I guess in the end what I'm looking for is a document which describes how to set up CI for a real world Xamarin Forms application with steps as well as descriptions of the options, trade-offs, and other considerations that one should look at when planning for and building the CI configuration.

Answers

  • JWhiteJWhite USMember, Xamarin Team Xamurai

    Hi @AndrewZaslow,

    Good questions! Mobile DevOps is definitely something we are focused on (at least on the sales team) and this is definitely an area I would say we are getting better information out. Still there is a lot of ground to cover, these things take time. @DanRigby suggested checking out this set of guides:

    http://www.blogaboutxamarin.com/tag/visual-studio-team-services/

    and I would be inclined to agree.

    To answer some of your questions, I do not believe that VSTS supports release builds of mobile apps at this present time. I could be wrong though, still learning the product myself.

    NUnit can be run on your iOS projects from Mac. In fact, UITest is built on NUnit, so you can do both actual Unit Testing as well as your UI/Automation testing.

    Otherwise, to any integration questions, maybe could you reach out to us at [email protected]? We can try to at least try to get you connected with the right resources.

  • tribaltribal USMember ✭✭✭

    As if in response to your post there is a video from Evolve16 now which seems to explain the process for using Team Services and HockeyApp. Manage Xamarin apps with HockeyApp and Visual Studio Team Services

  • From my experimenting with:
    https://github.com/Microsoft/vsts-agent

    Initially I got the builds up and going from build definitions alone and it worked fine. I wanted to be able to build from the command line on either platform so I created build scripts using cake build, Redth's cake.xamarin, and fastlane tools.

    Then I create a build definition to call the script and pass the correct targets.

    I'm not an expert but I'll try and answer these:

    Can unit tests (NUnit or whatever) be run for iOS builds on Macs?
    yes.

    Overall approach to handling a Xamarin Forms app with multiple (Android, iOS, UWP) targets
    In my particular case, I'd just add a lane to fastlane. To build UWP I'd create another target in the cake def. So for all 3, I'd have 3 build definitions.

    Best practices for UWP apps -- i.e. deploying to HockeyApp and packaging with regard to ARM vs x86 builds.
    Not sure but, there's definitely overlap between all the build tools. I haven't added Hockey yet but my plan was to add it as a step to the build definition.

    Does the VSTS release system translate to mobile app builds and if so how best to leverage it.
    Not sure yet.

    Designing for different types of builds from quick "gated check-in" type builds for developer check-ins, QA deployments, and final deployments to the various stores.
    I hadn't figured exactly how I wanted to do this yet. I didn't have builds kicking off on checkins (yet) and when I built for deployment I ran the build definition manually.

    Managing version numbers for the same app on different platforms (pros and cons of different approachs).
    We kept the version name the same for both platforms. For iOS its "Version" and Android its "Version Name". The version might be 1.0.0 or 1.0.0-beta.

    Updating version numbers in code when running a build.
    Not sure yet but I want a solution that works for all 3 platforms.

  • JohnHJohnH GBMember ✭✭✭✭✭

    @DerekBeattie.6675

    Can unit tests (NUnit or whatever) be run for iOS builds on Macs?
    yes.

    I should have searched better before posting my own question, can you explain how? I don't see how to run unit tests after the VSTS build has completed. The unit tests will require the launching of the iOS Simulator to run.

Sign In or Register to comment.