Is it not possible to have cocoapods build a frame...
# multiplatform
g
Is it not possible to have cocoapods build a framework that is compatible both with iOS and macOS? I’m trying to build native iOS and macOS apps using a shared kotlin module, is that possible? If so how do I set it up, is there any example?
g
So I guess it would be better to use swift packages?
Also, I'm not sure how can I use that xcframework? Pretty new to the apple build system, I'm wondering if it's the same as the default iOS setup using cocoapods. Or if something needs to get changed
'cause I couldn't find any examples of using kotlin multiplatform for both ios and macos without swift packages
a
It depends on why you need the xcframework. If your shared module and ios/macos app are in the same repo you probably don’t need it. Regular integration through generated podspec would just work. It would choose correct OS/platform for the framework depending on how the build initiated in Xcode
XCFramework is needed when you want to publish somewhere you shared module as ios/macos library
g
Yes it's all in the same repo, I will try to use the xcFramwork and integrate with cocoapod. Can you explain what you meant with "it would choose correct OS / platform..."
Oh nvm