Skip to content

Instantly share code, notes, and snippets.

@seanhenry
seanhenry / resign.sh
Last active April 24, 2024 09:14
Resign an ipa and change the build number
APPNAME=App
BUILDNUMBER=123
CERTIFICATE="iPhone Distribution"
cp "${APPNAME}.ipa" "${APPNAME}.zip"
mkdir contents || true
unzip "${APPNAME}.zip" -d contents
codesign -d --entitlements :Entitlements.plist "contents/Payload/${APPNAME}.app"
plutil -replace CFBundleVersion -string "${BUILDNUMBER}" "contents/Payload/${APPNAME}.app/Info.plist"
rm -r "contents/Payload/${APPNAME}.app/_CodeSignature"
@rothomp3
rothomp3 / singleton.swift
Created October 5, 2015 21:40
Example of building an inheritance-friendly singleton class in Swift
#!/usr/bin/xcrun -sdk macosx swift
import Foundation
public protocol SharedInstanceType
{
init()
}
private struct TokenKey
@rjungemann
rjungemann / Communicator.h
Created June 21, 2010 00:45
How to open a TCP socket in Objective-C
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;