Milkman's Push ANE not working on iOS10
Asked Answered
O

2

8

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

Oversleep answered 9/11, 2016 at 18:23 Comment(0)
L
6

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

enter image description here

Lacasse answered 9/11, 2016 at 18:39 Comment(1)
But this is in Xcode, right? As I compile via Animate CC and upload with Application Loader, how should I use Xcode then?Oversleep
P
2

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.

Presbytery answered 19/11, 2016 at 0:32 Comment(4)
I forgot to mention "why". It's not about iOS version, it's about Xcode. Apple changed the way Xcode defines entitlements for applications in Xcode 8.Presbytery
Dear Dive, thank you very much! But I do have the <key>application-identifier</key> <string>SWXA5H99MY.com.winterlife.boscogurin</string> <key>aps-environment</key> <string>production</string> in the application.xml. That's what I do not understand...Oversleep
@nbuechi, you should add by yourself. Instructions about identifiers and environments can be found in the Apple Documentation about "Configuring Push Notifications"Presbytery
thanks. But I added it manually to the xml, as written. And it gives me always the same error. But only on iOS 10 devices...Oversleep

© 2022 - 2024 — McMap. All rights reserved.