oracle / pushiomanager-react-native

React Native Module for Responsys SDK
Universal Permissive License v1.0
16 stars 17 forks source link

Needed add extra code to work foreground notification at iOS #31

Open Zanluca opened 3 years ago

Zanluca commented 3 years ago

For foreground work correct at iOS I need do this changes on AppDelegate.h:

#import <UserNotifications/UserNotifications.h> and @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate>

On AppDelegate.m:

UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
          center.delegate = self;

    [PushIOManager sharedInstance].notificationPresentationOptions = UNNotificationPresentationOptionAlert|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionBadge;

at the end add UserNotifications.framework under Linked Frameworks and Libraries

uptscs commented 3 years ago

right, it's documented for native SDK. It makes sense to add those details in React-Native as well: https://docs.oracle.com/en/cloud/saas/marketing/responsys-develop-mobile/ios/running-alerts.htm