来自iPhone应用程序的设备ID [英] Device Id from an iphone app

查看:89
本文介绍了来自iPhone应用程序的设备ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iphone开发的初学者,我创建了一个应用程序。现在我需要通过点击按钮来了解应用程序中的设备ID。请帮助我
提前付款

I am a beginner in iphone development, i have created an application.Now i need to know the device id from the app on click of a button.Please help me out Thanks in advance

推荐答案

使用此

    UIDevice *device = [UIDevice currentDevice];
    NSString *uniqueIdentifier = [device uniqueIdentifier];






更新

Apple拥有已弃用的唯一标识符,因此现在以下代码(来自Melvin Sovereign的评论)是合适的:

Apple has the deprecated unique identifier, so now the following code (from Melvin Sovereign's comment) is appropriate:

NSString *uniqueIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

这篇关于来自iPhone应用程序的设备ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