I am using firebase in my iOS project for notifications. Instead of the APNS certificates, I am using auth keys (that can be downloaded only once). Now the problem is, the auth key file that has been uploaded on Firebase is lost as it was uploaded by some other developer an year ago. Now I need that auth key file to upload on CleverTap for notifications to work but as the file is lost, I am not able to do so.
Now I can't upload a new key on firebase as the existing users might not receive notifications. What option do I have to make it work so that the existing users continue receiving the notifications and I can make CleverTap notifications work?
Clevertap push notifications config works with both Auth keys & push certificate.
If you don't have auth key, you can upload the valid push certificate to make it work.
Once the above process is done, if you initiate any push notification all your users will receive that. It does not matter whether they are new or existing users.
Related
I want to register iOS device to APNs. I know two methods
Sending device token to our own provider
Using Push Tester application**
But I am not comfortable to use both of this methods.
Problem while using first method:
Our Api request requires the parameters which i won't be able to provide in my own project
Problem while using second method:
They ask to provide key, .p8 file and all those details.
I can't give any of these confidential information to unknown application.
Now my question is, is there any way to send only device token to APNs directly or any other way?
You can visit this links:
https://pushtry.com/
https://github.com/noodlewerk/NWPusher
http://pushmebaby.herokuapp.com/
and also use mac tool like:
apns-tool
To test your push notifications are working fine or not.
https://www.apnstester.com
You can visit this website and enter the details, here you get a notification on your device if your push notifications are working. Using this will not share any of the details with anyone. So it’s safe here to test notifications on your live app.
Second Method: To register your live app on Push notifications
You need to create a .pem file and share it with the backend to implement push notifications in your live app.
I have an app which had 7,000 users subscribed on Pushwoosh. We switched from Pushwoosh to OneSignal and updated our app with OneSignal documentation. New users downloading our app are getting subscribed to our push notifications but the old ones are not getting updated.
Do we have to trigger permission to send push notification again ? Does Apple allow to do so ?
What is the workaround this ?
Notification Permissions & APNs Token
Notification permission is granted at the app level, so no matter what SDK / library is in your app it can read if the user has already accepted notifications and the APNs token.
The OneSignal iOS SDK does automatically check if permission is already granted and attempts to register for an APNs token. The OneSignal SDK will register the device with the app_id you put in your app and create a new player if it is the first time you opened the app since you added OneSignal.
APNs will return the same push token each time unless the user has fully uninstalled and reinstalled your app. However just in-case Apple were to deiced to rotate the token the OneSignal SDK does call the APNs register API to be sure.
Finding & Fixing The Issue
To find the issue I recommend the following;
Only include one push notification SDK in your app at a time, it possible for SDKs to have conflicts due to method swizzling or other possible issues.
In this case remove the Pushwoosh SDK if you using OneSignal.
Try to reproduce the issue on a test device by upgrading your app.
When testing the upgrade, I recommend enabling verbose logging in the OneSignal SDK.
OneSignal.setLogLevel(.LL_VERBOSE, visualLevel: .LL_NONE)
Also observe at this point if you are getting a user on the OneSignal dashboard.
If there was an issue getting an APNs token by the OneSignal SDK there will still be a user, they will just show as unsubscribed with details why.
This all depends on how you are getting the device push token from the user's device and sending it to OneSignal. A common mistake is to only get the device token the first time the user accepts the notification permission prompt. However, the device push token is subject to change randomly at any point in the future which can result in outdated device push tokens on the server used to send notifications.
To combat this, it is suggested to register for push notification every time the user launches the app. While this won't re-prompt them to accept notification permissions, it will fetch the device push token again. The push service you are using should then be updated with the new device token.
TL;DR: at every app launch register for a device push token and send it to your push server.
I am implementing Pushnotification on my project.I have Connected my project to firebase and than if I push notification from firebase Cloud messaging than notification properly coming in my Real-Devices. but if I test on my real-Device to Real-Device notification than Notification is not Coming.
I dont know how to present Push Notification.
Please any one help me.
As per your description I can understand that the issue might be from backend. Please confirm with him 2 things
Server key he added is correct from your project in firebase console.
Are you setting him correct notification token.
The notification code of firebase token added is correct.
I have shared some php push notification sending link you can show to backend. But from app side things required are
- Push notification enable from capabilities.
- certification which is uploaded to firebase is proper.
- firebase token is generating or not
I am using APNS auth key for push notification in my iOS app which directs notification via Firebase cloud messaging. App is live on appstore and notifications are working fine. However, I have to integrate a chat SDK which requires APNS certificate for push notification for that app. I haven't created any APNS cert yet. My doubt is if I create a new APNS certificate, will it invalidate my previous APNS auth key? I dont want live users to stop receiving notifications.
First of all may be it will be a duplicate question, but due to curiosity I have asked.
I have an application in which push notifications are used, I have prepared, created all the required things for it and at last I have checked the notifications on this link: https://pushtry.com/. All are working well. NOw the problem is that, when admin wants to send the notification from their admin panel the push notifications are not receiving in iOS device.
I have update all the necessary certificates, pem files, methods for iOS 10 etc, but I don't get received the notifictions from admin panel, as per backend, when we send notifications it shows notification send successfully and showing no error for it. I don't know whats wrong going.
Any sugesstions....
First check all the validations or verifications like certificate, pem file and other things are updated on iOS and backend side. This will ensures that nothing error or fault at both ends.
Now reinstall the app in iOS, Clear all notification ids or apns token table from database. On installing the app, you will see there are few apis token available. Now open your admin panel and test again, it will works correctly.
Firstly I want to confirm which certificate you are used for the app developer or distribution.Because there are different ways for sending the notification for both(developer or distribution). Like I am using php services at backend.When I am using developer certificate my backend developer used 'ssl://gateway.sandbox.push.apple.com:2195', $err,
and when I used distribution certificate he used
//'ssl://gateway.push.apple.com:2195', $err.
Thanks