Actually, the singleton was easier to fix. I have just realised that replacing:
public static var shared = MyDatabaseService()
is more correct and fix the issue:
public static let shared = MyDatabaseService()
Post
Replies
Boosts
Views
Activity
Hmmm, after looking the file/directory tree of an XCFramework I found on Internet, I tried to duplicate it with the generated files (I saw is missing MySDK.swiftmodule from the XCFramework)
So copying MySDK.swiftmodule to the XCFramework fixes my issue.
mkdir ./MyFramework.xcframework/macos-x86_64/MySDK.framework/Versions/A/Modules
cp ./DerivedData/Build/Products/Debug/MySDK.swiftmodule ./MyFramework.xcframework/macos-x86_64/MySDK.framework/Versions/A/Modules/
ln -s ./MyFramework.xcframework/macos-x86_64/MySDK.framework/Versions/A/Modules ./MyFramework.xcframework/macos-x86_64/MySDK.framework/Modules
Is it a xcodebuild bug or a missing step in my XCFramework generation?
I do not know if it is matter but there is no *.swiftinterface in my XCFramework. I do not know if it is expected. But after building with xcodebuild build or xcodebuild archive, these files are present in subdirectories of DerivedData.