🔐Configure WireGuard Apple

After you open the project in Vcode, please right click in the iOS folder then open in Xcode.

download wireguard-apple and Change the WireGuardKitGo directory with the directory you have.

If build fails with the following error

make: *** 
[$(PROJECTDIR)/client/build/Runner.build/Debug-iphoneos/wireguard-go-bridge/goroot/.prepared] 
Error 1

Add a user defined variable to both runner and VPNExtension targets' build settings with key PATH and value ${PATH}/path/to/bin/folder/with/go/executable, e.g. ${PATH}:/usr/local/go/bin.

if above error still persists on you M1 Mac, then most probably you need to install arch based cmake

arch -arm64 brew install cmake

Build might fail with "source files not found" error the first time you try it, because modern XCode build system compiles dependencies in parallel, and some dependencies end up being built after the ones that require them. In this case simply restart the build.