Skip to content

NSBundle:bundleIdentifier 属性 ​

bundleIdentifier 属性是包名。

值 ​

字符串或 null,形如 com.example.shop。

示例 ​

js
console.log(NSBundle.mainBundle.bundleIdentifier);

结果:输出 App 的包名。

对应的 iOS API ​

NSBundle.bundleIdentifier。

参见 ​