Kyle Ye

1K posts

Kyle Ye

Kyle Ye

@KyleSwifter

Swift programmer / SDWG member / Darwin platform hacker Options are my own. Follow me for learning SwiftUI internal details. https://t.co/DvuIoVvRqi

Earth Entrou em Aralık 2018
162 Seguindo2.5K Seguidores
Kyle Ye
Kyle Ye@KyleSwifter·
OpenSwiftUI 0.17.0 release: - Add Xcode Preview support - Add Text rendering - Add OpenSwiftUI xcframework support - Update framework logo See full release notes: github.com/OpenSwiftUIPro… #OpenSwiftUI #OSUI
Kyle Ye tweet mediaKyle Ye tweet media
Kyle Ye@KyleSwifter

OpenSwiftUI 0.16.0 release: - Add NS/UIApplicationDelegateAdapter support - Add Compute backend support as an alternative to AttributeGraph - Add NamedImage support for bundle image and system image github.com/OpenSwiftUIPro…

English
0
8
84
12.1K
Kyle Ye
Kyle Ye@KyleSwifter·
First thanks for your PR @pepicrft , but I have hit some problem using the tuist setup. Trying to ping you both via PM and GH issue. Would you mind have a check on it to follow up? Before it got resolved, I'll use plain SPM xcodeproj integration then using #838.
English
1
0
1
291
Kyle Ye
Kyle Ye@KyleSwifter·
Preparing a xcframework release of OpenSwiftUI so that everyone can give it a try more easily,
Kyle Ye tweet media
English
2
2
73
3.9K
Kyle Ye
Kyle Ye@KyleSwifter·
@nathantannar4 @absolute__tk _UIHostingView is also a private API as opposed to NSHostingView and still have some side effect when embedding a SwiftUI View eg. safeArea.
English
0
0
2
79
Kyle Ye
Kyle Ye@KyleSwifter·
SwiftUI has a hidden CAHostingLayer API — host your SwiftUI views directly in a CALayer. Currently used internally by UIKit/AppKit and WebKit. Available since iOS 18 / macOS 15. I wrote a guide on how to access it without Apple's internal SDK 👇 gist.github.com/Kyle-Ye/8a7f12…
Kyle Ye tweet media
English
4
26
203
13.5K
Kyle Ye
Kyle Ye@KyleSwifter·
@NathanBLawrence Those are private API and should not be shipped on prod of course.
English
0
0
3
263
Nathan Lawrence 🌈
Nathan Lawrence 🌈@NathanBLawrence·
@KyleSwifter If you’re just messing around, have fun! But careful with software you ship to others using these, even more than usual.
English
2
0
9
821
Kyle Ye
Kyle Ye@KyleSwifter·
@absolute__tk It's essential when embedding SwiftUI content inside UIKit/AppKit — you don't want an extra hosting controller sitting inside your view hierarchy. A lightweight CALayer integrates much more naturally.
English
2
1
15
565
Kyle Ye
Kyle Ye@KyleSwifter·
Also worth noting — OpenSwiftUI provides this API too. If you're using OpenSwiftUI, you can use CAHostingLayer directly via _spi import OpenSwiftUI without the extra swiftinterface workaround. See #831 and #832 for more detail.
Kyle Ye tweet media
English
0
0
8
1K
Kyle Ye
Kyle Ye@KyleSwifter·
@mahyarm8 @oskargroth @sids7 A simpler way to understand this is to just read the OpenSwiftUI source code (or run and debug it lively). I went through this manually a few years ago. #L433-L484" target="_blank" rel="nofollow noopener">github.com/OpenSwiftUIPro… It used to take a lot of effort to piece this together — now AI can walk through 80% of it in minutes.
English
0
0
2
70
Mahyar McDonald
Mahyar McDonald@mahyarm8·
@oskargroth @sids7 Can it figure out how and when the graph library in swiftui determines when to regenerate view structs and call various stateobject initializers?
English
2
0
7
9.8K
Siddharth
Siddharth@sids7·
Codex's ability to reverse engineer private macOS frameworks is uncanny. Just added an HDR toggle to DisplayBuddy - so many users asked for this!
English
14
28
1K
119.6K
Kyle Ye
Kyle Ye@KyleSwifter·
Inspired by @_julianschiavo's recent work, I started reworking OpenSwiftUI's Xcode Preview support. It's now working on OSUI via a lightweight shim layer + some tweaks around XCODE_RUNNING_FOR_PREVIEWS 🎉
Kyle Ye tweet mediaKyle Ye tweet media
English
1
1
55
3.5K
Kyle Ye
Kyle Ye@KyleSwifter·
github.com/pointfreeco/sw… Add swift-testing Attachment for snapshot testing. Upstream has not supported it and I fallback to use my fork instead.
Kyle Ye tweet media
English
0
1
16
1.4K
Kyle Ye
Kyle Ye@KyleSwifter·
Finally got basic Text rendering working on OpenSwiftUI 🎉
Kyle Ye tweet mediaKyle Ye tweet media
English
2
3
132
10.3K
Kyle Ye
Kyle Ye@KyleSwifter·
@_julianschiavo @renegademtl > what are you trying to do? May Preview work for OSUI. > `nm` the private framework Besides that, sometimes we may also need to enable library evolution to align with the private framework's ABI if we want to pass in some data or conform to some protocol from it.
English
0
0
0
31
Julian Schiavo
Julian Schiavo@_julianschiavo·
@KyleSwifter @renegademtl Interesting, what are you trying to do? ABI/API issues should be solvable by asking AI/Codex to `nm` the private framework and solve swiftinterface issues
English
1
0
0
57
Julian Schiavo
Julian Schiavo@_julianschiavo·
Fun fact: you can just tell Codex to go figure out how to use a private framework you need on macOS. It is insanely good at dumping symbols and making its own `.swiftinterface` for the framework, which you can then link against when compiling.
Julian Schiavo tweet media
English
8
9
243
23.7K
Kyle Ye
Kyle Ye@KyleSwifter·
@_julianschiavo @renegademtl Got it. But in my case, the crash does not seem to be entitlement related permission but some strange framework ABI issue. My current implement is something like the following. Anyway I'll give the new PreviewsPlatform a look when I have time.
Kyle Ye tweet media
English
1
0
0
52
Julian Schiavo
Julian Schiavo@_julianschiavo·
@KyleSwifter @renegademtl For previews? Anything through Mach/xpc is blocked (gated) unfortunately, inaccessible without disabling SIP from what I can tell. I feel like there has to be a way to hack this from the sim side (using SIM_CHILD_DYLD_INJECT_LIBRARY) but I haven’t figured it out yet :(
English
1
0
1
46
Kyle Ye
Kyle Ye@KyleSwifter·
@perezstudioio For other details: you will know it after you clone the repo and run it. 😊
English
0
0
0
26
Kyle Ye
Kyle Ye@KyleSwifter·
@perezstudioio It is API compatible with SwiftUI. 1. via shaft(skia) backend: a cross platform DSL on all supported platform(Currently only support macOS and has not been merged yet) 2. via CA/RB backend on Darwin: Debug SUI & AG issue with OSUI & OAG source code. Not recommended for prod.
English
1
0
0
66
Kyle Ye
Kyle Ye@KyleSwifter·
@_julianschiavo @renegademtl Trying to add #Preview support for OpenSwiftUI before and failed due to some strange Xcode preview framework related crash 💥. Would you mind sharing more information on this private framework? 😉
English
1
0
0
36
Kyle Ye
Kyle Ye@KyleSwifter·
Yeah. I used to do this manually (craft fake header and swiftinterface to compose xcframework and export as private SDK). LLM can really speed up this process. Here is some skills and scripts I use ⬇️ github.com/OpenSwiftUIPro…
Julian Schiavo@_julianschiavo

Fun fact: you can just tell Codex to go figure out how to use a private framework you need on macOS. It is insanely good at dumping symbols and making its own `.swiftinterface` for the framework, which you can then link against when compiling.

English
1
5
57
7.5K