-
Notifications
You must be signed in to change notification settings - Fork 1
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
3 changed files
with
55 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
- [X] [[../ios|ios]] [[../push-notification|push-notification]] 백그라운드에서 뱃지 업데이트 못함 | ||
- `@react-native-firebase/messaging` | ||
- `setBackgroundMessageHandler` 가 호출되지 않는다 | ||
- 문제 | ||
- 백그라운드 핸들러를 통해서 노티피케이션을 띄우는게 아닌 os 에서 직접 띄움 | ||
- 직접띄우면서 백그라운드 핸들러가 호출되지 않기 때문에 여기서 처리하려던 로직을 처리할 수 없음 | ||
- 처리 하려던 것 | ||
- increment badge count | ||
```json | ||
{ | ||
"apns": { | ||
"headers": { | ||
"apns-priority": "10", | ||
"apns-push-type": "background" // 우선순위 낮음의 background 처리 | ||
}, | ||
"payload": { | ||
"aps": { | ||
"content-available": 1, | ||
"badge": 3, // 보내면서 badge 를 set 해버릴 수 있다. increment 가 안된다 | ||
"sound": "default" | ||
} | ||
}, | ||
}, | ||
} | ||
``` | ||
- `content-available` 로도 `setBackgroundMessageHandler` 핸들러가 호출되는 것은 확인, 다만 100%는 아닌것으로 보인다 | ||
- 조건 | ||
- [[../ios|ios]] | ||
- `notification` 없이 `sound` 만 보내면 `sound` 는 무시된다 | ||
- `apns-push-type: background` 는 apns-priority: 10 에서 에러라고 문서에 명시되어있다 | ||
- `apns-push-type: background` 는 ios 에서 notification 을 띄우지 않는다. | ||
- `content-available` 이 설정되지 않으면 `apns-push-type: background` 설정을 하지 **않았을 때** `setBackgroundMessageHandler` 에 도달하지 않는다 | ||
- android 는 notifee 의 뱃지 관련 api 는 사용할 수 없다 | ||
|
||
- [ ] [[../@todo|@todo]] [[../fcm|fcm]] | ||
- [ ] 로그아웃 관리 https://rnfirebase.io/messaging/server-integration#signing-out-users | ||
- [ ] [[../ios|ios]] 이미지 전송 설정 |
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