I'm trying to build a widget extension for my iOS ...
# multiplatform
i
I'm trying to build a widget extension for my iOS app, how do I import my shared library into the widget target? I keep getting
ComposeApp not found
l
Using cocoapods, you add the widget extension target to your podfile
Copy code
target 'AppWidgetExtension' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for AppWidgetExtension
  pod 'composeApp', :path => '../composeApp'

end
i
I'm using SPM, is it possible to use both? Or can I use SPM to import it as well @Lukáš Kúšik
l
I have not tried using SPM to import shared libraries yet, so I don't know. I switched from direct integration to CocoaPods because I had issues including the shared library in multiple targets. As for using SPM and CocoaPods at the same time, that is generally working for me. Although if you mean that you want to import the same library twice, I guess you would have duplicate classes build errors. Try it out.
i
Okay I'll try it ! Thank you so much