Question

In my iphone application i want Device Token using the APN. How to get that using code ?

Alos i want Other information about the Device User,its version and other info. How to get that using Code ?

Is it possible to get the device other information using Device Token?

what is the format of the Device Token?

Please give solution by code or any link or any other way,which would be appreciated.

Thanks,

Mishal Shah

Was it helpful?

Solution

here how you get information about device---

NSString*  deviceName= [[UIDevice currentDevice] uniqueIdentifier];
NSString*  localizedModel=[[UIDevice currentDevice] localizedModel];
NSString*  systemVersion=[[UIDevice currentDevice] systemVersion];
NSString*  systemName=[[UIDevice currentDevice] systemName];
NSString*  model=[[UIDevice currentDevice] model];

OTHER TIPS

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert ];
}

// Delegation methods 
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken);
} 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top