我有一个iOS项目,其文件夹/组结构如下:
Xcode将lesson.xml
复制到没有封闭文件夹的捆绑包中,所以我需要像这样加载它:
let url = Bundle.main.url(forResource: "lesson", withExtension: "xml")
但是我想要捆绑包中的文件夹,所以我可以有多个lesson.xml文件并加载它们:
let url1 = Bundle.main.url(forResource: "Lessons/Hello/lesson",
withExtension: "xml")
let url2 = Bundle.main.url(forResource: "Lessons/Foo/lesson",
withExtension: "xml")
如何将文件夹结构复制到捆绑包?