kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.37k stars 311 forks source link

Xcode 15.3 build failure #297

Closed yonicsurny closed 1 month ago

yonicsurny commented 1 month ago

Hi,

I'm upgrading from version 4.2.7 to 5.1.1 and I'm encountering an issue when building.

Failed to build module 'PulseUI'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)', while this compiler is 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)'). Please select a toolchain which matches the SDK.

I have to use Xcode 15.3 because of internal tooling support and therefore cannot use a newer version of Xcode. Isn't the project supporting Swift 5?

Or have I misconfigured something?

yonicsurny commented 1 month ago

If Swift 5 is still meant to be supported, maybe some config is missing when building the framework?

When using Xcode to develop for Apple platforms, set the BUILD_LIBRARY_FOR_DISTRIBUTION build setting in the framework’s target. This setting turns on both library evolution and module stability. Be sure to use the setting in both Debug and Release builds. https://www.swift.org/blog/library-evolution/#enabling-library-evolution-support

See https://stackoverflow.com/a/70562356

kean commented 1 month ago

Hey Yonic, the minimum supported version is Xcode 15.4. The development now happens on Xcode 16, but the project compiles on Xcode 15.4. The .xcframeworks included in the releases are compiled using Xcode 16.

yonicsurny commented 1 month ago

Ok, I feared as such. I'll have to stick to 4.2.7 for now then. Thanks for the quick reply.