Xcode 16.4 and above build error with Network Extension and WireGuard library

I have added a Network Extension to my iOS project to use the WireGuard library. Everything was working fine up to Xcode 16, but after updating, I’m facing a build issue.

The build fails with the following error:

No such file or directory: '@rpath/WireGuardNetworkExtensioniOS.debug.dylib'

I haven’t explicitly added any .dylib to my project. The Network Extension target builds and runs fine on Xcode 16.

Xcode 16.4 and above build error with Network Extension and WireGuard library
 
 
Q