ios push notifications

Hi, I have this:

import React from 'react';
import {
    Notifications,
} from 'expo';
import {
    Text,
    View,
} from 'react-native';

// This refers to the function defined earlier in this guide
import registerForPushNotificationsAsync from './registerForPushNotificationsAsync';

export default class AppContainer extends React.Component {
    state = {
        notification: {},
    };

    componentDidMount() {
        registerForPushNotificationsAsync();
        this._notificationSubscription = Notifications.addListener(this._handleNotification);
    }

    _handleNotification = (notification) => {
        this.setState({notification: notification});
    };

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <Text>Origin: {this.state.notification.origin}</Text>
                <Text>Data: {JSON.stringify(this.state.notification.data)}</Text>
                <Text>Props: {JSON.stringify(this.props.exp.notification)}</Text>
            </View>
        );
    }
}

from Push Notifications I don’t know how to import it to my project, I import it in “index.js” but it seem that doesn’t work, how can I import it?

I see that I can show the information of the notification, but I don’t know how to show the push notification when in ios I have the app is open and I don’t know how to handle when the app is open when the app is open with the notificaiton

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.