apple-push-notifications

generated certificate stops working when moved to resources folder

谁说我不能喝 提交于 2019-11-29 17:15:17
问题 I'm having problems with a generated certificate I'm using to connect to the apple push services. All works fine when the generated p12 file was in my src/main/java folder, but I moved it to src/main/resources and it decided to stop working with the following error: DerInputStream.getLength(): lengthTag=111, too big. To get into some more detail: I'm using the notnoop push notifications library and followed the tutorial from Ray Wenderlich to generate the certificates. after, I used to

Firebase p8: Invalid APN Certificate. Check the certificate in Settings

混江龙づ霸主 提交于 2019-11-29 17:05:11
I have successfully registered with APN and I received the token ID. The problem is that when I send a notification from Firebase console, I get error Invalid APN Certificate. Check the certificate in Settings This is the steps I followed in order to assign the .p8 APN certificate to Firebase. I am testing the app on an Iphone device. What am I doing wrong? created new key at https://developer.apple.com/account/ios/authkey/ downloaded the p8 file got the Team ID from https://developer.apple.com/account/#/membership/ uploaded the .p8 file in firebase console under Settings/cloud messaging in my

GCM (Google Cloud Messaging) for iOS apps

只谈情不闲聊 提交于 2019-11-29 16:40:40
I am working on an iOS app, in which my client is asking for implementing GCM (Google Cloud Messaging) on iOS platform. I need to be sure if it can be done on iOS. As we use APNS for Push Notifications in iOS. Can anyone suggest me about this. Thanks In Advance. Please check this link it contains all steps to integrate GCM in iOS and requirement is you need to set up CocoaPods dependencies. https://developers.google.com/cloud-messaging/ios/start https://developers.google.com/cloud-messaging/ios/client Its a late answer.But I just started working on GCM on iOS.SO I thought to answer this

How to use the device token in method other than didRegisterForRemoteNotificationsWithDeviceToken?

丶灬走出姿态 提交于 2019-11-29 16:31:30
I got the device token through didRegisterForRemoteNotificationsWithDeviceToken method. I wanted to use the device token in another method. I tried it in this way, In didRegisterForRemoteNotificationsWithDeviceToken method: str = [NSString stringWithFormat:@"%@",deviceToken]; // str is the NSString which is declared in the appDelegate.h file as global variable In didReceiveRemoteNotification method: NSLog(@"Device Token : %@",str); When i do like this the Device Token is returning as "nosniff". How can i store this device token in a global variable and use it in the other class or in other

iOS silent push should update application badge count

霸气de小男生 提交于 2019-11-29 16:25:50
Is it possible to update application badge count by receiving a silent push. When the application is not running in the background, this method is not called. My guess is this method get called even if the app is not running in the background. Am I wrong? - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler { int currentBadge = [UIApplication sharedApplication].applicationIconBadgeNumber; DLog(@"%@, badge = %i", userInfo, currentBadge); [UIApplication

Push Notification in production is not working

自作多情 提交于 2019-11-29 15:49:24
I Have implemented this url. Development mode notification is working but in production its not working. and shows errors. dakshas-iMac:alootamatar daksha$ php push_demo.php Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/daksha/Desktop/alootamatar/push_demo.php on line 18 Warning: stream_socket_client(): unable to connect to ssl://gateway.push-apple.com:2195 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /Users/daksha/Desktop/alootamatar/push_demo.php on line

IOS Play Sound on receiving push notification when app in foreground

陌路散爱 提交于 2019-11-29 15:45:11
How to play sound on receiving a push notification when the app is in the foreground state. My Code : - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { if (application.applicationState == UIApplicationStateActive) { //create an audio player and play the sound NSString *path = [[NSBundle mainBundle] pathForResource:@"whistle" ofType:@"caf"]; NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: path]; AVAudioPlayer *theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:NULL]; theAudio.volume = 1.0; [theAudio prepareToPlay];

Get Apple's remote push notifications even after app terminates

走远了吗. 提交于 2019-11-29 15:41:28
I am developing an iOS app which receives apple's remote push notifications at a particular time interval. The notifications are received successfully when app is active as well as when app is in background. But when app is terminated from app switcher/dock, notifications are not received until the app is started again. I have tried following code to keep app alive in background. This same code is implemented in applicationWillTerminate: method, but it did not work. __block UIBackgroundTaskIdentifier bgTask ; UIApplication *app = [UIApplication sharedApplication]; bgTask = [app

Azure Notification Hub: Why is NotificationOutcome NotificationId Property Empty?

断了今生、忘了曾经 提交于 2019-11-29 15:23:14
Using a Standard Notification Hub, I want to view telemetry for a specific message using the returned NotificationId and either this rest API: https://msdn.microsoft.com/en-us/library/azure/mt608135.aspx or the NotificationHubClient GetNotificationOutcomeDetailsAsync method: https://msdn.microsoft.com/en-us/library/microsoft.azure.notificationhubs.notificationhubclient.getnotificationoutcomedetailsasync.aspx Either way, I need the Notification Message Id that is supposed to be returned from the hub when sending the message. I am sending the message from the app backend using the

PHP fails socket connection with Apple notification gateway

时光怂恿深爱的人放手 提交于 2019-11-29 14:49:24
问题 Disclaimer: on SO I found many similar questions and some answers but none solved my issue . I have this easy PHP code: <?php $deviceToken = "myDeviceToken"; $message = "Hello from server"; $badge = 1; $sound = "default"; // Construct the notification payload $body['aps'] = array( 'alert' => $message ); if ($badge) { $body['aps']['badge'] = $badge; } if ($sound) { $body['aps']['sound'] = $sound; } /* End of Configurable Items */ $ctx = stream_context_create(); stream_context_set_option($ctx,