Episode #548

Starting a Mastodon Client for macOS from Scratch

Series: macOS Mastodon Client

26 minutes
Published on March 14, 2023

This video is only available to subscribers. Get access to this video and 583 others.

Gui Rambo joins us to build a Mastodon Client for macOS using SwiftUI. In this episode we'll show the app we'll be building and then start from a blank slate where we will cover some topics about how a SwiftUI macOS app is set up, how we can define some build settings using xcconfig files, and how to deal with building for different Apple Developer teams.

Links

Finding your team identity

security find-identity -v -p codesigning

Our initial config

// Run the setup.sh script to generate the TeamID.xcconfig file.
#include "TeamID.xcconfig"

// You probably don't need to change anything below this line.
CODE_SIGN_STYLE = Automatic
CODE_SIGN_IDENTITY = Apple Development
BUNDLE_ID_SUFFIX = .$(DEVELOPMENT_TEAM)
PRODUCT_BUNDLE_IDENTIFIER = com.ficklebits.oliphaunt.App$(BUNDLE_ID_SUFFIX)

The setup script to generate a team id config file

#!/bin/bash

echo "What's your Apple Developer Team ID? (looks like: 1A2345BCDE)"
read TEAM_ID

if [ -z "$TEAM_ID" ]; then
    echo "You must enter a team ID"
    exit 1
fi

echo "DEVELOPMENT_TEAM = $TEAM_ID" > App/Config/TeamID.xcconfig

This episode uses Xcode 14.2, Swift 5.7.