WireGuardKit iOS - Import package and usage of 'Shared' classes

Andrej Mihajlov and at mullvad.net
Tue Mar 22 11:50:12 UTC 2022


Hi,

The source code under Sources/Shared is a part of WireGuard app. These files are checked out by SPM, because both WireGuardKit and WireGuard app share the same repository. However, these files aren’t part of WireGuardKit and thus not available for direct import via WireGuardKit.

Best,
Andrej

> On 20 Mar 2022, at 16:24, Alexey Ponkin <alexey.ponkin at gmail.com> wrote:
> 
> Hi guys,
> I'm trying to use WiregurdKit in my iOS app. I imported the package as
> described here - https://github.com/WireGuard/wireguard-apple. Now I
> can use `PacketTunnelProvider` inside `WireGuardNetworkExtension`. But
> unfortunately , I can't use any classes and extensions from the
> `Shared` folder
> (https://github.com/WireGuard/wireguard-apple/tree/master/Sources/Shared).
> Is there any way to make them 'visible' for my project? I'm fairly new
> to Swift and iOS development. I would like, for instance, to reuse
> this extension (https://github.com/WireGuard/wireguard-apple/blob/master/Sources/Shared/Model/NETunnelProviderProtocol%2BExtension.swift)
> and may be, `Keychan` wrapper class.
> Thanks in advance for your help.



More information about the WireGuard mailing list