This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import OSLog | |
@main | |
struct LogReaderApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import OSLog | |
class LogReader: ObservableObject { | |
var log: OSLogStore | |
init?() { | |
do { | |
log = try OSLogStore.init(scope: .currentProcessIdentifier) | |
dump(log) | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
func getBootedSimulatorTCCDBPath() -> String { | |
let getBundlePath = Process() | |
let outputPipe = Pipe() | |
getBundlePath.standardOutput = outputPipe | |
getBundlePath.executableURL = URL(fileURLWithPath: "/usr/bin/xcrun") | |
getBundlePath.arguments = ["simctl", "get_app_container", "booted", "sean.systems.SimpleUITest"] | |
getBundlePath.launch() | |
getBundlePath.waitUntilExit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ObjectiveC | |
import PlaygroundSupport | |
import Foundation | |
var loadedClasses = [String]() | |
NotificationCenter.default.addObserver(forName: Bundle.didLoadNotification, object: nil, queue: nil, using: { (n) in | |
let classes = n.userInfo?[NSLoadedClasses] as! [String] | |
loadedClasses.append(contentsOf: classes) | |
loadedClasses.sort() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Cocoa | |
import MediaPlayer | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
if #available(OSX 10.12.2, *) { | |
let centre = MPRemoteCommandCenter.shared() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import WebKit | |
import PlaygroundSupport | |
let playbackRate = 1.7 | |
let session = "417" | |
let userScript = WKUserScript(source: "document.querySelector('video').playbackRate = \(playbackRate);", injectionTime: .atDocumentEnd, forMainFrameOnly: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Enums and Dictionaries: how do they work? | |
import Foundation | |
enum Enum { | |
case A | |
case B | |
} | |
class O: NSObject {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sep 22 18:38:20 Bane-of-TXL pkd[116] <Warning>: assigning plug-in com.pcalc.mobile.watchkitapp.watchkitextension(3.5) to plugin sandbox | |
Sep 22 18:38:20 Bane-of-TXL pkd[116] <Warning>: enabling pid=100 for plug-in com.pcalc.mobile.watchkitapp.watchkitextension(3.5) 4D89534E-38B4-4DA9-927E-BC916E3036A4 /private/var/mobile/Containers/Bundle/Application/DB2AC5B3-2F01-4DA5-811F-B214DA74CEA0/PCalc WatchKit App.app/PlugIns/PCalc WatchKit Extension.appex | |
Sep 22 18:38:20 Bane-of-TXL kernel[0] <Notice>: AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42004 | |
Sep 22 18:38:20 Bane-of-TXL com.apple.xpc.launchd[1] (com.pcalc.mobile.watchkitapp.watchkitextension[707]) <Warning>: FairPlay decryption failed on binary. | |
Sep 22 18:38:20 Bane-of-TXL gizmoappd[100] <Warning>: plugin com.pcalc.mobile.watchkitapp.watchkitextension interrupted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xed -l 42 file && osascript << SCRIPT | |
tell application "Xcode-Beta" | |
activate | |
end tell | |
tell application "System Events" | |
tell application process "Xcode" | |
click menu item "Jump to Selection" of menu "Navigate" of menu bar 1 | |
end tell | |
end tell |
NewerOlder