• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

IOS 10 RemoteNotificationEvent.TOKEN not working

New Here ,
Sep 26, 2016 Sep 26, 2016

Copy link to clipboard

Copied

I have tried the same app in IOS9 device and everything works as expected. Tried AIR SDK 19 and 23 with IOS 10 device and both gave same results, event is not fired.

TOPICS
Air beta

Views

522

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 28, 2016 Sep 28, 2016

Copy link to clipboard

Copied

Hi,

Thanks for reporting the issue. We have tried reproducing this issue at our end and we are unable to reproduce it. Could you please share a sample project with us.

Thanks,

Pravishti
Adobe Air Team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 28, 2016 Sep 28, 2016

Copy link to clipboard

Copied

Hi pravishtis,

Here is the code I tested with and device was iPad 4 with iOS 10.0.2

package

{

        import flash.display.Sprite;

        import flash.events.Event;

        import flash.events.RemoteNotificationEvent;

        import flash.events.StatusEvent;

        import flash.notifications.NotificationStyle;

        import flash.notifications.RemoteNotifier;

        import flash.notifications.RemoteNotifierSubscribeOptions;

        public class TestNotification extends Sprite {

                private var subscribeOptions : RemoteNotifierSubscribeOptions = new RemoteNotifierSubscribeOptions();

                private var preferredStyles : Vector.<String> = new Vector.<String>();

                private var remoteNot : RemoteNotifier = new RemoteNotifier();

                public function SecureSocketExample() {

                        this.addEventListener( Event.ADDED_TO_STAGE, addedToStageHandler );

                }

                private function addedToStageHandler ( event : Event ) : void {

                        preferredStyles.push(NotificationStyle.ALERT, NotificationStyle.SOUND );

                        subscribeOptions.notificationStyles= preferredStyles;

                        remoteNot.addEventListener(RemoteNotificationEvent.TOKEN, tokenHandler);

                        remoteNot.addEventListener(RemoteNotificationEvent.NOTIFICATION, notificationHandler);

                        remoteNot.addEventListener(StatusEvent.STATUS, statusHandler);

                        if(RemoteNotifier.supportedNotificationStyles.toString() != ' ') {

                                remoteNot.subscribe(subscribeOptions);

                        } else {

                                trace('Remote Notifications not supported on this Platform !');

                        }

                }

                public function notificationHandler(e:RemoteNotificationEvent) : void {

                }

                public function statusHandler(e:StatusEvent) : void {

                 }

                private function tokenHandler(e:RemoteNotificationEvent) : void {

                        trace(e.tokenId);

                }

        }

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 29, 2016 Sep 29, 2016

Copy link to clipboard

Copied

LATEST

Hi,

Could you please help us with further information.

We tried running your code at our end and it woks fine. But we are using Push Notification enabled certificates in our application.

We have also added below tag in app.xml :

<Entitlements>

            <![CDATA[

  <key>aps-environment</key>

  <string>development</string>

            ]]>

        </Entitlements>

Please verify above two things at your end and refer to below blog for further information on Push Notifications with AIR applications:

Using push notifications in AIR iOS apps | Adobe Developer Connection

Please let us know if it helps you.

Thanks,

Adobe AIR Team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines