Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

google/macops-MOLFCMClient

Repository files navigation

MOLFCMClient

A client for receiving and acknowledging FCM messages.

Usage

#import <MOLFCMClient/MOLFCMClient.h>

MOLFCMClient *fcmClient = [[MOLFCMClient alloc] initWithFCMToken:token
                                            sessionConfiguration:configuration
                                                 messagesHandler:^(NSDictionary *message) {
  NSLog(@"%@", message);
  [fcmClient acknowledgeMessage:message];
}];
[fcmClient connect];

Installation

Using CocoaPods

Add the following line to your Podfile:

pod 'MOLFCMClient'

Using Bazel

Add the following to your WORKSPACE:

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

# Needed for MOLFCMClient
git_repository(
    name = "MOLCertificate",
    remote = "https://github.com/google/macops-molcertificate.git",
    tag = "v2.0",
)

# Needed for MOLFCMClient
git_repository(
    name = "MOLAuthenticatingURLSession",
    remote = "https://github.com/google/macops-molauthenticatingurlsession.git",
    tag = "v2.5",
)

git_repository(
    name = "MOLFCMClient",
    remote = "https://github.com/google/macops-molfmclient.git",
    tag = "v2.0",
)

And in your BUILD file, add MOLFCMClient as a dependency:

objc_library(
    name = "MyAwesomeApp_lib",
    srcs = ["src/MyAwesomeApp.m", "src/MyAwesomeApp.h"],
    deps = ["@MOLFCMClient//:MOLFCMClient"],
)

Documentation

Reference documentation is at CocoaDocs.org:

http://cocoadocs.org/docsets/MOLFCMClient

Contributing

Patches to this library are very much welcome. Please see the CONTRIBUTING file.