# 4. Firebase 푸시 알림

## 1.  Firebase 설정

{% hint style="info" %}
**참고**

테스트 플라이트에 앱이 올라가고 난 후에 확인 가능합니다.
{% endhint %}

* <https://developer.apple.com/account>로 이동해 주세요.&#x20;
* 인증서, 식별자 및 프로파일에서 키(영문)을 선택해 주세요.&#x20;

<figure><img src="/files/TvQl5f6sKw1OJaftfqXo" alt=""><figcaption></figcaption></figure>

* Keys 옆에 있는 파란색+ 버튼을 클릭해 주세요. <br>

  <figure><img src="/files/qrXi77pp2kWxv72fYN1P" alt=""><figcaption></figcaption></figure>
* 아래의 사진과 같이 두 가지 항목을 선택 후 Key Name에 앱 영문 이름을 입력해 주세요.&#x20;
  * Apple Push Notifications service (APNs) : 푸시 알림을 위한 설정
  * Sign in with Apple : 애플 로그인을 위한 설정

    * configure에는 [**관리자 웹 환경설정**](/main/guide/deploy/appstore/2.md)에서 작성한 번들 아이디를 선택해 주세요.&#x20;

    <figure><img src="/files/oNBtsAPtZBSdABZrDKAe" alt=""><figcaption></figcaption></figure>
* 생성한 키를 다운로드해 주세요.&#x20;

  * 다운로드 된 .p8 확장자 파일은 나중에 필요하기 때문에 저장 위치를 확인해 주세요.&#x20;
  * 키 ID(Key ID)를 복사해서 메모장에 저장해 주세요.&#x20;

  <figure><img src="/files/SPpCP4p7ukQPrAmqXRTD" alt=""><figcaption></figcaption></figure>
* <https://developer.apple.com/account>으로 이동해서 우측 상단의 계정을 클릭해 주세요.&#x20;
* 아래로 스크롤하면 멤버십 세부 사항이 보여요.
* 팀 ID를 복사해서 메모장에 저장해 주세요.&#x20;

<figure><img src="/files/wkfRCVDdtYI2h6p8HTOV" alt=""><figcaption></figcaption></figure>

* Firebase ➡︎ 톱니 바퀴 ➡︎ 프로젝트 설정에서 클라우드 메시징을 클릭해 주세요.&#x20;

<figure><img src="/files/1CcX4aBpiIhVwOSkUvXJ" alt=""><figcaption></figcaption></figure>

* 클라우드 메시징을 설정하는 아래의 사진과 같은 화면을 확인할 수 있어요.&#x20;

<figure><img src="/files/9ZMUFeteel3wUWgLnTwl" alt=""><figcaption></figcaption></figure>

* APN 인증 키의 업로드 버튼을 클릭해 주세요.&#x20;

<figure><img src="/files/XnKaumbWkYmijGglb8Au" alt=""><figcaption></figcaption></figure>

* 각 항목에 해당 하는 값을 입력 후 업로드 버튼을 클릭해 주세요.&#x20;
  * APNs 인증 키 : 위에서 다운 받은 .p8 확장자 파일을 업로드해 주세요.&#x20;
  * 키 ID : 위에서 복사한 키 ID를 입력해 주세요.&#x20;
  * 팀 ID : 위에서 복사한 팀 ID를 입력해 주세요.&#x20;

<figure><img src="/files/DzwXylBJ86YPaYHIFZGj" alt=""><figcaption></figcaption></figure>

* 모든 과정을 진행하면 오마이앱 내부 푸시 알림이 아니라 실제 앱에서 푸시 알림이 오는 것을 확인할 수 있어요.

## 2. 오마이앱 설정

1. Firebase ➡︎ 프로젝트 설정 ➡︎ 서비스 계정으로 이동해 주세요.&#x20;

<figure><img src="/files/5hLtkRwIe5rdOmEMdgIB" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/IAcuw0kc4aPvPv11EueJ" alt=""><figcaption></figcaption></figure>

3. 아래의 사진과 같이 새 비공개 키 생성 버튼을 클릭해서 파일을 다운로드해 주세요.&#x20;

<figure><img src="/files/c5jagRqVAFYijkaBVoN5" alt=""><figcaption></figcaption></figure>

4. 다운로드 받은 파일을 열면 아래 사진과 같이 나와요. project\_id를 복사해서 메모장에 저장해 주세요.&#x20;

<figure><img src="/files/5Y3Njn8zsCMC0otxmW5T" alt=""><figcaption></figcaption></figure>

5. 오마이앱 관리자 웹 ➡︎ 운영 모드 ➡︎ 좌측 메뉴바 설정 ➡︎ 고급 설정 ➡︎ API 키 설정으로 이동해 주세요.&#x20;

<div align="left"><figure><img src="/files/OGv8IImaERT4ldEbbBeG" alt=""><figcaption></figcaption></figure></div>

6. 앱 푸시를 클릭해 주세요.&#x20;

* 만약 앱 푸시가 2개 이상 있다면 1개를 남겨두고 모두 삭제해 주세요.&#x20;

<figure><img src="/files/riNdVxJRlG4hhPabB2BO" alt=""><figcaption></figcaption></figure>

7. API key의 빨간색으로 표시된 부분에 4번에서 복사했던 project\_id를 입력해 주세요.&#x20;
   1. 빨간색으로 표시된 부분 : ohmyapp-58d39

<figure><img src="/files/wDEn0S5nqCUzwVciRk6J" alt=""><figcaption></figcaption></figure>

8. 4번에서 다운로드 받은 파일의 모든 내용을 'JSON 키'에 입력해 주세요.&#x20;

<figure><img src="/files/yQzbLgggt75p1wZbIb9Y" alt=""><figcaption></figcaption></figure>

9. 변경 사항을 저장해 주세요.&#x20;

> \#푸시 알림, #애플 개발자 페이지, #인증서, 식별자 및 프로파일, #Key Name, #Apple Push Notifications service (APNs), #Sign in with Apple, #Key ID, #팀 ID, #클라우드 메시징, #APN 인증 키, #APNs 인증 키

\
2023 11 22 Nana


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ohmyapp.io/main/guide/deploy/appstore/apple_firebase-pushnotifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
