raix-push icon indicating copy to clipboard operation
raix-push copied to clipboard

React Native Support?

Open AugustoAleGon opened this issue 6 years ago • 3 comments

This plugin works for codova/ phonegap versions. But It is on future plans to make it work on React Native?

AugustoAleGon avatar Feb 01 '19 16:02 AugustoAleGon

@AugustoAleGon I have looked at the https://github.com/zo0r/react-native-push-notification

The only difference I see is to configure:

PushNotification.configure({

    // (optional) Called when Token is generated (iOS and Android)
    onRegister: function(token) {
        console.log( 'TOKEN:', token );
    },

    // (required) Called when a remote or local notification is opened or received
    onNotification: function(notification) {
        console.log( 'NOTIFICATION:', notification );

        // process the notification

        // required on iOS only (see fetchCompletionHandler docs: https://facebook.github.io/react-native/docs/pushnotificationios.html)
        notification.finish(PushNotificationIOS.FetchResult.NoData);
    },

    // ANDROID ONLY: GCM or FCM Sender ID (product_number) (optional - not required for local notifications, but is need to receive remote push notifications)
    senderID: "YOUR GCM (OR FCM) SENDER ID",

    // IOS ONLY (optional): default: all - Permissions to register.
    permissions: {
        alert: true,
        badge: true,
        sound: true
    },

    // Should the initial notification be popped automatically
    // default: true
    popInitialNotification: true,

    /**
      * (optional) default: true
      * - Specified if permissions (ios) and token (android and ios) will requested or not,
      * - if not, you must call PushNotificationsHandler.requestPermissions() later
      */
    requestPermissions: true,
});

so that it listens to changes from the server.. I dont have any react native projects setup, but I can assist you with what you may have to change on the client.

da314pc avatar Feb 05 '19 08:02 da314pc

@AugustoAleGon react native has already well-featured https://github.com/invertase/react-native-firebase package

Nits7029 avatar Feb 25 '19 05:02 Nits7029

@Nits7029 I'm migrating my app to react native now, This project is good for the meteor back-end support, to send messages with APN / FCM

da314pc avatar Aug 13 '19 22:08 da314pc