Linphone iOS push notification and App ID - push-notification

I'm wondering question about push notification for Linphone (installed from AppStore). I'm not Apple Developer and not famous with APN details just trying to setup Flexisip proxy as frontend for Asterisk and everything works except PUSH.
I see that Linphone sends pn-param=ABCD1234.org.linphone.phone.voip so I assume that I need to get certificate associated with App ID org.linphone.phone
But the problem I cannot register this App ID on developer.apple.com because it returns "An App ID with Identifier 'org.linphone.phone' is not available" error.
Is there any way to change pn-param sending by Linphone? Or I can use another App ID with Linphone?
Any advice appreciate.
Thank you!

Indeed you can't create an app with a package name that is already being used.
But you can't either use our push notifications as our certificate used by sip.linphone.org flexisip is private.
What you can do is build your own iOS app using another package name, and generate & install your own push certificates on your flexisip push gateway.
Cheers,

Related

Get Topic Id from Device Token in Apple Push Notification for DeviceTokenNotForTopic exception

Currently I'm using Pushy to send Push Notification for iOS devices. Everything is working fine, except I'm getting exceptions for some devices with response (DeviceTokenNotForTopic)
Do we have any way to decode Device Token to get Topic associated?
The device token example as 195d2ab5bce448b692dbb6de91452e0fbac0e6c09a599525bce52accc8a6b34a
Thanks,
DeviceTokenNotForTopic can occur for the following reasons:
The iOS Bundle ID was changed since device was registered for notifications
The iOS Bundle ID configured in the Pushy Dashboard doesn't match the actual Bundle ID of the app installed on the device
The iOS device uninstalled your app, rendering the device token invalid.
The APNs Auth Key you uploaded to the Pushy Dashboard belongs to a different Apple Developer Account than the one your app is distributed under.
Please check the following:
Do the Pushy device tokens you're trying to send still have your app installed on those devices?
Does the iOS Bundle ID in Pushy Dashboard precisely equal the Bundle ID string in Xcode? Copy-paste to make sure there are no typos
Please uninstall your app completely on a test device. Install it and call pushy.register(). What device token is returned? Try sending a notification immediately to that device.
Please ensure you uploaded an APNs Auth Key to the Pushy Dashboard from the right Apple Developer Account that owns the app.

Firebase OTP only works in some devices - Swift 4

I am using firebase authentication in my device. I have followed every steps in firebase documentation. The OTP works in the devices that I used for testing purpose. But when I download the app from AppStore, It does not work. Please help me to get rid of this issue. Thanks in advance.
I got the answer.
There were 2 things wrong with what I was done.
When I created SSL certificate (For push notification) from App Ids under 'Certificates, Identifiers & Profiles' tab in developer.apple.com, The certificate was not created for production. So I created one for production.
I forgot to create APNs key. So I created APNs key from Keys under 'Certificates, Identifiers & Profiles' tab in developer.apple.com. Then I uploaded it in the firebase App (console.firebase.google.com). After you select your project, you can find a gear icon in the firebase website. Select project settings from there and click on the cloud messaging tab. And there you can find the option to upload APNs certificate.

Twilio Chat IOS Production APN Certifications Error-52131

I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.

Notification when app is closed in Ionic3

I am building my app using Ionic3 and Firebase. Here users can send eatch other messages. I want when a use sends a message to another ures he/she should get a notification in the phone even when the app is closed. I have no idea how to achieve this with Ionic3.
Any suggesions please.
I can see there are mainly 2 plugins for push notifications. cordova-plugin-firebase and cordova-plugin-fcm
At least I can fine some tutorial for cordova-plugin-fcm in the internet. There is no clear example of any wayout given for cordova-plugin-firebase.
You have to use the cordova-plugin-firebase and each time a user logs in using a device, a unique device ID will be registered with respect to that device. This device ID is used to send notifications. Make sure to handle this (device ID), every time a user logs in & logs out. If you do not remove the device_id from the database when a user logs out, he will continue to receive notifications.
You have to use a cordova-plugin for sending push notifications. One of the many available plugins is: cordova-plugin-firebase. This one is a good fit for Ionic 3 because there is an ionic-native wrapper available.
For sending the push notification you can use a third party service (there is also one offered by ionic) or you can send them yourself from your backend.

SNS push notification service only success on dedicated device

I've been trying to use AWS SNS service to send notifications to Apple Sandbox environment . I think I setup everything ok and my dev iPhone can get notification without trouble.
But when I start to send notifications to others who install the test app , I keep seeing error message state that
Platform token associated with the endpoint is not valid
With a messageId :147975e0-8a09-5223-8537-256320ab3733
From what I understand , if one device can success, others can success too.
Could anyone tell me how to debug this probelm.
Thanks.
I believe that the apps that the other people are installing were not built with a dev cert (probably built with an adhoc or production provisioning profile), so you probably should use the production certificate.
You could try adding another application on SNS using the production certificate (or the same one, but not using Sandbox, depending on how you generated it), if it works, that this is it.
Also make sure you are using the correct bundle id associated with the certificate.

Resources