WIP: First try at getting an iOS build ready #78

Closed
ineiti wants to merge 3 commits from (deleted):ios_build into trunk
First-time contributor

This is a draft PR!

It allows anybody interested to help me debug why I get no matching architecture in universal wrapper

This is a draft PR! It allows anybody interested to help me debug why I get `no matching architecture in universal wrapper`
Owner
Drone Build Status: failure https://build.openprivacy.ca/flutter/flutter_app/299
sarah changed title from First try at getting an iOS build ready to WIP: First try at getting an iOS build ready 2021-05-11 19:23:15 +00:00
dan reviewed 2021-05-11 23:00:58 +00:00
dan left a comment
Owner

Wow this is amazing, thanks!

I'm just finishing off a bunch of build automation work, but if you have more questions I can prolly try and answer some and over the next few weeks might get more time to help support this port :)

Wow this is amazing, thanks! I'm just finishing off a bunch of build automation work, but if you have more questions I can prolly try and answer some and over the next few weeks might get more time to help support this port :)
@ -66,2 +66,4 @@
} else if (Platform.isLinux) {
library = DynamicLibrary.open("libCwtch.so");
} else if (Platform.isIOS) {
print(Platform.environment);
Owner

rm in final version

rm in final version
Author
First-time contributor

done

done
ineiti marked this conversation as resolved
pubspec.lock Outdated
@ -8,3 +8,3 @@
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.2"
version: "2.0.13"
Owner

Can you elaborate on why all the packages got downgraded for your build?

We're still very WIP so we haven't quite pinned down a specific flutter version, but its the dev channel, anywhere from 2.1 to 2.3 I beleive

Can you elaborate on why all the packages got downgraded for your build? We're still very WIP so we haven't quite pinned down a specific flutter version, but its the dev channel, anywhere from 2.1 to 2.3 I beleive
Author
First-time contributor

In fact this is what I get if I do

flutter pub get

so it's not on purpose - more that I do something wrong ;) I just tried to check out the trunk version, and if I do flutter pub get, it downgrades the package-versions.

I upgraded to Android Studio 4.2 and now it doesn't have this behaviour anymore.

In fact this is what I get if I do ``` flutter pub get ``` so it's not on purpose - more that I do something wrong ;) I just tried to check out the `trunk` version, and if I do `flutter pub get`, it downgrades the package-versions. I upgraded to Android Studio 4.2 and now it doesn't have this behaviour anymore.
Owner
Drone Build Status: failure https://build.openprivacy.ca/flutter/flutter_app/313
Author
First-time contributor

Also added Makefile and the ios/Podfile* so that people can correctly try out and help me figure out why this fails...

Also added `Makefile` and the `ios/Podfile*` so that people can correctly try out and help me figure out why this fails...
Owner
Drone Build Status: failure https://build.openprivacy.ca/flutter/flutter_app/354
Author
First-time contributor

Thanks to @Pleurinae from Twitter to point out that a .a library is static, and dlopen is dynamic. In the end I needed to do:

  • use DynamicLibrary.process() to get the symbols
  • add a dummy-call, so that the static library gets linked
  • make sure the go is compiled for iossimulator

Now it complains that there is no tor - which is correct, as this is the next step ;)

Thanks to @Pleurinae from Twitter to point out that a `.a` library is static, and `dlopen` is dynamic. In the end I needed to do: - use `DynamicLibrary.process()` to get the symbols - add a dummy-call, so that the static library gets linked - make sure the go is compiled for iossimulator Now it complains that there is no tor - which is correct, as this is the next step ;)
Owner

hey you still around. sorry this got dropped in the rush to beta, but we're def looking to start proceeding on Mac support

hey you still around. sorry this got dropped in the rush to beta, but we're def looking to start proceeding on Mac support
Author
First-time contributor

Hi dan, yes, still here ;) I had to take care of some projects of my own, but I would be happy to continue hacking a bit on this.

Btw, at my job we did a library using https://gitlab.torproject.org/tpo/core/arti to create a simple HTTPS request over tor. We have now an iOS Swift package and an Android maven package that exports a simple "call_arti" method. As soon as we find a good name (currently it's called arti-rest), we'll make it public.

As I didn't look into how you're using tor in your app I was wondering if that could be of interest. Or if it's easier trying to reproduce what you did on Android with iOS.

Hi dan, yes, still here ;) I had to take care of some projects of my own, but I would be happy to continue hacking a bit on this. Btw, at my job we did a library using https://gitlab.torproject.org/tpo/core/arti to create a simple HTTPS request over tor. We have now an iOS Swift package and an Android maven package that exports a simple "call_arti" method. As soon as we find a good name (currently it's called arti-rest), we'll make it public. As I didn't look into how you're using tor in your app I was wondering if that could be of interest. Or if it's easier trying to reproduce what you did on Android with iOS.
Owner

ah cool! currently we're managing tor through https://git.openprivacy.ca/openprivacy/connectivity

so I've ported your patches to the new repos at

I should be getting those merged shortly.

However we have concern's about the viability of an iOS port, from what we've seen from Briar, having long running tor on iOS may be challenging? we'll prolly be looking at trying to get a MacOS build working first as support for it should be more straight forward once we figure out the infastructure (actually getting a mac for any of our devs, figuring out how to do automated cloud builds for it...).

But happy to merge some iOS support in the mean time for interested parties to keep experimenting with ahead of us :)

ah cool! currently we're managing tor through https://git.openprivacy.ca/openprivacy/connectivity so I've ported your patches to the new repos at - https://git.openprivacy.ca/cwtch.im/libcwtch-go/pulls/16 - https://git.openprivacy.ca/cwtch.im/cwtch-ui/pulls/140 I should be getting those merged shortly. However we have concern's about the viability of an iOS port, from what we've seen from Briar, having long running tor on iOS may be challenging? we'll prolly be looking at trying to get a MacOS build working first as support for it should be more straight forward once we figure out the infastructure (actually getting a mac for any of our devs, figuring out how to do automated cloud builds for it...). But happy to merge some iOS support in the mean time for interested parties to keep experimenting with ahead of us :)
Author
First-time contributor

OK - continuing discussion there...

OK - continuing discussion there...
dan closed this pull request 2022-10-08 17:59:44 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing

Pull request closed

Sign in to join this conversation.
No description provided.