I tried to build an framework with its own image and it compiles fine. However, when I include my framework in another project, it crashes when loading the image, any idea?
ImageTest (my framework)
public class ImageTest {
open func getImage() {
return #imageLiteral(resourceName: "IMG_0745")
}
}
My project
import ImageTest
...
...
override func viewDidLoad() {
super.viewDidLoad()
let imageView = UIImageView(image: ImageTest.getImage()) // crash !
imageView.center = view.center
view.addSubview(imageView)
}