Post

Replies

Boosts

Views

Activity

Reply to SPM: Create XCFramework and reusing it - simple example "error: no such module" when importing
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?
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to Make my SwiftData code concurrency proof (sendable model, singleton)
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()
Replies
Boosts
Views
Activity
May ’24
Reply to SPM: Create XCFramework and reusing it - simple example "error: no such module" when importing
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?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to SPM: Create XCFramework and reusing it - simple example "error: no such module" when importing
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24