beeware / beeware/rubicon-objc

Provide tools for accessing Swift-only APIs

Open
#563 17 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
301
Forks
70
Avg merge
1d 8h
Merged PRs (30d)
18

Description

### What is the problem or limitation you are having?

Rubicon ObjC is great for accessing Objective C classes. Objective C code (AIUI, anything subclassing NSObject) is also transparently visible to the Swift runtime.

However, Apple is clearly making a transition to Swift in preference to Objective C. UIKit (on iOS) and AppKit on (macOS) both started as Objective C, and so all the major classes (even newly added ones) seem to retain Objective C access; and all documentation for those classes has both Swift and Objective C flavours.

Newer frameworks, such as [SwiftUI](https://developer.apple.com/swiftui/) (a replacement for UIKit and AppKit, and required for use on watchOS), and [MusicKit](https://developer.apple.com/documentation/musickit) (used to access Apple Music), appear to be published as "Swift Only", with no Objective C examples.

### Describe the solution you'd like

This may not even be possible - or it may require a "Rubicon Swift" project to provide an alternate path into the Swift runtime.

If it *is* possible, Rubicon ObjC needs documentation for how it can be acheived, and/or any assistive tools (such as an analog of `ObjCClass`?) that are needed.

If it *isn't* possible, the limitation should still be documented.

### Describe alternatives you've considered

There really isn't one. Swift is becoming an essential part of the Apple ecosystem; we need a solution for this.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.