Category Archives: iOS

Deploying a Xamarin Forms application to TestFlight

Note: This post was written a while back but sat in draft. I’ve published this now, but I’m not sure it’s relevant to the latest versions etc. so please bear this in mind.

Pre-requisites

You’ll need an Apple developer account if you intend to eventually deploy your application to the Apple store, using this site https://developer.apple.com/account, however you can use the free provisioning using Free provisioning for Xamarin.iOS apps.

As I already have an Apple Developer account this post will concentrate on provisioning with a Developer account id.

TestFlight

TestFlight is the Apple beta testing tool which allows users to access your application in test (i.e. not live on the app store). Your users will need to install TestFlight, see Beta Testing Made Simple with TestFlight and you’ll need to set up an application for testing via https://appstoreconnect.apple.com/

Deploying your application to TestFlight

Once you’ve built and signed your application so it’s ready for distribution then, one of the simplest ways to deploy your application to TestFlight is install Transporter on your Mac and simply Add the application to Transport which in turn will upload to your TestFlight account.

Your application will go through a build process and when completed you’ll receive an email letting you know. You’ll be waiting for the status of your build (within appstoreconnect) to change state to Approved (this may take a couple of days although I’ve also seen posts from people stating this can take longer). Once approved we select our External Groups (testers) and you should see a Enable Public Link – click on this (enable it). Now you’ll have a link to send to your users, although appstoreconnect should automatically send this to any testers you add.

Note: Your TestFlight build is available for a total of 90 days, ofcourse this excludes the build and review process. If you do not update the application within that time the app will expire.

Once your build has passed review, it’ll go into a Testing status, any testers you’ve added already will get a code to redeem in TestFlight from their device, you can also enable a link that you can send to people to load the application for testing. This obviously allows you to have a core group of testers as well as a public access to testing.

When your application is deployed to your testers via TestFlight, the icon that you launch the application from will have a small orange dot (it looks red on a dark background) to indicate this is a beta application.

When you’re ready to update your testers with a new application, if you only change the Build version, i.e. if your app version is 0.1.0 and build was 1.0, just changing this to 2.0 will mean your application need not go through review again. Instead it’ll go into a Submit Ready state, waiting for you to assign testers and then it’ll switch to Testing.

References

Automatic Provisioning for Xamarin.iOS
TestFlight – How to Upload and Distribute Your App | App Store 2021

Change the colour of the status bar on iOS (in Xamarin Forms)

As per my previous post Change the colour of the status bar on Android (in Xamarin Forms) we might wish to change the status bar on iOS.

Open Info.plist in a code editor and add the following (if it does not already exist)

<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Basically we’re disabling the status bar from taking it’s appearance from the preferred style of the current view controller – see UIViewControllerBasedStatusBarAppearance.

Adding an iOS device via the apple developer portal

I finally got around to looking into Mac & iOS development using Xamarin Studio. I’m sure there will be a series of blog posts on my experiences using the tools but for now, let’s look at the steps required to add a device to your account on the apple developer portal.

We need to add devices to allow us to provision profiles etc. – I’ll be honest, at this time I know very little about the ways of developing iOS apps. so this is definitely a learning process.

Note: These are the manual steps. I read that you can do this from XCode but I couldn’t seem to see the options, if I get that working I’ll create a post on that process, but for now this is the manual process.

  • Firstly, connect the device you want to add to your computer
  • Run iTunes
  • In iTunes click on the device
  • If you’ve not connected the device to the computer you will be asked to trust the computer on the device, obviously do so
  • Click on the serial number so it changes to show the UDID of the device
  • Right mouse click on this and copy the UDID
  • Log into your account on https://developer.apple.com
  • Select Member Center
  • Select Certificates, Identifiers & Profiles
  • Select Devices under the iOS Apps section
  • To the right of the iOS Devices heading, click the + button
  • Put something meaningful to you as the name of the device, i.e. iPad Air or even Mark’s iPad Air or whatever
  • Paste the UDID we copied earlier into the UDID field
  • Click the Continue button
  • You should now see the Review and register page, click Register if you’re happy with the name etc.
  • Finally press the Done button on the Registration complete page and you’re done

You should now see a list of all the iOS devices you’ve registered.