Skip to content

[Fix] iOS 일반 푸시 알림 미수신 해결을 위한 APNs 페이로드 필수 필드 추가#187

Merged
pooreumjung merged 1 commit into
developfrom
fix/#186-fcm-apns-normal-push-config
Jun 4, 2026
Merged

[Fix] iOS 일반 푸시 알림 미수신 해결을 위한 APNs 페이로드 필수 필드 추가#187
pooreumjung merged 1 commit into
developfrom
fix/#186-fcm-apns-normal-push-config

Conversation

@pooreumjung

Copy link
Copy Markdown
Member

🧾 요약

  • normalPushApnsConfig에 누락된 APNs 필수 필드를 추가해 iOS 일반 푸시 알림이 정상 수신되도록 수정

🔗 이슈

✨ 변경 내용

  • apns-priority: 10 헤더 추가
  • aps.alert (title/body) 추가
  • aps.sound = "default" 추가
  • aps.content-available = true 추가

✅ 확인

  • 빌드 OK
  • 테스트 OK

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c6dc235-95bc-422d-ba69-e14d9d31dc26

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#186-fcm-apns-normal-push-config

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • APNs 페이로드 설정 강화: iOS 일반 푸시 알림 수신 문제를 해결하기 위해 APNs 설정에 필수 필드(apns-priority, alert, sound, content-available)를 추가했습니다.
  • FcmService 수정: normalPushApnsConfig 메서드에 title과 body 인자를 추가하여 푸시 알림의 가시성을 개선했습니다.
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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pooreumjung pooreumjung self-assigned this Jun 4, 2026
@pooreumjung pooreumjung added the bug Something isn't working label Jun 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +52 to 65
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();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[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();
    }

@pooreumjung
pooreumjung merged commit e35dd4c into develop Jun 4, 2026
3 checks passed
@howooyeon
howooyeon deleted the fix/#186-fcm-apns-normal-push-config branch June 5, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] FCM normalPushApnsConfig에 APNs 필수 필드 추가

1 participant