[swift-evolution] [Pitch]Building a limited framework to develop Android Apps in Swift 3.0
devteam.codafi at gmail.com
Mon Oct 10 13:14:29 CDT 2016
> On Oct 10, 2016, at 2:04 PM, Tony Constantinides via swift-evolution <swift-evolution at swift.org> wrote:
> Its a nice cop-out, but this framework is an extension of the standard library of Swift
Then it requires a proposal as much. Bear in mind that the Swift Standard Library is platform-agnostic. Adding support for Android necessarily contradicts that and will be a hard sell. Further, I don’t believe stdlib is the right target for this kind of library at all and will lead to the same lowest-common-denominator style of application as with Java on every other platform they support.
This doesn’t belong anywhere near core libs, but as a 3rd-party project it would certainly be welcome to have Android bindings.
> as it will allow Swift developers to target new mobile platforms. This is the mailing lists for the evolution of Swift which is what this is. I not sure any of the other Swift mailing lists suits this goal. I not making Swift language changes(maybe) but adding an additional library that developers can build against if they are interested in having their Swift code running on Android.
> Note that the Swift project itself has provided documentation and hooks to provide this capabailit seen here
> https://github.com/apple/swift/blob/master/docs/Android.md <https://github.com/apple/swift/blob/master/docs/Android.md>
> The main issue is that swiftcore is missing on Swift for Linux.
Unless Android gets support for Objective-C (shudder) I don’t think you need SwiftCore for this.
> Its only important to understand I going to build this framework with or without support from Swift.org. However I want other developers to benefit from my work and I want to give back to the community. I find it extremely disappointing if Swift core members reject enhancing Swift to target additional mobile platforms as making Swift cross-platform is a stated goal.
I think this is a bit of a strawman. Members of this community have spent a lot of time and effort getting Swift to even build on Android. To say we’d “reject” this because it’s out of bounds for inclusion in the libraries you’re trying to include it in is ignoring the larger problems inherent in this proposal.
> On Mon, Oct 10, 2016 at 9:41 AM, Douglas Gregor <dgregor at apple.com <mailto:dgregor at apple.com>> wrote:
> > On Oct 9, 2016, at 9:45 PM, Tony Constantinides via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> > In Swift 3.0 you can build Android apps in Linux but only console apps as there is no framework to build GUI apps using JNI.
> > What I propose is to build an initial limited framework coded in C that calls enough of the Java Android API via JNI to bootstrap the android app and to create widgets and layouts.A default Androidmanifest.xml file and some files needed to be generated to make a valid android app.
> > The Android API java surface is vast, so this framework needs to be build over many releases to be useful. Developing a graphical Android app requires interaction with "Activities" and the package manager and some widgets like Button and some layouts like "RelativeLayout" and "LinearLayout".
> > The result will be the ability to develop GUI Android apps on Linux using Swift 3.0
> > Further support for additional APIs will be provided once the basics are solid..
> > Who am I: Senior Android mobile developer with more than six years experience on Android.
> > Am I able to build Swift 3.0 on Linux: Yes
> The swift-evolution process is primarily focused on the Swift language and standard library. Large-scale API development, which binding to/creating a GUI library entails, is out-of-scope for this process and should occur in a different forum.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution