# AppKit in Swift Playgrounds

DevFeed: [AppKit in Swift Playgrounds](<https://devfeed.tech/articles/appkit-in-swift-playgrounds-27353.md>)

Original publisher: [Read original article](<https://saagarjha.com/blog/2020/02/11/appkit-in-swift-playgrounds/>)

Published: 2020-02-11T00:00:00Z

Content type: article

Language: en

Sources: [Saagar Jha](<https://devfeed.tech/sources/saagar-jha.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Code](<https://devfeed.tech/topics/code.md>), [Objective-C](<https://devfeed.tech/topics/objective-c.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [macos](<https://devfeed.tech/tags/macos.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [swift](<https://devfeed.tech/tags/swift.md>)

## AI overview

The article examines how Swift Playgrounds on macOS can import AppKit in a Mac Catalyst application, despite most Cocoa APIs being unavailable. It describes using the Objective-C runtime to create a native window and notes that official support may come in a future release.

## Source excerpt

A Catalyst version of the Swift Playgrounds app launched for macOS earlier today, with support for the Mac Catalyst platform SDK. While it's usually impractical to import AppKit in a Catalyst application, this is apparently now possible in Swift Playgrounds. Most Cocoa APIs have been marked as unavailable, but import AppKit does cause the image to actually end up being loaded so it only takes a little bit of work to be able to use them: