[#3352] Improve new message notifications
* Set custom sound * Tap on notification opens chat * Show message notifications when app in foreground Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
parent
c9b450119e
commit
a4541c8af3
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
- Added refresh button
|
||||
- Added more dapps
|
||||
- Allow for setting custom network id
|
||||
- Sound for Push Notifications, tap on PN opens corresponding chat
|
||||
|
||||
### Fixed
|
||||
- Fixed Sign in: Cannot paste text within password field [#3931]
|
||||
|
|
|
@ -201,6 +201,7 @@ configurations.all {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':react-native-firebase')
|
||||
implementation project(':react-native-background-timer')
|
||||
implementation project(':react-native-svg')
|
||||
implementation 'com.android.support:multidex:1.0.2'
|
||||
|
@ -224,9 +225,10 @@ dependencies {
|
|||
implementation project(':react-native-securerandom')
|
||||
implementation project(':react-native-webview-bridge')
|
||||
implementation project(':react-native-config')
|
||||
implementation project(':react-native-fcm')
|
||||
implementation 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version
|
||||
compile project(':react-native-testfairy')
|
||||
implementation 'com.google.android.gms:play-services-base:15.0.0'
|
||||
implementation 'com.google.firebase:firebase-core:15.0.2' //this decides your firebase SDK version
|
||||
implementation 'com.google.firebase:firebase-messaging:15.0.2'
|
||||
implementation project(':react-native-testfairy')
|
||||
implementation project(':react-native-keychain')
|
||||
implementation project(':instabug-reactnative')
|
||||
|
||||
|
@ -240,9 +242,6 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
|||
into 'libs'
|
||||
}
|
||||
|
||||
// Must be at bottom to avoid dependency collision
|
||||
apply plugin: "com.google.gms.google-services"
|
||||
|
||||
task hemroidBuild(type: Exec) {
|
||||
def rootDir = project.rootDir
|
||||
def localProperties = new File(rootDir, "local.properties")
|
||||
|
@ -259,3 +258,6 @@ task hemroidBuild(type: Exec) {
|
|||
}
|
||||
|
||||
preBuild.dependsOn hemroidBuild
|
||||
|
||||
// Must be at bottom to avoid dependency collision
|
||||
apply plugin: "com.google.gms.google-services"
|
||||
|
|
Binary file not shown.
|
@ -9,6 +9,8 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PROFILE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<!-- dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
|
@ -34,8 +36,14 @@
|
|||
android:largeHeap="true">
|
||||
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
android:resource="@drawable/ic_stat_status_notification" />
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
android:resource="@drawable/ic_stat_status_notification" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_channel_id"
|
||||
android:value="@string/notification_channel_id" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
|
@ -74,19 +82,17 @@
|
|||
android:enabled="true"
|
||||
android:exported="true"/>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||
|
||||
<service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
|
||||
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
|
||||
<service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
|
@ -4,11 +4,13 @@ import android.support.multidex.MultiDexApplication;
|
|||
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import org.devio.rn.splashscreen.SplashScreenReactPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import io.invertase.firebase.RNFirebasePackage;
|
||||
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
|
||||
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
|
||||
import net.rhogan.rnsecurerandom.RNSecureRandomPackage;
|
||||
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
|
||||
import com.ocetnik.timer.BackgroundTimerPackage;
|
||||
import com.horcrux.svg.SvgPackage;
|
||||
import com.evollu.react.fcm.FIRMessagingPackage;
|
||||
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
|
@ -55,10 +57,12 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
|
|||
Function<String, String> callRPC = statusPackage.getCallRPC();
|
||||
List<ReactPackage> packages = new ArrayList<ReactPackage>(Arrays.asList(
|
||||
new MainReactPackage(),
|
||||
new RNFirebasePackage(),
|
||||
new RNFirebaseMessagingPackage(),
|
||||
new RNFirebaseNotificationsPackage(),
|
||||
new RNSecureRandomPackage(),
|
||||
new BackgroundTimerPackage(),
|
||||
new SvgPackage(),
|
||||
new FIRMessagingPackage(),
|
||||
new HttpServerReactPackage(),
|
||||
new SplashScreenReactPackage(),
|
||||
statusPackage,
|
||||
|
|
Binary file not shown.
|
@ -3,4 +3,5 @@
|
|||
<string name="root_warning">Your phone appears to be ROOTED, by pressing CONTINUE you understand and accept the risks in using this software.</string>
|
||||
<string name="root_okay">Continue</string>
|
||||
<string name="root_cancel">Exit</string>
|
||||
<string name="notification_channel_id">status-im</string>
|
||||
</resources>
|
|
@ -17,7 +17,6 @@ buildscript {
|
|||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
maven { url "$rootDir/../node_modules/react-native/android" }
|
||||
|
@ -26,5 +25,6 @@ allprojects {
|
|||
flatDir { dirs 'libs' }
|
||||
maven { url "http://139.162.11.12:8081/artifactory/libs-release-local" }
|
||||
maven { url "https://jitpack.io" }
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
rootProject.name = 'StatusIm'
|
||||
include ':react-native-firebase'
|
||||
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
|
||||
include ':react-native-securerandom'
|
||||
project(':react-native-securerandom').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-securerandom/android')
|
||||
include ':instabug-reactnative'
|
||||
|
@ -7,8 +9,6 @@ include ':react-native-background-timer'
|
|||
project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
|
||||
include ':react-native-svg'
|
||||
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
|
||||
include ':react-native-fcm'
|
||||
project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
|
||||
include ':app'
|
||||
include ':react-native-http-bridge'
|
||||
project(':react-native-http-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-http-bridge/android')
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"react-native-image-crop-picker"
|
||||
"react-native-securerandom"
|
||||
"react-native-webview-bridge"
|
||||
"react-native-fcm"
|
||||
"react-native-firebase"
|
||||
"homoglyph-finder"
|
||||
"web3"
|
||||
"chance"
|
||||
|
|
12
ios/Podfile
12
ios/Podfile
|
@ -1,22 +1,14 @@
|
|||
# Uncomment the next line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
|
||||
# Need to explicitly declare this avoid downgrade
|
||||
# https://github.com/evollu/react-native-fcm/issues/420
|
||||
#pod 'Firebase/Core', '4.0.0'
|
||||
|
||||
# react-native-fcm should support FB 4, but latest breaks builds, hence older version
|
||||
# TODO(oskarth): Awaiting RN 0.47 upgrade, and/or PN working on iOS device before deciding which version to use
|
||||
#pod 'Firebase/Messaging'
|
||||
#pod 'Firebase/Messaging', '3.17.0'
|
||||
|
||||
target 'StatusIm' do
|
||||
platform :ios, '8.0'
|
||||
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
|
||||
# use_frameworks!
|
||||
|
||||
# Pods for StatusIm
|
||||
pod 'FirebaseMessaging'
|
||||
pod 'Firebase/Core'
|
||||
pod 'Firebase/Messaging'
|
||||
|
||||
pod 'React', :path => '../node_modules/react-native'
|
||||
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||
|
|
|
@ -1,24 +1,37 @@
|
|||
PODS:
|
||||
- FirebaseAnalytics (4.0.1):
|
||||
- FirebaseCore (~> 4.0)
|
||||
- FirebaseInstanceID (~> 2.0)
|
||||
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
|
||||
- FirebaseCore (4.0.2):
|
||||
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
|
||||
- FirebaseInstanceID (2.0.0):
|
||||
- FirebaseCore (~> 4.0)
|
||||
- FirebaseMessaging (2.0.0):
|
||||
- FirebaseAnalytics (~> 4.0)
|
||||
- FirebaseCore (~> 4.0)
|
||||
- FirebaseInstanceID (~> 2.0)
|
||||
- Firebase/Core (5.0.1):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseAnalytics (= 5.0.0)
|
||||
- Firebase/CoreOnly (5.0.1):
|
||||
- FirebaseCore (= 5.0.1)
|
||||
- Firebase/Messaging (5.0.1):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (= 3.0.0)
|
||||
- FirebaseAnalytics (5.0.0):
|
||||
- FirebaseCore (~> 5.0)
|
||||
- FirebaseInstanceID (~> 3.0)
|
||||
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
|
||||
- nanopb (~> 0.3)
|
||||
- FirebaseCore (5.0.1):
|
||||
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
|
||||
- FirebaseInstanceID (3.0.0):
|
||||
- FirebaseCore (~> 5.0)
|
||||
- FirebaseMessaging (3.0.0):
|
||||
- FirebaseCore (~> 5.0)
|
||||
- FirebaseInstanceID (~> 3.0)
|
||||
- GoogleToolboxForMac/Logger (~> 2.1)
|
||||
- Protobuf (~> 3.1)
|
||||
- GoogleToolboxForMac/Defines (2.1.1)
|
||||
- GoogleToolboxForMac/Logger (2.1.1):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.1)
|
||||
- "GoogleToolboxForMac/NSData+zlib (2.1.1)":
|
||||
- GoogleToolboxForMac/Defines (= 2.1.1)
|
||||
- Protobuf (3.3.0)
|
||||
- GoogleToolboxForMac/Defines (2.1.4)
|
||||
- GoogleToolboxForMac/Logger (2.1.4):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.4)
|
||||
- GoogleToolboxForMac/NSData+zlib (2.1.4):
|
||||
- GoogleToolboxForMac/Defines (= 2.1.4)
|
||||
- nanopb (0.3.8):
|
||||
- nanopb/decode (= 0.3.8)
|
||||
- nanopb/encode (= 0.3.8)
|
||||
- nanopb/decode (0.3.8)
|
||||
- nanopb/encode (0.3.8)
|
||||
- Protobuf (3.5.0)
|
||||
- React (0.55.4):
|
||||
- React/Core (= 0.55.4)
|
||||
- react-native-background-timer (2.0.0):
|
||||
|
@ -30,7 +43,8 @@ PODS:
|
|||
- yoga (0.55.4.React)
|
||||
|
||||
DEPENDENCIES:
|
||||
- FirebaseMessaging
|
||||
- Firebase/Core
|
||||
- Firebase/Messaging
|
||||
- React (from `../node_modules/react-native`)
|
||||
- react-native-background-timer (from `../node_modules/react-native-background-timer`)
|
||||
- RNKeychain (from `../node_modules/react-native-keychain`)
|
||||
|
@ -49,24 +63,26 @@ EXTERNAL SOURCES:
|
|||
React:
|
||||
:path: "../node_modules/react-native"
|
||||
react-native-background-timer:
|
||||
:path: "../node_modules/react-native-background-timer"
|
||||
:path: ../node_modules/react-native-background-timer
|
||||
RNKeychain:
|
||||
:path: "../node_modules/react-native-keychain"
|
||||
:path: ../node_modules/react-native-keychain
|
||||
yoga:
|
||||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
FirebaseAnalytics: 4d7040fefc3cd8b291cde35f12cf063d7963f15d
|
||||
FirebaseCore: 1a8bf6c795ad07d2918278657954ffd2552e9c17
|
||||
FirebaseInstanceID: 9fbf536668f4d3f0880e7438456dabd1376e294b
|
||||
FirebaseMessaging: 227406c05b0dc9290702d2e9f18ab5528f0c2cf2
|
||||
GoogleToolboxForMac: 8e329f1b599f2512c6b10676d45736bcc2cbbeb0
|
||||
Protobuf: d582fecf68201eac3d79ed61369ef45734394b9c
|
||||
Firebase: d6861c2059d8c32d1e6dd8932e22ada346d90a3a
|
||||
FirebaseAnalytics: 19812b49fa5f283dd6b23edf8a14b5d477029ab8
|
||||
FirebaseCore: cafc814b2d84fc8733f09e653041cc2165332ad7
|
||||
FirebaseInstanceID: 83e0040351565df711a5db3d8ebe5ea21aca998a
|
||||
FirebaseMessaging: f2360a966ecfb0d14facf0fbdf306efc2df0ddbe
|
||||
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
|
||||
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
|
||||
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
|
||||
React: aa2040dbb6f317b95314968021bd2888816e03d5
|
||||
react-native-background-timer: 63dcbf37dbcf294b5c6c071afcdc661fa06a7594
|
||||
RNKeychain: 627c6095cef215dd3d9804a9a9cf45ab96aa3997
|
||||
yoga: a23273df0088bf7f2bb7e5d7b00044ea57a2a54a
|
||||
|
||||
PODFILE CHECKSUM: 58fa7be75df3ece53c570dbd30d721f4b6d77137
|
||||
PODFILE CHECKSUM: 7d2c351f8b90d3ad2b11fdcfde727875f4c2eebf
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
COCOAPODS: 1.4.0
|
||||
|
|
|
@ -33,22 +33,18 @@
|
|||
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; };
|
||||
3A8BF31C42291E324219071C /* InstabugCore.framework in Embed Instabug Framework */ = {isa = PBXBuildFile; fileRef = EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; };
|
||||
475D202F20B7450D00879A77 /* libRNFirebase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 475D1FC020B7413500879A77 /* libRNFirebase.a */; };
|
||||
4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */; };
|
||||
4CA4DA1B206D105D006A98B0 /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E3F1C121DDAE781005E4779 /* libRNInstabug.a */; };
|
||||
5974D2035B8B47E0946B63B6 /* libRNFIRMessaging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F752F17B1E04216B1337A72 /* libRNFIRMessaging.a */; };
|
||||
63AE4174241B852A045FAE1F /* InstabugCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */; };
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */; };
|
||||
81C6E6AE0AA739BE9D87C1D0 /* libPods-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC1CBCFE6C906043D6CCEEE1 /* libPods-StatusImTests.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
8E55E6877F950B81C8D711C5 /* libPods-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 101A4045637A2ADF57D28EF5 /* libPods-StatusIm.a */; };
|
||||
91446A820DA5E1C15C24D2A7 /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D72275B7ADF9FC3304DCE5 /* Instabug.framework */; };
|
||||
925C1F471F7B73B20063DFA0 /* FirebaseCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F401F7B73B20063DFA0 /* FirebaseCore.framework */; };
|
||||
925C1F481F7B73B20063DFA0 /* FirebaseCoreDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F411F7B73B20063DFA0 /* FirebaseCoreDiagnostics.framework */; };
|
||||
925C1F491F7B73B20063DFA0 /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F421F7B73B20063DFA0 /* FirebaseInstanceID.framework */; };
|
||||
925C1F4A1F7B73B20063DFA0 /* FirebaseNanoPB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F431F7B73B20063DFA0 /* FirebaseNanoPB.framework */; };
|
||||
925C1F4C1F7B73B20063DFA0 /* nanopb.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F451F7B73B20063DFA0 /* nanopb.framework */; };
|
||||
925C1F811F7B73C00063DFA0 /* FirebaseMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F7F1F7B73C00063DFA0 /* FirebaseMessaging.framework */; };
|
||||
92A0DF7D1F4DE3A4002051BC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 92A0DF491F4DE3A0002051BC /* GoogleService-Info.plist */; };
|
||||
983F077E2119C9D2004133ED /* message.wav in Resources */ = {isa = PBXBuildFile; fileRef = 983F07442119C9D2004133ED /* message.wav */; };
|
||||
98482A6F2065257B00263651 /* libReactNativeTestFairy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9880471C20650CBC00CEBFE0 /* libReactNativeTestFairy.a */; };
|
||||
9E0B01A11DDC5DA7002B0359 /* SF-UI-Text-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9E0B01A01DDC5DA7002B0359 /* SF-UI-Text-Light.otf */; };
|
||||
9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E3AB6C61D87DA2B008846B4 /* libReact-Native-Webview-Bridge.a */; };
|
||||
|
@ -189,6 +185,20 @@
|
|||
remoteGlobalIDString = F60690131CA2766F0003FB26;
|
||||
remoteInfo = RealmReact;
|
||||
};
|
||||
475D1EF120B73EE000879A77 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = AF409BB755B94FB1BBA01927 /* RNSecureRandom.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNSecureRandom;
|
||||
};
|
||||
475D1FBF20B7413500879A77 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 475D1F8D20B7413500879A77 /* RNFirebase.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNFirebase;
|
||||
};
|
||||
5537E2A920650E640085CED4 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
||||
|
@ -217,13 +227,6 @@
|
|||
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
||||
remoteInfo = RCTText;
|
||||
};
|
||||
922C4C4A1F4D5C3F0033C753 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F89A8F8005874B86B63C22E3 /* RNFIRMessaging.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNFIRMessaging;
|
||||
};
|
||||
92925B671F571DE600203EEB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1E74DC52A1E449A2BA858B14 /* RNSVG.xcodeproj */;
|
||||
|
@ -329,13 +332,6 @@
|
|||
remoteGlobalIDString = B29EC9CC1E48BED600704A36;
|
||||
remoteInfo = RCTHttpServer;
|
||||
};
|
||||
C20F3A6E20E5165B00757214 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = AF409BB755B94FB1BBA01927 /* RNSecureRandom.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNSecureRandom;
|
||||
};
|
||||
C90047CC1FC47AF50002B8EA /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
|
||||
|
@ -537,6 +533,7 @@
|
|||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* StatusImTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusImTests.m; sourceTree = "<group>"; };
|
||||
064351D2FD901F8B6C9AE2A5 /* Pods-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusImTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StatusImTests/Pods-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
0A9C79F2FD464877A7CC0BC2 /* libRNFirebase.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFirebase.a; sourceTree = "<group>"; };
|
||||
101A4045637A2ADF57D28EF5 /* libPods-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
11632AA0A5F84F029DD91797 /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
|
||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||
|
@ -566,6 +563,9 @@
|
|||
3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SplashScreen.xcodeproj; path = "../node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj"; sourceTree = "<group>"; };
|
||||
439B6B4B407A4E2AACAFE5BE /* RCTStatus.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTStatus.xcodeproj; path = "../modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj"; sourceTree = "<group>"; };
|
||||
46E2F6052EB44C698C680894 /* RNI18n.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNI18n.xcodeproj; path = "../node_modules/react-native-i18n/ios/RNI18n.xcodeproj"; sourceTree = "<group>"; };
|
||||
475D1F8D20B7413500879A77 /* RNFirebase.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNFirebase.xcodeproj; path = "../node_modules/react-native-firebase/ios/RNFirebase.xcodeproj"; sourceTree = "<group>"; };
|
||||
475D1FCD20B7415300879A77 /* libFirebaseCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFirebaseCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
475D1FCE20B7415300879A77 /* libFirebaseMessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFirebaseMessaging.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
4EC426A98043452BB6F9C134 /* libRNInstabug.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNInstabug.a; sourceTree = "<group>"; };
|
||||
|
@ -586,6 +586,7 @@
|
|||
925C1F451F7B73B20063DFA0 /* nanopb.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = nanopb.framework; sourceTree = "<group>"; };
|
||||
925C1F7F1F7B73C00063DFA0 /* FirebaseMessaging.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseMessaging.framework; sourceTree = "<group>"; };
|
||||
92A0DF491F4DE3A0002051BC /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
983F07442119C9D2004133ED /* message.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = message.wav; path = ../android/app/src/main/res/raw/message.wav; sourceTree = "<group>"; };
|
||||
9880471720650CBC00CEBFE0 /* ReactNativeTestFairy.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeTestFairy.xcodeproj; path = "../node_modules/react-native-testfairy/ios/ReactNativeTestFairy.xcodeproj"; sourceTree = "<group>"; };
|
||||
9E0B01A01DDC5DA7002B0359 /* SF-UI-Text-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Text-Light.otf"; sourceTree = "<group>"; };
|
||||
9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "React-Native-Webview-Bridge.xcodeproj"; path = "../node_modules/react-native-webview-bridge/ios/React-Native-Webview-Bridge.xcodeproj"; sourceTree = "<group>"; };
|
||||
|
@ -613,7 +614,6 @@
|
|||
EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InstabugCore.framework; path = "../node_modules/instabug-reactnative/ios/InstabugCore.framework"; sourceTree = "<group>"; };
|
||||
F090E261B9854867A728CE4F /* RealmReact.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RealmReact.xcodeproj; path = "../node_modules/realm/react-native/ios/RealmReact.xcodeproj"; sourceTree = "<group>"; };
|
||||
F3548417D8DA4362B6796A54 /* RNInstabug.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNInstabug.xcodeproj; path = "../node_modules/instabug-reactnative/ios/RNInstabug.xcodeproj"; sourceTree = "<group>"; };
|
||||
F89A8F8005874B86B63C22E3 /* 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>"; };
|
||||
F9238D6B1E5F055900C047B9 /* SF-UI-Text-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Text-Semibold.otf"; sourceTree = "<group>"; };
|
||||
FC1CBCFE6C906043D6CCEEE1 /* libPods-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
@ -631,15 +631,13 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
475D202F20B7450D00879A77 /* libRNFirebase.a in Frameworks */,
|
||||
4CA4DA1B206D105D006A98B0 /* libRNInstabug.a in Frameworks */,
|
||||
98482A6F2065257B00263651 /* libReactNativeTestFairy.a in Frameworks */,
|
||||
C93242561FE1C68C00FE7099 /* libRCTAnimation.a in Frameworks */,
|
||||
4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */,
|
||||
B2DEA0D01E49E33300FA28D6 /* libRCTHttpServer.a in Frameworks */,
|
||||
925C1F481F7B73B20063DFA0 /* FirebaseCoreDiagnostics.framework in Frameworks */,
|
||||
9EE89E271E03FCB7007D3C25 /* libSplashScreen.a in Frameworks */,
|
||||
925C1F811F7B73C00063DFA0 /* FirebaseMessaging.framework in Frameworks */,
|
||||
925C1F4A1F7B73B20063DFA0 /* FirebaseNanoPB.framework in Frameworks */,
|
||||
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */,
|
||||
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */,
|
||||
9EE89E2D1E03FD9F007D3C25 /* libimageCropPicker.a in Frameworks */,
|
||||
|
@ -647,7 +645,6 @@
|
|||
20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */,
|
||||
CE4E31B31D8695250033ED64 /* Statusgo.framework in Frameworks */,
|
||||
20AB9EC61D47CC0300E7FD9C /* libRCTStatus.a in Frameworks */,
|
||||
925C1F471F7B73B20063DFA0 /* FirebaseCore.framework in Frameworks */,
|
||||
20B6B6871D92C42600CC5C6A /* QBImagePicker.framework in Frameworks */,
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
|
||||
146834051AC3E58100842450 /* libReact.a in Frameworks */,
|
||||
|
@ -670,10 +667,8 @@
|
|||
3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */,
|
||||
E0AD9E8F495A4907B65104BF /* libRCTImageResizer.a in Frameworks */,
|
||||
8E55E6877F950B81C8D711C5 /* libPods-StatusIm.a in Frameworks */,
|
||||
925C1F491F7B73B20063DFA0 /* FirebaseInstanceID.framework in Frameworks */,
|
||||
9EF0836B1F3B53AB00876A8F /* libReactNativeConfig.a in Frameworks */,
|
||||
B957A49EB0DE44D9A31CAF2D /* libRNSVG.a in Frameworks */,
|
||||
5974D2035B8B47E0946B63B6 /* libRNFIRMessaging.a in Frameworks */,
|
||||
91446A820DA5E1C15C24D2A7 /* Instabug.framework in Frameworks */,
|
||||
63AE4174241B852A045FAE1F /* InstabugCore.framework in Frameworks */,
|
||||
AB96C730942E49178F59AE6F /* libRNSecureRandom.a in Frameworks */,
|
||||
|
@ -802,6 +797,7 @@
|
|||
1E7837547A9A40E18AD63CF3 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
983F07442119C9D2004133ED /* message.wav */,
|
||||
2028E0111D4275BD00227DCD /* SF */,
|
||||
B23B48FE1E76917B006D4535 /* RobotoMono-Medium.ttf */,
|
||||
74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */,
|
||||
|
@ -883,6 +879,22 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
475D1EEE20B73EE000879A77 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
475D1EF220B73EE000879A77 /* libRNSecureRandom.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
475D1F8E20B7413500879A77 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
475D1FC020B7413500879A77 /* libRNFirebase.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5C1C8762251D6EF495FB2384 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -906,6 +918,7 @@
|
|||
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
475D1F8D20B7413500879A77 /* RNFirebase.xcodeproj */,
|
||||
9880471720650CBC00CEBFE0 /* ReactNativeTestFairy.xcodeproj */,
|
||||
9EF083381F3B538A00876A8F /* ReactNativeConfig.xcodeproj */,
|
||||
B2DEA0A41E49E32000FA28D6 /* RCTHttpServer.xcodeproj */,
|
||||
|
@ -934,7 +947,6 @@
|
|||
5E5A7625B76441D984EA8C0D /* RCTImageResizer.xcodeproj */,
|
||||
F3548417D8DA4362B6796A54 /* RNInstabug.xcodeproj */,
|
||||
1E74DC52A1E449A2BA858B14 /* RNSVG.xcodeproj */,
|
||||
F89A8F8005874B86B63C22E3 /* RNFIRMessaging.xcodeproj */,
|
||||
AF409BB755B94FB1BBA01927 /* RNSecureRandom.xcodeproj */,
|
||||
);
|
||||
name = Libraries;
|
||||
|
@ -978,14 +990,6 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
922C4C211F4D5C3F0033C753 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
922C4C4B1F4D5C3F0033C753 /* libRNFIRMessaging.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
92925B361F571DE600203EEB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1038,6 +1042,8 @@
|
|||
A97BA941B2FB44B4B66EE6D3 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
475D1FCD20B7415300879A77 /* libFirebaseCore.a */,
|
||||
475D1FCE20B7415300879A77 /* libFirebaseMessaging.a */,
|
||||
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */,
|
||||
925C1F7F1F7B73C00063DFA0 /* FirebaseMessaging.framework */,
|
||||
925C1F401F7B73B20063DFA0 /* FirebaseCore.framework */,
|
||||
|
@ -1094,14 +1100,6 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C20F3A6B20E5165A00757214 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C20F3A6F20E5165B00757214 /* libRNSecureRandom.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C90047C11FC47AF30002B8EA /* Recovered References */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1118,6 +1116,7 @@
|
|||
AF2BF381BC7B4EB0887F0091 /* libRNSVG.a */,
|
||||
7F752F17B1E04216B1337A72 /* libRNFIRMessaging.a */,
|
||||
1464A9A9E12F45068947C28F /* libRNSecureRandom.a */,
|
||||
0A9C79F2FD464877A7CC0BC2 /* libRNFirebase.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
|
@ -1310,8 +1309,8 @@
|
|||
ProjectRef = F090E261B9854867A728CE4F /* RealmReact.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 922C4C211F4D5C3F0033C753 /* Products */;
|
||||
ProjectRef = F89A8F8005874B86B63C22E3 /* RNFIRMessaging.xcodeproj */;
|
||||
ProductGroup = 475D1F8E20B7413500879A77 /* Products */;
|
||||
ProjectRef = 475D1F8D20B7413500879A77 /* RNFirebase.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 20B7D1161D3F74CD00B70F14 /* Products */;
|
||||
|
@ -1326,7 +1325,7 @@
|
|||
ProjectRef = F3548417D8DA4362B6796A54 /* RNInstabug.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = C20F3A6B20E5165A00757214 /* Products */;
|
||||
ProductGroup = 475D1EEE20B73EE000879A77 /* Products */;
|
||||
ProjectRef = AF409BB755B94FB1BBA01927 /* RNSecureRandom.xcodeproj */;
|
||||
},
|
||||
{
|
||||
|
@ -1456,6 +1455,20 @@
|
|||
remoteRef = 20B7D1281D3F74CD00B70F14 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
475D1EF220B73EE000879A77 /* libRNSecureRandom.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNSecureRandom.a;
|
||||
remoteRef = 475D1EF120B73EE000879A77 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
475D1FC020B7413500879A77 /* libRNFirebase.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNFirebase.a;
|
||||
remoteRef = 475D1FBF20B7413500879A77 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
5537E2AA20650E640085CED4 /* libjsinspector.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -1484,13 +1497,6 @@
|
|||
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
922C4C4B1F4D5C3F0033C753 /* libRNFIRMessaging.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNFIRMessaging.a;
|
||||
remoteRef = 922C4C4A1F4D5C3F0033C753 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
92925B681F571DE600203EEB /* libRNSVG.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -1596,13 +1602,6 @@
|
|||
remoteRef = B2DEA0B01E49E32000FA28D6 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
C20F3A6F20E5165B00757214 /* libRNSecureRandom.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNSecureRandom.a;
|
||||
remoteRef = C20F3A6E20E5165B00757214 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
C90047CD1FC47AF50002B8EA /* libRCTBlob-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -1780,6 +1779,7 @@
|
|||
files = (
|
||||
9ED2F4611D9D579900B36508 /* SF-UI-Text-Bold.otf in Resources */,
|
||||
9E0B01A11DDC5DA7002B0359 /* SF-UI-Text-Light.otf in Resources */,
|
||||
983F077E2119C9D2004133ED /* message.wav in Resources */,
|
||||
9ED2F45E1D9D535A00B36508 /* SF-UI-Text-Regular.otf in Resources */,
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */,
|
||||
9ED2F45F1D9D535A00B36508 /* SF-UI-Text-Medium.otf in Resources */,
|
||||
|
@ -1945,6 +1945,7 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -1989,6 +1990,7 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -2034,10 +2036,12 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-config/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-svg/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fcm/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-testfairy/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-securerandom/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/messaging",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/notifications",
|
||||
);
|
||||
INFOPLIST_FILE = StatusIm/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
|
@ -2096,10 +2100,12 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-config/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-svg/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fcm/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-testfairy/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-securerandom/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/messaging",
|
||||
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/notifications",
|
||||
);
|
||||
INFOPLIST_FILE = StatusIm/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@import UserNotifications;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate,UNUserNotificationCenterDelegate>
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
|
||||
|
|
|
@ -16,8 +16,10 @@
|
|||
#import "RCTRootView.h"
|
||||
#import "SplashScreen.h"
|
||||
#import "TestFairy.h"
|
||||
#import "RNFIRMessaging.h"
|
||||
#import "RCTLinkingManager.h"
|
||||
#import <Firebase.h>
|
||||
#import "RNFirebaseNotifications.h"
|
||||
#import "RNFirebaseMessaging.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
@ -64,6 +66,11 @@ RCTLogFunction RCTTestFairyLogFunction = ^(
|
|||
signal(SIGPIPE, SIG_IGN);
|
||||
NSURL *jsCodeLocation;
|
||||
|
||||
[FIRApp configure];
|
||||
[RNFirebaseNotifications configure];
|
||||
[application registerForRemoteNotifications];
|
||||
|
||||
|
||||
/* Set logging level from React Native */
|
||||
NSString *logLevel = [ReactNativeConfig envFor:@"LOG_LEVEL"];
|
||||
if([logLevel isEqualToString:@"error"]){
|
||||
|
@ -95,29 +102,20 @@ RCTLogFunction RCTTestFairyLogFunction = ^(
|
|||
[self.window makeKeyAndVisible];
|
||||
[SplashScreen show];
|
||||
|
||||
[FIRApp configure];
|
||||
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler
|
||||
{
|
||||
[RNFIRMessaging willPresentNotification:notification withCompletionHandler:completionHandler];
|
||||
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
|
||||
[[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
|
||||
}
|
||||
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler
|
||||
{
|
||||
[RNFIRMessaging didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
|
||||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
|
||||
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
|
||||
[[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
|
||||
}
|
||||
|
||||
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
|
||||
[RNFIRMessaging didReceiveLocalNotification:notification];
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
|
||||
[RNFIRMessaging didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
|
||||
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
|
||||
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
|
|
|
@ -5547,6 +5547,69 @@
|
|||
"mimic-fn": "1.2.0"
|
||||
}
|
||||
},
|
||||
"opencollective": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz",
|
||||
"integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=",
|
||||
"requires": {
|
||||
"babel-polyfill": "6.23.0",
|
||||
"chalk": "1.1.3",
|
||||
"inquirer": "3.0.6",
|
||||
"minimist": "1.2.0",
|
||||
"node-fetch": "1.6.3",
|
||||
"opn": "4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-escapes": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
|
||||
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz",
|
||||
"integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=",
|
||||
"requires": {
|
||||
"ansi-escapes": "1.4.0",
|
||||
"chalk": "1.1.3",
|
||||
"cli-cursor": "2.1.0",
|
||||
"cli-width": "2.2.0",
|
||||
"external-editor": "2.2.0",
|
||||
"figures": "2.0.0",
|
||||
"lodash": "4.17.10",
|
||||
"mute-stream": "0.0.7",
|
||||
"run-async": "2.3.0",
|
||||
"rx": "4.1.0",
|
||||
"string-width": "2.1.1",
|
||||
"strip-ansi": "3.0.1",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz",
|
||||
"integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=",
|
||||
"requires": {
|
||||
"encoding": "0.1.12",
|
||||
"is-stream": "1.1.0"
|
||||
}
|
||||
},
|
||||
"opn": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
|
||||
"integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=",
|
||||
"requires": {
|
||||
"object-assign": "4.1.1",
|
||||
"pinkie-promise": "2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"opn": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
|
||||
|
@ -5832,6 +5895,11 @@
|
|||
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
||||
"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
|
||||
},
|
||||
"postinstall-build": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/postinstall-build/-/postinstall-build-5.0.1.tgz",
|
||||
"integrity": "sha1-uRepB5smF42aJK9aXNjLSpkdEbk="
|
||||
},
|
||||
"preserve": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
|
||||
|
@ -6234,16 +6302,33 @@
|
|||
"resolved": "https://registry.npmjs.org/react-native-dialogs/-/react-native-dialogs-0.0.20.tgz",
|
||||
"integrity": "sha512-HeoU9d7wWUUAtxjcIJLaeIs/eYS2ZHTNh3kboeCKngLvfvgptd/7vZXwXdQ+xeOEek+cm95kDfMJQd2xnb+4wA=="
|
||||
},
|
||||
"react-native-fcm": {
|
||||
"version": "10.0.3",
|
||||
"resolved": "https://registry.npmjs.org/react-native-fcm/-/react-native-fcm-10.0.3.tgz",
|
||||
"integrity": "sha1-HcU47YifkLelvB0FMMxRbmmwnow="
|
||||
},
|
||||
"react-native-fetch-polyfill": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-fetch-polyfill/-/react-native-fetch-polyfill-1.1.2.tgz",
|
||||
"integrity": "sha1-JWtaCr14zEmS96fPglQ9ovISSnM="
|
||||
},
|
||||
"react-native-firebase": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-firebase/-/react-native-firebase-4.2.0.tgz",
|
||||
"integrity": "sha512-HGmvsToYD9qrVoe0u/kXSNG6lHvPah9bbC1Rvt/L5669kHs7oSufS9SM0QzDpEw8QEstXCrB/yg+57VEsUUtFw==",
|
||||
"requires": {
|
||||
"opencollective": "1.0.3",
|
||||
"postinstall-build": "5.0.1",
|
||||
"prop-types": "15.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"prop-types": {
|
||||
"version": "15.6.1",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz",
|
||||
"integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==",
|
||||
"requires": {
|
||||
"fbjs": "0.8.16",
|
||||
"loose-envify": "1.3.1",
|
||||
"object-assign": "4.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-native-fs": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-fs/-/react-native-fs-2.8.1.tgz",
|
||||
|
@ -6813,6 +6898,11 @@
|
|||
"is-promise": "2.1.0"
|
||||
}
|
||||
},
|
||||
"rx": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz",
|
||||
"integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I="
|
||||
},
|
||||
"rx-lite": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
"react-native-config": "0.9.0",
|
||||
"react-native-crypto": "2.1.1",
|
||||
"react-native-dialogs": "0.0.20",
|
||||
"react-native-fcm": "10.0.3",
|
||||
"react-native-fetch-polyfill": "1.1.2",
|
||||
"react-native-firebase": "4.2.0",
|
||||
"react-native-fs": "2.8.1",
|
||||
"react-native-http-bridge": "https://github.com/status-im/react-native-http-bridge.git",
|
||||
"react-native-i18n": "2.0.9",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
(def EventEmmiter (js/require "react-native/Libraries/vendor/emitter/EventEmitter"))
|
||||
(def fetch (.-default (js/require "react-native-fetch-polyfill")))
|
||||
(def i18n (js/require "react-native-i18n"))
|
||||
(def react-native-firebase (js/require "react-native-firebase"))
|
||||
(def camera #js {:constants {:Aspect "Portrait"}})
|
||||
(def dialogs #js {})
|
||||
(def dismiss-keyboard #js {})
|
||||
|
@ -20,8 +21,6 @@
|
|||
(def instabug #js {:IBGLog ( fn [])})
|
||||
(def nfc #js {})
|
||||
(def svg #js {})
|
||||
(def react-native-fcm #js {:default #js {:getFCMToken (fn [])
|
||||
:requestPermissions (fn [])}})
|
||||
(def snoopy #js {})
|
||||
(def snoopy-filter #js {})
|
||||
(def snoopy-bars #js {})
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
(def image-resizer (js/require "react-native-image-resizer"))
|
||||
(def instabug (js/require "instabug-reactnative"))
|
||||
(def svg (js/require "react-native-svg"))
|
||||
(def react-native-fcm (js/require "react-native-fcm"))
|
||||
(def react-native-firebase (js/require "react-native-firebase"))
|
||||
(def snoopy (js/require "rn-snoopy"))
|
||||
(def snoopy-filter (js/require "rn-snoopy/stream/filter"))
|
||||
(def snoopy-bars (js/require "rn-snoopy/stream/bars"))
|
||||
|
|
|
@ -60,9 +60,8 @@
|
|||
(.addEventListener react/app-state "change" app-state-change-handler))
|
||||
:component-did-mount
|
||||
(fn []
|
||||
(notifications/on-refresh-fcm-token)
|
||||
;; TODO(oskarth): Background click_action handler
|
||||
(notifications/on-notification))
|
||||
(notifications/init))
|
||||
:component-will-unmount
|
||||
(fn []
|
||||
(.stop react/http-bridge)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
(ns status-im.chat.models.message
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.utils.core :as utils]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.utils.ethereum.core :as ethereum]
|
||||
[status-im.utils.datetime :as time]
|
||||
[status-im.chat.models :as chat-model]
|
||||
|
@ -10,6 +12,7 @@
|
|||
[status-im.utils.clocks :as utils.clocks]
|
||||
[status-im.utils.handlers-macro :as handlers-macro]
|
||||
[status-im.utils.money :as money]
|
||||
[status-im.utils.notifications :as notifications]
|
||||
[status-im.transport.utils :as transport.utils]
|
||||
[status-im.transport.message.core :as transport]
|
||||
[status-im.transport.message.v1.protocol :as protocol]
|
||||
|
@ -132,6 +135,18 @@
|
|||
(= constants/content-type-command-request content-type)
|
||||
(assoc :content-type constants/content-type-command)))
|
||||
|
||||
(defn- display-notification [chat-id cofx]
|
||||
(when config/in-app-notifications-enabled?
|
||||
(let [view-id (get-in cofx [:db :view-id])
|
||||
from (get-in cofx [:db :current-public-key])
|
||||
current-chat-id (get-in cofx [:db :current-chat-id])]
|
||||
(when-not (and (= :chat view-id)
|
||||
(= current-chat-id chat-id))
|
||||
{:display-notification-fx {:title (i18n/label :notifications-new-message-title)
|
||||
:body (i18n/label :notifications-new-message-body)
|
||||
:to chat-id
|
||||
:from from}}))))
|
||||
|
||||
(defn- add-received-message
|
||||
[batch?
|
||||
{:keys [from message-id chat-id content content-type clock-value js-obj] :as raw-message}
|
||||
|
@ -157,6 +172,7 @@
|
|||
current-chat? :seen
|
||||
:else :received))
|
||||
(commands-receiving/receive message)
|
||||
(display-notification chat-id)
|
||||
(send-message-seen chat-id message-id (and (not public?)
|
||||
current-chat?
|
||||
(not (chat-model/bot-only-chat? db chat-id))
|
||||
|
@ -258,8 +274,11 @@
|
|||
|
||||
(defn send-push-notification [fcm-token status cofx]
|
||||
(when (and fcm-token (= status :sent))
|
||||
{:send-notification {:message "message"
|
||||
:payload {:title "Status" :body "You have a new message"}
|
||||
{:send-notification {:message (js/JSON.stringify #js {:from (get-in cofx [:db :current-public-key])
|
||||
:to (get-in cofx [:db :current-chat-id])})
|
||||
:payload {:title (i18n/label :notifications-new-message-title)
|
||||
:body (i18n/label :notifications-new-message-body)
|
||||
:sound notifications/sound-name}
|
||||
:tokens [fcm-token]}}))
|
||||
|
||||
(defn update-message-status [{:keys [chat-id message-id from]} status {:keys [db]}]
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
(.addEventListener react/app-state "change" app-state-change-handler))
|
||||
:component-did-mount
|
||||
(fn []
|
||||
(notifications/on-refresh-fcm-token)
|
||||
(notifications/on-notification))
|
||||
(notifications/init))
|
||||
:component-will-unmount
|
||||
(fn []
|
||||
(.stop react/http-bridge)
|
||||
|
|
|
@ -108,6 +108,10 @@
|
|||
:delete-message "Delete message"
|
||||
:sent-at "Sent at"
|
||||
|
||||
;;notifications
|
||||
:notifications-new-message-body "You have new message"
|
||||
:notifications-new-message-title "Status"
|
||||
|
||||
;;datetime
|
||||
:datetime-ago-format "{{number}} {{time-intervals}} {{ago}}"
|
||||
:datetime-second {:one "second"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
[status-im.native-module.core :as status]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.utils.keychain.core :as keychain]
|
||||
[status-im.utils.notifications :as notifications]
|
||||
[status-im.utils.universal-links.core :as universal-links]))
|
||||
|
||||
;;;; FX
|
||||
|
@ -131,4 +132,5 @@
|
|||
:dispatch [:initialize-account address
|
||||
(when (not= view-id :create-account)
|
||||
[[:navigate-to-clean :home]
|
||||
(universal-links/stored-url-event cofx)])]})
|
||||
(universal-links/stored-url-event cofx)
|
||||
(notifications/stored-event address cofx)])]})
|
||||
|
|
|
@ -53,7 +53,9 @@
|
|||
:chat/spam-messages-frequency 0
|
||||
:tooltips {}
|
||||
:desktop/desktop {:tab-view-id :home}
|
||||
:dimensions/window (dimensions/window)})
|
||||
:dimensions/window (dimensions/window)
|
||||
:push-notifications/stored {}
|
||||
:push-notifications/initial? false})
|
||||
|
||||
;;;;GLOBAL
|
||||
|
||||
|
@ -161,6 +163,12 @@
|
|||
;; DIMENSIONS
|
||||
(spec/def :dimensions/window map?)
|
||||
|
||||
;; PUSH NOTIFICATIONS
|
||||
|
||||
(spec/def :push-notifications/stored (spec/nilable map?))
|
||||
; Shows that push notification used to start the application is processed
|
||||
(spec/def :push-notifications/initial? (spec/nilable boolean?))
|
||||
|
||||
(spec/def ::db (allowed-keys
|
||||
:opt
|
||||
[:contacts/contacts
|
||||
|
@ -199,6 +207,8 @@
|
|||
:inbox/current-id
|
||||
:inbox/fetching?
|
||||
:universal-links/url
|
||||
:push-notifications/stored
|
||||
:push-notifications/initial?
|
||||
:browser/browsers
|
||||
:browser/options
|
||||
:new/open-dapp
|
||||
|
|
|
@ -213,20 +213,22 @@
|
|||
:on-accept handle-reset-data})
|
||||
|
||||
(defn initialize-views [{{:accounts/keys [accounts] :as db} :db}]
|
||||
{:db (if (empty? accounts)
|
||||
(assoc db :view-id :intro :navigation-stack (list :intro))
|
||||
(let [{:keys [address photo-path name]} (first (sort-by :last-sign-in > (vals accounts)))]
|
||||
(-> db
|
||||
(assoc :view-id :login
|
||||
:navigation-stack (list :login))
|
||||
(update :accounts/login assoc
|
||||
:address address
|
||||
:photo-path photo-path
|
||||
:name name))))})
|
||||
{:db (if (empty? accounts)
|
||||
(assoc db :view-id :intro :navigation-stack (list :intro))
|
||||
(let [{:keys [address photo-path name]} (first (sort-by :last-sign-in > (vals accounts)))]
|
||||
(-> db
|
||||
(assoc :view-id :login
|
||||
:navigation-stack (list :login))
|
||||
(update :accounts/login assoc
|
||||
:address address
|
||||
:photo-path photo-path
|
||||
:name name))))
|
||||
:handle-initial-push-notification-fx db})
|
||||
|
||||
(defn initialize-db
|
||||
"Initialize db to the initial state"
|
||||
[{{:universal-links/keys [url]
|
||||
:push-notifications/keys [initial?]
|
||||
:keys [status-module-initialized? status-node-started?
|
||||
network-status network peers-count peers-summary device-UUID]
|
||||
:or {network (get app-db :network)}} :db}]
|
||||
|
@ -239,6 +241,7 @@
|
|||
:status-node-started? status-node-started?
|
||||
:network network
|
||||
:universal-links/url url
|
||||
:push-notifications/initial? initial?
|
||||
:device-UUID device-UUID)})
|
||||
|
||||
;; Entrypoint, fetches the key from the keychain and initialize the app
|
||||
|
@ -292,7 +295,8 @@
|
|||
:initialize-account-db
|
||||
(fn [{:keys [accounts/accounts accounts/create contacts/contacts networks/networks
|
||||
network network-status peers-count peers-summary view-id navigation-stack
|
||||
status-module-initialized? status-node-started? device-UUID]
|
||||
status-module-initialized? status-node-started? device-UUID
|
||||
push-notifications/initial?]
|
||||
:or [network (get app-db :network)]} [_ address]]
|
||||
(let [console-contact (get contacts constants/console-chat-id)
|
||||
current-account (accounts address)
|
||||
|
@ -310,6 +314,7 @@
|
|||
:network-status network-status
|
||||
:network network
|
||||
:chain (ethereum/network->chain-name account-network)
|
||||
:push-notifications/initial? initial?
|
||||
:peers-summary peers-summary
|
||||
:peers-count peers-count
|
||||
:device-UUID device-UUID)
|
||||
|
|
|
@ -43,3 +43,4 @@
|
|||
(def group-chats-enabled? (enabled? (get-config :GROUP_CHATS_ENABLED)))
|
||||
(def spam-button-detection-enabled? (enabled? (get-config :SPAM_BUTTON_DETECTION_ENABLED "0")))
|
||||
(def mainnet-warning-enabled? (enabled? (get-config :MAINNET_WARNING_ENABLED 0)))
|
||||
(def in-app-notifications-enabled? (enabled? (get-config :IN_APP_NOTIFICATIONS_ENABLED 0)))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
(ns status-im.utils.notifications
|
||||
(:require [goog.object :as object]
|
||||
[re-frame.core :as re-frame :refer [dispatch reg-fx]]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.utils.handlers-macro :as handlers-macro]
|
||||
[status-im.utils.handlers :as handlers]
|
||||
[status-im.react-native.js-dependencies :as rn]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.ui.components.react :refer [copy-to-clipboard]]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.utils.platform :as platform]))
|
||||
|
@ -20,48 +20,167 @@
|
|||
(handlers/register-handler-fx
|
||||
:request-notifications-granted
|
||||
(fn [_ _]
|
||||
(re-frame.core/dispatch [:show-mainnet-is-default-alert])))
|
||||
(re-frame/dispatch [:show-mainnet-is-default-alert])))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:request-notifications-denied
|
||||
(fn [_ _]
|
||||
(re-frame.core/dispatch [:show-mainnet-is-default-alert])))
|
||||
(re-frame/dispatch [:show-mainnet-is-default-alert])))
|
||||
|
||||
(def firebase (object/get rn/react-native-firebase "default"))
|
||||
|
||||
;; NOTE: Only need to explicitly request permissions on iOS.
|
||||
(defn request-permissions []
|
||||
(if platform/desktop?
|
||||
(dispatch [:request-notifications-granted {}])
|
||||
(-> (.requestPermissions (.-default rn/react-native-fcm))
|
||||
(re-frame/dispatch [:request-notifications-granted {}])
|
||||
(-> (.requestPermission (.messaging firebase))
|
||||
(.then
|
||||
(fn [_]
|
||||
(log/debug "notifications-granted")
|
||||
(dispatch [:request-notifications-granted {}]))
|
||||
(re-frame/dispatch [:request-notifications-granted {}]))
|
||||
(fn [_]
|
||||
(log/debug "notifications-denied")
|
||||
(dispatch [:request-notifications-denied {}]))))))
|
||||
(re-frame/dispatch [:request-notifications-denied {}]))))))
|
||||
|
||||
(defn get-fcm-token []
|
||||
(-> (.getFCMToken (object/get rn/react-native-fcm "default"))
|
||||
(-> (.getToken (.messaging firebase))
|
||||
(.then (fn [x]
|
||||
(log/debug "get-fcm-token: " x)
|
||||
(dispatch [:update-fcm-token x])))))
|
||||
(re-frame/dispatch [:update-fcm-token x])))))
|
||||
|
||||
(defn on-refresh-fcm-token []
|
||||
(.on (.-default rn/react-native-fcm)
|
||||
(.-RefreshToken (.-FCMEvent rn/react-native-fcm))
|
||||
(fn [x]
|
||||
(log/debug "on-refresh-fcm-token: " x)
|
||||
(dispatch [:update-fcm-token x]))))
|
||||
(.onTokenRefresh (.messaging firebase)
|
||||
(fn [x]
|
||||
(log/debug "on-refresh-fcm-token: " x)
|
||||
(re-frame/dispatch [:update-fcm-token x]))))
|
||||
|
||||
;; TODO(oskarth): Only called in background on iOS right now.
|
||||
;; NOTE(oskarth): Hardcoded data keys :sum and :msg in status-go right now.
|
||||
(defn on-notification []
|
||||
(.on (.-default rn/react-native-fcm)
|
||||
(.-Notification (.-FCMEvent rn/react-native-fcm))
|
||||
(fn [event-js]
|
||||
(let [event (js->clj event-js :keywordize-keys true)
|
||||
data (select-keys event [:sum :msg])
|
||||
aps (:aps event)]
|
||||
(log/debug "on-notification event: " (pr-str event))
|
||||
(log/debug "on-notification aps: " (pr-str aps))
|
||||
(log/debug "on-notification data: " (pr-str data))))))
|
||||
(.onNotification (.notifications firebase)
|
||||
(fn [event-js]
|
||||
(let [event (js->clj event-js :keywordize-keys true)
|
||||
data (select-keys event [:sum :msg])
|
||||
aps (:aps event)]
|
||||
(log/debug "on-notification event: " (pr-str event))
|
||||
(log/debug "on-notification aps: " (pr-str aps))
|
||||
(log/debug "on-notification data: " (pr-str data))))))
|
||||
|
||||
(def channel-id "status-im")
|
||||
(def channel-name "Status")
|
||||
(def sound-name "message.wav")
|
||||
(def group-id "im.status.ethereum.MESSAGE")
|
||||
(def icon "ic_stat_status_notification")
|
||||
|
||||
(defn create-notification-channel []
|
||||
(let [channel (firebase.notifications.Android.Channel. channel-id
|
||||
channel-name
|
||||
firebase.notifications.Android.Importance.Max)]
|
||||
(.setSound channel sound-name)
|
||||
(.setShowBadge channel true)
|
||||
(.enableVibration channel true)
|
||||
(.. firebase
|
||||
notifications
|
||||
-android
|
||||
(createChannel channel)
|
||||
(then #(log/debug "Notification channel created:" channel-id)
|
||||
#(log/error "Notification channel creation error:" channel-id %)))))
|
||||
|
||||
(defn store-event [{:keys [from to]} {:keys [db] :as cofx}]
|
||||
(let [{:keys [address photo-path name]} (->> (get-in cofx [:db :accounts/accounts])
|
||||
vals
|
||||
(filter #(= (:public-key %) to))
|
||||
first)]
|
||||
(when address
|
||||
{:db (assoc-in db [:push-notifications/stored to] from)
|
||||
:dispatch [:open-login address photo-path name]})))
|
||||
|
||||
(defn process-initial-push-notification [{:keys [initial?]} {:keys [db]}]
|
||||
(when initial?
|
||||
{:db (assoc db :push-notifications/initial? true)}))
|
||||
|
||||
(defn process-push-notification [{:keys [from to] :as event} {:keys [db] :as cofx}]
|
||||
(let [current-public-key (get-in cofx [:db :current-public-key])]
|
||||
(if current-public-key
|
||||
(when (= to current-public-key)
|
||||
{:db (update db :push-notifications/stored dissoc to)
|
||||
:dispatch [:navigate-to-chat from]})
|
||||
(store-event event cofx))))
|
||||
|
||||
(defn handle-push-notification [cofx [_ event]]
|
||||
(handlers-macro/merge-fx cofx
|
||||
(process-initial-push-notification event)
|
||||
(process-push-notification event)))
|
||||
|
||||
(defn stored-event [address cofx]
|
||||
(let [to (get-in cofx [:db :accounts/accounts address :public-key])
|
||||
from (get-in cofx [:db :push-notifications/stored to])]
|
||||
(when from
|
||||
[:handle-push-notification {:from from
|
||||
:to to}])))
|
||||
|
||||
(defn parse-notification-payload [s]
|
||||
(try
|
||||
(js/JSON.parse s)
|
||||
(catch :default _
|
||||
#js {})))
|
||||
|
||||
(defn handle-notification-event [event {:keys [initial?]}]
|
||||
(let [msg (object/get (.. event -notification -data) "msg")
|
||||
data (parse-notification-payload msg)
|
||||
from (object/get data "from")
|
||||
to (object/get data "to")]
|
||||
(log/debug "on notification" (pr-str msg))
|
||||
(when (and from to)
|
||||
(re-frame/dispatch [:handle-push-notification {:from from
|
||||
:to to
|
||||
:initial? initial?}]))))
|
||||
|
||||
(defn on-notification-opened []
|
||||
(.. firebase
|
||||
notifications
|
||||
(onNotificationOpened handle-notification-event)))
|
||||
|
||||
(def notification (firebase.notifications.Notification.))
|
||||
|
||||
;; API reference https://rnfirebase.io/docs/v4.2.x/notifications/reference/AndroidNotification
|
||||
(defn display-notification [{:keys [title body from to]}]
|
||||
(.. notification
|
||||
(setTitle title)
|
||||
(setBody body)
|
||||
(setData (js/JSON.stringify #js {:from from
|
||||
:to to}))
|
||||
(setSound sound-name)
|
||||
(-android.setChannelId channel-id)
|
||||
(-android.setAutoCancel true)
|
||||
(-android.setPriority firebase.notifications.Android.Priority.Max)
|
||||
(-android.setGroup group-id)
|
||||
(-android.setGroupSummary true)
|
||||
(-android.setSmallIcon icon))
|
||||
(.. firebase
|
||||
notifications
|
||||
(displayNotification notification)
|
||||
(then #(log/debug "Display Notification" title body))
|
||||
(then #(log/debug "Display Notification error" title body))))
|
||||
|
||||
(re-frame/reg-fx :display-notification-fx display-notification)
|
||||
|
||||
(handlers/register-handler-fx :handle-push-notification handle-push-notification)
|
||||
|
||||
(re-frame/reg-fx
|
||||
:handle-initial-push-notification-fx
|
||||
(fn [{:keys [push-notifications/initial?]}]
|
||||
(when-not initial?
|
||||
(.. firebase
|
||||
notifications
|
||||
getInitialNotification
|
||||
(then (fn [event]
|
||||
(when event
|
||||
(handle-notification-event event {:initial? true}))))))))
|
||||
|
||||
(defn init []
|
||||
(on-refresh-fcm-token)
|
||||
(on-notification)
|
||||
(on-notification-opened)
|
||||
(when platform/android?
|
||||
(create-notification-channel)))
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
(def vector-icons #js {:default #js {}})
|
||||
(def webview-bridge #js {:default #js {}})
|
||||
(def svg #js {:default #js {}})
|
||||
(def react-native-fcm #js {:default #js {}})
|
||||
|
||||
(defrecord Notification [])
|
||||
(def react-native-firebase #js {:default #js {:notifications #js {:Notification Notification}}})
|
||||
|
||||
(def snoopy #js {:default #js {}})
|
||||
(def snoopy-filter #js {:default #js {}})
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
(ns status-im.test.utils.notifications
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im.utils.notifications :as notifications]))
|
||||
|
||||
(deftest test-handle-push-notification
|
||||
(testing "user's signed in"
|
||||
(is (= {:db {:current-public-key "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"
|
||||
:push-notifications/stored {}}
|
||||
:dispatch [:navigate-to-chat "0x045db1fdb16c4721ddf32e892c5156d9c7a7445482b84ccd41131eb7970f9d623629d86763c5c2a542ae372815125c27eb73535d583d3285bdbfa16ba37f42e2de"]}
|
||||
(notifications/handle-push-notification {:db {:push-notifications/stored {}
|
||||
:current-public-key "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"}}
|
||||
[:push-notification-opened {:from "0x045db1fdb16c4721ddf32e892c5156d9c7a7445482b84ccd41131eb7970f9d623629d86763c5c2a542ae372815125c27eb73535d583d3285bdbfa16ba37f42e2de"
|
||||
:to "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"}]))))
|
||||
(testing "user's signed in into another account"
|
||||
(is (= {}
|
||||
(notifications/handle-push-notification {:db {:current-public-key "0x04bc8bf4a91ab726bd98f2c54b3036caacaeea527867945ab839e9ad4e62696856d7f7fa485f68304de357e38a1553eac5592706a16fcf71fd821bbd6c796f9ab3"}}
|
||||
[:push-notification-opened {:from "0x045db1fdb16c4721ddf32e892c5156d9c7a7445482b84ccd41131eb7970f9d623629d86763c5c2a542ae372815125c27eb73535d583d3285bdbfa16ba37f42e2de"
|
||||
:to "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"}]))))
|
||||
(testing "user's not signed in"
|
||||
(is (= {:db {:accounts/accounts {"bd36cd64e2621b054a3b7464ff1b3c4c304880e7" {:address "bd36cd64e2621b054a3b7464ff1b3c4c304880e7"
|
||||
:photo-path "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX"
|
||||
:name "Bob"
|
||||
:public-key "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"}}
|
||||
:current-public-key nil
|
||||
:push-notifications/initial? true
|
||||
:push-notifications/stored {"0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"
|
||||
"0x045db1fdb16c4721ddf32e892c5156d9c7a7445482b84ccd41131eb7970f9d623629d86763c5c2a542ae372815125c27eb73535d583d3285bdbfa16ba37f42e2de"}}
|
||||
:dispatch [:open-login "bd36cd64e2621b054a3b7464ff1b3c4c304880e7" "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX" "Bob"]}
|
||||
(notifications/handle-push-notification {:db {:accounts/accounts {"bd36cd64e2621b054a3b7464ff1b3c4c304880e7" {:address "bd36cd64e2621b054a3b7464ff1b3c4c304880e7"
|
||||
:photo-path "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX"
|
||||
:name "Bob"
|
||||
:public-key "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"}}
|
||||
:current-public-key nil
|
||||
:push-notifications/stored {}}}
|
||||
[:push-notification-opened {:from "0x045db1fdb16c4721ddf32e892c5156d9c7a7445482b84ccd41131eb7970f9d623629d86763c5c2a542ae372815125c27eb73535d583d3285bdbfa16ba37f42e2de"
|
||||
:to "0x04d2e59a7501a7bc5bc8bf973a0ab95d06225e2b0f53d5f6be719d857c579bdc1b809bfbe0e8393343f9a5b63a9a90a1a58329c6d1c286d6929f01aaa5472ca9c2"
|
||||
:initial? true}])))))
|
Loading…
Reference in New Issue