Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
// | |
// CustomPicker.swift | |
// | |
// Created by T Brennan on 27/3/21. | |
// | |
import SwiftUI | |
struct ContentView: View { | |
@State private var selection: Int? = 0 |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
swiftc main.swift -emit-module-path main.swiftmodule -emit-executable -enable-private-imports -Xfrontend -enable-implicit-dynamic
./main
-> prints From original bar()
swiftc -emit-library inject.swift -o inject.dylib -I . -Xlinker -undefined -Xlinker suppress -Xlinker -flat_namespace -Xfrontend -disable-access-control
DYLD_INSERT_LIBRARIES=inject.dylib ./main
-> prints From replacement bar()
-Xfrontend -enable-implicit-dynamic
removes you from having to add dynamic
to everything you want to be replacableimport UIKit | |
extension UIDevice { | |
/* | |
List can be updated here: | |
https://gist.github.com/adamawolf/3048717 | |
*/ | |
internal static var models: String = """ |
// | |
// OSLogStream.swift | |
// LoggingTest | |
// | |
// Created by Peter Steinberger on 24.08.20. | |
// | |
// Requires importing https://github.com/apple/llvm-project/blob/apple/master/lldb/tools/debugserver/source/MacOSX/DarwinLog/ActivityStreamSPI.h via bridging header | |
import Foundation |
import OSLog | |
class LogReader: ObservableObject { | |
var log: OSLogStore | |
init?() { | |
do { | |
log = try OSLogStore.init(scope: .currentProcessIdentifier) | |
dump(log) | |
/* |
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
HStack { | |
Text("Hello") | |
.padding() | |
.background(.blue) | |
.overlay { | |
Color.yellow |