I'm stepping across the same problem. I already filled up bug report: FB13278576.
@eskimo Yes, Xcode 15 properly prints the warning of IPHONEOS_DEPLOYMENT_TARGET set to iOS 11 vs Xcode 15 requiring minimum iOS 12. However, because this is just a warning, I'd expect the app to run with no problem on any iOS from 12.0 to 17. Instead, it crashes when hitting any symbol from Network lib. I attached the crash report to this post.
Repro steps:
Create an Xcode 14 project, chose iOS 11 for IPHONEOS_DEPLOYMENT_TARGET. Adjust the app's startup code to build for iOS 11.
Add some code that uses the Network module, like:
import Network
if #available(iOS 12.0, *) {
_ = NWEndpoint.Host("example.com")
}
Open this project in Xcode 15.0.
Run it on device with iOS prior to 17.0.
The app will crash on NWEndpoint.Host("example.com").
Now, I understand that the problem is surfaced by following:
The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.0.99.
but either the severity of this message is wrong (it is a build warning, not error) or there is a problem with loading Network lib in explained setup.
We're particularly hit by this issue as a vendor lib developers. Because our library depends on Network and our customers build it from source code, we can't enforce all of them to fix their IPHONEOS_DEPLOYMENT_TARGET when migrating from Xcode 14 to Xcode 15. They ignore the warning and report the crash to us.
X14AppForOS11-2023-10-16-153400.txt
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: