如何获取 iOS 应用程序的 bundle id - 使用 .ipa 文件或安装在 iPhone 上的应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27509838/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get bundle id of iOS app - either using .ipa file or app installed on iPhone
提问by NRM
Currently I have .ipa
file and same app can be installed through test flight. I don't have the app source code. I tried extracting the files from .ipa file using Archive Utility but there was no plist file. I am not sure how do I get the bundle id for this app- (either from .ipa
file or by using the installed app and what is the process?) as i want to automate this app test on real device
目前我有.ipa
文件,可以通过试飞安装相同的应用程序。我没有应用程序源代码。我尝试使用 Archive Utility 从 .ipa 文件中提取文件,但没有 plist 文件。我不确定如何获取此.ipa
应用程序的捆绑 ID(从文件中或通过使用已安装的应用程序以及过程是什么?),因为我想在真实设备上自动执行此应用程序测试
(Note: .app
file or source code is not available and the test app is signed with valid developer provisioning profile)
(注意:.app
文件或源代码不可用,测试应用程序使用有效的开发人员配置文件签名)
回答by Moin Pansare
- Extract the contents of
.ipa
file using any app, this will give you aPayload
folder. There will be only a single file inside thePayload
Folder - Right Click on file -> Show Package content. This will redirect you to a new finder window with lot of files
- Open
info.plist
file using eitherXcode
ortextEdit
there you can find the bundle id
.ipa
使用任何应用程序提取文件的内容,这将为您提供一个Payload
文件夹。文件Payload
夹中将只有一个文件- 右键单击文件 -> 显示包内容。这会将您重定向到一个包含大量文件的新查找器窗口
- 打开
info.plist
文件,或者使用Xcode
或textEdit
那里你可以找到包ID
Cheers
干杯
回答by Shashank Agrawal
To find out the bundle id of any existing app:
要找出任何现有应用程序的捆绑包 ID:
- Connect your iOS device to your Mac with iOS wire
- Open the
Console
app on Mac - Select your device under the Devicesheading (top left)
- Enter the name of your app in the search bar
- Now launch the app in your iOS device
- You will see the first log in the console like
SpringBoard Bootstrapping com.xxxx.xxx.kids with intent foreground-interactive
- 使用 iOS 线将您的 iOS 设备连接到 Mac
Console
在 Mac 上打开应用- 在设备标题下选择您的设备(左上角)
- 在搜索栏中输入您的应用程序名称
- 现在在您的 iOS 设备中启动该应用程序
- 您将在控制台中看到第一个日志,例如
SpringBoard Bootstrapping com.xxxx.xxx.kids with intent foreground-interactive
回答by SaRaVaNaN DM
Try this terminal cmd:
试试这个终端cmd:
osascript -e 'id of app "{path of .app}"'
osascript -e 'id of app "{path of .app}"'
example:
例子:
osascript -e 'id of app "~/Desktop/Fontli.app"'
osascript -e 'id of app "~/Desktop/Fontli.app"'
回答by Deolas
If your app is in the App Store.
1) Find the app online (Google for the iTunes link). For this example we use Apple Pages: https://itunes.apple.com/app/pages/id361309726?mt=8.
2) Copy the number after the id in the URL. (Here: 361309726).
3) Open https://itunes.apple.com/lookup?id=361309726where you replace the ID with the one you looked up.
4) Search the output for "bundleID". In this example it looks like this (next to a bunch of other data): "bundleId":"com.apple.Pages". So for Apple, the bundle ID is com.apple.Pages.
如果您的应用程序在 App Store 中。
1) 在线查找应用程序(谷歌搜索 iTunes 链接)。对于此示例,我们使用 Apple Pages:https: //itunes.apple.com/app/pages/id361309726?mt=8。
2)复制URL中id后面的数字。(此处:361309726)。
3) 打开https://itunes.apple.com/lookup?id=361309726,将 ID 替换为您查找的 ID。
4) 在输出中搜索“bundleID”。在这个例子中,它看起来像这样(在一堆其他数据旁边):“bundleId”:“com.apple.Pages”。所以对于 Apple 来说,bundle ID 是 com.apple.Pages。
回答by Eyal Sooliman
If your app is in App Store,Then you can download the app from iTunes store. Then open that file in finder. There should be plist file. if you open it, you you will be able to find the bundle id there.
如果您的应用程序在 App Store 中,那么您可以从 iTunes 商店下载该应用程序。然后在finder中打开该文件。应该有 plist 文件。如果您打开它,您将能够在那里找到捆绑包 ID。
回答by DeepakMK14
You can get it by Changing the extension of .ipa to .zip and then uncompress .zip file.
您可以通过将 .ipa 的扩展名更改为 .zip,然后解压缩 .zip 文件来获取它。
回答by Mike Mellor
If you have access to the testflight admin you can get the bundle id from the app information on that site. Otherwise you can extract the file using archive utility like you said and right click on the application within and select show package contents, this is where your info.plist will be stored.
如果您有权访问 testflight 管理员,则可以从该站点上的应用程序信息中获取包 ID。否则,您可以像您说的那样使用存档实用程序提取文件,然后右键单击其中的应用程序并选择显示包内容,这是您的 info.plist 将被存储的位置。
回答by Kakshil Shah
If the App is signed with a Proper profile, and you have the access to the developer portal via the Apple ID, you can go to the portal and check out the Bundle ID in the identified --> AppID under Certificate, Identifiers and profiles
如果应用程序使用正确的配置文件进行签名,并且您可以通过 Apple ID 访问开发者门户,则可以转到门户并在已识别的 --> 证书、标识符和配置文件下的 AppID 中查看 Bundle ID
Or you can access it via test flight.
或者您可以通过试飞访问它。
Or else, as Mike Mentioned, Right Click on the ipa, click show package contents, Find the info.plist and you will find the Bundle identifier there.
或者,正如 Mike 提到的,右键单击 ipa,单击显示包内容,找到 info.plist,您将在那里找到 Bundle 标识符。