Hi,
I'm trying to convert a "regular" FAT Framework to a XCFramework to make later use of it in the Swift-Package Manager (SPM).
This process works with very simple framework which has just a struct with one string property and a function.
But when I'm try to convert a more complex framework, like SwiftyBeaver, I get a kinds of weird errors as soon as I try to import the XCFramework in my project.
The error message in the Xcode-IDE is:
"Failed to build module 'SwiftyBeaver' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug"
When I look into the arm64-apple-ios.swiftinterface - file I see all kind of weird declerations like:
open class BaseDestination : Swift.Hashable, Swift.Equatable {
open var format: Swift.String
open var asynchronously: Swift.Bool
open var minLevel: SwiftyBeaver.SwiftyBeaver.Level
open var levelString: SwiftyBeaver.BaseDestination.LevelString
open var levelColor: SwiftyBeaver.BaseDestination.LevelColor
open var calendar: Foundation.Calendar
and error messages like: SwiftyBeaver' is not a member type of class 'SwiftyBeaver.SwiftyBeaver'
Which is very likely true.
These are the commands I execute to create the XCFramework:
xcodebuild archive -scheme SwiftyBeaver -destination "generic/platform=iOS" -archivePath /work/SwifyBeaver.xcarchive SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
ARCHIVE SUCCEEDED
and then:
xcodebuild -create-xcframework -framework /work/SwifyBeaver.xcarchive/Products/Library/Frameworks/SwiftyBeaver.framework -output ./SwiftyBeaver.xcframework
both commands succeed but when I add the XCFramework to my XCode-Project and import the module I get error message - stated above:
"Failed to build module 'SwiftyBeaver' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug"
I'm using XCode 13.3.1 and xcodebuild -version gives me this output:
objc[16246]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x201a47458) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1040184f8). One of the two will be used. Which one is undefined.
objc[16246]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x201a474a8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104018548). One of the two will be used. Which one is undefined.
objc[16246]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x201a474f8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104018598). One of the two will be used. Which one is undefined.
objc[16246]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x201a47548) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1040185e8). One of the two will be used. Which one is undefined.
objc[16246]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x201a47598) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104018638). One of the two will be used. Which one is undefined.
objc[16246]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x201a475e8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104018688). One of the two will be used. Which one is undefined.
Xcode 13.3.1
Build version 13E500a
Any idea how to solve this problem?
Thanks in advance!
Best Regards,
Frank