Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Does this include the UI components too? Write once, run on both without differentiating Android and iOS UI components? That would be nice, but probably not the case.
Our company uses currently .NET MAUI for cross platform iOS/Android - it's ok, but lots of UI limitations and you still have often to write platform dependent wrapper for certain native controls or operations.
It does not.

This is all about using the recent Swift/Java interoperability to bridge Swift code with the JVM so that it can access the Android SDK. That is, Swift is now one more language that can write Android apps. But has no bridging with other Apple SDKs. For example, SwiftUI doesn't exist on Android so can't be used in an Android app.

I can see this makes sense for Apple for their Android develoment, where they can now use more of their Swift expertise. But it's really all Android-specific development.
 
  • Like
Reactions: System603
Does this include the UI components too? Write once, run on both without differentiating Android and iOS UI components? That would be nice, but probably not the case.
absolutely not the case

Swift already has first-class support for Windows and Linux, and there's not a hint of SwiftUI over there. Just consider them separate and unrelated projects.
 
Last edited:
  • Like
Reactions: blob.DK
Apple has their own Android apps to maintain (Music, TV, Migrate). They could dogfood this, and perhaps Apple sees the App Store filling up with often clunky non-native apps already. They’d be smart to come up with a better approach to meet the need.

I’ve been learning flutter for my work. It’s kind of fun, but also unusual in that the flutter framework renders its own “pixel perfect” replicas of the host OS UI (I can switch my app to Android UI on iOS and vice versa for testing).
The effort to improve Swift usability on Android has been a long-running community effort, and it sounds like they are now close enough to become an officially supported platform, which is the point of this.

There are apparently Apple contributors to the group and I suspect this work (along with Java JNI support) is related like you said to Google Play Store apps that Apple provides - they have internal devs now who would like to write as much common code as reasonable in Swift for their integration code and apps for other platforms. That includes Android/Google TV support for AirPlay and Apple TV+ as well, most likely.

That doesn't mean Apple is trying to turn SwiftUI into say a Flutter competitor - they haven't aimed toward 100% parity with AppKit/UIKit on their own platforms. But you can have a lot of complex business logic and network connectivity logic behind say the Music app; it would be nice if they could share that chunk and make sure it is robust everywhere, even if the code that puts downloaded album covers in a grid is still platform-specific.

I think this is also Apple's recommendation toward cross platform development as well, barring a few oddities like Catalyst.
 
Last edited:
For those who live in these environments, what’s in it for Apple?

Is there a goal to make apps more platform independent like Java?
I really am asking because this isn’t an area I know much about.
So, a couple things… first, the Swift group has a lot of autonomy in Apple. Their goal isn't to sell iPhones, it's to make Swift as good as possible, and that means being a real open source project with all the philosophy that comes with that.

More importantly: the stated goal of Swift is not “to be a great language” or “to be a modern Objective-C” or whatever. They want it to be the default language for computer science. That means that it should not just be performant, but it should also be the best way to express conceptual ideas in computer code.

That role was filled by Java from roughly the mid-nineties through today. CS students still study Java all day but don't spend a minute of their professional lives in it.

