devicetoken

how to make iPhone app asks to register device for push notification multiple times

白昼怎懂夜的黑 提交于 2019-12-13 11:36:30
问题 I have used the following code to register my app to receive push notification, and I got the alert that asks me to register for push notification and I accidentally press cancel. Now I want to have the alert again so I can fire the delegate method in order to get the device token. But I don't get this alert any more and every time I open the settings I found that the notification is turned off for the app. I tried to delete the app from device, change app version, delete testing profile

Critical outcome when sending push notification from our server

ぐ巨炮叔叔 提交于 2019-12-13 00:34:30
问题 We have an app on appstore, and with registered push notifications. They have successfully worked all the time, but we now tried to send a 'global' push, and something weird happened. This is what we have in our server-side .php file: //Loop through tokens in tokenArray $i = 0; $t = 0; foreach($tokenArray as $token) { $t++; // Make notification $msg = chr(0) . pack('n', 32) . pack('H*', $token) . pack('n', strlen($payload)) . $payload; // Send $result; if($message != null) { $result = fwrite(

Attempting to sent Push Notifications to iOS device - not receiving them

元气小坏坏 提交于 2019-12-11 08:47:56
问题 I have so far done the following: - Generated certificate and private key as .pem, also cat'd them together. Successfully connected to gateway.sandbox.push.apple.com. - Using the provisional profile with push notifications is enabled for development, I have a basic app that successfully prompted "Do you want to allow push notifications", so this is working correctly - Obtained the device token - I have tried pulling a few pre-made files for SSLing into sandbox from the internet just to see if

Obtain NEW Apple device token?

寵の児 提交于 2019-12-10 19:04:26
问题 I am creating an app that allows the user to log out of the app and log in as different user if they want to. Is there any way to obtain a new device token from Apple once the new user logs in? Is there a way to force call the didRegisterForRemoteNotificationsWithDeviceToken method? 回答1: No, you can't request a new device token. They expire from time to time, and only then will you get a new one (or if you have a different app with a different bundle id, the token will be different). Create a

How to get device tokens

限于喜欢 提交于 2019-12-10 15:22:18
问题 I have an app for iOS and I want to integrate there push notifications. I have seen a tutorial on youtube and everything is OK, but recently I'm using a development certificate (for testing - not for AppStore use) and I have PHP script on my server. In this file is stored the deviceToken which have my iPhone and it is written in php variable $deviceToken. But now, when I want to use this in AppStore, how can I get the device tokens from everybody who had downloaded my app and get it into the

iPhone registerForRemoteNotificationTypes does not generate an error but does not fire delegate that gives device token

99封情书 提交于 2019-12-09 05:09:13
问题 I am developing an iPhone app that needs push notification. I followed the instructions for creating the certifications and modifying the app ID. I am not totally sure I did this correctly, but I did follow the directions. Any idea how I can check to see if this is OK? When I ran in the emulator I did get an error message saying that the emulator did not support push notifications. This was somewhat expected. BTW: I have seem this question out there a few times. It always seems to be with a

device tokens for Apple Push Notifications provider

五迷三道 提交于 2019-12-07 08:26:48
问题 If I'm an Apple Push Notification "provider" for multiple iOS apps can I use the same device token for multiple apps? I'm aware that I need unique SSL certificates for each app. However I'm confused about the device tokens. Example : I have two apps A and B. I want to provide push notifications for both apps. Say I collect a device token T from a user who installs app A. Assume I have unique SSL certificates for both apps. When the same user installs app B can I re-use token T when providing

How to get device token id of windows phone for push notification?

北城以北 提交于 2019-12-07 06:20:17
问题 I am creating a windows phone 8 app in phone gap + mobile jquery using visual studio 2012. I want to get the device token id from the device for push notifications. Can anyone guide me as to how can I get device token id of windows phone 8? 回答1: You can use the DeviceExtendedProperties - byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId"); string idAsString = Convert.ToBase64String(myDeviceID); 回答2: For what reason you need the device ID? In

Saving the DeviceToken for Later Use in Apple Push Notification Services

可紊 提交于 2019-12-06 21:15:04
问题 In my iPhone app I am getting the device token from Apple which I am assigning a public property inside the Delegate file as shown below: - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { self.dToken = [[NSString alloc] initWithData:deviceToken encoding:NSUTF8StringEncoding]; } The dToken property is declared as shown below: NSString *dToken; @property (nonatomic,retain) NSString *dToken; But when I try to retrieve the

Device token in push notification

余生长醉 提交于 2019-12-05 16:51:24
I want to send push notification to certain users only. From what I have gone through in Apple docs. The code to register for push notification is this - (void)applicationDidFinishLaunching:(UIApplication *)app { // other setup tasks here.... [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; } // Delegation methods - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { const void *devTokenBytes = [devToken bytes]; self.registered = YES; [self