Push notification not delivered from Amazon Pinpoint Campaigns - ios

I created a Amazon Pinpoint project using a production certificate from my Apple developer account, I configured my Xcode project with the project ID and APS environment equal to 'production' , I upload the app to TestFlight and then install it in my device, when I send a message using the 'Test messaging' Amazon Pinpoint option (using an specific Endpoint Id or Device Token) the push notification is sent and received in my device, but when I launch a Campaign everything looks ok but I never received the push notification in my device, regardless that the segment I choose is dynamic and shows 1 eligible endpoint (I assume is mine because only I have installed this version).
Can anyone shed any light on this? Thanks in advance!
P.D: In the development environment both works, the message to specific device and the campaign.
UPDATE: I've research in all Amazon pinpoint documentation and is unclear the solution and in other posts from AWS forums and stackoverflow I found that the solution is use the APNs Production certificate and I've already done this.

I found that this line of code in the function didFinishLaunchingWithOptions, the debug mode was always in true:
// Enabling app to receive push notification from Amazon Pinpoint
// Instantiate Pinpoint
let pinpointConfiguration = AWSPinpointConfiguration
.defaultPinpointConfiguration(launchOptions: launchOptions)
// Set debug mode to use APNS sandbox, make sure to toggle for your production app
pinpointConfiguration.debug = false
pinpoint = AWSPinpoint(configuration: pinpointConfiguration)
So the device could not be able to receive the remote notification from Amazon pinpoint

Related

iOS Firebase Push Notification for sandbox only

I am trying to send a PUSH message to iOS using the Firebase. APNS certificate has been set up for the development and production, and It is confirmed that the remote message can be received. I think there is no way to send a message only for development in Firebase Console.
Not directly, there is no dev vs prod switch in the message composer.
One option is to have dev builds subscribe to topics with a _dev appended to them then only send to the _dev topics when developing.
As discussed above, you cannot send directly without knowing which devices are having development build or having production build.
What you can try is
Based on the scheme you are running/releaseing, set a firebase property, say isDevBuild, with values Yes for dev builds and No for prodbuild.
This property will be available for you in firebase console when you are composing the notification message.
Based on user-property if you set the property as Yes, the notification will be sent to all devices which has a dev build.
or
Create a separate firebase project for dev and prod.
This will help you in separating all your dev info (analytics, notification info) with prod info.
Hope this helps.

iOS Push Notificationss log/history or trace

