My app uses GCM to send push notifications and it all worked great.
Recently, one of subdcribers bought iPhone 7 and wrote to me, that push notifications dont work.
I've checked the logs from GCM - message is sent correctly:
{"multicast_id":6854913573879465744,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1484614306664165%6a57bb166a57bb16"}]}
She does receive other notifications from facebook, viber, etc., so no trouble with network.
Notifications are enabled in general and for my app.
"Do not disturb" is off.
Other subscribers with iOS 10.2 successfully receive notifications on their iPhones 5/6.
Reinstalling the app didnt help. App successfully receives the token, but doesnt receive notifications after.
What else can I check? Thank you.
I think this is a common issue on iPhone7. Check it here. I guess you have done all the workarounds in the link given but still no luck to fix the issue. Maybe this thread might help. Suggested action is to make sure that on your project settings, under the Capabilities Tab, scroll down to Push Notifications and turn it to ON. This automatically generates an entitlements file that contains the key APS Environment.
Related
So I am whitelabeling the Rocket.chat app for iOS. I have already done this for Android and it is working very well. The issue I'm having is that the app works on the simulator, but it does not receive any notifications. I have followed these instructions to no avail. It seems as if the app is not able to communicate with Firebase. Additionally, when I first launch the app after installing, it asks if I want to enable notifications, so the app itself is working. I'm really not sure what to try next. Thank you for your help. If you need any additional information, just let me know.
So the simulator cannot receive push notifications. Seems strange, but that was the problem.
A few days ago, I got the issue below.
I've been getting notifications for the past several days. The notification had been enabled, and the app was working (I received push notification) until it suddenly didn't yesterday. And when I open the app, it suddenly asks me to enable notification (please see the picture "iOS Push Notification Permission Alert.png")
iOS Push Notification Permission Alert.png
I guessed that my client removed the app and re-installed, so all permissions were lost. But they said that they didn't.
So, How can it happen?
My concerns are:
If notification was enabled, how can it show the alert above again? Is there a possible way?
If notification was not enabled, why have I received the notification for the past several days?
Under which scenario(s), would an app suddenly disable already enabled notification? Is there a way to disable notification permission for the app on the iOS phone by programming?
I will appreciate your answers so much!
P/s: I read the post disable push notification in app, but it doesn't help for my questions.
This is only possible if the app is reinstalled or the notifications are turned off from the settings.
There is one setting in iPhone which will allow iPhone to offload the unused apps and if this happened, there will be a cloud icon on the left of app title.The app will be reinstalled when you click it again.
And it seems that it will also happened when the storage of iPhone is not enough.
So I guess this happened in your client's phone.
This setting is in both Setting-iTunes & App Stores-Offload Unused Apps and Setting-General-iPhone Storage-Offload Unused Apps.
I have an enterprise iOS app I'm developing which receives push notifications for various features. I have the push notification service installed and working while debugging the app with Xcode and an iPhone X (phone doesn't matter, I've tried multiple and they all seem to work directly from Xcode).
If I package the app and distribute it over the air to the device, I get the normal "Would you like to receive push notifications" (which I agree to), but then it won't receive push notifications.
Things I've checked:
Make sure the device capability "Push Notifications" is turned on.
Make sure the bundle identifier matches.
Verify that the pushID is correct.
Verify that Background Modes: Remote Notifications is turned on.
The only thing I can think of is that maybe when the app is packaged it's flipping something to production rather than development and maybe when I send the push notification it's not able to send to production or something along those lines.
Has anyone had this issue before?
#HarshalBhavsar's answer got me closer. I found the explanation here though:
https://stackoverflow.com/a/35628480/3921182
As it turns out, Apple has a push notification service for development that is separate from distribution(production). When sending the push notification messages to a distributed app, they actually need to be sent to:
ssl://gateway.push.apple.com:2195
rather than
ssl://gateway.sandbox.push.apple.com:2195
Per the title, I'm trying to get AWS SNS push notification to work on iOS device. For testing purpose I wanted try the Mobile Hub (https://console.aws.amazon.com/mobilehub) and work my way on top of the sample app that's given.
I just can't seem to make it work. I know it's difficult to ask for help when it involves a multi layered instructions, but I've spent all weekend wrestling this issue, and just couldn't seem to figure it out.
In AppDelegate, didReceiveRemoteNotification call should receive something when I trigger an SNS within Amazon SNS Mobile Console after selecting a Topic. But this protocol is not being called.
In terms of Provisioning Profile, I've created both Development & Distribution. Tested with both.
In terms of certificates I have tried with both Apple Push Notification service SSL (Sandbox) and Apple Push Notification service SSL (Sandbox & Production). It's obvious you have to select the latter since with the former, the notification permission alert doesn't even show when you install the app. Only does it show when you've installed it with the latter.
I made sure the bundle IDs match.
I've turned on all my notifications on my iphone 6s.
On console I see this success message:
2016-03-30 20:57:57.103 MySampleApp[284:47861] AWSiOSSDKv2 [Info] AWSPushManager.m line:186 | -[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:] | The device token: 435d5se354s38s9ddge2edcs2a3601e18ss9c83e47s629164ebced21s16abb39974sg3
"didFailToRegisterForRemoteNotificationsWithError" never gets called.
"didRegisterForRemoteNotificationsWithDeviceToken" successfully gets called.
I also get this success message on my console:
2016-03-30 21:34:16.635 MySampleApp[321:57551] AWSiOSSDKv2 [Info] PushNotificationViewController.m line:112 |
-[PushNotificationViewController topicDidSubscribe:] | Successfully subscribed to a topic: AWSPushTopic: 0x14c6da770
I'm absolutely lost. Please let me know if there is more info for me to post to solve this issue.
Update: Rohan Dubal, thanks for the comment. Here are the following things you asked me for.
Yes, I have always went from "My Sample App" navigationbar view -> "Push Notifications" row -> "Push Notifications" navigation bar view -> click Demo Push Notifications on the bottom -> the toggle is on (green) and the "topic" line is checkmarked and I have sent the APNS to that referring Topic.
Yes I've tried minimizing and also closing the app as well. The top bar notification or any notification doesn't show at all.
Thanks for your feedback. Please do suggest any other tests I can run.
Also, I thought that maybe it has to do w/ my iphone 6s so i tried it w/ iphone 5s and it still doesn't work.
iphone 6s is ios9.2 and iphone 5s is ios 8.3.
Well, this sounds similar to the problem that I was just having. Mobile Hub only seems to let you setup Production APNS and not Development ones. When I debug the app with XCODE I'd need to use the sandbox APNS, so I did the following:
Create an SNS Application of type Apple Development (APNS_SANDBOX)
Use the .p12 from my Development Certificate in the App ID
Started my App and recorded the device token that didRegisterForRemoteNotificationsWithDeviceToken gave me
Minimised my App (otherwise notifications don't appear)
in SNS console I registered an Endpoint using the device token
Used the Publish to this Endpoint button in SNS console to send a message ('Hello World', obviously)
Saw notification
Did engineers victory dance
Hopefully that helps you. The key to this for me was realising that I'd need to create another SNS queue. TBH I'm not seeing the benefit of the Mobile Hub.
I have an application, it uses APNS, so I have code that subscribes to notifications, and everything works fine. But every time I reinstall app, and run it with xcode, I get allow push notification dialog. Every time.
I found hundreds questions about how to achieve this dialog again, but none - how to stop achieving them. I need help!
It's seems known IOS9 bug, here is a link for developer forum and still no response from apple and no solution: