如何在 iPhone 上获取 IMEI? [英] How to get IMEI on iPhone?

查看:41
本文介绍了如何在 iPhone 上获取 IMEI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 iPhone 上获取 IMEI.我尝试使用以下代码:

I want to get IMEI on iPhone. I try to use the following code:

#import "Message/NetworkController.h"
NetworkController *ntc=[[NetworkController sharedInstance] autorelease];
NSString *imeistring = [ntc IMEI];

但是没有找到 NetworkController.

But NetworkController is not found.

我还发现我可以使用:

UIDevice *myDevice = [UIDevice currentDevice];
NSString *identifier = myDevice.uniqueIdentifier;

但这无法帮助我获得 IMEI.

But this cannot help me to get IMEI.

如何在 iPhone 上获取 IMEI?

How to get IMEI on iPhone?

推荐答案

您无法再在 iPhone 上获取 IMEI.您可能必须改用 UDID.查看其他答案.

You can't get IMEI on iPhone anymore. You may have to use UDID instead. See other answers.

过去,您可以使用 ericasadun.com 上发布的头文件Message/NetworkController.h".http://ericasadun.com/iPhoneDocs300/_network_controller_8h-source.html(已经现已移除)

In the past, you could use the header file "Message/NetworkController.h" posted on ericasadun.com. http://ericasadun.com/iPhoneDocs300/_network_controller_8h-source.html (It's been removed now)

您可以将 NetworkController.h 文件和私有框架Message.framework"添加到您的项目中,然后导入该头文件以使用我发现的原始方法来获取 imei 编号:

You would add the NetworkController.h file and the private framework "Message.framework" to your project, then import that header file to use the original method I found to get the imei number:

NetworkController *ntc = [NetworkController sharedInstance];
NSString *imeistring = [ntc IMEI];

那个黑客不再起作用了.应用程序将被 Apple 拒绝.

That hack doesn't work anymore. App will be rejected by Apple.

这篇关于如何在 iPhone 上获取 IMEI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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