frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
444 stars 136 forks source link

iOS compatibility? #287

Open FunkyMuse opened 6 months ago

FunkyMuse commented 6 months ago

Hello, can this library be incorporated into an iOS application?

Is there a guide how to do so or anything if possible?

gubatron commented 6 months ago

we never tried since bittorrent apps are not allowed on ios. I suppose you want to take a look at the swig folder and then inside there's a jam config file for .dylib (macOS) for the closest to what you need to compile for iOS.

I've developed zero code on iOS :(

gubatron commented 6 months ago

https://github.com/frostwire/frostwire-jlibtorrent/blob/master/swig/config/macosx-arm64-config.jam

gubatron commented 6 months ago

you'd probably have to make a similar file to this, for IOS builds

https://github.com/frostwire/frostwire-jlibtorrent/blob/master/swig/build-macos-arm64.sh

I'd suggest naming it build-ios-arm64.sh

and the config one, config/ios-arm64-config.jam

gubatron commented 6 months ago

hope you can get something going, would be awesome bringing jlibtorrent to iOS

FunkyMuse commented 6 months ago

Thanks for the info, I'm building something using https://www.jetbrains.com/kotlin-multiplatform/

I'm targeting iOS, Android phones, tablets, TV, Desktop (macos, windows and Linux), previously I've used this library only for Android phones, TV and tablets, but now that Compose UI is multiplatform I'm targeting more platforms.

If the MacOS build you've suggested works also on iOS that'll be a blast, also https://www.zdnet.com/article/apple-hints-that-ios-17-2-will-enable-sideloading-apps-but-not-for-everyone/.

The idea is to share most of the torrent code with the exception of the way they're downloaded on Android only.

I'll see how it'll go, my work is an adaptation of https://github.com/masterwok/simple-torrent-android

gubatron commented 6 months ago

If the MacOS build you've suggested works also on iOS that'll be a blast

If that worked it'd be a blast indeed, I doubt it will though, but it can be a reference to do the build for iOS.

gubatron commented 3 weeks ago

After developments in the EU, against the monopolistic behavior of the apple store it seems we should start taking seriously adding an iOS build :)

FunkyMuse commented 3 weeks ago

After developments in the EU, against the monopolistic behavior of the apple store it seems we should start taking seriously adding an iOS build :)

You're right. Oh, totally forgot about this, been busy with other stuff.

I'm on a vacation till end of June, feel free to take over.