Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Alessio Nossa <alessio.nossa+list@gmail.com>
To: Houman <houmie@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Contributing to iOS app
Date: Tue, 25 Jan 2022 16:45:34 +0100	[thread overview]
Message-ID: <CAMTfdYp19s=AefZvK-eDAmGSodSCxmrBa_61G7fpGqOaPMUnWw@mail.gmail.com> (raw)
In-Reply-To: <CABBZOs=1po1VvKY+Rq6i1AOybXQHar+k+mzDFH9hAdd3uRc8fg@mail.gmail.com>

I am aware of the bug reported by Houman. To get around this problem I
have implemented a workaround: when the action needs to make changes
to the configuration, the main app is launched and the user can then
specify in Shortcut's action a URL to open when the action is
completed (default will be "shortcuts://"). This workaround has been
used by other apps like Working Copy [1] (in "Clone repository from"
action) for actions that need to be executed by the main app.
With this solution you cannot return results of the operation to
Shortcuts, but you can successfully get the work done and if something
went wrong, there is Wireguard's log to check.

One thing I had to change in the app to accomplish this is to move
TunnelsManager initialization from MainViewController to AppDelegate.
It will not slow down app startup since it is an asynchronous action
and I think it is fine to initialize the main component of the app's
logic, outside the view hierarchy.

Hopefully, one day the bug will be fixed and moving the action logic
to Intents Extension will be straightforward.

Regards,
Alessio

[1]: https://workingcopyapp.com/

Il giorno mar 25 gen 2022 alle ore 15:52 Houman <houmie@gmail.com> ha scritto:
>
> Shortcut integration for Wireguard on iOS would be amazing. But did you actually get it working?
>
> I think due to this Apple bug that has been open for years: https://developer.apple.com/forums/thread/96020, it is not possible to work with Siri shortcuts on the network extension.
> But if your solution works, it would be amazing!!
>
> Regards,
> Houman
>
> On Tue, 25 Jan 2022 at 14:20, Alessio Nossa <alessio.nossa+list@gmail.com> wrote:
>>
>> Hello,
>> I’d like to contribute to wireguard-apple with Shortcuts integration
>> for the iOS app (this is a feature in the todo-list too).
>> The implementation is almost complete, I’d like to be allowed to merge
>> my contribution with the main app (or to have information on how I can
>> submit my contributions).
>>
>> Kind regards,
>> Alessio Nossa

      parent reply	other threads:[~2022-01-25 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 14:16 Alessio Nossa
2022-01-25 14:55 ` Jason A. Donenfeld
     [not found] ` <CABBZOs=1po1VvKY+Rq6i1AOybXQHar+k+mzDFH9hAdd3uRc8fg@mail.gmail.com>
2022-01-25 15:45   ` Alessio Nossa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMTfdYp19s=AefZvK-eDAmGSodSCxmrBa_61G7fpGqOaPMUnWw@mail.gmail.com' \
    --to=alessio.nossa+list@gmail.com \
    --cc=houmie@gmail.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).