Skip to content

Instantly share code, notes, and snippets.

View paulz's full-sized avatar
🍐
pairing is caring

Paul Zabelin paulz

🍐
pairing is caring
View GitHub Profile
@paulz
paulz / CoreFoundation.h
Created May 6, 2023 08:45
iOS Debugging
/* For debugging only; output goes to stderr
Use CFShow() to printf the description of any CFType;
Use CFShowStr() to printf detailed info about a CFString
*/
public func CFShow(_ obj: CFTypeRef!)
public func CFShowStr(_ str: CFString!)
@paulz
paulz / export-xcode-archive.zsh
Last active April 10, 2023 06:03
TestFlight deployment using altool GitHub Actions workflow
#!/bin/zsh --login --errexit
version=$((GITHUB_RUN_NUMBER+version_offset))
ORGANIZER_ARCHIVE=$(find ~/Library/Developer/Xcode/Archives -name MyApp-$version.xcarchive)
if [[ $ORGANIZER_ARCHIVE ]]
then
echo "::notice::Uploading: $ORGANIZER_ARCHIVE"
else
echo "::error::Archive MyApp-$version.xcarchive not found"
find -s ~/Library/Developer/Xcode/Archives -name \*.xcarchive
@paulz
paulz / create-simulators.zsh
Created April 5, 2023 04:18
Script to create or re-create simulators on self hosted runner
#!/bin/zsh
scriptDir=${0:a:h}
deleteAndCreate() {
xcrun simctl delete "$1"
xcrun simctl create "$1" com.apple.CoreSimulator.SimDeviceType.iPad-mini-6th-generation 2> /dev/null
}
createSimulatorWithContact() {
@paulz
paulz / update-dependencies.yml
Created April 4, 2023 03:43
Weekly PR to update dependencies
name: dependencies update
# Weekly PR to update dependencies:
# - Swift Packages
# - Github actions
on:
workflow_dispatch:
push:
branches:
@paulz
paulz / test-flight.yml
Last active April 10, 2023 05:58
TestFlight via fastlane deployment GitHub Actions workflow
name: TestFlight
on:
workflow_dispatch:
inputs:
changelog:
type: string
description: What to test
required: true
@paulz
paulz / build-and-test.yml
Last active April 4, 2023 02:57
GitHub Actions workflows
name: test on Simulator
on:
workflow_dispatch:
schedule:
# At every 10th minute past every hour from 9 through 13.
# which is 1 am PST
- cron: '*/10 9-13 * * *' # https://crontab.guru/#*/10_9-13_*_*_*
pull_request:
branches:
@paulz
paulz / first.md
Created March 8, 2023 17:34
Daniel and Paul create an article

first idea, can we both edit this?

@paulz
paulz / ci_post_clone.sh
Created June 7, 2022 06:20
Xcode Cloud Hardware
#!/bin/zsh
system_profiler SPHardwareDataType
system_profiler SPDisplaysDataType
@paulz
paulz / apply-patch.zsh
Last active May 21, 2022 03:40
How to fix python errors from Xcode bitcode-build-tool
#!/bin/zsh
cd /Applications/Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/
sudo patch < ${0:a:h}/buildenv.patch
@paulz
paulz / instructions.md
Created April 19, 2022 05:29
macOS Screen Share to GitHub hosted runner