Hello people,

Greetings!


I have an Android application and IOs, installed the OneSignal plugin and made the necessary settings and generated certificates.

I can receive notifications on Android without problems, but for IOs I am getting an error message in Xcode through the console log:


ERROR: ERROR! Unknown 3000 error returned from APNs when getting a push token: Error Domain = NSCocoaErrorDomain Code = 3000 "no valid“ aps-environment ”authorization code was found for the application" UserInfo = {NSLocalizedDescription = no valid “aps authorization code -environment” was found for the application}


Check that inside the .ipa package there is the embedded.mobileprovision file with the key

.... <key> aps-environment </key> <string> production </string> ...


A message appears on the oneSignal website:

 Error 3000 returned from APNs. Ensure "Push Notifications" in Xcode under "Project Target" -> Capabilities are enabled. Check the device log in Xcode for more details.


As we do not have the project code, I do not know how to check this issue that the Onesignal website poses as an option.

I'm using the In-House certificate


I'm using OutSystems v10.

Thank you!

Using the SetLogLevel DEBUG onesignal plugin method I can see that the provision is in production

Hi Hugo, how are you doing?

Perhaps your issue is related to Apple Push Certificates.

I believe this tutorial solves your problem:

https://ameyashetti.wordpress.com/2009/07/31/apple-push-notification-service-tutorial/

have a nice day;)

Rodolfo 

Hello Rodolfo. all well!


We recreated the push and provision certificates, but we are still unable to receive the push.

In addition to your link, we also check the https://documentation.onesignal.com/docs/generate-an-ios-push-certificate.

we continue to receive the error on the device console:

ERROR: ERROR! Unknown 3000 error returned from APNs when getting a push token: Error Domain = NSCocoaErrorDomain Code = 3000 "no valid“ aps-environment ”authorization code was found for the application" UserInfo = {NSLocalizedDescription = no valid “aps authorization code -environment” was found for the application}

Hi Hugo,

I did found differents solutions in this stackiverflow topic:

https://stackoverflow.com/questions/5457963/getting-an-error-from-push-notification

One of them is a provisioning file recreate solution :

Another, creating a Entitlement.plist file


Hello Leandro, how are you?


I don't think it's the push or provision certificate.


We made two new applications in the OSv10 client environment, one to test using OneSignal and the other using Firebase for both we were able to send and receive push on iOS and Android apps, using the same push certificate as the application that is not receiving the push.


One thing we saw in the compilation of the application is that the push notification option is not configured in the project, and in the documentation (OneSignal and Firebase) ask for this option in the project in Capability

Thanks!

Solution

We identified that a plugin we were using was in conflict with OneSignal and Firebase, for authentication we were using https://www.outsystems.com/forge/component-overview/4010/azure-ad-mobile-plugin, and the library used it generated conflict with the firebase plugin, when we removed the authentication plugin and recompiled, notifications started to arrive on both iOS and Android.

Solution

Hugo Fagundes wrote:

We identified that a plugin we were using was in conflict with OneSignal and Firebase, for authentication we were using https://www.outsystems.com/forge/component-overview/4010/azure-ad-mobile-plugin, and the library used it generated conflict with the firebase plugin, when we removed the authentication plugin and recompiled, notifications started to arrive on both iOS and Android.

Great News Hugo!

You can mark your own answer as a solution. so it can serve as an example for others.


Congrats!