I'm trying to test Push Notifications on an app which has been developed by other team. We have the app installed in our device and validated (the app is no yet in the App Store).
Connection parameters with APNS server are ok.
We launch our script to execute the Push Notification but we don't receive any notification in our device/app.
Question:
There are any log or trace in APNS of our demands?
Have APNS any history of the Notifications sended and its status ?
Note : We use Adobe Campaign to generate Push Notifications services.
We've tested the flux with an alpha version of the app and worked but now with a RC candidate doesn't work.
Thanks in advance
I recommend to check all these possibilities:
Notification is not sent from server
Try to log apns response to see if this is the issue
Check if apple certificates used are expired
Check if you're sending notification using development or production certificates with the right gateway. As Apple say:
The binary interface of the production environment is available through gateway.push.apple.com, port 2195; the binary interface of the development environment is available through gateway.sandbox.push.apple.com, port 2195.
Notification is sent from server but is not received by device
Check in settings if push notification are enabled for your app
Check if some code is hiding the notification when the app is in foregroud or is working in background
Check if you have installed the right environment application (if you send notification for production you won't receive nothing in a development build of the app)
Check the device token used to send notification
Did your app communicate to your server that it is a staging app and that the script should send APN via the Apple staging server?
Did you also deploy staging certs/keys to your server?
Did you log the response you got from the APN server when your server communicated with it?
Use APN Tester app save my day, thanks "sanandiya viper".
The problem was app's developers don't tell us p12 certificate is production one and we installed it as developer certificate. APN Tester bring us the choice to test booth options.
Thanks for all your answer. Problem solved.

Bluemix Push Notification service not working anymore?

I have a native iOS Swift app talking to a Node.js Bluemix backend with MobileFirst services (AMA, Cloudant, Push iOS 8), which worked well for over a month. A few days ago I noticed that I could no longer register new devices from the iOS app (IMFPushClient.sharedInstance().registerDeviceToken() responded with a 404).
I knew that changes had been made recently to the MobileFirst services (e.g. the various push services were merged into one), so I figured I should rebind those services. This resolved the registration issue, but I haven't been able to receive push notifications ever since.
This is what I tried:
created a completely new backend with the "MobileFirst Services Starter" boilerplate
cloned the most recent version of the "Bluelist" sample app and configured it for this new backend
issued a new APNs certificate for my bundle ID and uploaded it to the push service
successfully registered for push notifications on my device. I have verified this by calling the /devices REST API (essentially, I followed these steps).
Now every time I use the REST API to send messages (after figuring out that the bearer token approach was replaced with a new "appSecret" header), I get an HTTP 202, but the notification never arrives. Likewise, when I try to send the message through the service's dashboard, I get a success message, but the notification never arrives.
One thing I noted is that the symptoms stay the same even if I don't provide the .p12 certificate to the service, so I wonder if this might be some certificate issue, but I have no idea how to trace this. Also, IIRC the "old" MobileFirst services required me to provide the bundle ID and version of the mobile app, but this seems to be gone now. Any help is greatly appreciated.
We were able to solve the issue above by making sure the sandbox environment was using a sandbox .p12 file. To verify this setting go to the IBM Push Notification Dashboard and click the Configuration tab:
Here you can see the Certificate Type of the .p12 file you have uploaded. Make sure if you are using the Sandbox environment it is listed as Sandbox. Same is true for the Production environment.

Updated Amazon SNS Push Certificate for iOS. Notifications stopped

I have an app that's been live with push notifications for close to a year now. It's using Amazon's SNS service to provide the push notifications, but the certificate expired having followed Amazon's instructions, I created the new certificate through Apple's member center, installed it on my machine, exported it and its private key into a .p12 file, and finally uploaded that .p12 file to the Amazon SNS dashboard.
Everything seemed to work fine. But now when I try to actually send a push to my test device... nothing happens.
I've tried installing mobileconfig file mentioned here:
https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG24
...and in the console log I can see lots of messages like this
Aug 20 11:49:51 (my phone's name) apsd[86] : 2014-08-20 11:49:51 -0500 apsd[86]: setEnabledTopics:{(
)} ignoredTopics:{(
)} opportunisticTopics:{(
"(my app id)"
)} forCategory UsesALS pretend NO change NewlyEnabled
...which I assume means the app is telling apple to send it push notifications. But still nothing.
I have a second app set up the same way and I'm able to send notifications to THAT app through the SNS dashboard, so I know I'm sending them properly, but I'm not sure what else to do to debug this. What could be the problem here?

No active device tokens found in Urban Airship in iOS

I am trying to use Urban Airship to send/ receive push notification in my iOS app.
I have created one application, added the urban airship library to that project. I have set the development app key and the app secret key by adding Airshipconfig.plist file in my project. In appdelegate class, I have added the code to register for notification. Now, when I run the application, the device token gets registered in the urban airship dashboard in Audience -- > Device Tokens tab.
But now I want to send the push notification from the dashboard to my iPhone. I did this by clicking
Messages --> Messages Overview --> Message
When I do this, this send the notification to my iPhone.
But there are many questions I dont' understand about urban airship
I have created the application in development mode, Is it compulsory
to create an application to production mode also because in
Airshipconfig.plist, it asks to write the production app key and
production secret key also.
In the error console I am getting the message, "No activedevice tokens found", why?
What is the difference between PushMessage and Message in Messages --> Messages Overview option
I have created the application in development mode, Is it compulsory to create an application to production mode also because in Airshipconfig.plist, it asks to write the production app key and production secret key also.
Never mix these two. This is most likely your issue. Your app is registering a development device token to a production application. Create a new app in UA's dashboard for each environment:
production > production
development > development
http://docs.urbanairship.com/build/ios.html#production-vs-development-apps-in-urban-airship
In the error console I am getting the message, "No activedevice tokens found", why?
Probably because of the reason above. Otherwise, are you being prompted to receive push when you open the app?
http://docs.urbanairship.com/build/ios.html
What is the difference between PushMessage and Message in Messages --> Messages Overview option
no idea what this is referencing.. Screen shot?

Resources