Timac / VPNStatus

VPNStatus, a replacement for macOS builtin VPN Status
https://blog.timac.org/2018/0719-vpnstatus/
MIT License
221 stars 31 forks source link

Unable to compile on Catalina with clean checkout. #4

Closed jasperblues closed 3 years ago

jasperblues commented 4 years ago

What is needed to compile on Catalina? I get Network.h - file not found.

Timac commented 4 years ago

I can indeed reproduce this issue with Xcode 11.4.1 (11E503a) on macOS Catalina 10.15.4 (19E287):

Result: You get an error

While building module 'NetworkExtension' imported from VPNStatus-master/Common/ACDefines.h:16: In file included from :1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.h:12: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyFlow.h:10:9: fatal error: 'Network/Network.h' file not found

import <Network/Network.h>

    ^~~~~~~~~~~~~~~~~~~

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyFlow.h:10:9: note: did not find header 'Network.h' in framework 'Network' (loaded from '/System/Library/PrivateFrameworks') 1 error generated. In file included from VPNStatus-master/Common/ACNEServicesManager.m:11: VPNStatus-master/Common/ACDefines.h:16:9: fatal error: could not build module 'NetworkExtension'

import <NetworkExtension/NetworkExtension.h>

I am not sure what it causing this problem. It could be an Xcode issue. I found a simple workaround yet:

  1. Change the scheme to 'VPNStatus'
  2. Compile 'VPNStatus'
  3. Change the scheme back to 'VPNApp'

Result: You can now compile and run the 'VPNApp' scheme. As said, I currently don't understand why the NetworkExtension.framework module can't be created.

jasperblues commented 4 years ago

Thanks @Timac !!

Timac commented 3 years ago

@jasperblues This issue should now be fixed if you compile with Xcode 12.5.1.