views:

566

answers:

1

Hi,

In my Iphone application , i am able to get the UDID of the device and have display it on alertview.

my query is that while any user go to the apple appstore and try to istall the application, at that same time how to get the UDID of the device and store it to the Database and also want the UDID of application at the time of uninstallation.

Whether is it possible or not? If possible please provide any code or any useful link or any other info,which would be appreciated.

Thanks,

Mishal Shah

+3  A: 

You can't run any process when your application is not actually running - this includes at download time and at uninstallation.

Instead, you should try to find other ways to measure what you want. You can, for example, have your application keep track (in NSUserDefaults or similar) of whether or not this is the first time the user has launched your app, and if it is submit the UDID to your server.

Tracking uninstallation is a lot harder - the best you may be able to do is to keep track of how long it's been since the user last launched your app (if you have the app submit a launch time every time the user opens it).

Keep in mind that a lot of tech-savvy users will object to your gathering the UDID or usage patterns within your app without their express permission (or at all).

Tim
+1 for mentioning privacy issues. I'd have no problems if I were told. I would if it was surreptitious.
mahboudz