-
Notifications
You must be signed in to change notification settings - Fork 1
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
Document supported Foundation types #3
Comments
Hi @piercifani, we have a full support of the Apple's Foundation on Android, i.e. if you use any Foundation class in your code it can be compiled for Android and works as on any Apple platform, e.g. URLSession or FileManager. But if we want to expose any Foundation type to Java/Kotlin, for example, we have a function containing a parameter of type URLSession, it will not work, so, we can not expose functions with Foundation types for now. We plan such mappings as well and work on a list of types that should be mapped first, like Date, Time etc. |
Correct, there are two sides to this question:
|
Hi @piercifani, currently there are no Foundation types exposed to Kotlin, we are going to expose some mostly common types like Date, Locale, URL as soon as we are done with mostly used language features (for example those that you have requested are currently in WIP). But the second part is fully supported, all Foundation types it can be used similarly to the Apple's platform. Our toolchain for Android (current version 5.10) includes the whole implementation of the https://github.com/swiftlang/swift-corelibs-foundation , including some adjustments and specific implementations for Android. The upcoming version 6.0 will contain https://github.com/swiftlang/swift-foundation.git. In other words, when you use FileManager in your swift code you will access the file system on Android exactly the same way you would access on iOS. The URLSession etc. works the same. |
No description provided.
The text was updated successfully, but these errors were encountered: