Skip to content

Instantly share code, notes, and snippets.

View vpolsinelli's full-sized avatar

Vince Polsinelli vpolsinelli

View GitHub Profile
@roostr
roostr / Watchdog.swift
Last active March 19, 2024 14:40
A watchdog timer for iOS to detect when the main run loop is stalled
//
// Watchdog.swift
//
// The MIT License (MIT)
// Copyright © 2023 Front Pocket Software LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
@KaneCheshire
KaneCheshire / SimEnv_Xcode11.json
Created September 26, 2019 07:44
Output for the environment variables available on iOS simulators using `ProcessInfo.processInfo.environment`
{
"CA_ASSERT_MAIN_THREAD_TRANSACTIONS": "0",
"CA_DEBUG_TRANSACTIONS": "0",
"CFFIXED_USER_HOME": "/Users/kanecheshire/Library/Developer/XCTestDevices/2F7BBCEE-1020-4C33-9740-DCB7640911A4/data/Containers/Data/Application/4F2F5AA6-B639-45DE-9851-904569336CC4",
"CUPS_SERVER": "/private/tmp/com.apple.launchd.rz10bWAeQ8/Listeners",
"DYLD_FALLBACK_FRAMEWORK_PATH": ":",
"DYLD_FALLBACK_LIBRARY_PATH": "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib",
"DYLD_FRAMEWORK_PATH": "/Users/kanecheshire/Library/Developer/Xcode/DerivedData/Retryable-fezwrtdwmzupungrxeqznlnohxjl/Build/Products/Debug-iphonesimulator:/Users/kanecheshire/Library/Developer/Xcode/DerivedData/Retryable-fezwrtdwmzupungrxeqznlnohxjl/Build/Products/Debug-iphonesimulator",
"DYLD_LIBRARY_PATH": "/Users/kanecheshire/Library/Developer/Xcode/DerivedData/Retryable-fezwrtdwmzupungrxeqznlnohxjl/Build/Products/Debug-iphones
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@mat
mat / Readme.markdown
Last active February 19, 2024 07:46
apple-app-site-association —with examples

“apple-app-site-association” file

One file for each domain, both www.example.com and example.com need separate files:

{
    "applinks": {
        "apps": [],
        "details": {
 "9JA89QQLNQ.com.apple.wwdc": {