Xcode 15.4 - Crashes of macOS applications on missing symbol for NWPathMonitor

Since we migrated to Xcode 15.4, we are facing a crash of one of our application on Intel machines due to a missing symbol error:

Symbol not found: _$s7Network13NWPathMonitorCMa

This symbol is used by one of our internal SPM packages, targeting macOS 10.13, but the code using it is tagged @available(macOS 10.14.0, *).

After investigating, I can fix this crash by targeting 10.14 instead of 10.13 in package manifest. Sadly, this is not an option, as this SPM is used by products that supports macOS 10.13.

The linked libraries reported by otool differs significantly between the build targetting 10.13 and the build targetting 10.15:

The build targetting 10.13 weakly links links to

/System/Library/Frameworks/Network.framework/Versions/A/Network

The build targetting 10.15 does not link to Network.framework, but does link (not wealky) to a library that didn't appear before

/usr/lib/swift/libswiftNetwork.dylib

In previous builds that were performed by Xcode 14, the produced binary was weakly linking to

@rpath/libswiftNetwork.dylib

What can I do to work around this problem introduced by Xcode 15 ?

My problem seems to be pretty similar to the one reported in rdar://FB13278576

OK, let’s start by ruling out the easiest thing: If you run the same test with Xcode 16.0rc, does it have the same problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I can reproduce the same problem when compiling my sample project using Xcode 16 RC and Xcode 16.1 ß:

Sep 11 10:44:41 10 sandboxApp[974]: dyld: Symbol not found: _$s7Network13NWPathMonitorCMa
	  Referenced from: /Users/test/Desktop/sandboxApp.app/Contents/MacOS/../Frameworks/IntegoFoundation.framework/Versions/A/IntegoFoundation
	  Expected in: /System/Library/Frameworks/Network.framework/Versions/A/Network
Xcode 15.4 - Crashes of macOS applications on missing symbol for NWPathMonitor
 
 
Q