简体中文
外观
NSBundle
resourcePath
resourcePath 属性是包里放资源的目录的绝对路径。
字符串或 null。
null
TypeError
bundlePath
const main = NSBundle.mainBundle; console.log(main.resourcePath === main.bundlePath);
结果:输出 true。
true
NSBundle.resourcePath。
NSBundle.resourcePath