Skip to content

Instantly share code, notes, and snippets.

@danieltorrecillas
danieltorrecillas / resign-ios-app
Created November 23, 2020 16:39
Bash script to resign an iOS app
#!/usr/bin/env bash
set -e
# Resigns an iOS app with a given provisioning profile, distribution certificate, and, optionally, a new bundle identifier.
# This script expects to be invoked with at least three arguments.
# $1 is expected to be the path of the .ipa to be resigned
# $2 is expected to be the path of the .mobileprovision to resign $1 with
# $3 is expected to be the name of the distribution certificate in the Keychain to resign $1 with
# $4 is optional. If included, this will be the new bundle identifier of the resigned app. If not included, the original bundle identifier will be used.
@danieltorrecillas
danieltorrecillas / gist:4427405c1d68973457081c0c2cf99866
Created October 27, 2018 08:24
Clear CFBundleVersion (build) number
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion git_count" "${PRODUCT_SETTINGS_PATH}"
echo "Cleared build number in ${PRODUCT_SETTINGS_PATH}"
@danieltorrecillas
danieltorrecillas / gist:2ed0b957d225ef7cc9d82b2f0a1e4bb4
Created October 27, 2018 08:23
Increment CFBundleVersion (build) number from git
git=`sh /etc/profile; which git`
branch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\(.*\\),\\1,'`
git_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $git_count" "${PRODUCT_SETTINGS_PATH}"
echo "Updated build number in ${PRODUCT_SETTINGS_PATH} to $git_count from $branch_name"
{
"editor.tabSize": 2,
"editor.scrollBeyondLastLine": false,
"diffEditor.ignoreTrimWhitespace": false,
"workbench.colorTheme": "Default Light+",
"workbench.panel.location": "bottom",
"editor.minimap.enabled": false,
"terminal.integrated.cursorBlinking": true,
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,