Chi*_*ong 21 iphone objective-c imei ios
我想在iPhone上获取IMEI.我尝试使用以下代码:
#import "Message/NetworkController.h"
NetworkController *ntc=[[NetworkController sharedInstance] autorelease];
NSString *imeistring = [ntc IMEI];
Run Code Online (Sandbox Code Playgroud)
但是找不到NetworkController.
我还发现我可以使用以下方法获得uniqueIdentifier:
UIDevice *myDevice = [UIDevice currentDevice];
NSString *identifier = myDevice.uniqueIdentifier;
Run Code Online (Sandbox Code Playgroud)
但这无法帮助我获得IMEI.
有关如何在iPhone上获取IMEI的任何建议?
Chi*_*ong 13
我发现erica在ericasadun.com上发布了头文件"Message/NetworkController.h". http://ericasadun.com/iPhoneDocs300/_network_controller_8h-source.html(现已删除)
我创建了一个头文件,将NetworkController.h文件复制并粘贴到其中,并将私有框架"Message.framework"添加到我的项目中,导入我创建的头文件.
现在我可以使用我找到的原始方法来获取imei号码.
NetworkController *ntc = [NetworkController sharedInstance];
NSString *imeistring = [ntc IMEI];
Run Code Online (Sandbox Code Playgroud)
[已编辑]不再有效了.应用程序将被Apple拒绝.相反,您将不得不使用UDID.见下面的帖子.
| 归档时间: |
|
| 查看次数: |
69271 次 |
| 最近记录: |