ZupIT/beagle

[IOS] Image provider protocol

guitar09 opened this issue · 1 comments

Use case

In Beagle for iOS we are limited to using unique Bundle to load resources, and with that limitation we cannot load images dynamically for multi-module projects.

In comparison, in Beagle for Android we can create the ImageProvider using the interface called DesignSystem using the function bellow:

open fun image(id: String): Int? = null

In that way we can load resources from the Design System, even in multi-module projects.

Proposal

To facilitate the process of loading images from multi-module projects in Beagle for iOS, a new protocol to create an ImageProvider, similar how is done in Android, would allow us to load resources from more than one bounded Bundle context.

public protocol ImageAssetProtocol {
    func loadImageAsset(id: String) -> UIImage?
} 

👋 @guitar09
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible and that you have followed our contributing guidelines.
We will review it as soon as possible.