Hello everybody, talking about KMM libraries and i...
# multiplatform
m
Hello everybody, talking about KMM libraries and iOS. What’s in your opinion the feasibility and likelihood that apple will start detecting apps using KMM and rejecting them in the future?
k
Highly unlikely. Why wouldn't they also reject rust, c++, or anything else that isn't swift or objective-c that compiled down to machine code with llvm? If anything, Xamarin would be first. It's a totally different language with a VM. Then there's anything using js (react native), and then of course flutter. Then the huge pile of "other" option (gomobile, rubymotion, etc), and then my crazy personal favorite, j2objc, which is objective c, but is very "googly", and if apple was going to ban things purely for spite, it would be sort of a target. So, outside of apple deciding they don't like kotlin because they think banning it will hurt Google somehow, I can't think of a reason it would be at higher risk than anything else. Apple wants native quality apps, so if anything, they'd be supportive.
👍🏾 1
👍 2
s
For the record, the Kotlin compiler is not transpiling to ObjC. It’s a full LLVM front end the same as swift, ObjC, rust and others. When targeting an Apple platform, it includes an interop layer to bridge the Kotlin classes into the ObjC runtime.
👍 3
m
In the early days of iPhone they did start rejected apps built with flash, but they have not been that heavy handed since then.
d
@kpgalligan agree with everything you said but one thing FYI: Xamarin doesn't deploy a VM on iOS; it's based around the Monotouch compiler which has the ability to perform a 'full ahead of time' compile; somehow flattening out the VM into a more standard runtime which avoids Apple's rules against dynamic code execution ability.
🤔 1
s
Flutter does the same Ahead of Time compiling for release builds. While writing code and utilizing the hot reload, the dart code is running in a VM but builds submitted to Apple are all AoT compiled.
👍 1
m
@darkmoon_uk could you elaborate about “Apple’s rules against dynamic code execution ability”?
s
The official rule is no virtual machines but I think that it may be a little more fine grained than that. It's more virtual machines that use a JIT because changing pages in RAM to be executable is a security risk. Apple does allow an app to use the built in JavascriptCore VM. Also they don't flag games that use Lua. Lua compiles to byte code and interprets it without any JIT.
k
This is definitely a thread I want to dig into at some point. Zipline uses a different js runtime for reasons but it would perform worse on a number of comparisons I'm sure https://github.com/cashapp/zipline
I'm currently on a phone on a bus riding around Ireland so lengthy debate will need to wait ...