본문 바로가기

FCM12

안드로이드 Notification 클릭 시 원하는 곳으로 이동 중복실행 방지 및 포그라운드 중 바로이동 안드로이드12 이슈대응까지 푸시알림을 클릭 했을 때 원하는 url또는 화면으로 이동하는 기능은 다른 앱을 사용 하시면서 많이 보셨을겁니다. 우선 푸시알림 사용 방법은 https://onedaycodeing.tistory.com/78 안드로이드 8.0이상의 버전 Notification 및 버전별 처리 기존 푸시알람과는 달리 안드로이드 8.0이상부터는 채널이란 개념이 추가됩니다. 채널이란건 한번 그 채널로 푸시를 띄웠다면 앱을 지우지 않는 이상 그 채널이 삭제되진 않습니다. private void Suc onedaycodeing.tistory.com 해당 게시글을 참조해주시고 해당 게시글은 FCM하시는 분들에게 유용합니다!! 보통 푸시 클릭시 앱 실행은 PendingIntent 해당 인텐트로 사용했는데요. //푸시를 클릭했을때 이동/.. 2021. 12. 8.
Swift FCM에서 보낸 데이터를 앱 사용중 실시간 파싱 앱을 사용하는 도중 fcm에서 보낸 KEY VALUE 의 값을 계속해서 받아 볼 수 있는 방법. AppDelegate에서 extension AppDelegate : UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter,willPresent notification: UNNotification,withCompletionHandler completionHandler:@escaping(UNNotificationPresentationOptions)-> Void) { let userInfo = notification.request.content.userInfo print(userInfo["gcm.. 2021. 12. 8.
Swift 푸시(FCM) 알림 클릭 시 원하는 웹뷰 페이지로 이동하기 AppDelegate에서 extension AppDelegate : UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter,didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { } } 해당 함수를 사용이 가능 합니다. 해당 함수는 푸시를 클릭 했을 시 호출됩니다. 그리고 이제 웹서버에서 보내준 데이터를 받아야 하는데요. let userInfo = response.notification.request.content.userInfo var link .. 2021. 12. 8.
IOS 14 버전 업데이트 이후 FCM푸시가 오지않는 현상 Build Settings 에서 Product Name이 한글이라면 영어로 변경해주시면 해결이 됩니다. 근데 이부분을 영어로 바꾸시게되면 앱 설치시 이름도 영문으로 표기되는데 그부분은 General에서 Display Name를 한글로 변경해주시면 됩니다. 2020. 11. 30.