Personally, I've spent a bit of time writing iOS and MacOS apps in Swift, but in sheer number of hours, I've spent more time writing Swift for Linux servers (see https://vapor.codes). And as of a week ago, I've started dabbling in Swift for Godot, which was created by the guy who brought Microsoft's C# to Linux and every game platform under the sun under the "Mono" framework.

Apple understands that in order for Swift to fulfill its ambitions, it must be everywhere, not some kind of iOS "secret sauce."
 
Utterly meaningless. If anything, pointing out that the likes of Amazon and Microsoft use it speaks poorly of React Native.

(Yes, I've developed a couple apps with it)
Using React or using React Native? They are very different.
 
So, a couple things… first, the Swift group has a lot of autonomy in Apple. Their goal isn't to sell iPhones, it's to make Swift as good as possible, and that means being a real open source project with all the philosophy that comes with that.

More importantly: the stated goal of Swift is not “to be a great language” or “to be a modern Objective-C” or whatever. They want it to be the default language for computer science. That means that it should not just be performant, but it should also be the best way to express conceptual ideas in computer code.
One could say there's gradual process where Swift the language is independent, and Apple's development on Swift is specifically toward Apple goals - but as a more equal contributor.

It will never be as fully independent as people would like, because Apple would likely use and ship features whether or not the community at large accepts them. However, we see initiatives like Swift on Windows come about where Apple has almost no interest (until someone is crazy enough to attempt rewriting the iTunes codebase). We also see Apple contributing more heavily to Swift on Linux (and adding things like Containerization) when they increase their hosted services, and perhaps have an AI initiative that is making them deploy and maintain their own compute servers at scale.
 
It will never be as fully independent as people would like, because Apple would likely use and ship features whether or not the community at large accepts them. However, we see initiatives like Swift on Windows come about where Apple has almost no interest (until someone is crazy enough to attempt rewriting the iTunes codebase). We also see Apple contributing more heavily to Swift on Linux (and adding things like Containerization) when they increase their hosted services, and perhaps have an AI initiative that is making them deploy and maintain their own compute servers at scale.
Oh definitely, for sure.

Even within the Apple ecosystem, there was a lot of consternation over the changes to Swift that were necessary to make SwiftUI work the way they wanted.
 
Control of their own ecosystem.

Right now, if you want to build a multi-platform app, you pick React Native or Kotlin Multiplatform. React is ... to put it nicely, it's junk. It's basically a web wrapper, so you're limited in scope. Kotlin though, is coming along very nicely. And it will mean that developers will develop Android first, with iOS being second class. Apple does not want that. The way to fix that, is to let them easily port iOS apps to Android. Swift on Android will let them do that.

Make no mistake though, this is just step 1. Apple needs to bring SwiftUI to Android in order for iOS to not become a second class citizen, but this is a good first step.

Edit: To expand on your question about Java, Java runs in something called a Java Virtual Machine, or JVM. There's a JVM for each platform, and when you write java code it goes into the magic JVM and that runs your program.

With Swift on Android, the Swift code gets compiled to something that's native for Android (in this case, probably a special Google version of Java that doesn't use a JVM) and can run natively, at native speeds.
Not really. They won't bring SwiftUI to Android because that would mean using the IOS design for Android. What they want is just for Swift to be used everywhere, even replacing C++ and Java.
 
Very interesting to hear about this. Might not be immediately but should at least happen in a couple of years.
 
  • Like
Reactions: mganu
For those who live in these environments, what’s in it for Apple?

Is there a goal to make apps more platform independent like Java?
I really am asking because this isn’t an area I know much about.
Just off the top of my head ....

  1. Expand Swift's Adoption and Ecosystem: this may relieve increasing pressure from Flutter and React Native.
  2. Enterprise Developer Retention: enterprises want to develop from as few languages as possible. This can potentially solidify Swift as a systems-level Language
  3. Toolchain Dominance via Xcode. Aside from the development part, making Xcode/Swift the gold standard for mobile development will help to maintain Apple's hardware sales. This will also address Android’s dominance in emerging markets in Asia, Africa, and South America where there's a lot of growth potential.
  4. Antitrust and Openness Optics

Regardless, I'm not so sure if Apple has the intestinal fortitude to follow through on this. I anticipate this might just be another gimmick and not really pan out to be a full-fledge commitment by the leadership team.

Apple should've done this five years ago before or during the pandemic. They've lost the rock solid relationship they had with the creatives and dev community that they once had. It looks like the walled garden strategy is no longer a sure thing any more. I hope they can turn things around.
 
  • Like
Reactions: fatTribble
This 100%. We thankfully banned cross platform apps at work because they’re significantly more work and more brittle than just having two separate code bases.
Does this still hold true when the apps are development using Flutter?
 
Kotlin multiplatform has, I think, a similar goal. The UI code isn't cross compatible, but you can make model code cross platform a lot easier. My team kicked the idea around of using that, but we would rather have had a Swift code model we could export to Android, not Android/Kotlin to iOS/Xcode/Swift.

But what really still needs help more than anything is the nightmare that is Android studio. I have a part time project I have to update, and every time I need to fire up AS it's a nonstop barrage of Gradle updates and inscrutable code change warnings. But Xcode taking over all Android development is far beyond the scope of this topic. ;-)
 
  • Like
Reactions: Bromeo
That role was filled by Java from roughly the mid-nineties through today. CS students still study Java all day but don't spend a minute of their professional lives in it.
I think in C++ but have written in Java both at work. I’m surprised that students wouldn’t still be using Java for their jobs. What is replacing Java?
 
the good old "spend a quarter to save a dime" problem
It's a good point, and I also do take the point that multi-platform "layers" can add problems as much as fix them. I've used plenty of them over the years and there are wins and loses - no doubt about that. But they can work well in some situations. Like most stuff in the world of programming, there's very rarely one-right-way. If only that magic bullet did exist. Then again, coding would then become so simple we'd all be out of a job.
 
Not really. They won't bring SwiftUI to Android because that would mean using the IOS design for Android. What they want is just for Swift to be used everywhere, even replacing C++ and Java.
They can bring SwiftUI to Android without bringing the iOS .glassEffect() to Android. And I suspect that they will, because the alternative is letting Kotlin dictate the UI, and Kotlin Multiplatform on iOS just looks like you've taken an Android app and dumped it into iOS.
 
  • Like
Reactions: purplefox
I think in C++ but have written in Java both at work. I’m surprised that students wouldn’t still be using Java for their jobs. What is replacing Java?
Nothing. Most CS jobs in my area are Java (although it's using Spring Boot, which may as well as be its own flavor of Java at this point) or C#.net, although python is getting really big due to AI.
 
  • Like
Reactions: fatTribble
I don't think the AIs really care which language you get them to write your apps for you in.

I've not written much code in the last year but I've produced more code in that year than any other period in my life thanks to AI.
As long as I can still proof read it I'm fine with any language. ObjC, Swift, Java, Kotlin, I dont really care.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.