본문 바로가기
개발/Firebase

Firebase 번역 -Firebase Cloud Messaging(1-1)

by dev_caleb 2022. 12. 3.
728x90

https://firebase.google.com/docs/cloud-messaging

 

Firebase 클라우드 메시징

Firebase 클라우드 메시징(FCM)은 비용 없이 안정적으로 메시지를 보낼 수 있는 플랫폼 간 메시징 솔루션입니다.

firebase.google.com

Introduction

 

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.

FCM은 너가 안정적으로 무료로 메시지를 보낼 수 있도록 해주는 크로스플랫폼 솔루션이다. 

 

 

Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4000 bytes to a client app.

 

FCM을 사용하여, 너는 클라이언트 앱에 새로운 이메일이나 다른 데이터가 동기화 가능해졌다는 것을 알릴 수 있다. 너는 notification message를 보낼 수 있다. 너는 메시지를 보냄으로써 유저가 다시 앱을 사용하도록 이끌 수 있다.. 인스턴트메시지를 위한 사용 시에 메시지는 4000 byte의 payload를 클라이언트 앱에 옮길 수 있다.

 

Key capabilities(주요 기능)

 

Send notification messages or data messages

Send notification messages that are displayed to your user. Or send data messages and determine completely what happens in your application code. See Message types.

 

 

notification message나 data message 를 보내기

너의 유저에게 보여지는 노티메시지를 보내라. 또는 데이터메시지를 보내고 완벽하게 앱코드에서 어떤 일이 일어날 지 결정해라. Message Type(뒤에 About FCM messages 파트에 나옴)을 보자 .

 

Versatile message targeting 다양한 메시지 타겟팅

Distribute messages to your client app in any of 3 ways—to single devices, to groups of devices, or to devices subscribed to topics.

당신의 클라이언트 앱에 3가지 방식으로 메시지를 뿌려보세요. - single device ,group of devices, topic을 구독하는 기기들

 

 

How does it work?(작동방식)

An FCM implementation includes two main components for sending and receiving:

FCM 실행은 보내는 것과 받는 것 메인 component로 이루어져있다.

 

You can send messages via the Firebase Admin SDK or the FCM server protocols. You can use the Notifications composer for testing and to send marketing or engagement messages using powerful built-in targeting and analytics or custom imported segments.너는 Firebase admin SDK 또는 FCM servcer protocol을 통해서 message를 보낼 수 있다. 너는 Testing을 위해서 Notification Compose를 사용할 수 있고, 마케팅 그리고 참여메시지(강력한 타겟팅과 분석, 또는 custom imported segments)를 보내기 위해 사용할 수 있다. 

Implementation path(실행 경로)

 

Set up the FCM SDK (파이어베이스와 FCM) 

Set up Firebase and FCM on your app according to the setup instructions for your platform.

너의 플랫폼을 위한 셋업 instruction에 따라 Firebase와 FCM을 너의 앱에 설치하시오

 

Develop your client app (클라이언트 앱 개발)

Add message handling, topic subscription logic, or other optional features to your client app. During the development, you can easily send test messages from the Notifications composer.

message handling, topic subscription logic 또는 다른 기능을 너의 client앱에 추가하시오. 개발하는 동안 the Notifications composer.  로부터 테스트메시지를 쉽게 보낼 수 있다. 

 

Develop your app server(앱 서버 개발)

Decide whether you want to use the Firebase Admin SDK or one of the server protocols to create your sending logic—logic to authenticate, build send requests, handle responses, and so on. Then build out the logic in your trusted environment. Note that if you want to use upstream messaging from your client applications, you must use XMPP, and that Cloud Functions does not support the persistent connection required by XMPP.

니가 Firebase admin SDK를 쓸지 서버프로토콜 중의 하나를 쓸 지 결정해라 ->( authenticate 하기 위한 로직을 보낼 때, 요청 보내는 것을 build할 때, 응답을 handle하기 등등을 할 때) . 그런 다음 믿을 수 있는 환경에서 로직을 구현해라. 만약에 니가 upstream messaging을 사용하고 싶다면 너는 XMPP 를 사용해야한다. 그리고 Cloud function은 XMPP로부터 필요한 지속적인 connection을 제공하지 않는다.

 

Next steps(다음 단계)

  • Run the Android or iOS Quickstart sample. These samples let you run and review code to send a test message to a single device using the Firebase console.

안드로이드 ios 빠른 실행 샘플을 샐행해보라. 이 샘플들은 니가 싱글 기기에 firebase console을 사용하여  테스트메시지 보내는 걸 실행시키고 코드를 리뷰하도록 해준다.

 

안드로이드 ios 튜토리얼을 해보라

 

FCM을 android, apple , web app에 추가하라

 

  • Set up your trusted environment where you'll build and send message requests. You can write sending logic using the Admin SDK, and readily deploy that code on Cloud Functions for Firebase or other cloud environments managed by Google. Alternatively, you can perform server development using the FCM server protocols.

니가 빌드할 믿을 수 있는 환경을 셋업하고 request send message. 너는 sending logic을 작성할 수 있다. admin SDK를 사용해서. 그리고 손쉽게 firebase function이나 구글에서 제공하는 클라우드 환경에서 deploy할 수 있다. 대체하여 너는 FCM server protocols를 사용하여 서버개발을 수행할 수도 있다.

 

  • Learn more about sending data payloads, setting message priority, and other messaging options that are available with FCM.

payload 데이터 보내기, message priority 세팅하기, 그리고 FCM에서 사용할 수 있는 다른 메시지 옵션에 대해서 공부해보라.

728x90