Skip to content

Instantly share code, notes, and snippets.

View armadsen's full-sized avatar

Andrew Madsen armadsen

View GitHub Profile
@armadsen
armadsen / 2019_apps_using_swift.csv
Created February 17, 2019 06:29
Data generated by analysis of the top 110 iOS apps as of January 15, 2019
app_name bundle_id sdk deployment_target uses_swift percentage_swift main_binary_uses_swift is_game executable
30 Day Fitness com.vigorapps.30DayFitness iphoneos12.0 10 TRUE 31% TRUE FALSE ThirtyDaysFitness
8 Ball Pool com.miniclip.8ballpoolmult iphoneos11.3 8 FALSE 0% FALSE TRUE pool
Amazon com.amazon.Amazon iphoneos11.4 9 FALSE 0% FALSE FALSE Amazon
Amazon Alexa com.amazon.echo iphoneos11.2 10 TRUE 28% TRUE FALSE AlexaMobileiOS-prod
Astro Palmistry & Horoscope com.gfb.horoscope iphoneos12.1 8 FALSE 0% FALSE FALSE horoscope
Ball Blast com.nomonkeys.ball-blast iphoneos12.1 9 FALSE 0% FALSE TRUE ball-blast
BetterMen com.betterme.bettermen iphoneos12.0 10 TRUE 74% TRUE FALSE BetterMen
BitLife com.wtfapps.apollo16 iphoneos12.1 8 FALSE 0% FALSE TRUE Apollo16
Bitmoji com.bitstrips.imoji iphoneos11.4 10 TRUE 20% TRUE FALSE imoji
@armadsen
armadsen / analyze_apps.py
Created February 15, 2019 19:14
Script to analyze Swift usage in iOS or Mac apps
from pathlib import Path
import plistlib
import subprocess
import re
import csv
def app_uses_swift(path):
libswiftPath = path / 'Frameworks' / 'libswiftCore.dylib'
return libswiftPath.exists()
@armadsen
armadsen / MIKMIDISynthesizer+Volume.swift
Created May 12, 2018 21:18
Extension to add a volume property to MIKMIDISynthesizer on iOS
//
// MIKMIDISynthesizer+Volume.swift
//
// Created by Andrew Madsen on 3/22/16.
// Copyright © 2016 Mixed In Key. All rights reserved.
//
import Foundation
import CoreAudio
import MIKMIDI
/* Compile this with:
clang -std=c99 -framework CoreMIDI -fed MIDIPacketNextTest.m
Run:
./a.out
*/
@armadsen
armadsen / CommitSubmodules.sh
Created July 19, 2017 02:18
Quick and dirty bash script to recursively commit submodules
if [[ "$#" -ne 1 ]]; then
echo "You must specify a commit message as an argument."
exit 1
fi
COMMIT_MESSAGE="$1"
git submodule foreach "echo 'Adding all files.'; git add ."
git submodule foreach "echo 'Stashing.'; git stash"
git submodule foreach "echo 'Checking out master branch.'; git checkout master"
git submodule foreach "echo 'Applying stash.'; git stash apply"
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: (none)
HEAD: (none)
Last commit: never
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://ia902307.us.archive.org/31/items/tigerbrew
CPU: single-core 32-bit g4e
@armadsen
armadsen / UploadBuild.sh
Last active October 12, 2021 18:00
Simple script for creating a zip and DMG, uploading to S3, and posting a new build to an Appcaster instance.
#!/bin/sh
# UploadBuild.sh
# Aether
#
# Created by Andrew Madsen on 11/7/15.
# Copyright © 2015 Open Reel Software. All rights reserved.
S3BucketName=<redacted>
username="<redacted>"
@armadsen
armadsen / MIKMIDISequence+BarBeatTime.m
Created July 1, 2016 16:17
Quick (untested) example of getting bar-beat time for a particular timestamp in an MIKMIDISequence.
@interface MIKMIDISequence (BarBeatTime)
- (CABarBeatTime)barBeatTimeForTimeStamp:(MusicTimeStamp)timeStamp error:(NSError **)error;
@end
@implementation MIKMIDISequence (BarBeatTime)
- (CABarBeatTime)barBeatTimeForTimeStamp:(MusicTimeStamp)timeStamp error:(NSError **)error
{
error = error ?: &(NSError *__autoreleasing){ nil };
UInt32 timeResolution = 0;
@armadsen
armadsen / deletescreen.rb
Last active January 28, 2016 17:35
Ruby script using spaceship to delete all existing screenshots for an iOS app on iTunes Connect
#!/usr/bin/env ruby
require "spaceship"
Spaceship.login('yourusername', 'yourpassword')
Spaceship::Tunes.login('yourusername', 'yourpassword')
du = Spaceship::Tunes.client.du_client
app = Spaceship::Tunes::Application.find "app.bundle.id"
@armadsen
armadsen / KVODependentToManyBug.m
Created November 5, 2015 22:12
Example program attached to Radar #
#import <Foundation/Foundation.h>
@interface Foo : NSObject
@property (nonatomic, strong) NSArray *bars;
- (void)addBar:(NSString *)bar;
- (void)removeBar:(NSString *)bar;
@end