Can anyone tell me the way for getting the UDID number of an iPhone programmatically .I found som开发者_高级运维e private framework like IOKit i dont want to use this.
HI,
NSString *UDID=[[UIDevice currentDevice] uniqueIdentifier];
NSLog(@"UDID==> %@",UDID);
Why do you need it? Tell us what problem you're trying to solve and we may be able to help you find another way to solve it. For instance:
- If you're trying to get a device-unique value, the UDID is precisely that.
- If you're trying to tie your app's data to a specific device... the UDID is again the right thing for the job.
- If you're trying to determine a model based on serial numbers, consider using
uname()
instead. - If you're trying to spy on the user... naughty you!
Can you give us more information on your situation?
精彩评论