Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

react-native-push-notification doesn't work on ios DEVICE

$
0
0

I'm using react-native-push-notification, but I have a problem.
With IOS simulator or android emulator, Everything works well.
But with real iphone device, push notification doesn't work. (on release mode or on debug mode, both are not worked.

Here is my setting.

Link binary with Libraries

Set Search Header Path

I check Capabilities/Background Modes/Remote notification on XCODE

And PushNotification.configure

import React from 'react';import PushNotification from 'react-native-push-notification';import {    Auth} from '../config/router';import './ReactotronConfig';export default class App extends React.Component {    constructor(props) {        super(props);        this.PushConfigure();    }    PushConfigure() {        PushNotification.configure({            onNotification: (notification) => {                console.log('NOTIFICATION:', JSON.stringify(notification));            },            permissions: {                alert: true,                badge: true,                sound: true,            },            popInitialNotification: true,            requestPermissions: true,        });    }    render() {        return <Auth />;    }}

And when I have to push notification

    const date = new Date(Date.now());    PushNotification.localNotificationSchedule({        title: '메세지가도착했습니다.',        message: `${data.user._id}: ${data.text}`,        date,        actions: 'Yes',    });

As I said before, notification works well on all simulator (Xcode IOS, android).
But I don't know why notification doesn't work on real IOS device.

If you want more environment or settings on my project, please comment.

Update -

I didn't register on Apple Developer Program.
Is that reason why I can't use notification on real IOS device?


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>