Can I use a .xcframework inside a .framework?
When I try this the framework target builds fine, but when I use this framework in an iOS app target, it gives build error
For eg:
MyApp is iOS app target
MyFramework is a framework (embedded in MyApp)
MyXcFramework is a xcframework (embedded in MyFramework)
A sample swift file inside MyFramework contains
import Foundation
import MyXcFramework
and builds successfully
But when MyFramework is added to MyAapp i get the following error
import Foundation
import MyXcFramework <- No such module MyXcFramework
Can anyone help what I am doing wrong?
It seems like you are trying to use the xcframework without adding it to the app. If you want to use your xcframework in your app too you have to add that xcframework in your app target, you can avoid embedding xcframework in the framework and only embed for the app itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With