[Fix] iOS 일반 푸시 알림 미수신 해결을 위한 APNs 페이로드 필수 필드 추가#187
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 본 PR은 iOS 환경에서 일반 푸시 알림이 정상적으로 수신되지 않는 문제를 해결하기 위해 FCM 서비스의 APNs 설정을 보완합니다. 푸시 우선순위와 알림 상세 정보를 포함한 필수 페이로드 필드를 명시적으로 설정함으로써 알림 전달 안정성을 높였습니다. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the APNS configuration in FcmService to include alert details (title and body), sound, priority, and the content-available flag for normal push notifications. The review feedback suggests removing the content-available: true setting unless background processing is explicitly required, as it can cause unnecessary battery drain and potential notification throttling on iOS devices.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| private ApnsConfig normalPushApnsConfig(String title, String body) { | ||
| return ApnsConfig.builder() | ||
| .putHeader("apns-environment", apnsEnvironment) | ||
| .putHeader("apns-priority", "10") | ||
| .setAps(Aps.builder() | ||
| .setAlert(ApsAlert.builder() | ||
| .setTitle(title) | ||
| .setBody(body) | ||
| .build()) | ||
| .setSound("default") | ||
| .setContentAvailable(true) | ||
| .build()) | ||
| .build(); | ||
| } |
There was a problem hiding this comment.
[P2] 일반 알림(Normal Push Notification)의 경우, 백그라운드 작업이 필요하지 않다면 content-available 필드를 true로 설정하지 않는 것이 좋습니다.
문제점
content-available: true를 설정하면 iOS 기기가 알림을 수신할 때마다 앱을 백그라운드에서 깨우게(wake up) 됩니다.
영향
이는 불필요한 배터리 소모를 유발하며, 앱이 백그라운드 작업을 빠르게 완료하지 않거나 자주 깨어날 경우 iOS 시스템에 의해 알림 전달이 지연되거나 제한(throttling)될 수 있습니다.
개선 방향
단순히 사용자에게 알림을 보여주는 목적이라면 이 설정을 제거하는 것을 권장합니다. 만약 백그라운드 업데이트가 반드시 필요한 경우라면 유지하되, 그렇지 않다면 제거해 주세요.
private ApnsConfig normalPushApnsConfig(String title, String body) {
return ApnsConfig.builder()
.putHeader("apns-environment", apnsEnvironment)
.putHeader("apns-priority", "10")
.setAps(Aps.builder()
.setAlert(ApsAlert.builder()
.setTitle(title)
.setBody(body)
.build())
.setSound("default")
.build())
.build();
}
🧾 요약
🔗 이슈
✨ 변경 내용
apns-priority: 10헤더 추가aps.alert(title/body) 추가aps.sound = "default"추가aps.content-available = true추가✅ 확인