Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv8 on iOS #52

Open
devos50 opened this issue Jul 28, 2021 · 0 comments
Open

IPv8 on iOS #52

devos50 opened this issue Jul 28, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@devos50
Copy link
Contributor

devos50 commented Jul 28, 2021

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.

@devos50 devos50 added the enhancement New feature or request label Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant