views:

39

answers:

2

Hi all,

How can I get the device-id of the iPhone on which my application's got installed immediately after installation? Is PUSH_NOTIFICATION the answer?

Thanx in advance.

A: 

Neither your app nor yourself get informed by the OS when your app is installed. You have no option to detect installation unless the user launches the app.

Ole Begemann
Thanx Ole.. What is the way to dynamically retrieve the device-id when the user launches the application? Also can I get the notification of uninstallation of my application by any way?
neha
`[[UIDevice currentDevice] uniqueIdentifier];`
Ole Begemann
Thank you for your help..
neha
A: 

Here is a sample code http://www.timeister.com/2009/06/objective-c-get-iphone-device-guid/

UIDevice *device = [UIDevice currentDevice];
NSString *uniqueIdentifier = [device uniqueIdentifier];
NSLog(@"Device GUID: %@", uniqueIdentifier);
Adrian Pirvulescu
Thanx Adrian.. It helped..
neha