-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
푸시알림 개발 및 에러수정
- Loading branch information
Showing
113 changed files
with
2,058 additions
and
1,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
import 'react-native-gesture-handler'; | ||
import { AppRegistry } from 'react-native'; | ||
import { AppRegistry, Platform } from 'react-native'; | ||
import { LogBox } from 'react-native'; | ||
import { notification } from '@/utils/notification'; | ||
import PushNotification from 'react-native-push-notification'; | ||
import PushNotificationIOS from '@react-native-community/push-notification-ios'; | ||
import messaging from '@react-native-firebase/messaging'; | ||
import App from './App'; | ||
import { name as appName } from './app.json'; | ||
import store from './src/slices'; | ||
import { updateRequestedScreenInfo } from './src/slices/notification'; | ||
import { notification } from './src/utils/notification/notification'; | ||
|
||
LogBox.ignoreLogs([ | ||
"[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!", | ||
'VirtualizedLists should never be nested', | ||
]); | ||
|
||
notification().init(); | ||
messaging().setBackgroundMessageHandler(async remoteMessage => { | ||
notification().showANDROIDNotification(remoteMessage); | ||
}); | ||
|
||
PushNotification.configure({ | ||
onNotification: function (_notification) { | ||
// 푸시알림 클릭으로 앱 진입시 | ||
if (_notification.userInteraction) { | ||
store.dispatch(updateRequestedScreenInfo(_notification.data)); | ||
} | ||
|
||
if (Platform.OS === 'ios') { | ||
if (notification.finish) { | ||
notification.finish(PushNotificationIOS.FetchResult.NoData); //추가 | ||
} | ||
} | ||
}, | ||
}); | ||
|
||
AppRegistry.registerComponent(appName, () => App); |
Oops, something went wrong.