Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1690] Add JNI support for Android #44299

Open
ephemer opened this issue Jun 6, 2016 · 0 comments
Open

[SR-1690] Add JNI support for Android #44299

ephemer opened this issue Jun 6, 2016 · 0 comments
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@ephemer
Copy link

ephemer commented Jun 6, 2016

Previous ID SR-1690
Radar None
Original Reporter @ephemer
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Android
Assignee None
Priority Medium

md5: a9800741e5c48aabda3b49741403b21f

Issue Description:

We can't do much with swift on android without a working JNI bridge.

I've got a "MVP" solution working here:
https://github.com/SwiftAndroid/swift-jni

It provides a thin wrapper over the C API, with some more OOP structure (currently via a 'jni' global, which is not very Cocoa-like), with some nil checks and optionals to make it more swift-like. There's also a wrapper to make JavaCallbacks using a jniGlobalRef of your Java instance and possibly a couple of other experiments that I've forgotten about.

The question is, should this be a part of swift core or continue to be maintained by the community? To me the answer to this should be based on whether we see an Android port as useful without it.

Maybe we can have a CJNI package that does little more than wrap the headers, and a community package that makes it more swift-like? On the other hand, this is Swift. Why not have a half-decent Swift API built in?

I'm looking for guidance as to how to continue this conversation and how to proceed with the JNI module I linked to above.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant