您能否建议如何在 Windows 上使用 C# 获取已连接 iOS 设备的 UDID?我试图在谷歌中搜索,但没有找到任何东西。有没有办法或解决方法?也许任何开源库或其他东西?
请提出建议。
提前致谢。
最佳答案
这就是问题所在,UDID 从 IOS 7 开始就被锁定了,你不应该在你的代码中访问这个 ID。有一些方法可以通过不可见的后台网页提取 ID,但这仅适用于您不打算在 iTunes 商店上发布您的应用程序的情况,因为您的应用程序将被拒绝。
2013 年,马特在他的博客 NSHipster ( http://nshipster.com/uuid-udid-unique-identifier/ ) 中写道:
As of May 1st, Apple began enforcing this deprecation on all new app submissions, even for apps targeting earlier versions of iOS. Any use of uniqueIdentifier is grounds for immediate rejection of new binaries.
(如果您希望更详细地解释此更改的来龙去脉,请阅读 Mattt 博客条目的其余部分)
对此您能做些什么?没有什么。但是,如果您需要某种 ID 来执行您想要执行的任何操作,那么您有两种选择:
identifierForVendor
The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.
Normally, the vendor is determined by data provided by the App Store. If the app was not installed from the app store (such as enterprise apps and apps still in development), then a vendor identifier is calculated based on the app’s bundle ID. The bundle ID is assumed to be in reverse-DNS format.
广告标识符
Unlike the identifierForVendor property of the UIDevice, the same value is returned to all vendors. This identifier may change—for example, if the user erases the device—so you should not cache it.
If the value is nil, wait and get the value again later. This happens, for example, after the device has been restarted but before the user has unlocked the device.
关于c# - 如何使用 C# 在 Windows 上读取连接的 iOS 设备的 UDID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32071966/