Skip to content

Instantly share code, notes, and snippets.


Jordan Bondo faithfracture

  • OpenEye
  • Cheney, WA
View GitHub Profile
sevar83 / ParcelSortedMapAdapter.kt
Created Feb 21, 2017
PaperParcel SortedSet and SortedMap adapters
View ParcelSortedMapAdapter.kt
class ParcelSortedMapAdapter<K, V>(
private val keyAdapter: TypeAdapter<K>,
private val valueAdapter: TypeAdapter<V>
) : TypeAdapter<@JvmSuppressWildcards SortedMap<K, V>> {
override fun readFromParcel(source: Parcel): SortedMap<K, V> {
val size = source.readInt()
val map = TreeMap<K, V>()
for (ignored in 1..size) {
val key = keyAdapter.readFromParcel(source)
cconway25 / gist:7ff167c6f98da33c5352
Created Aug 11, 2014
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool.
View gist:7ff167c6f98da33c5352
# make sure the output directory exists
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
# Step 2. Copy the framework structure to the universal folder
adamawolf / Apple_mobile_device_types.txt
Last active Oct 21, 2021
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
View Apple_mobile_device_types.txt
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