Hello,
I built an iOS app (got approved by Apple today) using Swift. The app uses native iOS Swift libraries. What is the best approach to port my app to Android?
Submitted 14 hours ago by q1p_@lemmy.zip to [deleted]
Hello,
I built an iOS app (got approved by Apple today) using Swift. The app uses native iOS Swift libraries. What is the best approach to port my app to Android?
Feed it to an LLM and tell it to do the thing. It will suck. It might not even build (be very explicit what version of the android SDK you’re targeting). But at least it will exist and you can always massage it into working order.
Ok whatever dude
Thanks bro. I appreciate it
This is an absolutely terrible idea first of all debugging code that you’re completely unfamiliar with is not easier than writing your own. The code you end up with is also likely to end up being very insecure with vulnerabilities exposing both you and your users.
When people actually crunch the numbers, vibe coding does not save time. So there is nothing to offset the massive drawbacks to this approach.
Well, given the level of effort in the OP, I figured this was the best response. If some serious engineer came up to me and told me they wrote a whole app with some platform specific language and now are looking for tips for porting it to some other platform with some other language, I’d laugh. What else can you say other than “Learn the language of that platform and good luck with the rewrite”? You’re barking up my tree when it is OP with the very lazy fucking question.
I did a VM of Hearthstone from my PC before they had an android app. So uh, do they have a PC version?
I don't know what kind of a state your code is in, but if you haven't done it yet, seperate the code for the app's logic from the code that interfaces with the iOS APIs as much as possible. The code that handles the logic is the code you'll be able to reuse (at least I would be surprised if there wouldn't be a way to compile swift code for Android). Side Bonus: this makes it much easier to write proper tests. Then you can work on adapting the code that uses the iOS APIs to use the Android APIs. Either there's a direct way to call the APIs from swift, or someone will have made a library somewhere that you can use.
My views, services (which do iOS api calls), and models are already separated.
I found this project: skip.tools :-)
6nk06@sh.itjust.works 13 hours ago
I don’t know but have you tried this? swift.org/blog/nightly-swift-sdk-for-android/
q1p_@lemmy.zip 12 hours ago
This looks like the way to do it.