55 Followers
19 Following
31 Posts
A Swift Programmer
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.
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 👇
https://gist.github.com/Kyle-Ye/8a7f12487a4ce2ca6ac9e087b09d4a20
Here’s a sneak peek at the TOC I’m drafting for the article 👇
Anyone interested in how to quickly dive into and debug the internals of SwiftUI?
I’m planning to publish an article later this month about how I debug and fixed this issue
https://github.com/OpenSwiftUIProject/OpenSwiftUI/issues/461
Stay tuned—and let me know in the comments which parts you’d be most curious about!
If you can fully understand what the code in the screenshot is doing, I guess you can then call yourself as a truly SwiftUI engineer instead of SwiftUI developer. 👀

Looking for recommended resources (blog article/tutorial video/code snippet etc.) on kdebug for internal SwiftUI tracing research.

My current references: /usr/share/misc/trace.codes and xnu/bsd/sys/kdebug.h.

Suggestions appreciated!

Digging and fixing another OG crash case when implementing ViewModifier.
withUnsafePointer(x) will create a copy of x while withUnsafePointer(&x) will not.
Since &x is just an invalid pointer here, the former will crash.
https://github.com/OpenSwiftUIProject/OpenGraph/pull/71
Fix PointerOffset.offset implementation by Kyle-Ye · Pull Request #71 · OpenSwiftUIProject/OpenGraph

Close #70

GitHub
Joined as an intern on 2021, and today is my last day at ByteDance.
It’s been a pleasure working with so many creative engineers and designers.
And working with one of the largest mobile app codebase is definitely a challenge for me.
But I think I'll start my new life tomorrow.

Fun fact about APSL

What’s the point of $50 here?

> Thought it was an April Fool's joke at first glance.

https://opensource.apple.com/apsl/

License - APSL

Useless knowledge:
Learned how to demangle Swift symbol manually today.

> There is a tool named swift-demangle shipping with the toolchain. But sometimes it will be quicker if you master the basic skill :)