Open ost12666 opened 5 years ago
Also if I run the app from Xcode then I would load the layout XML from the framework bundle successfully but if I am running the app directly from the simulator I get the red screen because XML is not found
Hi, I have faced the same issue when creating a universal framework using this library.
This might help someone who encounter the same issue.
One way to fix this is, read the XML content using the bundle and write it temporary or documents folder. Then If you try to access it from the document folder, it works fine.
You can keep a check if the file exists on the documents folder, you can skip writing and pass the path to loadLoayout(withContentsOfUrl: url!, ...)
Probably because of this code assumes main bundle:
LayoutLoader.swift line 276