ios - Worklight : get device token -


can worklight return device token android/iphone/bb , if how?

more specifically, i'm not looking "device id" native device token.

worklight can return "device id", different device token. example worklight: how current device id push subscription states how "device id" using call

wl.client.getuserinfo("wl_devicenoprovisioningrealm", "userid");

unfortunately returns different device token. when using native iphone call , comparing wl deviceid it's obvious different.

- (void)didregisterforremotenotificationswithdevicetoken:(nsdata *)devicetoken {      nsmutabledictionary *results = [nsmutabledictionary dictionary];     nsstring *token = [[[[devicetoken description] stringbyreplacingoccurrencesofstring:@"<"withstring:@""]                         stringbyreplacingoccurrencesofstring:@">" withstring:@""]                        stringbyreplacingoccurrencesofstring: @" " withstring: @""];     [results setvalue:token forkey:@"devicetoken"];  #if !target_iphone_simulator     [results setvalue:[[[nsbundle mainbundle] infodictionary] objectforkey:@"cfbundledisplayname"] forkey:@"appname"];     [results setvalue:[[[nsbundle mainbundle] infodictionary] objectforkey:@"cfbundleversion"] forkey:@"appversion"];       nsuinteger rntypes = [[uiapplication sharedapplication] enabledremotenotificationtypes];      // set defaults disabled unless find otherwise...     nsstring *pushbadge = @"disabled";     nsstring *pushalert = @"disabled";     nsstring *pushsound = @"disabled";      if(rntypes & uiremotenotificationtypebadge){         pushbadge = @"enabled";     }     if(rntypes & uiremotenotificationtypealert) {         pushalert = @"enabled";     }     if(rntypes & uiremotenotificationtypesound) {         pushsound = @"enabled";     }      [results setvalue:pushbadge forkey:@"pushbadge"];     [results setvalue:pushalert forkey:@"pushalert"];     [results setvalue:pushsound forkey:@"pushsound"];      // users device model, display name, token & version number     uidevice *dev = [uidevice currentdevice];     [results setvalue:dev.name forkey:@"devicename"];     [results setvalue:dev.model forkey:@"devicemodel"];     [results setvalue:dev.systemversion forkey:@"devicesystemversion"];      [self successwithmessage:[nsstring stringwithformat:@"%@", token]];  #else     [self successwithmessage:[nsstring stringwithformat:@"%@", @"simulator generated"]]; #endif  } 

moreover, native device token needed third party notification platform outside of worklight , using worklights messaging system isn't feasible.

you're correct apns device token , worklight deviceid 2 different things. in case require apns device token using 3rd party notification platform can override didregisterforremotenotificationswithdevicetoken method in application delegate receiving full control on device token once arrives apns


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -