Post

Replies

Boosts

Views

Activity

Warning on Xcode 13.0 with framework's swiftsourceinfo files
I used Xcode 12.5.1 to create the most recent release of my company's library. Now, when trying to import the library and build on Xcode 13.0, we run into the warning: ".../Library.framework/Modules/Library.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo' is either malformed or generated by a different Swift version. Note that it uses an unstable format and may leak internal project details, it should not be distributed alongside modules" Looking at our released framework - there are multiple swiftsourceinfo files in the LibraryFramework/Modules/Library.swiftmodule/Project directory (x86_64.swiftsourceinfo, x86_64-apple-ios-simulator.swiftsourceinfo, arm64.swiftsourceinfo, and arm64-apple-ios.swiftsourceinfo). Our framework is built with the modern build system and BUILD_LIBRARY_FOR_DISTRIBUTION true. We are not using .xcframeworks yet. Why were these files still included in the resulting framework? Looking online for swiftsourceinfo, the most helpful link I found for a Swift explanation is this proposal: https://forums.swift.org/t/proposal-emitting-source-information-file-during-compilation/28794, which seems to suggest these files won't be present when packaging a Swift module for client consumption. I do not run into the same warning when building on Xcode 13.0 or Xcode 13.1 with a library released on Xcode 13.0. Swift should have forward compatibility - so I would expect a framework built on Xcode 12.5.1 to still be compatible with development on Xcode 13.0 without these kinds of warnings. How should we build our library such that a developer on a more recent version of Xcode would not run into such warnings?
0
1
1.6k
Nov ’21