OpenArchive / Save-app-ios

Secure Mobile Media Preservation
https://open-archive.org/
GNU General Public License v3.0
10 stars 3 forks source link

Integrate with Orbot iOS #216

Closed johnhess closed 2 years ago

johnhess commented 2 years ago

cc @tladesignz for obvious reasons :-)

tladesignz commented 2 years ago

What you can achieve with Orbot / OrbotKit is to check, if the Orbot "VPN" is running, and if not, tell the user and deny start of app or start of upload, until they start Orbot or override.

However, to start the VPN, we need to do this via a UX jump into the Orbot app. Since the VPN is not running, there's no REST API we could talk to in the background to achieve this.

johnhess commented 2 years ago

What you can achieve with Orbot / OrbotKit is to check, if the Orbot "VPN" is running, and if not, tell the user and deny start of app or start of upload, until they start Orbot or override.

Having an assurance you're not uploading without the VPN is great! Let's go that route, even if it means bouncing users over to another app to start it.

tladesignz commented 2 years ago

Will be contained in next TestFlight (build 64) coming later today!

tladesignz commented 2 years ago

Oh, just recognized: With the first implementation, I don't bounce the user anywhere.

It just silently stops uploading more items.

What's the right time to tell the user that they requested to only upload via Orbot, but Orbot is not running?

Another thing I need to fix:

johnhess commented 2 years ago

I'd prefer to be conservative so we don't unwittingly route uploads over the ordinary network. I'm thinking that probably means whenever we make a call to upload, whether that's immediately upon clicking "upload" or whether the user re-opens the app and uploads resume.

Are there other edge cases we should be thinking about? For example, if a user enables the VPN, clicks "upload" for 5 files and then quits the app and re-opens the app later after they've turned off the VPN? In short, I understand there's a way to make sure we don't request the OS upload the file while the VPN is off. Is there a way to ensure the async call actually runs over the VPN?

tladesignz commented 2 years ago

Another TestFlight incoming adressing the last pieces! (build 65).

Alert texts are completely my own. A non-native speaker. Please review and improve!

purvi-ranawat commented 2 years ago

The issue still exists. Nothing related to the Orbot is mentioned on the onboarding slides. In Android, we get the option to install Orbot during onboarding. But on IOS, we do not get Install Orbot on the onboarding slides and user might not know anything related to Orbot.

Attached is the video link :

https://drive.google.com/file/d/1dWDDtENrReKWSMQyOJBiyXjbDqFnCIFG/view?usp=sharing

tladesignz commented 2 years ago

Good thinking! I added the slide. It works slightly differently, because Orbot iOS works slightly differently, but now we drag the user right into Orbot usage. :-)

Will be contained in next Testflight (build 66)

purvi-ranawat commented 2 years ago

@tladesignz / @johnhess : This is working fine. Now I am able to see Orbot installation and enabling during the onboarding slides.

This is working in build 66