我如何获得任何应用程序(不是我开发的)的 identifierForVendor?

How could I get identifierForVendor for any app (not developed by me)?

我的目标是为 App Store 上的特定应用程序获取 identifierForVendor,我 开发也无法访问该应用程序。假设这个应用程序的包 ID 是 com.example.app

作为序言,我能够通过嗅探网络请求获取 com.example.app 的 identifierForVendor。但是,这不是为多个设备获取它的有效或可扩展的方式。所以,我正在研究其他方法。

我试图通过在 Xcode 上创建自定义 iOS 应用程序来获取 com.example.app 的 identifierForVendor,其捆绑 ID com.example.test

我希望 identifierForVendor 会相同,因为他们的文档说明具有相同 bundle id 的应用程序将具有相同的 identifierForVendor,但事实并非如此。好像identifierForVendor也是根据开发者资料什么的。

我是否可以获取外部应用程序的 identifierForVendor 值?

简短的回答是你不能。

Apple 未提供有关如何计算此标识符的任何详细信息。

对于每台设备上给定开发人员具有相同初始捆绑 ID 组件的应用程序,标识符是唯一的。

例如,来自 developer1 的捆绑 ID com.example.app1com.example.app2 的应用在给定设备上将具有相同的 identifierForVendor .

同一设备上的捆绑 ID com.example.app3 但来自不同开发者的应用会有不同的 identifierForVendor;那是 for vendor 位。

即使您使用相同的 bundle ID 前缀,您也不会获得与来自其他开发者的应用相同的标识符。

您还应该注意:

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.