It would be great if this repository could also support iOS, which should be possible using multiplatform programming. Yesterday, I spent a few hours looking into this. It seems that the Kotlin runtime is compiled to native C code and thus can be executed using an Objective-C/Swift compatibility layer.
Some of my findings:
Proper multiplatform programming requires deep understanding of the Gradle build system since different platforms require different conditions. For example, one cannot simply import the BouncyCastle library on iOS since this library uses hardware features only found on Android.
Multiplatform programming stil feels very experimental. I had to work around quite a few bugs in order to get even a basic example up and running. The iOS simulator also does not properly start and I have to launch it from Xcode instead.
The startup of Kotlin on iOS seems to take a few seconds.
If we want to run IPv8 on iOS, we have to rethink some of the IPv8 interactions with libraries. Luckily, it seems that there is iOS compatibility for the sqldelight library. However, it seems that we are unable to import from the java standard library which means we cannot re-use the UDPEndpoint logic on the iOS side. We probably need iOS-specific logic for that. Also, the lazysodium library advertises support for iOS but I could not find much about that.
In summary, I think adding iOS support to this repository is doable but very challenging.
It would be great if this repository could also support iOS, which should be possible using multiplatform programming. Yesterday, I spent a few hours looking into this. It seems that the Kotlin runtime is compiled to native C code and thus can be executed using an Objective-C/Swift compatibility layer.
Some of my findings:
sqldelight
library. However, it seems that we are unable to import from the java standard library which means we cannot re-use theUDPEndpoint
logic on the iOS side. We probably need iOS-specific logic for that. Also, thelazysodium
library advertises support for iOS but I could not find much about that.In summary, I think adding iOS support to this repository is doable but very challenging.