Posts – Page 2

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)

Duplicate Keychain Entries in macOS Sierra

I upgraded a build server to macOS Sierra and the keychain unlocking stopped working, here is how I fixed it.

Lockable Resources Jenkins 2.0 pipeline builds

If you want to increase concurrency in your Jenkins pipeline builds, but need to ensure that certain resources are not used concurrently, then you can use lockable resources

Automating Xcode 8’s New Automatic Signing

Picture of Matt speaking at SWMobile meetup

This was a talk I gave at the SWMobile Meetup in Bristol in October 2016. The talk was a lightning talk on automating the new Xcode 8 automated signing system when using it in a CI setup. In our case we use it with Jenkins and Fastlane to automate all our builds.

Video hosted at https://www.youtube.com/watch?v=nVDKZzN3zGk

Slides hosted at http://www.slideshare.net/hammertoe/automating-xcode-8s-new-automatic-signing

Changes to Keychains in macOS Sierra

I upgraded a build server to macOS Sierra and the keychain unlocking stopped working, here is how I fixed it.

Wiping the workspace in Jenkins 2.0 pipeline builds

Instead of the 'wipe workspace' checkbox that used to be in Jenkins, you can now use deleteDir() to clear the workspace before building.

WOTRA Trademark Scam letter

I filed for a trademark for my company name, shortly after it was accepted I received this scam letter in the post, quite a legitimate phishing attempt.

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.