Reputation: 21
I am using RxCocoa in custom framework, so I am trying to inject dependencies with SPM and make that .xcframework. I made the .xcframework, but the following error keeps appearing.
The process of creating and configuring the framework project and creating the xcframework was as follows.enter image description here
Development Environment
Step
Create framework project (km-ios-sdk)
Set Build Active Architecture Only YES from NO
Mach-O Type is Dynamic Library
Write simple code using RxSwift, RxCocoa
Create .xcarchive and .xcframework
xcodebuild archive \
-scheme km-ios-sdk \
-archivePath ./archive/km-ios-sdk.framework-iphoneos.xcarchive \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild archive \
-scheme km-ios-sdk \
-archivePath ./archive/km-ios-sdk.framework-iphonesimulator-arm64.xcarchive \
-sdk iphonesimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild -create-xcframework \
-framework './archive/km-ios-sdk.framework-iphoneos.xcarchive/Products/Library/Frameworks/km_ios_sdk.framework' \
-framework './archive/km-ios-sdk.framework-iphonesimulator-arm64.xcarchive/Products/Library/Frameworks/km_ios_sdk.framework' \
-output './KmSDK.xcframework'
Created Package.swift as below and uploaded it to git. enter image description here
If you download and import km-ios-sdk as spm in the sample app, the error appears enter image description here
It is the same even if you manually download .xcframework, and it is the same even if you download it with cocoapod. Is there any way to solve it?
Upvotes: 2
Views: 2366
Reputation: 5858
We probably don't have the same dependency management configuration, but the following suggestions might help with the mysterious "Missing Required Module 'RxCocoaRuntime'" error that appears under some conditions.
Upvotes: 0