Skip to content

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

@rajagopalannairr

Description

@rajagopalannairr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions