Skip to content

Instantly share code, notes, and snippets.

@adamzarn
adamzarn / add-swift-support
Last active November 30, 2023 20:17
A bash script to add the SwiftSupport folder to an .ipa to resolve the ITMS-90426: Invalid Swift Support error.
#!/bin/bash
# Usage:
# 1. Copy the script into a text editor and save it with no extension
# 2. Make it executable like so: chmod +x path/to/script
# 3. Run it from the Terminal in one of two ways:
# * path/to/script ipa_path="path/to/ipa" archive_path="path/to/xcarchive"
# * path/to/script ipa_path="path/to/ipa" toolchain_path="path/to/toolchain"
@brbowden
brbowden / resign_ipa.sh
Created October 25, 2019 03:01
Resign IPA and include Swift Support libraries
#!/usr/bin/env bash
# Usage: sh resign_ipa.sh <IPA file> <full build version>
# i.e.: sh resign_ipa.sh ~/Downloads/Wolf.ipa 2.6.11.914
# Repackages and resigns the ~/Downloads/Wolf.ipa file and deposits the resulting file at ~/WolfBuilds/Wolf.2.6.11.914.ipa
# fail if any commands fails
set -e
# debug log
set -x
import UIKit
class FloatingButtonController: UIViewController {
private(set) var button: UIButton!
required init?(coder aDecoder: NSCoder) {
fatalError()
}
#!/bin/bash
cd /***
APP="input.ipa"
IPA="output.ipa"
TEMP_IPA_BUILT="***"
unzip ${APP}
APP="Payload/aplikacja.app"
echo "+ Packaging ${APP} into ${IPA}"
@easonoutlook
easonoutlook / IOPlatformSerialNumber
Created September 10, 2014 11:33
"IOPlatformSerialNumber" = “removed”
This file has been truncated, but you can view the full file.
*** IOService Tree ***
+-o Root <class IORegistryEntry, retain count 11>
| {
| "IOKitBuildVersion" = "Darwin Kernel Version 14.0.0: Mon Sep 9 20:56:02 PDT 2013; root:xnu-2423.1.74~2/RELEASE_ARM64_S5L8960X"
| "OS Build Version" = "11A470a"
| "OSKernelCPUSubtype" = 0
| "OSKernelCPUType" = 16777228
| "OSPrelinkKextCount" = 152
| "IOConsoleLocked" = Yes
| "IORegistryPlanes" = {"IO80211Plane"="IO80211Plane","IOPower"="IOPower","IODeviceTree"="IODeviceTree","IOService"="IOService","IOAccessory"="IOAccessory","CoreCapture"="CoreCapture"}
@andrep
andrep / configure.ios
Created December 3, 2013 23:51
A script to run `./configure` for various iOS devices. Lightly tested and WorksForMe™.
#!/bin/sh -x -e
case "$ARCH" in
armv6-apple-darwin10|armv7-apple-darwin10|armv7s-apple-darwin10|arm64-apple-darwin10|i386-apple-darwin11)
;;
*)
cat <<EOF
Must set ARCH environment variable to
armv6-apple-darwin10 = All iOS devices
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active June 26, 2024 07:52
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@nolanw
nolanw / ios-configure
Created January 26, 2011 01:48
Compile a library for iOS 4.3 using its configure script
#!/bin/bash
# ios-configure runs a "configure" script using the iOS 4.3 SDK, generating a
# static library that will load and run on your choice of iPhone, iPad, and
# their respective simulators.
#
# Simply run in the same directory as a "configure" script.
# You can run this script for multiple targets and use lipo(1) to stitch them
# together into a universal library.
#