add the push notification feature to your App ID - xcode

I am creating an application with ionic. I already have the certificates downloaded and I wanted to receive the notifications using the xcode simulator, but I do not receive them. In the 'Capabilities' section, in the 'push notification' section I have the error:
'add the push notification feature to your App ID'
==================================================
Do not use xcode very well. I hope someone can help me.
a greeting

'add the push notification feature to your App ID'
As it states, go to developer apple portal to add the push notification feature to your App ID and regenerate your provisioning profile.
https://developer.apple.com/account/ios/identifier/bundle
You also have to generate a APNs Auth Key to make push notification and some coding is needed in your app. You can reference the following tutorial.
https://www.raywenderlich.com/156966/push-notifications-tutorial-getting-started

Related

Firebase Admin SDK Push notification cannot be measured

I wonder if I can measure my push notifications open and receive rate, sent by my backend. I use laravel right now and I use firebase admin SDK to send push notification from my backend server.
However, I cannot measure my push notification open and receive rate because it doesn't appeared in firebase console. Is there any way out like if google have API for us to grab the push notification data, or anything else ?
I'm also open for using another push notification service, as long they provide the analytics tools for the push notification campaign.
Thanks
Hi Kevin currently only the console allows automatic tracking of notification opens and other metrics. You could log these events yourself with the Google Analytics for Firebase SDK. Thanks for the feedback, this would be a useful feature.

Azure Notification Hub losing the subscribe when app is reinstalled

I have a problem with Azure Notification Hub.
When my app is started in first time, the notifications working correctly, but when did a rebuild the app by Visual Studio, the notifications stop working and the Android Services with IntentFilters do not are called.
For the notifications works again, I need to uninstall the App in Android and run by Visual Studio again.
Have someone some idea about that problem?
My worry is: if I send the app to GooglePlay, the notifications would continue working after a update?
If someone know how to call the service to get the new InstallationId, always that the app to be started I will know how I can resolve the problem.
Can someone help me?
I did follow that tutorial:
https://www.youtube.com/watch?v=le2lDY22xwM&t=3312s
if I send the app to GooglePlay, the notifications would continue working after a update?
There is no need to worry about that, referring to this document, when you use Azure Notification Hub, it's using Android GCM to send the push notificcation. You could see my answer about Android using Firebase Cloud Messaging not receiving message.
As the Official document said :
On initial startup of your app, the FCM SDK generates a registration token for the client app instance. If you want to target single devices or create device groups, you'll need to access this token.
Explanation about Token :
An ID issued by the GCM connection servers to the client app that allows it to receive messages.
When you did a rebuild the app by Visual Studio your token is changed, but it didn't trigger the OnTokenRefresh method, so at this time the Token in your application is invalid. That's why your application cannot receiving message.
For more information, you could refer to Sending Push Notifications from Azure Mobile Apps and Implement the Firebase Instance ID Service.
When your app get a update, it will trigger the OnTokenRefresh method automatically, so your application can still receive the message.

I didn't receive push notification on iPhone using cordova plugin

I integrated cordova plugin phonegap-plugin-push "PushPlugin" in my app, but after I send a notification, I didn't receive it with alert or badge or sound, nothing.
The registration has been successfully because gave the token correctly.
I also generated the push certificate (Apple Development IOS Push Services) and exported it in p12 format.
On Xcode I setted push notification button.
Someone can help me?
Thank you in advance.
There are 2 cases for your error.
When you call Push.Init, there is sth missing. Folling example is my own.
Push.init({
ios: {
senderID: "XXXXXXXXXX",
gcmSandbox: true,
alert: true,
badge: true,
sound: true
}
}
In https://developers.google.com/mobile/add, you have to add the platform ios and sign up your .p12 certificate in ios project of google console.

Query on push notification plaforms

How does push notification platforms check if the app credentials(Android - app key, project id // ios - certificate etc) provided by user are genuine or not. Do they validate this at the time of app registration or while pushing a notification on to GCM - Google cloud , APN - Apple push
I don't know the specifics for GCM but I assume it's similar to Apple: every time you try to send a push notification, you need to connect to Apple's servers with the Push Certificate that you will have generated between them and you. The validity of the certificate is checked for every single call that you make to their servers.

Coding Issue while registerForRemoteNotificationTypes

I had a support for push notification "registerForRemoteNotificationTypes" in my app which is under a macro "EnablePushNotification". That means only if I enable this macro, then my "registerForRemoteNotificationTypes" will be executed.
I have recently submitted my app to Apple Appstores, and they have sent me a warning as below:
"Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement.
If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary."
My question is that I had not enabled this macro "EnablePushNotification" so "registerForRemoteNotificationTypes" will never get executed. Also I had not enabled my appstores provisioning profile for push notification. Even then i got this warning. What might be the issue here? Help appreciated.
I think you should also put under macro following UIApplicationDelegate methods
application:didReceiveRemoteNotification:
application:didRegisterForRemoteNotificationsWithDeviceToken:
application:didFailToRegisterForRemoteNotificationsWithError:

Resources