Commit 1f1da63f authored by Libin Lu's avatar Libin Lu

Merge branch 'sdk-26' of https://github.com/evollu/react-native-fcm into sdk-26

parents c3466ab4 b3d921be
...@@ -131,6 +131,9 @@ android { ...@@ -131,6 +131,9 @@ android {
} }
dependencies { dependencies {
compile(project(':react-native-maps')) {
exclude group: 'com.google.android.gms', module: 'play-services-base'
}
compile project(':react-native-fcm') compile project(':react-native-fcm')
compile fileTree(dir: "libs", include: ["*.jar"]) compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.facebook.react:react-native:+" // From node_modules compile "com.facebook.react:react-native:+" // From node_modules
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-sdk <uses-sdk
android:minSdkVersion="16" android:minSdkVersion="16"
......
package com.google.firebase.quickstart.fcm; package com.google.firebase.quickstart.fcm;
import android.content.Intent;
import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity { public class MainActivity extends ReactActivity {
...@@ -12,4 +14,11 @@ public class MainActivity extends ReactActivity { ...@@ -12,4 +14,11 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() { protected String getMainComponentName() {
return "SimpleFcmClient"; return "SimpleFcmClient";
} }
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
} }
...@@ -4,6 +4,7 @@ import android.app.Application; ...@@ -4,6 +4,7 @@ import android.app.Application;
import android.util.Log; import android.util.Log;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.airbnb.android.react.maps.MapsPackage;
import com.evollu.react.fcm.FIRMessagingPackage; import com.evollu.react.fcm.FIRMessagingPackage;
import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactNativeHost;
...@@ -25,6 +26,7 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -25,6 +26,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList( return Arrays.<ReactPackage>asList(
new MainReactPackage(), new MainReactPackage(),
new MapsPackage(),
new FIRMessagingPackage() new FIRMessagingPackage()
); );
} }
......
rootProject.name = 'SimpleFcmClient' rootProject.name = 'SimpleFcmClient'
include ':react-native-maps'
project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
include ':app' include ':app'
include ':react-native-fcm' include ':react-native-fcm'
......
...@@ -11,17 +11,20 @@ import { ...@@ -11,17 +11,20 @@ import {
TouchableOpacity, TouchableOpacity,
View, View,
Clipboard, Clipboard,
Platform Platform,
ScrollView
} from 'react-native'; } from 'react-native';
import FCM from "react-native-fcm"; import { StackNavigator } from 'react-navigation';
import FCM, {NotificationActionType} from "react-native-fcm";
import {registerKilledListener, registerAppListener} from "./Listeners"; import {registerKilledListener, registerAppListener} from "./Listeners";
import firebaseClient from "./FirebaseClient"; import firebaseClient from "./FirebaseClient";
registerKilledListener(); registerKilledListener();
export default class App extends Component { class MainPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -38,11 +41,16 @@ export default class App extends Component { ...@@ -38,11 +41,16 @@ export default class App extends Component {
description: 'used for example', description: 'used for example',
priority: 'high' priority: 'high'
}) })
registerAppListener(); registerAppListener(this.props.navigation);
FCM.getInitialNotification().then(notif => { FCM.getInitialNotification().then(notif => {
this.setState({ this.setState({
initNotif: notif initNotif: notif
}) })
if(notif && notif.targetScreen === 'detail'){
setTimeout(()=>{
this.props.navigation.navigate('Detail')
}, 500)
}
}); });
try{ try{
...@@ -65,16 +73,30 @@ export default class App extends Component { ...@@ -65,16 +73,30 @@ export default class App extends Component {
showLocalNotification() { showLocalNotification() {
FCM.presentLocalNotification({ FCM.presentLocalNotification({
vibrate: 500,
title: 'Hello',
channel: 'default', channel: 'default',
body: 'Test Notification', id: new Date().valueOf().toString(), // (optional for instant notification)
big_text: 'i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large, i am large', title: "Test Notification with action", // as FCM payload
priority: "high", body: "Force touch to reply", // as FCM payload (required)
sound: "bell.mp3", sound: "bell.mp3", // "default" or filename
large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", priority: "high", // as FCM payload
show_in_foreground: true, click_action: "com.myapp.MyCategory", // as FCM payload - this is used as category identifier on iOS.
number: 10 badge: 10, // as FCM payload IOS only, set 0 to clear badges
number: 10, // Android only
ticker: "My Notification Ticker", // Android only
auto_cancel: true, // Android only (default true)
large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", // Android only
icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap
big_text: "Show when notification is expanded", // Android only
sub_text: "This is a subText", // Android only
color: "red", // Android only
vibrate: 300, // Android only default: 300, no vibration if you pass 0
wake_screen: true, // Android only, wake up screen when notification arrives
group: "group", // Android only
picture: "https://google.png", // Android only bigPicture style
ongoing: true, // Android only
my_custom_data:'my_custom_field_value', // extra data you want to throw
lights: true, // Android only, LED blinking (default false)
show_in_foreground: true // notification when app is in foreground (local & remote)
}); });
} }
...@@ -89,7 +111,10 @@ export default class App extends Component { ...@@ -89,7 +111,10 @@ export default class App extends Component {
priority: "high", priority: "high",
large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg",
show_in_foreground: true, show_in_foreground: true,
picture: 'https://firebase.google.com/_static/af7ae4b3fc/images/firebase/lockup.png' picture: 'https://firebase.google.com/_static/af7ae4b3fc/images/firebase/lockup.png',
wake_screen: true,
extra1: {a: 1},
extra2: 1
}); });
} }
...@@ -102,10 +127,11 @@ export default class App extends Component { ...@@ -102,10 +127,11 @@ export default class App extends Component {
"data":{ "data":{
"custom_notification": { "custom_notification": {
"title": "Simple FCM Client", "title": "Simple FCM Client",
"body": "This is a notification with only NOTIFICATION.", "body": "Click me to go to detail",
"sound": "default", "sound": "default",
"priority": "high", "priority": "high",
"show_in_foreground": true "show_in_foreground": true,
targetScreen: 'detail'
} }
}, },
"priority": 10 "priority": 10
...@@ -115,9 +141,12 @@ export default class App extends Component { ...@@ -115,9 +141,12 @@ export default class App extends Component {
"to": token, "to": token,
"notification":{ "notification":{
"title": "Simple FCM Client", "title": "Simple FCM Client",
"body": "This is a notification with only NOTIFICATION.", "body": "Click me to go to detail",
"sound": "default" "sound": "default"
}, },
data: {
targetScreen: 'detail'
},
"priority": 10 "priority": 10
} }
} }
...@@ -139,21 +168,21 @@ export default class App extends Component { ...@@ -139,21 +168,21 @@ export default class App extends Component {
firebaseClient.send(JSON.stringify(body), "data"); firebaseClient.send(JSON.stringify(body), "data");
} }
sendRemoteNotificationWithData(token) { showLocalNotificationWithAction() {
let body = { FCM.presentLocalNotification({
"to": token, title: 'Test Notification with action',
"notification":{ body: 'Force touch to reply',
"title": "Simple FCM Client", priority: "high",
"body": "This is a notification with NOTIFICATION and DATA (NOTIF).", show_in_foreground: true,
"sound": "default" click_action: "com.myidentifi.fcm.text", // for ios
}, android_actions: JSON.stringify([{
"data":{ id: "view",
"hello": "there" title: 'view'
}, },{
"priority": "high" id: "dismiss",
} title: 'dismiss'
}]) // for android, take syntax similar to ios's. only buttons are supported
firebaseClient.send(JSON.stringify(body), "notification-data"); });
} }
render() { render() {
...@@ -161,19 +190,11 @@ export default class App extends Component { ...@@ -161,19 +190,11 @@ export default class App extends Component {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView style={{paddingHorizontal: 20}}>
<Text style={styles.welcome}> <Text style={styles.welcome}>
Welcome to Simple Fcm Client! Welcome to Simple Fcm Client!
</Text> </Text>
<Text>
Init notif: {JSON.stringify(this.state.initNotif)}
</Text>
<Text selectable={true} onPress={() => this.setClipboardContent(this.state.token)} style={styles.instructions}>
Token: {this.state.token}
</Text>
<Text style={styles.feedback}> <Text style={styles.feedback}>
{this.state.tokenCopyFeedback} {this.state.tokenCopyFeedback}
</Text> </Text>
...@@ -190,17 +211,32 @@ export default class App extends Component { ...@@ -190,17 +211,32 @@ export default class App extends Component {
<Text style={styles.buttonText}>Send Remote Data</Text> <Text style={styles.buttonText}>Send Remote Data</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity onPress={() => this.sendRemoteNotificationWithData(token)} style={styles.button}> <TouchableOpacity onPress={() => this.showLocalNotification()} style={styles.button}>
<Text style={styles.buttonText}>Send Remote Notification With Data</Text> <Text style={styles.buttonText}>Show Local Notification</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity onPress={() => this.showLocalNotification()} style={styles.button}> <TouchableOpacity onPress={() => this.showLocalNotificationWithAction(token)} style={styles.button}>
<Text style={styles.buttonText}>Send Local Notification</Text> <Text style={styles.buttonText}>Show Local Notification with Action</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity onPress={() => this.scheduleLocalNotification()} style={styles.button}> <TouchableOpacity onPress={() => this.scheduleLocalNotification()} style={styles.button}>
<Text style={styles.buttonText}>Schedule Notification in 5s</Text> <Text style={styles.buttonText}>Schedule Notification in 5s</Text>
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.instructions}>
Init notif:
</Text>
<Text>
{JSON.stringify(this.state.initNotif)}
</Text>
<Text style={styles.instructions}>
Token:
</Text>
<Text selectable={true} onPress={() => this.setClipboardContent(this.state.token)}>
{this.state.token}
</Text>
</ScrollView>
</View> </View>
); );
} }
...@@ -216,6 +252,25 @@ export default class App extends Component { ...@@ -216,6 +252,25 @@ export default class App extends Component {
} }
} }
class DetailPage extends Component {
render(){
return <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Detail page</Text>
</View>
}
}
export default StackNavigator({
Main: {
screen: MainPage,
},
Detail: {
screen: DetailPage
}
}, {
initialRouteName: 'Main',
});
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
...@@ -241,8 +296,8 @@ const styles = StyleSheet.create({ ...@@ -241,8 +296,8 @@ const styles = StyleSheet.create({
button: { button: {
backgroundColor: "teal", backgroundColor: "teal",
paddingHorizontal: 20, paddingHorizontal: 20,
paddingVertical: 10, paddingVertical: 15,
marginVertical: 15, marginVertical: 10,
borderRadius: 10 borderRadius: 10
}, },
buttonText: { buttonText: {
......
import { Platform, AsyncStorage } from 'react-native'; import { Platform, AsyncStorage, AppState } from 'react-native';
import FCM, {FCMEvent, RemoteNotificationResult, WillPresentNotificationResult, NotificationType} from "react-native-fcm"; import FCM, {FCMEvent, RemoteNotificationResult, WillPresentNotificationResult, NotificationType, NotificationActionType, NotificationActionOption, NotificationCategoryOption} from "react-native-fcm";
AsyncStorage.getItem('lastNotification').then(data=>{ AsyncStorage.getItem('lastNotification').then(data=>{
if(data){ if(data){
...@@ -10,22 +10,60 @@ AsyncStorage.getItem('lastNotification').then(data=>{ ...@@ -10,22 +10,60 @@ AsyncStorage.getItem('lastNotification').then(data=>{
} }
}) })
AsyncStorage.getItem('lastMessage').then(data=>{
if(data){
// if notification arrives when app is killed, it should still be logged here
console.log('last message', JSON.parse(data));
AsyncStorage.removeItem('lastMessage');
}
})
export function registerKilledListener(){ export function registerKilledListener(){
// these callback will be triggered even when app is killed // these callback will be triggered even when app is killed
FCM.on(FCMEvent.Notification, notif => { FCM.on(FCMEvent.Notification, notif => {
AsyncStorage.setItem('lastNotification', JSON.stringify(notif)); AsyncStorage.setItem('lastNotification', JSON.stringify(notif));
if(notif.opened_from_tray){
setTimeout(()=>{
if(notif._actionIdentifier === 'reply'){
if(AppState.currentState !== 'background'){
console.log('User replied '+ JSON.stringify(notif._userText))
alert('User replied '+ JSON.stringify(notif._userText));
} else {
AsyncStorage.setItem('lastMessage', JSON.stringify(notif._userText));
}
}
if(notif._actionIdentifier === 'view'){
alert("User clicked View in App");
}
if(notif._actionIdentifier === 'dismiss'){
alert("User clicked Dismiss");
}
}, 1000)
}
}); });
} }
// these callback will be triggered only when app is foreground or background // these callback will be triggered only when app is foreground or background
export function registerAppListener(){ export function registerAppListener(navigation){
FCM.on(FCMEvent.Notification, notif => { FCM.on(FCMEvent.Notification, notif => {
console.log("Notification", notif); console.log("Notification", notif);
if(notif.local_notification){
if(Platform.OS ==='ios' && notif._notificationType === NotificationType.WillPresent && !notif.local_notification){
// this notification is only to decide if you want to show the notification when user if in forground.
// usually you can ignore it. just decide to show or not.
notif.finish(WillPresentNotificationResult.All)
return; return;
} }
if(notif.opened_from_tray){ if(notif.opened_from_tray){
return; if(notif.targetScreen === 'detail'){
setTimeout(()=>{
navigation.navigate('Detail')
}, 500)
}
setTimeout(()=>{
alert(`User tapped notification\n${JSON.stringify(notif)}`)
}, 500)
} }
if(Platform.OS ==='ios'){ if(Platform.OS ==='ios'){
...@@ -42,6 +80,8 @@ export function registerAppListener(){ ...@@ -42,6 +80,8 @@ export function registerAppListener(){
break; break;
case NotificationType.WillPresent: case NotificationType.WillPresent:
notif.finish(WillPresentNotificationResult.All) //other types available: WillPresentNotificationResult.None notif.finish(WillPresentNotificationResult.All) //other types available: WillPresentNotificationResult.None
// this type of notificaiton will be called only when you are in foreground.
// if it is a remote notification, don't do any app logic here. Another notification callback will be triggered with type NotificationType.Remote
break; break;
} }
} }
...@@ -49,7 +89,6 @@ export function registerAppListener(){ ...@@ -49,7 +89,6 @@ export function registerAppListener(){
FCM.on(FCMEvent.RefreshToken, token => { FCM.on(FCMEvent.RefreshToken, token => {
console.log("TOKEN (refreshUnsubscribe)", token); console.log("TOKEN (refreshUnsubscribe)", token);
this.props.onChangeToken(token);
}); });
FCM.enableDirectChannel(); FCM.enableDirectChannel();
...@@ -60,3 +99,35 @@ export function registerAppListener(){ ...@@ -60,3 +99,35 @@ export function registerAppListener(){
FCM.isDirectChannelEstablished().then(d => console.log(d)); FCM.isDirectChannelEstablished().then(d => console.log(d));
}, 1000); }, 1000);
} }
FCM.setNotificationCategories([
{
id: 'com.myidentifi.fcm.text',
actions: [
{
type: NotificationActionType.TextInput,
id: 'reply',
title: 'Quick Reply',
textInputButtonTitle: 'Send',
textInputPlaceholder: 'Say something',
intentIdentifiers: [],
options: NotificationActionOption.AuthenticationRequired
},
{
type: NotificationActionType.Default,
id: 'view',
title: 'View in App',
intentIdentifiers: [],
options: NotificationActionOption.Foreground
},
{
type: NotificationActionType.Default,
id: 'dismiss',
title: 'Dismiss',
intentIdentifiers: [],
options: NotificationActionOption.Destructive
}
],
options: [NotificationCategoryOption.CustomDismissAction, NotificationCategoryOption.PreviewsShowTitle]
}
])
PODS: PODS:
- Firebase/Core (4.7.0): - Firebase/Core (4.9.0):
- FirebaseAnalytics (= 4.0.5) - FirebaseAnalytics (= 4.0.9)
- FirebaseCore (= 4.0.12) - FirebaseCore (= 4.0.15)
- Firebase/Messaging (4.7.0): - Firebase/Messaging (4.9.0):
- Firebase/Core - Firebase/Core
- FirebaseMessaging (= 2.0.7) - FirebaseMessaging (= 2.1.0)
- FirebaseAnalytics (4.0.5): - FirebaseAnalytics (4.0.9):
- FirebaseCore (~> 4.0) - FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0) - FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1) - GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3) - nanopb (~> 0.3)
- FirebaseCore (4.0.12): - FirebaseCore (4.0.15):
- GoogleToolboxForMac/NSData+zlib (~> 2.1) - GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseInstanceID (2.0.7) - FirebaseInstanceID (2.0.9):
- FirebaseMessaging (2.0.7): - FirebaseCore (~> 4.0)
- FirebaseMessaging (2.1.0):
- FirebaseAnalytics (~> 4.0) - FirebaseAnalytics (~> 4.0)
- FirebaseCore (~> 4.0) - FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0) - FirebaseInstanceID (~> 2.0)
...@@ -35,15 +36,15 @@ DEPENDENCIES: ...@@ -35,15 +36,15 @@ DEPENDENCIES:
- Firebase/Messaging - Firebase/Messaging
SPEC CHECKSUMS: SPEC CHECKSUMS:
Firebase: dbfb98ccec2dcfcd21ab9cc1b4981a3f3c8c5e26 Firebase: 632216af3ed7f31e3be34776947fdc7546cfb572
FirebaseAnalytics: 5b02a63ead2c3f0259cfc7f15e053e440587ecf8 FirebaseAnalytics: 388b630c15713f5dbf364071f5f3d6077fb52f4e
FirebaseCore: 6cf108b63997bc08c04a1ffa55a3ac0d71a59ffc FirebaseCore: 3bd047463058fa6b5d312c97502c52e45401cdfb
FirebaseInstanceID: 148c25c986c8699e67304b114e365713dce467f2 FirebaseInstanceID: d2058a35e9bebda1b6dd42486b84917bde552a9d
FirebaseMessaging: 1a11d1c0a9ed9b3f75a0685bb0ae5932e1062f5f FirebaseMessaging: 2bafab2d0f3ab3dfd753101c2c32995c2051b5da
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20 GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3 nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03 Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
PODFILE CHECKSUM: 31f07bb14b00eef65c77cff51721f530ad6eb826 PODFILE CHECKSUM: 31f07bb14b00eef65c77cff51721f530ad6eb826
COCOAPODS: 1.2.1 COCOAPODS: 1.4.0
...@@ -23,11 +23,13 @@ ...@@ -23,11 +23,13 @@
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
3A6D62911E2044AB00D0D2C7 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A6D62901E2044AB00D0D2C7 /* libz.tbd */; }; 3A6D62911E2044AB00D0D2C7 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A6D62901E2044AB00D0D2C7 /* libz.tbd */; };
3A7531B520323B2400888478 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A7531B220323B0700888478 /* libRCTAnimation.a */; };
3AC87E631F6C190900194883 /* bell.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3AC87E621F6C190900194883 /* bell.mp3 */; }; 3AC87E631F6C190900194883 /* bell.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3AC87E621F6C190900194883 /* bell.mp3 */; };
4339BFE81DAEE9D100F53B62 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4339BFE71DAEE9D100F53B62 /* GoogleService-Info.plist */; }; 4339BFE81DAEE9D100F53B62 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4339BFE71DAEE9D100F53B62 /* GoogleService-Info.plist */; };
5FE70723D2AE04BF2D98342D /* libPods-SimpleFcmClientTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8C044191FA88F1BCCF08BD /* libPods-SimpleFcmClientTests.a */; }; 5FE70723D2AE04BF2D98342D /* libPods-SimpleFcmClientTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8C044191FA88F1BCCF08BD /* libPods-SimpleFcmClientTests.a */; };
6976C617E52062E3EE272128 /* libPods-SimpleFcmClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A959965489E40CE19F2B06B4 /* libPods-SimpleFcmClient.a */; }; 6976C617E52062E3EE272128 /* libPods-SimpleFcmClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A959965489E40CE19F2B06B4 /* libPods-SimpleFcmClient.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
B5EEA6C40DAD43C696D4A7EE /* libAirMaps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 441E689027CF4924A5FEA8F6 /* libAirMaps.a */; };
FAE94A218EB64E38BF8D8E9B /* libRNFIRMessaging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */; }; FAE94A218EB64E38BF8D8E9B /* libRNFIRMessaging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -186,6 +188,27 @@ ...@@ -186,6 +188,27 @@
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS"; remoteInfo = "jschelpers-tvOS";
}; };
3A7531B120323B0700888478 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3A7531AC20323B0700888478 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTAnimation;
};
3A7531B320323B0700888478 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3A7531AC20323B0700888478 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS";
};
3AA3D5D4204DD40F00C3E8E6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 955F937AAFAB473EA79C80F7 /* AirMaps.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 11FA5C511C4A1296003AC2EE;
remoteInfo = AirMaps;
};
3AAE7F501F55B50200E914A8 /* PBXContainerItemProxy */ = { 3AAE7F501F55B50200E914A8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
...@@ -260,16 +283,19 @@ ...@@ -260,16 +283,19 @@
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
3A6D628E1E20449400D0D2C7 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 3A6D628E1E20449400D0D2C7 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
3A6D62901E2044AB00D0D2C7 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 3A6D62901E2044AB00D0D2C7 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
3A7531AC20323B0700888478 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
3AC87E621F6C190900194883 /* bell.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = bell.mp3; sourceTree = "<group>"; }; 3AC87E621F6C190900194883 /* bell.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = bell.mp3; sourceTree = "<group>"; };
4339BFE31DAEBB4800F53B62 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; }; 4339BFE31DAEBB4800F53B62 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
4339BFE61DAED4D900F53B62 /* SimpleFcmClient.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = SimpleFcmClient.entitlements; path = SimpleFcmClient/SimpleFcmClient.entitlements; sourceTree = "<group>"; }; 4339BFE61DAED4D900F53B62 /* SimpleFcmClient.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = SimpleFcmClient.entitlements; path = SimpleFcmClient/SimpleFcmClient.entitlements; sourceTree = "<group>"; };
4339BFE71DAEE9D100F53B62 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; 4339BFE71DAEE9D100F53B62 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
441E689027CF4924A5FEA8F6 /* libAirMaps.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libAirMaps.a; sourceTree = "<group>"; };
55A6E80F734FA3F596B96C04 /* Pods-SimpleFcmClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClientTests/Pods-SimpleFcmClientTests.debug.xcconfig"; sourceTree = "<group>"; }; 55A6E80F734FA3F596B96C04 /* Pods-SimpleFcmClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClientTests/Pods-SimpleFcmClientTests.debug.xcconfig"; sourceTree = "<group>"; };
64204739CA77D9B1EB1F0788 /* Pods-SimpleFcmClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClientTests/Pods-SimpleFcmClientTests.release.xcconfig"; sourceTree = "<group>"; }; 64204739CA77D9B1EB1F0788 /* Pods-SimpleFcmClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClientTests/Pods-SimpleFcmClientTests.release.xcconfig"; sourceTree = "<group>"; };
692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFIRMessaging.a; sourceTree = "<group>"; }; 692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFIRMessaging.a; sourceTree = "<group>"; };
73B4AFC1AC5C6373F8074CBC /* Pods-SimpleFcmClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClient/Pods-SimpleFcmClient.debug.xcconfig"; sourceTree = "<group>"; }; 73B4AFC1AC5C6373F8074CBC /* Pods-SimpleFcmClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClient/Pods-SimpleFcmClient.debug.xcconfig"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
955F937AAFAB473EA79C80F7 /* AirMaps.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = AirMaps.xcodeproj; path = "../node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj"; sourceTree = "<group>"; };
A959965489E40CE19F2B06B4 /* libPods-SimpleFcmClient.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SimpleFcmClient.a"; sourceTree = BUILT_PRODUCTS_DIR; }; A959965489E40CE19F2B06B4 /* libPods-SimpleFcmClient.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SimpleFcmClient.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C7DEB70C413E484CBFA6AC45 /* RNFIRMessaging.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFIRMessaging.xcodeproj; path = "../node_modules/react-native-fcm/ios/RNFIRMessaging.xcodeproj"; sourceTree = "<group>"; }; C7DEB70C413E484CBFA6AC45 /* RNFIRMessaging.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFIRMessaging.xcodeproj; path = "../node_modules/react-native-fcm/ios/RNFIRMessaging.xcodeproj"; sourceTree = "<group>"; };
CF6939675D5A4A68FBE567C0 /* Pods-SimpleFcmClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClient/Pods-SimpleFcmClient.release.xcconfig"; sourceTree = "<group>"; }; CF6939675D5A4A68FBE567C0 /* Pods-SimpleFcmClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleFcmClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleFcmClient/Pods-SimpleFcmClient.release.xcconfig"; sourceTree = "<group>"; };
...@@ -289,6 +315,7 @@ ...@@ -289,6 +315,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
3A7531B520323B2400888478 /* libRCTAnimation.a in Frameworks */,
3A6D62911E2044AB00D0D2C7 /* libz.tbd in Frameworks */, 3A6D62911E2044AB00D0D2C7 /* libz.tbd in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
...@@ -302,6 +329,7 @@ ...@@ -302,6 +329,7 @@
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
FAE94A218EB64E38BF8D8E9B /* libRNFIRMessaging.a in Frameworks */, FAE94A218EB64E38BF8D8E9B /* libRNFIRMessaging.a in Frameworks */,
6976C617E52062E3EE272128 /* libPods-SimpleFcmClient.a in Frameworks */, 6976C617E52062E3EE272128 /* libPods-SimpleFcmClient.a in Frameworks */,
B5EEA6C40DAD43C696D4A7EE /* libAirMaps.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -422,10 +450,28 @@ ...@@ -422,10 +450,28 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
3A7531AD20323B0700888478 /* Products */ = {
isa = PBXGroup;
children = (
3A7531B220323B0700888478 /* libRCTAnimation.a */,
3A7531B420323B0700888478 /* libRCTAnimation.a */,
);
name = Products;
sourceTree = "<group>";
};
3AA3D5D1204DD40F00C3E8E6 /* Products */ = {
isa = PBXGroup;
children = (
3AA3D5D5204DD40F00C3E8E6 /* libAirMaps.a */,
);
name = Products;
sourceTree = "<group>";
};
3AF0A6071F7BE4DC004B899F /* Recovered References */ = { 3AF0A6071F7BE4DC004B899F /* Recovered References */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */, 692E216422234A4CB6A7A838 /* libRNFIRMessaging.a */,
441E689027CF4924A5FEA8F6 /* libAirMaps.a */,
); );
name = "Recovered References"; name = "Recovered References";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -472,6 +518,7 @@ ...@@ -472,6 +518,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = { 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3A7531AC20323B0700888478 /* RCTAnimation.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
...@@ -483,6 +530,7 @@ ...@@ -483,6 +530,7 @@
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
C7DEB70C413E484CBFA6AC45 /* RNFIRMessaging.xcodeproj */, C7DEB70C413E484CBFA6AC45 /* RNFIRMessaging.xcodeproj */,
955F937AAFAB473EA79C80F7 /* AirMaps.xcodeproj */,
); );
name = Libraries; name = Libraries;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -571,7 +619,7 @@ ...@@ -571,7 +619,7 @@
83CBB9F71A601CBA00E9B192 /* Project object */ = { 83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 0800; LastUpgradeCheck = 800;
ORGANIZATIONNAME = Facebook; ORGANIZATIONNAME = Facebook;
TargetAttributes = { TargetAttributes = {
00E356ED1AD99517003FC87E = { 00E356ED1AD99517003FC87E = {
...@@ -605,10 +653,18 @@ ...@@ -605,10 +653,18 @@
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = ""; projectDirPath = "";
projectReferences = ( projectReferences = (
{
ProductGroup = 3AA3D5D1204DD40F00C3E8E6 /* Products */;
ProjectRef = 955F937AAFAB473EA79C80F7 /* AirMaps.xcodeproj */;
},
{ {
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
}, },
{
ProductGroup = 3A7531AD20323B0700888478 /* Products */;
ProjectRef = 3A7531AC20323B0700888478 /* RCTAnimation.xcodeproj */;
},
{ {
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
...@@ -806,6 +862,27 @@ ...@@ -806,6 +862,27 @@
remoteRef = 3A6D627D1E20428000D0D2C7 /* PBXContainerItemProxy */; remoteRef = 3A6D627D1E20428000D0D2C7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
3A7531B220323B0700888478 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 3A7531B120323B0700888478 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3A7531B420323B0700888478 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 3A7531B320323B0700888478 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3AA3D5D5204DD40F00C3E8E6 /* libAirMaps.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libAirMaps.a;
remoteRef = 3AA3D5D4204DD40F00C3E8E6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3AAE7F511F55B50200E914A8 /* libthird-party.a */ = { 3AAE7F511F55B50200E914A8 /* libthird-party.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
...@@ -899,13 +976,16 @@ ...@@ -899,13 +976,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SimpleFcmClientTests-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
5FF00A260C7092D33989ED96 /* [CP] Embed Pods Frameworks */ = { 5FF00A260C7092D33989ED96 /* [CP] Embed Pods Frameworks */ = {
...@@ -974,13 +1054,16 @@ ...@@ -974,13 +1054,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SimpleFcmClient-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
...@@ -1042,6 +1125,7 @@ ...@@ -1042,6 +1125,7 @@
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
...@@ -1062,6 +1146,7 @@ ...@@ -1062,6 +1146,7 @@
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
...@@ -1089,6 +1174,7 @@ ...@@ -1089,6 +1174,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**", "$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-fcm/ios", "$(SRCROOT)/../node_modules/react-native-fcm/ios",
"$(SRCROOT)/../node_modules/react-native-maps/lib/ios/**",
); );
INFOPLIST_FILE = SimpleFcmClient/Info.plist; INFOPLIST_FILE = SimpleFcmClient/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
...@@ -1123,6 +1209,7 @@ ...@@ -1123,6 +1209,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**", "$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-fcm/ios", "$(SRCROOT)/../node_modules/react-native-fcm/ios",
"$(SRCROOT)/../node_modules/react-native-maps/lib/ios/**",
); );
INFOPLIST_FILE = SimpleFcmClient/Info.plist; INFOPLIST_FILE = SimpleFcmClient/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
...@@ -83,6 +84,7 @@ ...@@ -83,6 +84,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
"dependencies": { "dependencies": {
"react": "16.0.0-alpha.12", "react": "16.0.0-alpha.12",
"react-native": "^0.47.2", "react-native": "^0.47.2",
"react-native-fcm": "../../" "react-native-fcm": "^14.1.0",
"react-native-maps": "^0.20.1",
"react-navigation": "^1.2.1"
}, },
"jest": { "jest": {
"preset": "jest-react-native" "preset": "jest-react-native"
......
...@@ -61,9 +61,9 @@ ansi-escapes@^1.4.0: ...@@ -61,9 +61,9 @@ ansi-escapes@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
ansi-escapes@^2.0.0: ansi-escapes@^3.0.0:
version "2.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
ansi-regex@^2.0.0: ansi-regex@^2.0.0:
version "2.0.0" version "2.0.0"
...@@ -77,7 +77,7 @@ ansi-styles@^2.2.1: ...@@ -77,7 +77,7 @@ ansi-styles@^2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.1.0: ansi-styles@^3.2.0:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
dependencies: dependencies:
...@@ -103,8 +103,8 @@ append-transform@^0.3.0: ...@@ -103,8 +103,8 @@ append-transform@^0.3.0:
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813"
aproba@^1.0.3: aproba@^1.0.3:
version "1.1.2" version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
are-we-there-yet@~1.1.2: are-we-there-yet@~1.1.2:
version "1.1.2" version "1.1.2"
...@@ -198,8 +198,8 @@ async@^2.1.4: ...@@ -198,8 +198,8 @@ async@^2.1.4:
lodash "^4.14.0" lodash "^4.14.0"
async@^2.4.0: async@^2.4.0:
version "2.5.0" version "2.6.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
dependencies: dependencies:
lodash "^4.14.0" lodash "^4.14.0"
...@@ -303,7 +303,20 @@ babel-generator@^6.18.0, babel-generator@^6.21.0: ...@@ -303,7 +303,20 @@ babel-generator@^6.18.0, babel-generator@^6.21.0:
lodash "^4.2.0" lodash "^4.2.0"
source-map "^0.5.0" source-map "^0.5.0"
babel-generator@^6.24.1, babel-generator@^6.26.0: babel-generator@^6.24.1:
version "6.26.1"
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
dependencies:
babel-messages "^6.23.0"
babel-runtime "^6.26.0"
babel-types "^6.26.0"
detect-indent "^4.0.0"
jsesc "^1.3.0"
lodash "^4.17.4"
source-map "^0.5.7"
trim-right "^1.0.1"
babel-generator@^6.26.0:
version "6.26.0" version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5"
dependencies: dependencies:
...@@ -479,6 +492,14 @@ babel-plugin-jest-hoist@^16.0.0: ...@@ -479,6 +492,14 @@ babel-plugin-jest-hoist@^16.0.0:
version "16.0.0" version "16.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-16.0.0.tgz#b58ca3f770982a7e7c25b5614b2e57e9dafc6e76" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-16.0.0.tgz#b58ca3f770982a7e7c25b5614b2e57e9dafc6e76"
babel-plugin-module-resolver@^2.3.0:
version "2.7.1"
resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-2.7.1.tgz#18be3c42ddf59f7a456c9e0512cd91394f6e4be1"
dependencies:
find-babel-config "^1.0.1"
glob "^7.1.1"
resolve "^1.2.0"
babel-plugin-react-transform@2.0.2: babel-plugin-react-transform@2.0.2:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109" resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109"
...@@ -1161,8 +1182,8 @@ beeper@^1.0.0: ...@@ -1161,8 +1182,8 @@ beeper@^1.0.0:
resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
big-integer@^1.6.7: big-integer@^1.6.7:
version "1.6.23" version "1.6.26"
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.23.tgz#e85d508220c74e3f43a4ce72eed51f3da4db94d1" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.26.tgz#3af1672fa62daf2d5ecafacf6e5aa0d25e02c1c8"
block-stream@*: block-stream@*:
version "0.0.9" version "0.0.9"
...@@ -1304,17 +1325,25 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: ...@@ -1304,17 +1325,25 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
supports-color "^2.0.0" supports-color "^2.0.0"
chalk@^2.0.0: chalk@^2.0.0:
version "2.1.0" version "2.3.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796"
dependencies: dependencies:
ansi-styles "^3.1.0" ansi-styles "^3.2.0"
escape-string-regexp "^1.0.5" escape-string-regexp "^1.0.5"
supports-color "^4.0.0" supports-color "^5.2.0"
chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
ci-info@^1.0.0: ci-info@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"
clamp@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634"
cli-cursor@^2.1.0: cli-cursor@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
...@@ -1371,8 +1400,8 @@ code-point-at@^1.0.0: ...@@ -1371,8 +1400,8 @@ code-point-at@^1.0.0:
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
color-convert@^1.9.0: color-convert@^1.9.0:
version "1.9.0" version "1.9.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
dependencies: dependencies:
color-name "^1.1.1" color-name "^1.1.1"
...@@ -1650,6 +1679,10 @@ detect-indent@^4.0.0: ...@@ -1650,6 +1679,10 @@ detect-indent@^4.0.0:
dependencies: dependencies:
repeating "^2.0.0" repeating "^2.0.0"
detect-libc@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
diff@^3.0.0: diff@^3.0.0:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
...@@ -1783,12 +1816,12 @@ extend@~3.0.0: ...@@ -1783,12 +1816,12 @@ extend@~3.0.0:
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
external-editor@^2.0.4: external-editor@^2.0.4:
version "2.0.4" version "2.1.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48"
dependencies: dependencies:
chardet "^0.4.0"
iconv-lite "^0.4.17" iconv-lite "^0.4.17"
jschardet "^1.4.2" tmp "^0.0.33"
tmp "^0.0.31"
extglob@^0.3.1: extglob@^0.3.1:
version "0.3.2" version "0.3.2"
...@@ -1848,6 +1881,18 @@ fbjs@0.8.12, fbjs@^0.8.9: ...@@ -1848,6 +1881,18 @@ fbjs@0.8.12, fbjs@^0.8.9:
setimmediate "^1.0.5" setimmediate "^1.0.5"
ua-parser-js "^0.7.9" ua-parser-js "^0.7.9"
fbjs@^0.8.16:
version "0.8.16"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
dependencies:
core-js "^1.0.0"
isomorphic-fetch "^2.1.1"
loose-envify "^1.0.0"
object-assign "^4.1.0"
promise "^7.1.1"
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"
figures@^2.0.0: figures@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
...@@ -1884,6 +1929,13 @@ finalhandler@0.4.0: ...@@ -1884,6 +1929,13 @@ finalhandler@0.4.0:
on-finished "~2.3.0" on-finished "~2.3.0"
unpipe "~1.0.0" unpipe "~1.0.0"
find-babel-config@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.1.0.tgz#acc01043a6749fec34429be6b64f542ebb5d6355"
dependencies:
json5 "^0.5.1"
path-exists "^3.0.0"
find-up@^1.0.0, find-up@^1.1.2: find-up@^1.0.0, find-up@^1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
...@@ -1930,11 +1982,11 @@ fs.realpath@^1.0.0: ...@@ -1930,11 +1982,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
fsevents@^1.1.1: fsevents@^1.1.1:
version "1.1.2" version "1.1.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8"
dependencies: dependencies:
nan "^2.3.0" nan "^2.3.0"
node-pre-gyp "^0.6.36" node-pre-gyp "^0.6.39"
fstream-ignore@^1.0.5: fstream-ignore@^1.0.5:
version "1.0.5" version "1.0.5"
...@@ -2019,7 +2071,7 @@ glob@^5.0.15: ...@@ -2019,7 +2071,7 @@ glob@^5.0.15:
once "^1.3.0" once "^1.3.0"
path-is-absolute "^1.0.0" path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: glob@^7.0.3, glob@^7.0.5:
version "7.1.1" version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies: dependencies:
...@@ -2030,6 +2082,17 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: ...@@ -2030,6 +2082,17 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1:
once "^1.3.0" once "^1.3.0"
path-is-absolute "^1.0.0" path-is-absolute "^1.0.0"
glob@^7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
global@^4.3.0: global@^4.3.0:
version "4.3.1" version "4.3.1"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.1.tgz#5f757908c7cbabce54f386ae440e11e26b7916df" resolved "https://registry.yarnpkg.com/global/-/global-4.3.1.tgz#5f757908c7cbabce54f386ae440e11e26b7916df"
...@@ -2132,9 +2195,9 @@ has-flag@^1.0.0: ...@@ -2132,9 +2195,9 @@ has-flag@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
has-flag@^2.0.0: has-flag@^3.0.0:
version "2.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
has-gulplog@^0.1.0: has-gulplog@^0.1.0:
version "0.1.0" version "0.1.0"
...@@ -2146,7 +2209,7 @@ has-unicode@^2.0.0: ...@@ -2146,7 +2209,7 @@ has-unicode@^2.0.0:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
hawk@~3.1.3: hawk@3.1.3, hawk@~3.1.3:
version "3.1.3" version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
dependencies: dependencies:
...@@ -2159,6 +2222,10 @@ hoek@2.x.x: ...@@ -2159,6 +2222,10 @@ hoek@2.x.x:
version "2.16.3" version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
home-or-tmp@^2.0.0: home-or-tmp@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
...@@ -2204,8 +2271,8 @@ iconv-lite@^0.4.13, iconv-lite@~0.4.13: ...@@ -2204,8 +2271,8 @@ iconv-lite@^0.4.13, iconv-lite@~0.4.13:
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
iconv-lite@^0.4.17: iconv-lite@^0.4.17:
version "0.4.18" version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
image-size@^0.3.5: image-size@^0.3.5:
version "0.3.5" version "0.3.5"
...@@ -2227,14 +2294,14 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: ...@@ -2227,14 +2294,14 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
ini@~1.3.0: ini@~1.3.0:
version "1.3.4" version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
inquirer@^3.0.6: inquirer@^3.0.6:
version "3.2.2" version "3.3.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.2.tgz#c2aaede1507cc54d826818737742d621bef2e823" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
dependencies: dependencies:
ansi-escapes "^2.0.0" ansi-escapes "^3.0.0"
chalk "^2.0.0" chalk "^2.0.0"
cli-cursor "^2.1.0" cli-cursor "^2.1.0"
cli-width "^2.0.0" cli-width "^2.0.0"
...@@ -2588,8 +2655,8 @@ jest-haste-map@^16.0.2: ...@@ -2588,8 +2655,8 @@ jest-haste-map@^16.0.2:
worker-farm "^1.3.1" worker-farm "^1.3.1"
jest-haste-map@^20.0.4: jest-haste-map@^20.0.4:
version "20.0.4" version "20.0.5"
resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.5.tgz#abad74efb1a005974a7b6517e11010709cab9112"
dependencies: dependencies:
fb-watchman "^2.0.0" fb-watchman "^2.0.0"
graceful-fs "^4.1.11" graceful-fs "^4.1.11"
...@@ -2724,10 +2791,6 @@ jsbn@~0.1.0: ...@@ -2724,10 +2791,6 @@ jsbn@~0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
jschardet@^1.4.2:
version "1.5.1"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9"
jsdom@^9.8.0: jsdom@^9.8.0:
version "9.9.1" version "9.9.1"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.9.1.tgz#84f3972ad394ab963233af8725211bce4d01bfd5" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.9.1.tgz#84f3972ad394ab963233af8725211bce4d01bfd5"
...@@ -3148,8 +3211,8 @@ mime@1.3.4, mime@^1.3.4: ...@@ -3148,8 +3211,8 @@ mime@1.3.4, mime@^1.3.4:
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
mimic-fn@^1.0.0: mimic-fn@^1.0.0:
version "1.1.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
min-document@^2.19.0: min-document@^2.19.0:
version "2.19.0" version "2.19.0"
...@@ -3232,8 +3295,8 @@ mute-stream@0.0.7: ...@@ -3232,8 +3295,8 @@ mute-stream@0.0.7:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
nan@^2.3.0: nan@^2.3.0:
version "2.6.2" version "2.9.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866"
natural-compare@^1.4.0: natural-compare@^1.4.0:
version "1.4.0" version "1.4.0"
...@@ -3276,15 +3339,17 @@ node-notifier@^4.6.1: ...@@ -3276,15 +3339,17 @@ node-notifier@^4.6.1:
shellwords "^0.1.0" shellwords "^0.1.0"
which "^1.0.5" which "^1.0.5"
node-pre-gyp@^0.6.36: node-pre-gyp@^0.6.39:
version "0.6.36" version "0.6.39"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649"
dependencies: dependencies:
detect-libc "^1.0.2"
hawk "3.1.3"
mkdirp "^0.5.1" mkdirp "^0.5.1"
nopt "^4.0.1" nopt "^4.0.1"
npmlog "^4.0.2" npmlog "^4.0.2"
rc "^1.1.7" rc "^1.1.7"
request "^2.81.0" request "2.81.0"
rimraf "^2.6.1" rimraf "^2.6.1"
semver "^5.3.0" semver "^5.3.0"
tar "^2.2.1" tar "^2.2.1"
...@@ -3424,13 +3489,13 @@ os-locale@^1.4.0: ...@@ -3424,13 +3489,13 @@ os-locale@^1.4.0:
dependencies: dependencies:
lcid "^1.0.0" lcid "^1.0.0"
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
osenv@^0.1.4: osenv@^0.1.4:
version "0.1.4" version "0.1.5"
resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
dependencies: dependencies:
os-homedir "^1.0.0" os-homedir "^1.0.0"
os-tmpdir "^1.0.0" os-tmpdir "^1.0.0"
...@@ -3464,6 +3529,10 @@ path-exists@^2.0.0: ...@@ -3464,6 +3529,10 @@ path-exists@^2.0.0:
dependencies: dependencies:
pinkie-promise "^2.0.0" pinkie-promise "^2.0.0"
path-exists@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
...@@ -3472,6 +3541,12 @@ path-parse@^1.0.5: ...@@ -3472,6 +3541,12 @@ path-parse@^1.0.5:
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
path-to-regexp@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
dependencies:
isarray "0.0.1"
path-type@^1.0.0: path-type@^1.0.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
...@@ -3531,7 +3606,11 @@ preserve@^0.2.0: ...@@ -3531,7 +3606,11 @@ preserve@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
pretty-format@^4.2.1, pretty-format@~4.2.1: pretty-format@^4.2.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.3.1.tgz#530be5c42b3c05b36414a7a2a4337aa80acd0e8d"
pretty-format@~4.2.1:
version "4.2.3" version "4.2.3"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.2.3.tgz#8894c2ac81419cf801629d8f66320a25380d8b05" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.2.3.tgz#8894c2ac81419cf801629d8f66320a25380d8b05"
...@@ -3547,6 +3626,10 @@ process-nextick-args@~1.0.6: ...@@ -3547,6 +3626,10 @@ process-nextick-args@~1.0.6:
version "1.0.7" version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
process@~0.5.1: process@~0.5.1:
version "0.5.2" version "0.5.2"
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
...@@ -3557,13 +3640,29 @@ promise@^7.1.1: ...@@ -3557,13 +3640,29 @@ promise@^7.1.1:
dependencies: dependencies:
asap "~2.0.3" asap "~2.0.3"
prop-types@^15.5.6, prop-types@^15.5.8: prop-types@^15.5.10, prop-types@^15.6.0:
version "15.6.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"
prop-types@^15.5.6:
version "15.5.10" version "15.5.10"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
dependencies: dependencies:
fbjs "^0.8.9" fbjs "^0.8.9"
loose-envify "^1.3.1" loose-envify "^1.3.1"
prop-types@^15.5.8:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"
prr@~0.0.0: prr@~0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
...@@ -3612,8 +3711,8 @@ raw-body@~2.1.2: ...@@ -3612,8 +3711,8 @@ raw-body@~2.1.2:
unpipe "1.0.0" unpipe "1.0.0"
rc@^1.1.7: rc@^1.1.7:
version "1.2.1" version "1.2.5"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd"
dependencies: dependencies:
deep-extend "~0.4.0" deep-extend "~0.4.0"
ini "~1.3.0" ini "~1.3.0"
...@@ -3635,8 +3734,44 @@ react-devtools-core@2.3.1: ...@@ -3635,8 +3734,44 @@ react-devtools-core@2.3.1:
shell-quote "^1.6.1" shell-quote "^1.6.1"
ws "^2.0.3" ws "^2.0.3"
react-native-fcm@../../: react-native-dismiss-keyboard@1.0.0:
version "10.0.3" version "1.0.0"
resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49"
react-native-drawer-layout-polyfill@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7"
dependencies:
react-native-drawer-layout "1.3.2"
react-native-drawer-layout@1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e"
dependencies:
react-native-dismiss-keyboard "1.0.0"
react-native-fcm@^14.1.0:
version "14.1.0"
resolved "https://registry.yarnpkg.com/react-native-fcm/-/react-native-fcm-14.1.0.tgz#e1b58e041d4cc8bf100206a57bb5182d1324551c"
react-native-maps@^0.20.1:
version "0.20.1"
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.20.1.tgz#b5247a9a26446b2e1ffc3f680db8ba6ccc960096"
dependencies:
babel-plugin-module-resolver "^2.3.0"
babel-preset-react-native "1.9.0"
react-native-safe-area-view@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.7.0.tgz#38f5ab9368d6ef9e5d18ab64212938af3ec39421"
dependencies:
hoist-non-react-statics "^2.3.1"
react-native-tab-view@^0.0.74:
version "0.0.74"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.74.tgz#62c0c882d9232b461ce181d440d683b4f99d1bd8"
dependencies:
prop-types "^15.6.0"
react-native@^0.47.2: react-native@^0.47.2:
version "0.47.2" version "0.47.2"
...@@ -3725,6 +3860,18 @@ react-native@^0.47.2: ...@@ -3725,6 +3860,18 @@ react-native@^0.47.2:
xtend ">=4.0.0 <4.1.0-0" xtend ">=4.0.0 <4.1.0-0"
yargs "^6.4.0" yargs "^6.4.0"
react-navigation@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-1.2.1.tgz#06cb2c97eb1b2e20bdb4ff7aee1acfa218a1561b"
dependencies:
clamp "^1.0.1"
hoist-non-react-statics "^2.2.0"
path-to-regexp "^1.7.0"
prop-types "^15.5.10"
react-native-drawer-layout-polyfill "^1.3.2"
react-native-safe-area-view "^0.7.0"
react-native-tab-view "^0.0.74"
react-proxy@^1.1.7: react-proxy@^1.1.7:
version "1.1.8" version "1.1.8"
resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a"
...@@ -3785,13 +3932,13 @@ read-pkg@^1.0.0: ...@@ -3785,13 +3932,13 @@ read-pkg@^1.0.0:
util-deprecate "~1.0.1" util-deprecate "~1.0.1"
readable-stream@^2.0.1, readable-stream@^2.1.4: readable-stream@^2.0.1, readable-stream@^2.1.4:
version "2.3.3" version "2.3.4"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071"
dependencies: dependencies:
core-util-is "~1.0.0" core-util-is "~1.0.0"
inherits "~2.0.3" inherits "~2.0.3"
isarray "~1.0.0" isarray "~1.0.0"
process-nextick-args "~1.0.6" process-nextick-args "~2.0.0"
safe-buffer "~5.1.1" safe-buffer "~5.1.1"
string_decoder "~1.0.3" string_decoder "~1.0.3"
util-deprecate "~1.0.1" util-deprecate "~1.0.1"
...@@ -3882,18 +4029,18 @@ replace-ext@0.0.1: ...@@ -3882,18 +4029,18 @@ replace-ext@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
request@^2.55.0, request@^2.79.0: request@2.81.0:
version "2.79.0" version "2.81.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
dependencies: dependencies:
aws-sign2 "~0.6.0" aws-sign2 "~0.6.0"
aws4 "^1.2.1" aws4 "^1.2.1"
caseless "~0.11.0" caseless "~0.12.0"
combined-stream "~1.0.5" combined-stream "~1.0.5"
extend "~3.0.0" extend "~3.0.0"
forever-agent "~0.6.1" forever-agent "~0.6.1"
form-data "~2.1.1" form-data "~2.1.1"
har-validator "~2.0.6" har-validator "~4.2.1"
hawk "~3.1.3" hawk "~3.1.3"
http-signature "~1.1.0" http-signature "~1.1.0"
is-typedarray "~1.0.0" is-typedarray "~1.0.0"
...@@ -3901,24 +4048,26 @@ request@^2.55.0, request@^2.79.0: ...@@ -3901,24 +4048,26 @@ request@^2.55.0, request@^2.79.0:
json-stringify-safe "~5.0.1" json-stringify-safe "~5.0.1"
mime-types "~2.1.7" mime-types "~2.1.7"
oauth-sign "~0.8.1" oauth-sign "~0.8.1"
qs "~6.3.0" performance-now "^0.2.0"
qs "~6.4.0"
safe-buffer "^5.0.1"
stringstream "~0.0.4" stringstream "~0.0.4"
tough-cookie "~2.3.0" tough-cookie "~2.3.0"
tunnel-agent "~0.4.1" tunnel-agent "^0.6.0"
uuid "^3.0.0" uuid "^3.0.0"
request@^2.81.0: request@^2.55.0, request@^2.79.0:
version "2.81.0" version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
dependencies: dependencies:
aws-sign2 "~0.6.0" aws-sign2 "~0.6.0"
aws4 "^1.2.1" aws4 "^1.2.1"
caseless "~0.12.0" caseless "~0.11.0"
combined-stream "~1.0.5" combined-stream "~1.0.5"
extend "~3.0.0" extend "~3.0.0"
forever-agent "~0.6.1" forever-agent "~0.6.1"
form-data "~2.1.1" form-data "~2.1.1"
har-validator "~4.2.1" har-validator "~2.0.6"
hawk "~3.1.3" hawk "~3.1.3"
http-signature "~1.1.0" http-signature "~1.1.0"
is-typedarray "~1.0.0" is-typedarray "~1.0.0"
...@@ -3926,12 +4075,10 @@ request@^2.81.0: ...@@ -3926,12 +4075,10 @@ request@^2.81.0:
json-stringify-safe "~5.0.1" json-stringify-safe "~5.0.1"
mime-types "~2.1.7" mime-types "~2.1.7"
oauth-sign "~0.8.1" oauth-sign "~0.8.1"
performance-now "^0.2.0" qs "~6.3.0"
qs "~6.4.0"
safe-buffer "^5.0.1"
stringstream "~0.0.4" stringstream "~0.0.4"
tough-cookie "~2.3.0" tough-cookie "~2.3.0"
tunnel-agent "^0.6.0" tunnel-agent "~0.4.1"
uuid "^3.0.0" uuid "^3.0.0"
require-directory@^2.1.1: require-directory@^2.1.1:
...@@ -3950,6 +4097,12 @@ resolve@^1.1.6: ...@@ -3950,6 +4097,12 @@ resolve@^1.1.6:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c"
resolve@^1.2.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
dependencies:
path-parse "^1.0.5"
response-time@~2.3.1: response-time@~2.3.1:
version "2.3.2" version "2.3.2"
resolved "https://registry.yarnpkg.com/response-time/-/response-time-2.3.2.tgz#ffa71bab952d62f7c1d49b7434355fbc68dffc5a" resolved "https://registry.yarnpkg.com/response-time/-/response-time-2.3.2.tgz#ffa71bab952d62f7c1d49b7434355fbc68dffc5a"
...@@ -3971,8 +4124,8 @@ right-align@^0.1.1: ...@@ -3971,8 +4124,8 @@ right-align@^0.1.1:
align-text "^0.1.1" align-text "^0.1.1"
rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1:
version "2.6.1" version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies: dependencies:
glob "^7.0.5" glob "^7.0.5"
...@@ -4015,8 +4168,8 @@ safe-buffer@~5.0.1: ...@@ -4015,8 +4168,8 @@ safe-buffer@~5.0.1:
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
sane@^2.0.0: sane@^2.0.0:
version "2.0.0" version "2.4.1"
resolved "https://registry.yarnpkg.com/sane/-/sane-2.0.0.tgz#99cb79f21f4a53a69d4d0cd957c2db04024b8eb2" resolved "https://registry.yarnpkg.com/sane/-/sane-2.4.1.tgz#29f991208cf28636720efdc584293e7fd66663a5"
dependencies: dependencies:
anymatch "^1.3.0" anymatch "^1.3.0"
exec-sh "^0.2.0" exec-sh "^0.2.0"
...@@ -4024,7 +4177,7 @@ sane@^2.0.0: ...@@ -4024,7 +4177,7 @@ sane@^2.0.0:
minimatch "^3.0.2" minimatch "^3.0.2"
minimist "^1.1.1" minimist "^1.1.1"
walker "~1.0.5" walker "~1.0.5"
watch "~0.10.0" watch "~0.18.0"
optionalDependencies: optionalDependencies:
fsevents "^1.1.1" fsevents "^1.1.1"
...@@ -4174,6 +4327,10 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: ...@@ -4174,6 +4327,10 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1:
version "0.5.6" version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
source-map@^0.5.7:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
source-map@~0.2.0: source-map@~0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
...@@ -4304,19 +4461,19 @@ supports-color@^3.1.0, supports-color@^3.1.2: ...@@ -4304,19 +4461,19 @@ supports-color@^3.1.0, supports-color@^3.1.2:
dependencies: dependencies:
has-flag "^1.0.0" has-flag "^1.0.0"
supports-color@^4.0.0: supports-color@^5.2.0:
version "4.2.1" version "5.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a"
dependencies: dependencies:
has-flag "^2.0.0" has-flag "^3.0.0"
"symbol-tree@>= 3.1.0 < 4.0.0": "symbol-tree@>= 3.1.0 < 4.0.0":
version "3.2.1" version "3.2.1"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb"
tar-pack@^3.4.0: tar-pack@^3.4.0:
version "3.4.0" version "3.4.1"
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"
dependencies: dependencies:
debug "^2.2.0" debug "^2.2.0"
fstream "^1.0.10" fstream "^1.0.10"
...@@ -4375,11 +4532,11 @@ time-stamp@^1.0.0: ...@@ -4375,11 +4532,11 @@ time-stamp@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151"
tmp@^0.0.31: tmp@^0.0.33:
version "0.0.31" version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
dependencies: dependencies:
os-tmpdir "~1.0.1" os-tmpdir "~1.0.2"
tmpl@1.0.x: tmpl@1.0.x:
version "1.0.4" version "1.0.4"
...@@ -4543,6 +4700,13 @@ watch@~0.10.0: ...@@ -4543,6 +4700,13 @@ watch@~0.10.0:
version "0.10.0" version "0.10.0"
resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc"
watch@~0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"
dependencies:
exec-sh "^0.2.0"
minimist "^1.2.0"
webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: webidl-conversions@^3.0.0, webidl-conversions@^3.0.1:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
......
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
- An example working project is available at: https://github.com/evollu/react-native-fcm/tree/master/Examples/simple-fcm-client - An example working project is available at: https://github.com/evollu/react-native-fcm/tree/master/Examples/simple-fcm-client
- DO NOT change Android targetSdkVersion >= 26. The notification won't show up because of notification channel requirement. [Help is needed](https://github.com/evollu/react-native-fcm/issues/698) - DO NOT change Android targetSdkVersion >= 26. The notification won't show up because of notification channel requirement.
If you have to upgrade, you can use sdk-26 branch and post feedback on [here](https://github.com/evollu/react-native-fcm/pull/699)
## Installation ## Installation
- Run `npm install react-native-fcm --save` - Run `npm install react-native-fcm --save`
- Run `react-native link react-native-fcm` (RN 0.29.1+, otherwise `rnpm link react-native-fcm`) - [Link libraries](https://facebook.github.io/react-native/docs/linking-libraries-ios.html)
Note: the auto link doesn't work with xcworkspace so CocoaPods user needs to do manual linking
## Configure Firebase Console ## Configure Firebase Console
### FCM config file ### FCM config file
...@@ -43,6 +45,7 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien ...@@ -43,6 +45,7 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien
- Edit `android/app/build.gradle`. Add at the bottom of the file: - Edit `android/app/build.gradle`. Add at the bottom of the file:
```diff ```diff
apply plugin: "com.android.application" apply plugin: "com.android.application"
...
+ apply plugin: 'com.google.gms.google-services' + apply plugin: 'com.google.gms.google-services'
``` ```
...@@ -53,6 +56,8 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien ...@@ -53,6 +56,8 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien
... ...
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
+ <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notif"/>
+ <service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true"> + <service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
+ <intent-filter> + <intent-filter>
+ <action android:name="com.google.firebase.MESSAGING_EVENT"/> + <action android:name="com.google.firebase.MESSAGING_EVENT"/>
...@@ -73,6 +78,7 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien ...@@ -73,6 +78,7 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien
dependencies { dependencies {
+ compile project(':react-native-fcm') + compile project(':react-native-fcm')
+ compile 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version + compile 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version
+ compile 'com.google.firebase:firebase-messaging:10.0.1'
compile fileTree(dir: "libs", include: ["*.jar"]) compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1" compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules compile "com.facebook.react:react-native:+" // From node_modules
...@@ -86,6 +92,19 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien ...@@ -86,6 +92,19 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien
include ':app' include ':app'
``` ```
- Edit `MainActivity.java`. This fixes [a bug](https://stackoverflow.com/questions/14853327/intent-not-restored-correctly-after-activity-is-killed-if-clear-top-and-single-t/18307360#18307360)
```diff
+ import android.content.Intent;
...
public class MainActivity extends ReactActivity {
+ @Override
+ public void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ setIntent(intent);
+ }
}
```
### Config for notification and `click_action` in Android ### Config for notification and `click_action` in Android
To allow android to respond to `click_action`, you need to define Activities and filter on specific intent. Since all javascript is running in MainActivity, you can have MainActivity to handle actions: To allow android to respond to `click_action`, you need to define Activities and filter on specific intent. Since all javascript is running in MainActivity, you can have MainActivity to handle actions:
...@@ -184,7 +203,7 @@ cd ios && pod init ...@@ -184,7 +203,7 @@ cd ios && pod init
Edit the newly created `Podfile`: Edit the newly created `Podfile`:
```diff ```diff
# Pods for YOURAPP # Pods for YOURAPP
+ pod 'FirebaseMessaging' + pod 'Firebase/Messaging'
``` ```
Install the `Firebase/Messaging` pod: Install the `Firebase/Messaging` pod:
...@@ -192,13 +211,17 @@ Install the `Firebase/Messaging` pod: ...@@ -192,13 +211,17 @@ Install the `Firebase/Messaging` pod:
pod install pod install
``` ```
NOTE: you don't need to enable `use_frameworks!`. if you have to have `use_frameworks!` make sure you don't have `inherit! :search_paths` NOTE: you don't need to enable `use_frameworks!`. if you have to have `use_frameworks!` make sure you don't have `inherit! :search_paths`
NOTE: there is a working example in `master` branch
### Non Cocoapod approach ### Non Cocoapod approach
1. Download the Firebase SDK framework from [Integrate without CocoaPods](https://firebase.google.com/docs/ios/setup#frameworks). 1. Follow the instruction on [Integrate without CocoaPods](https://firebase.google.com/docs/ios/setup#frameworks).
- Import libraries, add Capabilities (background running and push notification), upload APNS and etc etc etc... - Import libraries, add Capabilities (background running and push notification), upload APNS and etc etc etc...
2. Put frameworks under `ios/Pods` folder 2. Put frameworks under `ios/Frameworks` folder, and drag those files into your xcode solution -> Frameworks
2. Follow the `README` to link frameworks (Analytics+Messaging) 3. Put `firebase.h` and `module.modulemap` under `ios/Frameworks` folder, no need to drag into solution
4. Modify your project's `User Header Search Paths` and add `$(PROJECT_DIR)/Frameworks`
<img width="796" alt="screen shot 2018-03-05 at 2 17 03 pm" src="https://user-images.githubusercontent.com/9213224/36994792-263f05c4-2080-11e8-9d46-9b11ef49962a.png">
NOTE: There is a working example in `no-pod` branch
### Shared steps ### Shared steps
...@@ -273,8 +296,7 @@ Edit AndroidManifest.xml ...@@ -273,8 +296,7 @@ Edit AndroidManifest.xml
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.VIBRATE" />
<application <application>
+ <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notif"/>
+ <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/> + <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/>
+ <receiver android:enabled="true" android:exported="true" android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver"> + <receiver android:enabled="true" android:exported="true" android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver">
+ <intent-filter> + <intent-filter>
...@@ -290,138 +312,8 @@ NOTE: `com.evollu.react.fcm.FIRLocalMessagingPublisher` is required for presenti ...@@ -290,138 +312,8 @@ NOTE: `com.evollu.react.fcm.FIRLocalMessagingPublisher` is required for presenti
## Usage ## Usage
[Check example project](https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-client/app/App.js#L68)
```javascript
import {Platform} from 'react-native';
import FCM, {FCMEvent, RemoteNotificationResult, WillPresentNotificationResult, NotificationType} from 'react-native-fcm';
// this shall be called regardless of app state: running, background or not running. Won't be called when app is killed by user in iOS
FCM.on(FCMEvent.Notification, async (notif) => {
// there are two parts of notif. notif.notification contains the notification payload, notif.data contains data payload
if(notif.local_notification){
//this is a local notification
}
if(notif.opened_from_tray){
//iOS: app is open/resumed because user clicked banner
//Android: app is open/resumed because user clicked banner or tapped app icon
}
// await someAsyncCall();
if(Platform.OS ==='ios'){
//optional
//iOS requires developers to call completionHandler to end notification process. If you do not call it your background remote notifications could be throttled, to read more about it see https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application.
//This library handles it for you automatically with default behavior (for remote notification, finish with NoData; for WillPresent, finish depend on "show_in_foreground"). However if you want to return different result, follow the following code to override
//notif._notificationType is available for iOS platfrom
switch(notif._notificationType){
case NotificationType.Remote:
notif.finish(RemoteNotificationResult.NewData) //other types available: RemoteNotificationResult.NewData, RemoteNotificationResult.ResultFailed
break;
case NotificationType.NotificationResponse:
notif.finish();
break;
case NotificationType.WillPresent:
notif.finish(WillPresentNotificationResult.All) //other types available: WillPresentNotificationResult.None
break;
}
}
});
FCM.on(FCMEvent.RefreshToken, (token) => {
console.log(token)
// fcm token may not be available on first load, catch it here
});
class App extends Component {
componentDidMount() {
// iOS: show permission prompt for the first call. later just check permission in user settings
// Android: check permission in user settings
FCM.requestPermissions().then(()=>console.log('granted')).catch(()=>console.log('notification permission rejected'));
FCM.getFCMToken().then(token => {
console.log(token)
// store fcm token in your server
});
this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => {
// optional, do some component related stuff
});
// initial notification contains the notification that launchs the app. If user launchs app by clicking banner, the banner notification info will be here rather than through FCM.on event
// sometimes Android kills activity when app goes to background, and when resume it broadcasts notification before JS is run. You can use FCM.getInitialNotification() to capture those missed events.
// initial notification will be triggered all the time even when open app by icon so send some action identifier when you send notification
FCM.getInitialNotification().then(notif => {
console.log(notif)
});
}
componentWillUnmount() {
// stop listening for events
this.notificationListener.remove();
}
otherMethods(){
FCM.subscribeToTopic('/topics/foo-bar');
FCM.unsubscribeFromTopic('/topics/foo-bar');
FCM.presentLocalNotification({
id: "UNIQ_ID_STRING", // (optional for instant notification)
title: "My Notification Title", // as FCM payload
body: "My Notification Message", // as FCM payload (required)
sound: "default", // as FCM payload
priority: "high", // as FCM payload
click_action: "ACTION", // as FCM payload
badge: 10, // as FCM payload IOS only, set 0 to clear badges
number: 10, // Android only
ticker: "My Notification Ticker", // Android only
auto_cancel: true, // Android only (default true)
large_icon: "ic_launcher", // Android only
icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap
big_text: "Show when notification is expanded", // Android only
sub_text: "This is a subText", // Android only
color: "red", // Android only
vibrate: 300, // Android only default: 300, no vibration if you pass 0
group: "group", // Android only
picture: "https://google.png", // Android only bigPicture style
ongoing: true, // Android only
my_custom_data:'my_custom_field_value', // extra data you want to throw
lights: true, // Android only, LED blinking (default false)
show_in_foreground // notification when app is in foreground (local & remote)
});
FCM.scheduleLocalNotification({
fire_date: new Date().getTime(), //RN's converter is used, accept epoch time and whatever that converter supports
id: "UNIQ_ID_STRING", //REQUIRED! this is what you use to lookup and delete notification. In android notification with same ID will override each other
body: "from future past",
repeat_interval: "week" //day, hour
})
FCM.getScheduledLocalNotifications().then(notif=>console.log(notif));
//these clears notification from notification center/tray
FCM.removeAllDeliveredNotifications()
FCM.removeDeliveredNotification("UNIQ_ID_STRING")
//these removes future local notifications
FCM.cancelAllLocalNotifications()
FCM.cancelLocalNotification("UNIQ_ID_STRING")
FCM.setBadgeNumber(1); // iOS only and there's no way to set it in Android, yet.
FCM.getBadgeNumber().then(number=>console.log(number)); // iOS only and there's no way to get it in Android, yet.
FCM.send('984XXXXXXXXX', {
my_custom_data_1: 'my_custom_field_value_1',
my_custom_data_2: 'my_custom_field_value_2'
});
FCM.deleteInstanceId()
.then( () => {
//Deleted instance id successfully
//This will reset Instance ID and revokes all tokens.
})
.catch(error => {
//Error while deleting instance id
});
}
}
```
### Build custom push notification for Android ### Build custom push notification for Android
Firebase android misses important feature of android notification like `group`, `priority` and etc. As a work around you can send data message (no `notification` payload at all) and this repo will build a local notification for you. If you pass `custom_notification` in the payload, the repo will treat the content as a local notification config and shows immediately. Firebase android misses important feature of android notification like `group`, `priority` and etc. As a work around you can send data message (no `notification` payload at all) and this repo will build a local notification for you. If you pass `custom_notification` in the payload, the repo will treat the content as a local notification config and shows immediately.
...@@ -538,6 +430,26 @@ FCM.send('984XXXXXXXXX', { ...@@ -538,6 +430,26 @@ FCM.send('984XXXXXXXXX', {
The `Data Object` is message data comprising as many key-value pairs of the message's payload as are needed (ensure that the value of each pair in the data object is a `string`). Your `Sender ID` is a unique numerical value generated when you created your Firebase project, it is available in the `Cloud Messaging` tab of the Firebase console `Settings` pane. The sender ID is used to identify each app server that can send messages to the client app. The `Data Object` is message data comprising as many key-value pairs of the message's payload as are needed (ensure that the value of each pair in the data object is a `string`). Your `Sender ID` is a unique numerical value generated when you created your Firebase project, it is available in the `Cloud Messaging` tab of the Firebase console `Settings` pane. The sender ID is used to identify each app server that can send messages to the client app.
### Sending remote notifications with category on iOS
If you want to send notification which will have actions as you defined in app it's important to correctly set it's `category` (`click_action`) property. It's also good to set `"content-available" : 1` so app will gets enough time to handle actions in background.
So the fcm payload should look like this:
```javascript
{
"to": "some_device_token",
"content_available": true,
"notification": {
"title": "Alarm",
"subtitle": "First Alarm",
"body": "First Alarm",
"click_action": "com.myapp.MyCategory" // The id of notification category which you defined with FCM.setNotificationCategories
},
"data": {
"extra": "juice"
}
}
```
## Q & A ## Q & A
#### Why do you build another local notification #### Why do you build another local notification
...@@ -547,18 +459,12 @@ Yes there are `react-native-push-notification` and `react-native-system-notifica ...@@ -547,18 +459,12 @@ Yes there are `react-native-push-notification` and `react-native-system-notifica
- The PushNotificationIOS by react native team is still missing features that recurring, so we are adding it here - The PushNotificationIOS by react native team is still missing features that recurring, so we are adding it here
#### My Android build is failing #### My Android build is failing
Try update your SDK and google play service. If you are having multiple plugins requiring different version of play-service sdk, use force to lock in version Try update your SDK and google play service.
If you are having multiple plugins requiring different version of play-service sdk, skip conflicting group. The example project shows for how to colive with react-native-maps
``` ```
dependencies { compile(project(':react-native-maps')) {
... exclude group: 'com.google.android.gms', module: 'play-services-base'
compile ('com.android.support:appcompat-v7:25.0.1') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile ('com.google.android.gms:play-services-gcm:10.0.1') {
force = true;
} }
...
}
``` ```
#### My App throws FCM function undefined error #### My App throws FCM function undefined error
...@@ -640,3 +546,65 @@ Issues and pull requests are welcome. Let's make this thing better! ...@@ -640,3 +546,65 @@ Issues and pull requests are welcome. Let's make this thing better!
#### Credits #### Credits
Local notification implementation is inspired by react-native-push-notification by zo0r Local notification implementation is inspired by react-native-push-notification by zo0r
## Sending remote notification
How to send a push notification from your server? You should `POST` to this endpoint:
https://fcm.googleapis.com/fcm/send
You need to set the headers of `Content-Type` to `application/json` and `Authorization` to `key=******` where you replace `******` with the "Legacy server key" from here the Firebase dashbaord. Get this information by first going to:
1. https://console.firebase.google.com/
2. Click on "Gear" icon and click "Project Settingss". Screenshot: https://screenshotscdn.firefoxusercontent.com/images/35b93de8-44e1-49af-89d7-140b74c267c7.png
3. Click on "Cloud Message" tab and find "Legacy server key" here. Screenshot: https://screenshotscdn.firefoxusercontent.com/images/c52ec383-783d-47d3-a1e6-75249fb6f3fb.png
The body should be json like this:
```
{
"to":"FCM_DEVICE_TOKEN_GOES_HERE",
"data": {
"custom_notification": {
"body": "test body",
"title": "test title",
"color":"#00ACD4",
"priority":"high",
"icon":"ic_launcher",
"group": "GROUP",
"sound": "default",
"id": "id",
"show_in_foreground": true
}
}
}
```
Example:
```
fetch('https://fcm.googleapis.com/fcm/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Authorization': 'key=EFefklefwef9efwefkejfwf'
},
body: JSON.stringify({
"to":"kajfsdf:efawefwe_fsdfdsf-asfawefwefwf_asdfsdfasd-asdfasdfsd9A_asdfsdf_asdf",
"data": {
"custom_notification": {
"body": "test body",
"title": "test title",
"color":"#00ACD4",
"priority":"high",
"icon":"ic_notif",
"group": "GROUP",
"sound": "default",
"id": "id",
"show_in_foreground": true
}
}
})
})
```
...@@ -58,7 +58,10 @@ public class FIRLocalMessagingHelper { ...@@ -58,7 +58,10 @@ public class FIRLocalMessagingHelper {
return; return;
} }
Long fireDate = Math.round(bundle.getDouble("fire_date")); long fireDate = Math.round(bundle.getDouble("fire_date"));
if(fireDate == 0){
fireDate = Math.round(bundle.getLong("fire_date"));
}
if (fireDate == 0) { if (fireDate == 0) {
Log.e(TAG, "failed to schedule notification because fire date is missing"); Log.e(TAG, "failed to schedule notification because fire date is missing");
return; return;
......
...@@ -37,6 +37,7 @@ import java.util.ArrayList; ...@@ -37,6 +37,7 @@ import java.util.ArrayList;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import com.google.firebase.FirebaseApp;
import static android.content.Context.NOTIFICATION_SERVICE; import static android.content.Context.NOTIFICATION_SERVICE;
...@@ -106,6 +107,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li ...@@ -106,6 +107,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
} }
if (mngr.getNotificationChannel(id) != null) { if (mngr.getNotificationChannel(id) != null) {
promise.resolve(null); promise.resolve(null);
return;
} }
// //
NotificationChannel channel = new NotificationChannel( NotificationChannel channel = new NotificationChannel(
...@@ -132,6 +134,31 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li ...@@ -132,6 +134,31 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
} }
} }
@ReactMethod
public void getEntityFCMToken(Promise promise) {
try {
String senderId = FirebaseApp.getInstance().getOptions().getGcmSenderId();
String token = FirebaseInstanceId.getInstance().getToken(senderId, "FCM");
Log.d(TAG, "Firebase token: " + token);
promise.resolve(token);
} catch (Throwable e) {
e.printStackTrace();
promise.reject(null,e.getMessage());
}
}
@ReactMethod
public void deleteEntityFCMToken(Promise promise) {
try {
String senderId = FirebaseApp.getInstance().getOptions().getGcmSenderId();
FirebaseInstanceId.getInstance().deleteToken(senderId, "FCM");
promise.resolve(null);
} catch (Throwable e) {
e.printStackTrace();
promise.reject(null,e.getMessage());
}
}
@ReactMethod @ReactMethod
public void deleteInstanceId(Promise promise){ public void deleteInstanceId(Promise promise){
try { try {
...@@ -353,4 +380,3 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li ...@@ -353,4 +380,3 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
sendEvent("FCMNotificationReceived", parseIntent(intent)); sendEvent("FCMNotificationReceived", parseIntent(intent));
} }
} }
...@@ -2,9 +2,14 @@ package com.evollu.react.fcm; ...@@ -2,9 +2,14 @@ package com.evollu.react.fcm;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.v4.content.LocalBroadcastManager; import android.support.v4.content.LocalBroadcastManager;
import android.util.Log; import android.util.Log;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService; import com.google.firebase.iid.FirebaseInstanceIdService;
...@@ -25,11 +30,35 @@ public class InstanceIdService extends FirebaseInstanceIdService { ...@@ -25,11 +30,35 @@ public class InstanceIdService extends FirebaseInstanceIdService {
Log.d(TAG, "Refreshed token: " + refreshedToken); Log.d(TAG, "Refreshed token: " + refreshedToken);
// Broadcast refreshed token // Broadcast refreshed token
Intent i = new Intent("com.evollu.react.fcm.FCMRefreshToken"); Intent i = new Intent("com.evollu.react.fcm.FCMRefreshToken");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("token", refreshedToken); bundle.putString("token", refreshedToken);
i.putExtras(bundle); i.putExtras(bundle);
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(i);
final Intent message = i;
Handler handler = new Handler(Looper.getMainLooper());
handler.post(new Runnable() {
public void run() {
// Construct and load our normal React JS code bundle
ReactInstanceManager mReactInstanceManager = ((ReactApplication) getApplication()).getReactNativeHost().getReactInstanceManager();
ReactContext context = mReactInstanceManager.getCurrentReactContext();
// If it's constructed, send a notification
if (context != null) {
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(message);
} else {
// Otherwise wait for construction, then send the notification
mReactInstanceManager.addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {
public void onReactContextInitialized(ReactContext context) {
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(message);
}
});
if (!mReactInstanceManager.hasStartedCreatingInitialContext()) {
// Construct it in the background
mReactInstanceManager.createReactContextInBackground();
}
}
}
});
} }
} }
package com.evollu.react.fcm;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeArray;
import com.facebook.react.bridge.WritableNativeMap;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Iterator;
public class ReactNativeJson {
public static WritableMap convertJsonToMap(JSONObject jsonObject) throws JSONException {
WritableMap map = new WritableNativeMap();
Iterator<String> iterator = jsonObject.keys();
while (iterator.hasNext()) {
String key = iterator.next();
Object value = jsonObject.get(key);
if (value instanceof JSONObject) {
map.putMap(key, convertJsonToMap((JSONObject) value));
} else if (value instanceof JSONArray) {
map.putArray(key, convertJsonToArray((JSONArray) value));
} else if (value instanceof Boolean) {
map.putBoolean(key, (Boolean) value);
} else if (value instanceof Integer) {
map.putInt(key, (Integer) value);
} else if (value instanceof Double) {
map.putDouble(key, (Double) value);
} else if (value instanceof String) {
map.putString(key, (String) value);
} else {
map.putString(key, value.toString());
}
}
return map;
}
public static WritableArray convertJsonToArray(JSONArray jsonArray) throws JSONException {
WritableArray array = new WritableNativeArray();
for (int i = 0; i < jsonArray.length(); i++) {
Object value = jsonArray.get(i);
if (value instanceof JSONObject) {
array.pushMap(convertJsonToMap((JSONObject) value));
} else if (value instanceof JSONArray) {
array.pushArray(convertJsonToArray((JSONArray) value));
} else if (value instanceof Boolean) {
array.pushBoolean((Boolean) value);
} else if (value instanceof Integer) {
array.pushInt((Integer) value);
} else if (value instanceof Double) {
array.pushDouble((Double) value);
} else if (value instanceof String) {
array.pushString((String) value);
} else {
array.pushString(value.toString());
}
}
return array;
}
public static JSONObject convertMapToJson(ReadableMap readableMap) throws JSONException {
JSONObject object = new JSONObject();
ReadableMapKeySetIterator iterator = readableMap.keySetIterator();
while (iterator.hasNextKey()) {
String key = iterator.nextKey();
switch (readableMap.getType(key)) {
case Null:
object.put(key, JSONObject.NULL);
break;
case Boolean:
object.put(key, readableMap.getBoolean(key));
break;
case Number:
object.put(key, readableMap.getDouble(key));
break;
case String:
object.put(key, readableMap.getString(key));
break;
case Map:
object.put(key, convertMapToJson(readableMap.getMap(key)));
break;
case Array:
object.put(key, convertArrayToJson(readableMap.getArray(key)));
break;
}
}
return object;
}
public static JSONArray convertArrayToJson(ReadableArray readableArray) throws JSONException {
JSONArray array = new JSONArray();
for (int i = 0; i < readableArray.size(); i++) {
switch (readableArray.getType(i)) {
case Null:
break;
case Boolean:
array.put(readableArray.getBoolean(i));
break;
case Number:
array.put(readableArray.getDouble(i));
break;
case String:
array.put(readableArray.getString(i));
break;
case Map:
array.put(convertMapToJson(readableArray.getMap(i)));
break;
case Array:
array.put(convertArrayToJson(readableArray.getArray(i)));
break;
}
}
return array;
}
}
...@@ -15,11 +15,17 @@ import android.net.Uri; ...@@ -15,11 +15,17 @@ import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.PowerManager;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat; import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.content.LocalBroadcastManager; import android.support.v4.content.LocalBroadcastManager;
import android.util.Log; import android.util.Log;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableArray;
import org.json.JSONArray;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
...@@ -35,7 +41,7 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -35,7 +41,7 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
private SharedPreferences sharedPreferences; private SharedPreferences sharedPreferences;
private Boolean mIsForeground; private Boolean mIsForeground;
public SendNotificationTask(Context context, SharedPreferences sharedPreferences, Boolean mIsForeground, Bundle bundle){ SendNotificationTask(Context context, SharedPreferences sharedPreferences, Boolean mIsForeground, Bundle bundle){
this.mContext = context; this.mContext = context;
this.bundle = bundle; this.bundle = bundle;
this.sharedPreferences = sharedPreferences; this.sharedPreferences = sharedPreferences;
...@@ -70,9 +76,12 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -70,9 +76,12 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
.setAutoCancel(bundle.getBoolean("auto_cancel", true)) .setAutoCancel(bundle.getBoolean("auto_cancel", true))
.setNumber((int)bundle.getDouble("number")) .setNumber((int)bundle.getDouble("number"))
.setSubText(bundle.getString("sub_text")) .setSubText(bundle.getString("sub_text"))
.setGroup(bundle.getString("group"))
.setVibrate(new long[]{0, DEFAULT_VIBRATION}) .setVibrate(new long[]{0, DEFAULT_VIBRATION})
.setExtras(bundle.getBundle("data")); .setExtras(bundle.getBundle("data"));
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
notification.setGroup(bundle.getString("group"));
}
if (bundle.containsKey("ongoing") && bundle.getBoolean("ongoing")) { if (bundle.containsKey("ongoing") && bundle.getBoolean("ongoing")) {
notification.setOngoing(bundle.getBoolean("ongoing")); notification.setOngoing(bundle.getBoolean("ongoing"));
...@@ -207,11 +216,40 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -207,11 +216,40 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT);
notification.setContentIntent(pendingIntent); notification.setContentIntent(pendingIntent);
if (bundle.containsKey("android_actions")) {
WritableArray actions = ReactNativeJson.convertJsonToArray(new JSONArray(bundle.getString("android_actions")));
for (int a = 0; a < actions.size(); a++) {
ReadableMap action = actions.getMap(a);
String actionTitle = action.getString("title");
String actionId = action.getString("id");
Intent actionIntent = new Intent();
actionIntent.setClassName(mContext, intentClassName);
actionIntent.setAction("com.evollu.react.fcm." + actionId + "_ACTION");
actionIntent.putExtras(bundle);
actionIntent.putExtra("_actionIdentifier", actionId);
actionIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent pendingActionIntent = PendingIntent.getActivity(mContext, notificationID, actionIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
notification.addAction(0, actionTitle, pendingActionIntent);
}
}
Notification info = notification.build(); Notification info = notification.build();
NotificationManagerCompat.from(mContext).notify(notificationID, info); NotificationManagerCompat.from(mContext).notify(notificationID, info);
} }
if(bundle.getBoolean("wake_screen", false)){
PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE);
if(pm != null && !pm.isScreenOn())
{
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK |PowerManager.ACQUIRE_CAUSES_WAKEUP |PowerManager.ON_AFTER_RELEASE,"FCMLock");
wl.acquire(5000);
}
}
//clear out one time scheduled notification once fired //clear out one time scheduled notification once fired
if(!bundle.containsKey("repeat_interval") && bundle.containsKey("fire_date")) { if(!bundle.containsKey("repeat_interval") && bundle.containsKey("fire_date")) {
SharedPreferences.Editor editor = sharedPreferences.edit(); SharedPreferences.Editor editor = sharedPreferences.edit();
...@@ -224,7 +262,7 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -224,7 +262,7 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
return null; return null;
} }
public Bitmap getBitmapFromURL(String strURL) { private Bitmap getBitmapFromURL(String strURL) {
try { try {
URL url = new URL(strURL); URL url = new URL(strURL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); HttpURLConnection connection = (HttpURLConnection) url.openConnection();
...@@ -238,11 +276,10 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -238,11 +276,10 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
} }
} }
public String getMainActivityClassName() { protected String getMainActivityClassName() {
String packageName = mContext.getPackageName(); String packageName = mContext.getPackageName();
Intent launchIntent = mContext.getPackageManager().getLaunchIntentForPackage(packageName); Intent launchIntent = mContext.getPackageManager().getLaunchIntentForPackage(packageName);
String className = launchIntent.getComponent().getClassName(); return launchIntent != null ? launchIntent.getComponent().getClassName() : null;
return className;
} }
} }
...@@ -25,6 +25,26 @@ declare module "react-native-fcm" { ...@@ -25,6 +25,26 @@ declare module "react-native-fcm" {
const Local = "local_notification"; const Local = "local_notification";
} }
export enum NotificationCategoryOption {
CustomDismissAction = 'UNNotificationCategoryOptionCustomDismissAction',
AllowInCarPlay = 'UNNotificationCategoryOptionAllowInCarPlay',
PreviewsShowTitle = 'UNNotificationCategoryOptionHiddenPreviewsShowTitle',
PreviewsShowSubtitle = 'UNNotificationCategoryOptionHiddenPreviewsShowSubtitle',
None = 'UNNotificationCategoryOptionNone'
}
export enum NotificationActionOption {
AuthenticationRequired = 'UNNotificationActionOptionAuthenticationRequired',
Destructive = 'UNNotificationActionOptionDestructive',
Foreground = 'UNNotificationActionOptionForeground',
None = 'UNNotificationActionOptionNone'
}
export enum NotificationActionType {
Default = 'UNNotificationActionTypeDefault',
TextInput = 'UNNotificationActionTypeTextInput',
}
export interface Notification { export interface Notification {
collapse_key: string; collapse_key: string;
opened_from_tray: boolean; opened_from_tray: boolean;
...@@ -44,6 +64,8 @@ declare module "react-native-fcm" { ...@@ -44,6 +64,8 @@ declare module "react-native-fcm" {
}; };
local_notification?: boolean; local_notification?: boolean;
_notificationType: string; _notificationType: string;
_actionIdentifier?: string;
_userText?: string;
finish(type?: string): void; finish(type?: string): void;
[key: string]: any; [key: string]: any;
} }
...@@ -83,6 +105,23 @@ declare module "react-native-fcm" { ...@@ -83,6 +105,23 @@ declare module "react-native-fcm" {
remove(): void; remove(): void;
} }
export interface NotificationAction {
type: NotificationActionType;
id: string;
title?: string;
textInputButtonTitle?: string;
textInputPlaceholder?: string;
options: NotificationActionOption | NotificationActionOption[];
}
export interface NotificationCategory {
id: string;
actions: NotificationAction[];
intentIdentifiers: string[];
hiddenPreviewsBodyPlaceholder?: string;
options?: NotificationCategoryOption | NotificationCategoryOption[];
}
export class FCM { export class FCM {
static requestPermissions(): Promise<void>; static requestPermissions(): Promise<void>;
static getFCMToken(): Promise<string>; static getFCMToken(): Promise<string>;
...@@ -109,6 +148,8 @@ declare module "react-native-fcm" { ...@@ -109,6 +148,8 @@ declare module "react-native-fcm" {
static enableDirectChannel(): void static enableDirectChannel(): void
static isDirectChannelEstablished(): Promise<boolean> static isDirectChannelEstablished(): Promise<boolean>
static getAPNSToken(): Promise<string> static getAPNSToken(): Promise<string>
static setNotificationCategories(categories: NotificationCategory[]): void;
} }
export default FCM; export default FCM;
......
...@@ -26,6 +26,26 @@ export const NotificationType = { ...@@ -26,6 +26,26 @@ export const NotificationType = {
Local: 'local_notification' Local: 'local_notification'
}; };
export const NotificationCategoryOption = {
CustomDismissAction: 'UNNotificationCategoryOptionCustomDismissAction',
AllowInCarPlay: 'UNNotificationCategoryOptionAllowInCarPlay',
PreviewsShowTitle: 'UNNotificationCategoryOptionHiddenPreviewsShowTitle',
PreviewsShowSubtitle: 'UNNotificationCategoryOptionHiddenPreviewsShowSubtitle',
None: 'UNNotificationCategoryOptionNone'
};
export const NotificationActionOption = {
AuthenticationRequired: 'UNNotificationActionOptionAuthenticationRequired',
Destructive: 'UNNotificationActionOptionDestructive',
Foreground: 'UNNotificationActionOptionForeground',
None: 'UNNotificationActionOptionNone',
};
export const NotificationActionType = {
Default: 'UNNotificationActionTypeDefault',
TextInput: 'UNNotificationActionTypeTextInput',
};
const RNFIRMessaging = NativeModules.RNFIRMessaging; const RNFIRMessaging = NativeModules.RNFIRMessaging;
const FCM = {}; const FCM = {};
...@@ -48,6 +68,14 @@ FCM.getFCMToken = () => { ...@@ -48,6 +68,14 @@ FCM.getFCMToken = () => {
return RNFIRMessaging.getFCMToken(); return RNFIRMessaging.getFCMToken();
}; };
FCM.getEntityFCMToken = () => {
return RNFIRMessaging.getEntityFCMToken();
}
FCM.deleteEntityFCMToken = () => {
return RNFIRMessaging.deleteEntityFCMToken();
}
FCM.deleteInstanceId = () =>{ FCM.deleteInstanceId = () =>{
return RNFIRMessaging.deleteInstanceId(); return RNFIRMessaging.deleteInstanceId();
}; };
...@@ -64,7 +92,7 @@ FCM.requestPermissions = () => { ...@@ -64,7 +92,7 @@ FCM.requestPermissions = () => {
FCM.createNotificationChannel = (channel) => { FCM.createNotificationChannel = (channel) => {
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
return RNFIRMessaging.createNotificationChannel(); return RNFIRMessaging.createNotificationChannel(channel);
} }
} }
...@@ -157,7 +185,7 @@ FCM.on = (event, callback) => { ...@@ -157,7 +185,7 @@ FCM.on = (event, callback) => {
try { try {
await callback(data); await callback(data);
} catch (err) { } catch (err) {
console.error('Notification handler err', err); console.error('Notification handler err:\n'+err.stack);
throw err; throw err;
} }
if (!data._finishCalled) { if (!data._finishCalled) {
...@@ -180,4 +208,12 @@ FCM.send = (senderId, payload) => { ...@@ -180,4 +208,12 @@ FCM.send = (senderId, payload) => {
RNFIRMessaging.send(senderId, payload); RNFIRMessaging.send(senderId, payload);
}; };
FCM.setNotificationCategories = (categories) => {
if (Platform.OS === 'ios') {
RNFIRMessaging.setNotificationCategories(categories);
}
}
export default FCM; export default FCM;
export {};
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@import FirebaseCore; #if __has_include(<Firebase.h>)
@import FirebaseMessaging; #import <FirebaseCore/FirebaseCore.h>
@import FirebaseInstanceID; #import <FirebaseMessaging/FirebaseMessaging.h>
#import <FirebaseInstanceID/FirebaseInstanceID.h>
#else
@import Firebase;
#endif
#import <React/RCTEventEmitter.h> #import <React/RCTEventEmitter.h>
@import UserNotifications; @import UserNotifications;
......
...@@ -131,12 +131,105 @@ RCT_ENUM_CONVERTER(UNNotificationPresentationOptions, (@{ ...@@ -131,12 +131,105 @@ RCT_ENUM_CONVERTER(UNNotificationPresentationOptions, (@{
@end @end
@implementation RCTConvert (UNNotificationAction)
typedef NS_ENUM(NSUInteger, UNNotificationActionType) {
UNNotificationActionTypeDefault,
UNNotificationActionTypeTextInput
};
+ (UNNotificationAction *) UNNotificationAction:(id)json {
NSDictionary<NSString *, id> *details = [self NSDictionary:json];
NSString *identifier = [RCTConvert NSString: details[@"id"]];
NSString *title = [RCTConvert NSString: details[@"title"]];
UNNotificationActionOptions options = [RCTConvert UNNotificationActionOptions: details[@"options"]];
UNNotificationActionType type = [RCTConvert UNNotificationActionType:details[@"type"]];
if (type == UNNotificationActionTypeTextInput) {
NSString *textInputButtonTitle = [RCTConvert NSString: details[@"textInputButtonTitle"]];
NSString *textInputPlaceholder = [RCTConvert NSString: details[@"textInputPlaceholder"]];
return [UNTextInputNotificationAction actionWithIdentifier:identifier title:title options:options textInputButtonTitle:textInputButtonTitle textInputPlaceholder:textInputPlaceholder];
}
return [UNNotificationAction actionWithIdentifier:identifier
title:title
options:options];
}
RCT_ENUM_CONVERTER(UNNotificationActionType, (@{
@"UNNotificationActionTypeDefault": @(UNNotificationActionTypeDefault),
@"UNNotificationActionTypeTextInput": @(UNNotificationActionTypeTextInput),
}), UNNotificationActionTypeDefault, integerValue)
RCT_MULTI_ENUM_CONVERTER(UNNotificationActionOptions, (@{
@"UNNotificationActionOptionAuthenticationRequired": @(UNNotificationActionOptionAuthenticationRequired),
@"UNNotificationActionOptionDestructive": @(UNNotificationActionOptionDestructive),
@"UNNotificationActionOptionForeground": @(UNNotificationActionOptionForeground),
@"UNNotificationActionOptionNone": @(UNNotificationActionOptionNone),
}), UNNotificationActionOptionNone, integerValue)
@end
@implementation RCTConvert (UNNotificationCategory)
+ (UNNotificationCategory *) UNNotificationCategory:(id)json {
NSDictionary<NSString *, id> *details = [self NSDictionary:json];
NSString *identifier = [RCTConvert NSString: details[@"id"]];
NSMutableArray *actions = [[NSMutableArray alloc] init];
for (NSDictionary *actionDict in details[@"actions"]) {
[actions addObject:[RCTConvert UNNotificationAction:actionDict]];
}
NSArray<NSString *> *intentIdentifiers = [RCTConvert NSStringArray:details[@"intentIdentifiers"]];
NSString *hiddenPreviewsBodyPlaceholder = [RCTConvert NSString:details[@"hiddenPreviewsBodyPlaceholder"]];
UNNotificationCategoryOptions options = [RCTConvert UNNotificationCategoryOptions: details[@"options"]];
if (hiddenPreviewsBodyPlaceholder) {
#if defined(__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
return [UNNotificationCategory categoryWithIdentifier:identifier actions:actions intentIdentifiers:intentIdentifiers hiddenPreviewsBodyPlaceholder:hiddenPreviewsBodyPlaceholder options:options];
#endif
}
return [UNNotificationCategory categoryWithIdentifier:identifier actions:actions intentIdentifiers:intentIdentifiers options:options];
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
RCT_MULTI_ENUM_CONVERTER(UNNotificationCategoryOptions, (@{
@"UNNotificationCategoryOptionNone": @(UNNotificationCategoryOptionNone),
@"UNNotificationCategoryOptionCustomDismissAction": @(UNNotificationCategoryOptionCustomDismissAction),
@"UNNotificationCategoryOptionAllowInCarPlay": @(UNNotificationCategoryOptionAllowInCarPlay),
@"UNNotificationCategoryOptionHiddenPreviewsShowTitle": @(UNNotificationCategoryOptionHiddenPreviewsShowTitle),
@"UNNotificationCategoryOptionHiddenPreviewsShowSubtitle": @(UNNotificationCategoryOptionHiddenPreviewsShowSubtitle),
}), UNNotificationCategoryOptionNone, integerValue)
#pragma clang diagnostic pop
@end
@interface RCTEventEmitter ()
- (void) addListener:(NSString *)eventName;
@end
@interface RNFIRMessaging () @interface RNFIRMessaging ()
@property (nonatomic, strong) NSMutableDictionary *notificationCallbacks; @property (nonatomic, strong) NSMutableDictionary *notificationCallbacks;
@end @end
@implementation RNFIRMessaging @implementation RNFIRMessaging
static bool jsHandlerRegistered;
static NSMutableArray* pendingNotifications;
RCT_EXPORT_MODULE(); RCT_EXPORT_MODULE();
- (NSArray<NSString *> *)supportedEvents { - (NSArray<NSString *> *)supportedEvents {
...@@ -144,21 +237,21 @@ RCT_EXPORT_MODULE(); ...@@ -144,21 +237,21 @@ RCT_EXPORT_MODULE();
} }
+ (BOOL)requiresMainQueueSetup { + (BOOL)requiresMainQueueSetup {
return YES; return YES;
} }
+ (void)didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull RCTRemoteNotificationCallback)completionHandler { + (void)didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull RCTRemoteNotificationCallback)completionHandler {
NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: userInfo]; NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: userInfo];
[data setValue:@"remote_notification" forKey:@"_notificationType"]; [data setValue:@"remote_notification" forKey:@"_notificationType"];
[data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"]; [data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"];
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data, @"completionHandler": completionHandler}]; [self sendNotificationEventWhenAvailable:@{@"data": data, @"completionHandler": completionHandler}];
} }
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification { + (void)didReceiveLocalNotification:(UILocalNotification *)notification {
NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.userInfo]; NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.userInfo];
[data setValue:@"local_notification" forKey:@"_notificationType"]; [data setValue:@"local_notification" forKey:@"_notificationType"];
[data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"]; [data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"];
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data}]; [self sendNotificationEventWhenAvailable:@{@"data": data}];
} }
+ (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(nonnull RCTNotificationResponseCallback)completionHandler + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(nonnull RCTNotificationResponseCallback)completionHandler
...@@ -169,14 +262,34 @@ RCT_EXPORT_MODULE(); ...@@ -169,14 +262,34 @@ RCT_EXPORT_MODULE();
if (response.actionIdentifier) { if (response.actionIdentifier) {
[data setValue:response.actionIdentifier forKey:@"_actionIdentifier"]; [data setValue:response.actionIdentifier forKey:@"_actionIdentifier"];
} }
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data, @"completionHandler": completionHandler}];
if ([response isKindOfClass:UNTextInputNotificationResponse.class]) {
[data setValue:[(UNTextInputNotificationResponse *)response userText] forKey:@"_userText"];
}
NSDictionary *userInfo = @{@"data": data, @"completionHandler": completionHandler};
[self sendNotificationEventWhenAvailable:userInfo];
} }
+ (void)willPresentNotification:(UNNotification *)notification withCompletionHandler:(nonnull RCTWillPresentNotificationCallback)completionHandler + (void)willPresentNotification:(UNNotification *)notification withCompletionHandler:(nonnull RCTWillPresentNotificationCallback)completionHandler
{ {
NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.request.content.userInfo]; NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.request.content.userInfo];
[data setValue:@"will_present_notification" forKey:@"_notificationType"]; [data setValue:@"will_present_notification" forKey:@"_notificationType"];
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data, @"completionHandler": completionHandler}]; [self sendNotificationEventWhenAvailable:@{@"data": data, @"completionHandler": completionHandler}];
}
+ (void)sendNotificationEventWhenAvailable:(NSDictionary*)data
{
if(!jsHandlerRegistered){
// JS hasn't registered callback yet. hold on that
if(!pendingNotifications){
pendingNotifications = [NSMutableArray array];
}
[pendingNotifications addObject:data];
} else {
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:data];
}
} }
- (void)dealloc - (void)dealloc
...@@ -186,10 +299,11 @@ RCT_EXPORT_MODULE(); ...@@ -186,10 +299,11 @@ RCT_EXPORT_MODULE();
- (instancetype)init { - (instancetype)init {
self = [super init]; self = [super init];
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleNotificationReceived:) selector:@selector(handleNotificationReceived:)
name:FCMNotificationReceived name:FCMNotificationReceived
object:nil]; object:nil];
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(sendDataMessageFailure:) addObserver:self selector:@selector(sendDataMessageFailure:)
...@@ -207,9 +321,38 @@ RCT_EXPORT_MODULE(); ...@@ -207,9 +321,38 @@ RCT_EXPORT_MODULE();
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[[FIRMessaging messaging] setDelegate:self]; [[FIRMessaging messaging] setDelegate:self];
}); });
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(!jsHandlerRegistered){
[self sendPendingNotifications];
}
});
return self; return self;
} }
-(void) addListener:(NSString *)eventName {
[super addListener:eventName];
if([eventName isEqualToString:FCMNotificationReceived]) {
[self sendPendingNotifications];
}
}
-(void) sendPendingNotifications {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
jsHandlerRegistered = true;
for (NSDictionary* data in pendingNotifications) {
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:data];
}
[pendingNotifications removeAllObjects];
});
}
RCT_EXPORT_METHOD(enableDirectChannel) RCT_EXPORT_METHOD(enableDirectChannel)
{ {
[[FIRMessaging messaging] setShouldEstablishDirectChannel:@YES]; [[FIRMessaging messaging] setShouldEstablishDirectChannel:@YES];
...@@ -222,14 +365,25 @@ RCT_EXPORT_METHOD(isDirectChannelEstablished:(RCTPromiseResolveBlock)resolve rej ...@@ -222,14 +365,25 @@ RCT_EXPORT_METHOD(isDirectChannelEstablished:(RCTPromiseResolveBlock)resolve rej
RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{ {
UILocalNotification *localUserInfo = self.bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; NSDictionary* initialNotif;
if (localUserInfo) { NSDictionary *localUserInfo = [[self.bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey] userInfo] mutableCopy];
resolve([[localUserInfo userInfo] copy]);
} else { NSDictionary *remoteUserInfo = [self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy];
resolve([self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]); if(localUserInfo){
} initialNotif = localUserInfo;
} else if (remoteUserInfo) {
initialNotif = remoteUserInfo;
}
if (initialNotif) {
[initialNotif setValue:@YES forKey:@"opened_from_tray"];
resolve(initialNotif);
} else {
resolve(nil);
}
} }
RCT_EXPORT_METHOD(getAPNSToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(getAPNSToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{ {
NSData * deviceToken = [FIRMessaging messaging].APNSToken; NSData * deviceToken = [FIRMessaging messaging].APNSToken;
...@@ -246,6 +400,42 @@ RCT_EXPORT_METHOD(getFCMToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromi ...@@ -246,6 +400,42 @@ RCT_EXPORT_METHOD(getFCMToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromi
resolve([FIRMessaging messaging].FCMToken); resolve([FIRMessaging messaging].FCMToken);
} }
RCT_EXPORT_METHOD(getEntityFCMToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{
FIROptions *options = FIROptions.defaultOptions;
NSString *entity = options.GCMSenderID;
NSData * deviceToken = [FIRMessaging messaging].APNSToken;
if (deviceToken == nil) {
resolve(nil);
return;
}
[[FIRInstanceID instanceID]tokenWithAuthorizedEntity:entity scope:kFIRInstanceIDScopeFirebaseMessaging options:@{@"apns_token": deviceToken} handler:^(NSString * _Nullable token, NSError * _Nullable error) {
if (error != nil) {
reject([NSString stringWithFormat:@"%ld",error.code],error.localizedDescription,nil);
} else {
resolve(token);
}
}];
}
RCT_EXPORT_METHOD(deleteEntityFCMToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{
FIROptions *options = FIROptions.defaultOptions;;
NSString *entity = options.GCMSenderID;
[[FIRInstanceID instanceID]deleteTokenWithAuthorizedEntity:entity scope:kFIRInstanceIDScopeFirebaseMessaging handler:^(NSError * _Nullable error) {
if (error != nil) {
reject([NSString stringWithFormat:@"%ld",error.code],error.localizedDescription,nil);
} else {
resolve(nil);
}
}];
}
RCT_EXPORT_METHOD(deleteInstanceId:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(deleteInstanceId:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{ {
[[FIRInstanceID instanceID]deleteIDWithHandler:^(NSError * _Nullable error) { [[FIRInstanceID instanceID]deleteIDWithHandler:^(NSError * _Nullable error) {
...@@ -367,7 +557,9 @@ RCT_EXPORT_METHOD(removeAllDeliveredNotifications) ...@@ -367,7 +557,9 @@ RCT_EXPORT_METHOD(removeAllDeliveredNotifications)
if([UNUserNotificationCenter currentNotificationCenter] != nil){ if([UNUserNotificationCenter currentNotificationCenter] != nil){
[[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications]; [[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications];
} else { } else {
[RCTSharedApplication() setApplicationIconBadgeNumber: 0]; dispatch_async(dispatch_get_main_queue(), ^{
[RCTSharedApplication() setApplicationIconBadgeNumber: 0];
});
} }
} }
...@@ -414,9 +606,25 @@ RCT_EXPORT_METHOD(getScheduledLocalNotifications:(RCTPromiseResolveBlock)resolve ...@@ -414,9 +606,25 @@ RCT_EXPORT_METHOD(getScheduledLocalNotifications:(RCTPromiseResolveBlock)resolve
} }
} }
RCT_EXPORT_METHOD(setNotificationCategories:(NSArray *)categories)
{
if([UNUserNotificationCenter currentNotificationCenter] != nil) {
NSMutableSet *categoriesSet = [[NSMutableSet alloc] init];
for(NSDictionary *categoryDict in categories) {
UNNotificationCategory *category = [RCTConvert UNNotificationCategory:categoryDict];
[categoriesSet addObject:category];
}
[[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:categoriesSet];
}
}
RCT_EXPORT_METHOD(setBadgeNumber: (NSInteger) number) RCT_EXPORT_METHOD(setBadgeNumber: (NSInteger) number)
{ {
[RCTSharedApplication() setApplicationIconBadgeNumber:number]; dispatch_async(dispatch_get_main_queue(), ^{
[RCTSharedApplication() setApplicationIconBadgeNumber:number];
});
} }
RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
...@@ -486,9 +694,7 @@ RCT_EXPORT_METHOD(finishNotificationResponse: (NSString *)completionHandlerId){ ...@@ -486,9 +694,7 @@ RCT_EXPORT_METHOD(finishNotificationResponse: (NSString *)completionHandlerId){
self.notificationCallbacks[completionHandlerId] = completionHandler; self.notificationCallbacks[completionHandlerId] = completionHandler;
data[@"_completionHandlerId"] = completionHandlerId; data[@"_completionHandlerId"] = completionHandlerId;
} }
[self sendEventWithName:FCMNotificationReceived body:data]; [self sendEventWithName:FCMNotificationReceived body:data];
} }
- (void)sendDataMessageFailure:(NSNotification *)notification - (void)sendDataMessageFailure:(NSNotification *)notification
......
...@@ -230,6 +230,7 @@ ...@@ -230,6 +230,7 @@
"$(PROJECT_DIR)/../../../ios/Frameworks/**", "$(PROJECT_DIR)/../../../ios/Frameworks/**",
"$(SRCROOT)/../../../node_modules/react-native-firestack/ios/**", "$(SRCROOT)/../../../node_modules/react-native-firestack/ios/**",
"$(PROJECT_DIR)/../../../ios/Pods/Firebase/**", "$(PROJECT_DIR)/../../../ios/Pods/Firebase/**",
"$(PROJECT_DIR)/../../../ios/Pods/Headers/Public/**",
); );
LIBRARY_SEARCH_PATHS = "$(inherited)"; LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC"; OTHER_LDFLAGS = "-ObjC";
...@@ -257,6 +258,7 @@ ...@@ -257,6 +258,7 @@
"$(PROJECT_DIR)/../../../ios/Frameworks/**", "$(PROJECT_DIR)/../../../ios/Frameworks/**",
"$(SRCROOT)/../../../node_modules/react-native-firestack/ios/**", "$(SRCROOT)/../../../node_modules/react-native-firestack/ios/**",
"$(PROJECT_DIR)/../../../ios/Pods/Firebase/**", "$(PROJECT_DIR)/../../../ios/Pods/Firebase/**",
"$(PROJECT_DIR)/../../../ios/Pods/Headers/Public/**",
); );
LIBRARY_SEARCH_PATHS = "$(inherited)"; LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC"; OTHER_LDFLAGS = "-ObjC";
......
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
"type": "git", "type": "git",
"url": "git+https://github.com/evollu/react-native-fcm.git" "url": "git+https://github.com/evollu/react-native-fcm.git"
}, },
"version": "11.0.1" "version": "14.1.2"
} }
...@@ -12,6 +12,8 @@ Pod::Spec.new do |s| ...@@ -12,6 +12,8 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/evollu/react-native-fcm.git' } s.source = { :git => 'https://github.com/evollu/react-native-fcm.git' }
s.platform = :ios, '8.0' s.platform = :ios, '8.0'
s.source_files = "ios/*.{h,m}" s.source_files = "ios/*.{h,m}"
s.public_header_files = ['ios/RNFIRMessaging.h']
s.static_framework = true
s.dependency "React" s.dependency "React"
s.dependency "Firebase/Messaging" s.dependency "Firebase/Messaging"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment