Skeptick / libres

Resources generation in Kotlin Multiplatform
Apache License 2.0
207 stars 11 forks source link

<Question> Configuring Libres in Kotlin (Compose) Multiplatform for SVG Asset Integration in iOS Compose Project #58

Open rajagopalannairr opened 9 months ago

rajagopalannairr commented 9 months ago

How can I configure Libres in a Kotlin Multiplatform Compose project to correctly access resource image assets like SVG files? Specifically, I have an SVG located at composeApp/src/commonMain/libres/images/logo.svg. I've set up my Podfile as shown below for an iOS target, but I'm unsure if this implementation correctly integrates the SVG asset for use in the iOS app. Can you review my Podfile configuration and advise if any modifications are needed for proper resource integration?

pre_install do |installer|
  FileUtils.mkdir_p(installer.sandbox.root.to_s + '/../composeApp/build/generated/libres/apple/libres-bundles')
end

target 'iosApp' do
  use_frameworks!
  platform :ios, '16.0'
  pod 'composeApp', :path => '../composeApp'
end

I am not sure some mistake I made and the files are not generating for iOS. Please help me to fix this iussue.

Thanks in advance.