apple-push-notifications

Azure notification hubs - how to set multiple apps on the same hub

喜你入骨 提交于 2019-11-30 15:59:00
问题 I have a situation where I need to use the same notification hub for several iOS applications. For a given tag - all the applications should receive this push. Each iOS app has a different push notification certificate, so only one of the apps actually got the push notification. I don't want to resolve to opening multiple hubs - because then I need to manage which hub each app could belong to - and this is very awkward. How can I achieve this? 回答1: I'm pretty certain what you want to do is

Stopping ios 7 remote notification sound

佐手、 提交于 2019-11-30 15:51:49
In iOS 7, when a user swipes one of my notifications from the lockscreen and is taken to my app, the notification sound keeps playing (unlike iOS 6). Is there any way to programmatically stop that sound when my app launches in iOS 7? NOTE: see the accepted answer for a shoddy workaround. Mohamed Hafez I'm pretty sure this is a bug on Apple's end, see devforums.apple.com/message/888091 (thanks Gui13). File a duplicate bug report to get Apple to pay attention to it, as that is how Apple assigns priority to bugs . In the meantime, the following will work but will also clear all of your

Does a iOS Push notification device token change?

不羁岁月 提交于 2019-11-30 15:51:35
问题 Is there any possibilities for a device token to change after the app is installed and registered for the notification in any kind of scenarios. Scenarios like: App update iOS update or in any other random scenario's. 回答1: Previously in document it was like, If the user restores backup data to a new device or reinstalls the operating system, the device token changes. From new documentation here: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual

Why would only some devices be receiving push notifications

给你一囗甜甜゛ 提交于 2019-11-30 15:38:51
I set up a push notification service to send out notifications to clients based on an RSS feed. I have a service that runs every minute to see if a new post was added to the feed. If so, the service will send out a notification to all the clients. However, some people have been complaining saying that they are not receiving any push notifications. Here is the function that I use to send out the messages: function _sendMessages($tokens, $message) { $payload['aps'] = array('alert' => $message, 'sound' => 'default'); $payload = json_encode($payload); $context = stream_context_create(); stream

Azure notification hubs - how to set multiple apps on the same hub

亡梦爱人 提交于 2019-11-30 15:37:40
I have a situation where I need to use the same notification hub for several iOS applications. For a given tag - all the applications should receive this push. Each iOS app has a different push notification certificate, so only one of the apps actually got the push notification. I don't want to resolve to opening multiple hubs - because then I need to manage which hub each app could belong to - and this is very awkward. How can I achieve this? I'm pretty certain what you want to do is impossible for several reasons. iOS push is handled via APNS which is an Apple technology. Apple dictates that

Upload new APNS certificate to GCM

青春壹個敷衍的年華 提交于 2019-11-30 15:34:06
We have an app for iOS and Android that uses GCM. I'm trying to upload a new production APNS certificate to GCM but I can't because Google is moving GCM to Firebase. How do I do that? Here's a screenshot of the Google Developer Products. There's no GCM now. I would suggest that you move to Firebase Cloud Messaging (FCM). If you go to the Firebase console you will be able to create a new Firebase project or import an existing Google project. Once you are in your Firebase project you will be able to connect your iOS and Android apps. You can then upload your APNs cert there. See the docs for

Dismissing iOS push notifications remotely

我们两清 提交于 2019-11-30 15:17:13
The Gmail app for iOS is able to receive push notifications while the app is not running (as most email apps do). However, it is also able to clear all Gmail push notifications from the device when the unread count of the user's Inbox becomes zero, even if the app is not running . Here is an example sequence: 1. Receive a new email in your Gmail account. 2. The iOS device displays a notification for the new message. 3. Go to the Gmail website and open the message (marking the message as "read"). 4. The notification on the iOS device is dismissed. Note: [[UIApplication sharedApplication]

Best practices for push notifications in multi user applications?

会有一股神秘感。 提交于 2019-11-30 15:16:53
问题 I'm working on a push architecture that needs to support applications which allow for multiple users. This means more than one user can log into the application with their credentials. The problem I'm running into is what if user A allows push notifications, then logs out, then user B logs in and starts getting user A's push notifications? What are some best practices for handling this type of thing? One thought I had was you could remember the last user who logged in and only display push

Apple rejection after implementing silent notifications with PushKit

时间秒杀一切 提交于 2019-11-30 15:07:57
We added silent notifications which require PushKit and enabling VoIP in the Info.plist See Apple's PushKit Doc Now my app is rejected by Apple: Your app declares support for VoIP in the UIBackgroundModes key in your Info.plist, but does not include any Voice over IP services. Please revise your app to either add VoIP features or remove the "voip" setting from the UIBackgroundModes key. The app is NOT a VoIP therefore it doesn't require VoIP features. Removing the VoIP from UIBackgroundModes causes the silent notifications to stop working. Anyone know what I should do? What VoIP feature can I

GCM push notification when iOS app is in the background

六月ゝ 毕业季﹏ 提交于 2019-11-30 14:44:34
I'm trying to send push notifications to my iOS app with GCM. The app doesn't get the notification when it's in the background but it does when it's in the foreground. I was testing the push notifications with a PHP script also which sends the message directly to the APNS and it's working in the background. The JSON sent to GCM: (I'm sending it from a rest client for testing) { "to" : "token...", "notification" : { "title": "GCM TITLE", "body" : "FROM GCM", "badge": "1", "sound": "default" } } Not working : The userInfo received from GCM in didReceiveRemoteNotification: Notification received: