【发布时间】:2026-02-10 04:30:01
【问题描述】:
是否可以在 UITesting 时从 UITests 文件夹文件中的 Info.plist 文件中读取?如果是这样,如何。
到目前为止,我已经尝试过:
if let url = Bundle.main.url(forResource: "Info", withExtension: "plist"),
let myDict = NSDictionary(contentsOf: url) as? [String:Any] {
print(myDict)
}
不过,这会返回一些plist,这不是我在主项目文件夹中拥有的那个。
【问题讨论】:
标签: ios swift ui-testing