如何获取应用程序的 Bundle Id iOS UIA 自动化
如何获取我所在应用程序的捆绑 ID?
How do I get the bundle Id of the app I am in ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何获取我所在应用程序的捆绑 ID?
How do I get the bundle Id of the app I am in ?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您可以使用:
+ mainBundle
"[r]返回当前应用程序可执行文件所在目录对应的 NSBundle 对象位于。”因此将返回应用程序包的 NSBundle 对象。[
-bundleIdentifier
] 返回“接收者的包标识符,由捆绑包信息属性列表中的 CFBundleIdentifier 键。”You'd use:
+ mainBundle
"[r]eturns the NSBundle object that corresponds to the directory where the current application executable is located." and hence will return anNSBundle
object for the application bundle.[
- bundleIdentifier
] Returns "[t]he receiver’s bundle identifier, which is defined by the CFBundleIdentifier key in the bundle’s information property list."以下是我在 UIA 脚本中获取应用程序的捆绑 ID 的方法:
Here is how I got the Bundle Id for my APP in the UIA Scripts:
您可以从 plist 中找到捆绑包 id。右键单击应用程序文件,然后单击“显示包内容”。你会在那里找到一个 plist 文件。使用任何文本编辑器打开它,您将获得捆绑包 ID。
You can findle the bundle id from the plist. Right Click in the app file and click on "show package contents". You will find a plist file there. Open it with any text editor and you will get the bundle id.