Posts tagged 'technology'

Finding Provisioning Profiles by Name Rather than UUID

I recently blogged about (and spoke at SWMobile) about Xcode 8's automatic code signing features and how to get them working with a CI setup such as Jenkins.

However, I was advocating at the time to hard-code the provisioning profile UUID into the .xcconfig file to make it explicit. One of the problems with that approach is that whenever you update the provisioning profile on the Apple Developer Portal the UUID changes. So this means every time you add a new device for testing, you then need to update the .xcconfig file with the new UUID.

From what I had read, it implied that you had to use UUIDs as using the new PROVISIONING_PROFILE_SPECIFIER variable would require switching over to fully automatic signing.

After a lot of playing about I managed to get it so that you could specify the name of the profile rather than the UUID, but not have it try to automatically manage the profiles. This means that the provisioning style is still manual but that it will look for the profile by name. So if you use Fastlane and use sigh to pull down the latest profile when the build job runs, it means it will always use the latest profile.

We have three different build configurations develop, feature, and release. The first two are AdHoc builds and are for testing. The latter uses an AppStore profile for uploading to TestFlight and the App Store.

TotalHealth-develop.xcconfig:

DEVELOPMENT_TEAM = 9Q5433VBYW
PROVISIONING_PROFILE_SPECIFIER_app = com.enquos.totalhealth.develop AdHoc
PROVISIONING_PROFILE_SPECIFIER = $(PROVISIONING_PROFILE_SPECIFIER_$(WRAPPER_EXTENSION))
CODE_SIGN_IDENTITY = iPhone Distribution: Legacy Parts Corporation (9Q5433VBYW)
PROVISIONING_PROFILE = 

TotalHealth-feature.xcconfig:

DEVELOPMENT_TEAM = 9Q5433VBYW
PROVISIONING_PROFILE_SPECIFIER_app = com.enquos.totalhealth.feature AdHoc
PROVISIONING_PROFILE_SPECIFIER = $(PROVISIONING_PROFILE_SPECIFIER_$(WRAPPER_EXTENSION))
CODE_SIGN_IDENTITY = iPhone Distribution: Legacy Parts Corporation (9Q5433VBYW)
PROVISIONING_PROFILE = 

As the app store profile doesn't contain UUIDs and doesn't change regularly, we still refer to that one by UUID in our xcconfig file:

TotalHealth-release.xcconfig:

DEVELOPMENT_TEAM = 9Q5433VBYW
PROVISIONING_PROFILE_SPECIFIER =
PROVISIONING_PROFILE = cb29a583-df74-4a2b-8424-bcc55b56090c
CODE_SIGN_IDENTITY = iPhone Distribution: Legacy Parts Corporation (9Q5433VBYW)

Using Xcode 8’s New Automatic Signing with Jenkins and Fastlane

Xcode 8 brings with it a new automatic code signing system. It is meant to make life a lot easier for developers, but needs a bit of work to get working with headless CI systems like Fastlane and Jenkins.

Uploading Git Changelog to Fabric Beta for Android Gradle Builds in Jenkins

The git changelog is not exposed as a variable in Jenkins for pipeline builds to use. This is how we got it and send it via Gradle to Fabric Beta when we distribute our automated builds

Global Build Numbers in Jenkins Multibranch Pipeline Builds

We wanted to have build numbers that were unique and incremental across all of our build jobs. Here is how I did it with a small python microservice.

Jenkins 2.0 and Multi-branch pipeline builds for iOS apps with Fastlane

Jenkins 2.0 beta is out and has included a multi-branch pipeline plugin that allows automatic build of feature branches from Github. Here is how I set it up to build feature branch builds of our iOS apps

Jenkins, Github, and IPv6

Github and some other sites don't yet support IPv6. But I want our build servers to be IPv6 only. Here is how I achieved it using OpenBSD's NAT64 and unbound's DNS64 functions

Smart Nation Singapore - Bristol Festival of Ideas - Festival of the Future City

Singapore aims to be the world’s first Smart Nation, with fuller use of technology to live, work and play resulting in improved quality of life for individuals; business opportunities for enterprises; and a government that uses technology to better serve and anticipate citizens’ needs.