UDID for Push Notification instead of Device Token?

10,507

Solution 1

No, you can only use the Device Token. The push notification server API will only accept Device tokens and will also check if you are allowed to send a notification to that installation by checking the Certificate.

The Device token is unique for your app on a specific device. If the user has multiple devices he/she will also have multiple device tokens (one for each install of your app).

When the user deletes your app and reinstalls it the device token can also change.

Also, the UDID is no longer useable by developers, Apple has restricted the use of the UDID and you can longer use the UDID anywhere in your code.

Solution 2

No, you can not use UDID for push notification. Lets understand what these things are actually.

UDID - (iOS Unique Device ID) A number in each iPhone that is used by developers to distribute new apps directly into the phone for testing purposes before they are available in the App Store. The UDIDs are used to create an Apple-certified provisioning file that is dragged with the app into iTunes.

The UDID is not visible on the phone. It has to be revealed in iTunes, and it cannot be highlighted and copied like normal text. To retrieve the UDID you would need to do the following:

  1. Connect your iPad to your computer, and run iTunes.
  2. Select your device in the 'Device' list. On the right side, you'll see information about your device.
  3. Click the Serial Number. It will switch to displaying your UDID.
  4. Press Cmd-C to copy the UDID to your clipboard.

NOTE:

Any app in the iTunes App Store that provides UDID is a fake app. UDID can not be retrieved by code, as defined above it has to be taken manually via iTunes Software or from XCode's Connected Device Listing.

Device Token - An identifier for the Apple Push Notification System for iOS devices. Each device has two device tokens – one for development, and one for production (ad hoc or app store builds). The tokens are 64 hexadecimal characters.

Solution 3

Device token is to be register in 3rd party servers and the third party server talks to APNS server. So Apple server is communicate to clients using device token. Instead of device token if you pass the UDID it will fail. Moreover Apple is restricting to access Device UDID.

Share:
10,507
Jarich
Author by

Jarich

Updated on June 24, 2022

Comments

  • Jarich
    Jarich almost 2 years

    I just successfully implemented a sample push notification in iOS. Currently, I used the device token in sending the message.Now, I have a question regarding Push Notification requirements. Can we use the UDID of the device for Push Notification instead of Device Token? I know the device token can do the work alone but is it possible to use UDID for push notification? Does Apple allow that?

  • psuhas
    psuhas over 8 years
    gr8 answer but how do you get/find out the device token for an iphone? thx
  • Vaibhav Saran
    Vaibhav Saran almost 5 years
    @psuhas this can be done with the code only which s quite simple now. You can find number of tutorials to find it.