Skip to content

Conversation

@ktoso
Copy link
Collaborator

@ktoso ktoso commented Oct 28, 2025

Based on public reception, people were immediately opening up the "simplest name" looking one, and then taken aback by the low-level JNI bridging full of unsafe code and cdecl etc. We should make it clear that those examples are just that: low level and raw jni examples, as compared to other ones using swift-java interop.

It should be easier to discover the swift-java example, because that provides a better first impression, and long term user experience.

Based on public reception, people were immediately opening up the
"simplest name" looking one, and then taken aback by the low-level JNI
bridging full of unsafe code and cdecl etc. We should make it clear that
those examples are just that: low level and raw jni examples, as
compared to other ones using swift-java interop.

It should be easier to discover the swift-java example, because that
provides a better first impression, and long term user experience.
@timsneath
Copy link
Collaborator

Some examples of where this is causing confusion:

It's unfortunate because readers who see these comments will have a false perception of the wonderful work the Android Workgroup has done here. I'm hoping that reorganizing these examples can draw attention to the true ergonomics of this for an author of business logic.

@marcprux
Copy link
Contributor

Agreed that this reorg will be useful for clarification.

We should also flesh out the README a lot more, but that can be saved for a future PR.

@ktoso
Copy link
Collaborator Author

ktoso commented Oct 28, 2025

Thanks folks; yeap we can keep polishing readme and examples more afterwards still

@ktoso ktoso merged commit d826553 into main Oct 28, 2025
@andriydruk
Copy link
Contributor

Not sure this example should be listed under “Examples using raw JNI without generated bridging sources”

native-activity - a complete native Android activity with OpenGL ES rendering, written entirely in Swift.

It looks like it needs its own separate section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants