This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
Text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_onPress = () => { | |
const subjectsRef = firebase.database().ref('subjects'); | |
const notificationReqsRef = firebase.database().ref('notificationRequests'); | |
const subjectData = { | |
author: 'TJ', | |
title: this.state.subjectText, | |
}; | |
const notificationReq = { | |
from_username: 'TJ', | |
message: `just posted new topic "${this.state.topicText}"`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firebase = require('firebase-admin'); | |
var request = require('request'); | |
// Fetch the service account key JSON file contents | |
var serviceAccount = require("path/to/serviceAccountKey.json"); | |
var env = require("path/to/env.json"); | |
// Your Firebase Cloud Messaging Server API key | |
var API_KEY = env.CLOUD_MESSAGE_API_KEY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, StyleSheet, Text } from 'react-native'; | |
import { Actions } from 'react-native-router-flux'; | |
import FCM from 'react-native-fcm'; | |
..... | |
_onLoginSuccess = () => { | |
const topic = '/topics/list' | |
FCM.subscribeToTopic(topic); // subscribe to topic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
/** | |
* Triggers when new subject added in the list and sends a notification. | |
*/ | |
exports.sendNotification = functions.database.ref('/subjects/{subjectKey}').onWrite((event) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastlane_version "2.25.0" | |
default_platform :ios | |
platform :ios do | |
lane :beta do |values| | |
# Before calling match, we make sure all our devices are registered on the Apple Developer Portal | |
register_devices( | |
devices_file: "./fastlane/devices.txt", | |
username: '[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: android | |
jdk: oraclejdk8 | |
sudo: required | |
dist: precise | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | |
cache: | |
yarn: true | |
directories: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..... | |
buildTypes { | |
release { | |
minifyEnabled enableProguardInReleaseBuilds | |
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | |
signingConfig signingConfigs.release | |
} | |
} | |
....... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Submit a new Beta Build to Crashlytics Beta" | |
lane :beta do |values| | |
# Adjust the `build_type` and `flavor` params as needed to build the right APK for your setup | |
emails = values[:test_email] ? values[:test_email] : ['[email protected]'] # You can list more emails here | |
groups = values[:test_email] ? nil : nil # You can define groups on the web and reference them here | |
gradle( | |
task: "assembleRelease", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_url "[email protected]:***/certificates.git" # ssh key | |
type "development" # The default type, can be: appstore, adhoc, enterprise or development | |
app_identifier "com.kangsta.smapleApp" | |
username "tj@***.com" # Your Apple Developer Portal username |
OlderNewer