Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Milkman's Push ANE not working on iOS10

I'm using the Milkman EasyPush ANE for push notification in my iOS and Android apps. Together with the OneSignal backend.

All is fine with iOS 9 and Android, but no iOS 10 devices register. I'm building with AnimateCC (same as Flash CC Pro) and Air SDK 23.

If I debug on a iOS 10 device and listen for the onRegFailed Event, I get:

“no valid aps-environment entitlement found for application”

As mentioned, there is no problem on iOS 9.

When I uploaded the IPA to the App Store, I got the following message:

Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal. Then, sign your app with a distribution provisioning profile that includes the aps-environment entitlement. This will create the correct signature, and you can resubmit your app. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

But why is it working on iOS 9 then, and not on iOS 10?

Thank you for your help

like image 746
nbuechi Avatar asked Nov 09 '16 18:11

nbuechi


People also ask

Are push notifications guaranteed to be delivered?

Push notifications may be delayed, rate-limited, lost in transit, or arrive in a different order than which they were sent. There are alternative push notification gateways you could use instead, which are far more reliable for your time-critical operational needs.

How long does a push notification take?

The problem is that notifications do arrive, but sometimes (randomly), it can take up to 15 minutes for the messages to arrive at the device after they are sent.


2 Answers

For iOS 10 you need to enable it from Capabilities, check screenshot

enter image description here

like image 113
Rajat Avatar answered Sep 23 '22 17:09

Rajat


If you use Adobe Animate CC, then check this guide Using push notifications in AIR iOS apps, where they're describing how to add base entitlements for push notifications and Troubleshooting common Adobe AIR installation errors with iOS applications, section "Feature listed in application.xml file is not added in the provisioning profile:

Example: Entitlements tag has been added in application.xml file but the push notification service is not enabled in provisioning profile.

... 
<Entitlements><![CDATA[
    <key>aps-environment</key>
    <string>development</string> 
    ]]> 
</Entitlements> 
... 

If you have any questions about Push Notifications setup on the Apple side, then check the guide from Apple - Adding Capabilities, section Configuring Push Notifications.

like image 35
dive Avatar answered Sep 19 '22 17:09

dive