enabling push notifications

This commit is contained in:
Roland Osborne 2025-01-14 14:53:20 -08:00
parent 905525588e
commit b557c1e639
17 changed files with 10007 additions and 11081 deletions

View File

@ -1,6 +1,7 @@
apply plugin: "com.android.application" apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android" apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react" apply plugin: "com.facebook.react"
apply plugin: "com.google.gms.google-services"
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle") apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
/** /**

View File

@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "627079362503",
"project_id": "databag-b46e0",
"storage_bucket": "databag-b46e0.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:627079362503:android:6f3dfcb2c255787b4a8be2",
"android_client_info": {
"package_name": "com.databag"
}
},
"oauth_client": [
{
"client_id": "627079362503-8bk8o4hcv5rgdgrhik6nu9cjp3poisv7.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAb92cvtSnaoQzhbDizg0dFskOtZFp_58M"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "627079362503-8bk8o4hcv5rgdgrhik6nu9cjp3poisv7.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@ -15,6 +15,7 @@ buildscript {
classpath("com.android.tools.build:gradle") classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin") classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("com.google.gms:google-services:4.4.2")
} }
} }

View File

@ -6,5 +6,12 @@ import './gesture-handler';
import {AppRegistry} from 'react-native'; import {AppRegistry} from 'react-native';
import App from './App'; import App from './App';
import {name as appName} from './app.json'; import {name as appName} from './app.json';
import messaging from '@react-native-firebase/messaging';
console.log("CALLING REGISTER DEVICE");
messaging().registerDeviceForRemoteMessages().then(() => { console.log("REGISTER SUCCESS!!!!"); });
messaging().setBackgroundMessageHandler(async remoteMessage => {});
AppRegistry.registerComponent(appName, () => App); AppRegistry.registerComponent(appName, () => App);

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#import <Firebase.h>
#import <React/RCTBundleURLProvider.h> #import <React/RCTBundleURLProvider.h>
@ -6,6 +7,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
[FIRApp configure];
self.moduleName = @"Databag"; self.moduleName = @"Databag";
// You can add your custom initial props in the dictionary below. // You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native. // They will be passed down to the ViewController used by React Native.

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>

View File

@ -4,21 +4,23 @@
<dict> <dict>
<key>NSPrivacyAccessedAPITypes</key> <key>NSPrivacyAccessedAPITypes</key>
<array> <array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
<dict> <dict>
<key>NSPrivacyAccessedAPIType</key> <key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string> <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key> <key>NSPrivacyAccessedAPITypeReasons</key>
<array> <array>
<string>CA92.1</string> <string>CA92.1</string>
<string>1C8F.1</string>
<string>C56D.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>3B52.1</string>
</array> </array>
</dict> </dict>
<dict> <dict>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>627079362503-juslol5o5odeki2agop3705pn6rfsb5n.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.627079362503-juslol5o5odeki2agop3705pn6rfsb5n</string>
<key>API_KEY</key>
<string>AIzaSyBZr5HTRVFmZL8U_8I1WvRaYzNjK8lBM7Y</string>
<key>GCM_SENDER_ID</key>
<string>627079362503</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>org.coredb.databag</string>
<key>PROJECT_ID</key>
<string>databag-b46e0</string>
<key>STORAGE_BUCKET</key>
<string>databag-b46e0.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:627079362503:ios:a3ddad40939b71a44a8be2</string>
</dict>
</plist>

View File

@ -17,6 +17,8 @@ end
target 'Databag' do target 'Databag' do
config = use_native_modules! config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!( use_react_native!(
:path => config[:reactNativePath], :path => config[:reactNativePath],
# An absolute path to your application root. # An absolute path to your application root.

View File

@ -2,11 +2,71 @@ PODS:
- boost (1.84.0) - boost (1.84.0)
- DoubleConversion (1.1.6) - DoubleConversion (1.1.6)
- FBLazyVector (0.75.2) - FBLazyVector (0.75.2)
- Firebase/CoreOnly (11.5.0):
- FirebaseCore (= 11.5.0)
- Firebase/Messaging (11.5.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 11.5.0)
- FirebaseCore (11.5.0):
- FirebaseCoreInternal (= 11.5)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.5.0):
- FirebaseCore (= 11.5)
- FirebaseCoreInternal (11.5.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseInstallations (11.5.0):
- FirebaseCore (= 11.5)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (11.5.0):
- FirebaseCore (= 11.5)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Reachability (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- fmt (9.1.0) - fmt (9.1.0)
- glog (0.3.5) - glog (0.3.5)
- GoogleDataTransport (10.1.0):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.0.2):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.0.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.0.2)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.0.2)
- GoogleUtilities/Reachability (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- hermes-engine (0.75.2): - hermes-engine (0.75.2):
- hermes-engine/Pre-built (= 0.75.2) - hermes-engine/Pre-built (= 0.75.2)
- hermes-engine/Pre-built (0.75.2) - hermes-engine/Pre-built (0.75.2)
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- PromisesObjC (2.4.0)
- RCT-Folly (2024.01.01.00): - RCT-Folly (2024.01.01.00):
- boost - boost
- DoubleConversion - DoubleConversion
@ -1289,7 +1349,7 @@ PODS:
- React-Core - React-Core
- react-native-sqlite-storage (6.0.1): - react-native-sqlite-storage (6.0.1):
- React-Core - React-Core
- react-native-video (6.9.0): - react-native-video (6.9.1):
- DoubleConversion - DoubleConversion
- glog - glog
- hermes-engine - hermes-engine
@ -1302,7 +1362,7 @@ PODS:
- React-featureflags - React-featureflags
- React-graphics - React-graphics
- React-ImageManager - React-ImageManager
- react-native-video/Video (= 6.9.0) - react-native-video/Video (= 6.9.1)
- React-NativeModulesApple - React-NativeModulesApple
- React-RCTFabric - React-RCTFabric
- React-rendererdebug - React-rendererdebug
@ -1311,7 +1371,7 @@ PODS:
- ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core - ReactCommon/turbomodule/core
- Yoga - Yoga
- react-native-video/Video (6.9.0): - react-native-video/Video (6.9.1):
- DoubleConversion - DoubleConversion
- glog - glog
- hermes-engine - hermes-engine
@ -1594,11 +1654,19 @@ PODS:
- React-utils (= 0.75.2) - React-utils (= 0.75.2)
- rn-fetch-blob (0.12.0): - rn-fetch-blob (0.12.0):
- React-Core - React-Core
- RNCClipboard (1.15.0): - RNCClipboard (1.16.0):
- React-Core - React-Core
- RNFBApp (21.6.2):
- Firebase/CoreOnly (= 11.5.0)
- React-Core
- RNFBMessaging (21.6.2):
- Firebase/Messaging (= 11.5.0)
- FirebaseCoreExtension
- React-Core
- RNFBApp
- RNFS (2.20.0): - RNFS (2.20.0):
- React-Core - React-Core
- RNGestureHandler (2.21.2): - RNGestureHandler (2.22.0):
- DoubleConversion - DoubleConversion
- glog - glog
- hermes-engine - hermes-engine
@ -1838,6 +1906,8 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`) - rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
- RNFS (from `../node_modules/react-native-fs`) - RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`) - RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
@ -1849,6 +1919,16 @@ DEPENDENCIES:
SPEC REPOS: SPEC REPOS:
trunk: trunk:
- Firebase
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
- GoogleDataTransport
- GoogleUtilities
- nanopb
- PromisesObjC
- SocketRocket - SocketRocket
- TOCropViewController - TOCropViewController
@ -1996,6 +2076,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/rn-fetch-blob" :path: "../node_modules/rn-fetch-blob"
RNCClipboard: RNCClipboard:
:path: "../node_modules/@react-native-clipboard/clipboard" :path: "../node_modules/@react-native-clipboard/clipboard"
RNFBApp:
:path: "../node_modules/@react-native-firebase/app"
RNFBMessaging:
:path: "../node_modules/@react-native-firebase/messaging"
RNFS: RNFS:
:path: "../node_modules/react-native-fs" :path: "../node_modules/react-native-fs"
RNGestureHandler: RNGestureHandler:
@ -2017,10 +2101,20 @@ SPEC CHECKSUMS:
boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 boost: 4cb898d0bf20404aab1850c656dcea009429d6c1
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
FBLazyVector: 38bb611218305c3bc61803e287b8a81c6f63b619 FBLazyVector: 38bb611218305c3bc61803e287b8a81c6f63b619
Firebase: 7a56fe4f56b5ab81b86a6822f5b8f909ae6fc7e2
FirebaseCore: 93abc05437f8064cd2bc0a53b768fb0bc5a1d006
FirebaseCoreExtension: ddb2eb987f736b714d30f6386795b52c4670439e
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
FirebaseInstallations: d8063d302a426d114ac531cd82b1e335a0565745
FirebaseMessaging: 9f4e42053241bd45ce8565c881bfdd9c1df2f7da
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: 69ef571f3de08433d766d614c73a9838a06bf7eb glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
hermes-engine: 3b6e0717ca847e2fc90a201e59db36caf04dee88 hermes-engine: 3b6e0717ca847e2fc90a201e59db36caf04dee88
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
RCTDeprecation: 34cbf122b623037ea9facad2e92e53434c5c7422 RCTDeprecation: 34cbf122b623037ea9facad2e92e53434c5c7422
RCTRequired: 24c446d7bcd0f517d516b6265d8df04dc3eb1219 RCTRequired: 24c446d7bcd0f517d516b6265d8df04dc3eb1219
RCTTypeSafety: ef5e91bd791abd3a99b2c75fd565791102a66352 RCTTypeSafety: ef5e91bd791abd3a99b2c75fd565791102a66352
@ -2029,73 +2123,75 @@ SPEC CHECKSUMS:
React-Core: facd883836d8d1cc1949d2053c58eab5fb22eb75 React-Core: facd883836d8d1cc1949d2053c58eab5fb22eb75
React-CoreModules: f92a2cb11d22f6066823ca547c61e900325dfe44 React-CoreModules: f92a2cb11d22f6066823ca547c61e900325dfe44
React-cxxreact: f5595a4cbfe5a4e9d401dffa2c1c78bbbbbe75e4 React-cxxreact: f5595a4cbfe5a4e9d401dffa2c1c78bbbbbe75e4
React-debug: 4a91c177b5b2efcc546fb50bc2f676f3f589efab React-debug: 153b1899b6d9e2fde855577e1cd615f7448a03ac
React-defaultsnativemodule: bb94c3db425b01c760f41a253de8536b3f5497f0 React-defaultsnativemodule: 34d0c4dc9d31b2feb5a4f3b573f7c491566b6e08
React-domnativemodule: 6c581fd39812cafb024171e091c00905b2c3a3e2 React-domnativemodule: f3f516cd33070e162f1f6bb1ead5a245f0b97db7
React-Fabric: a33cc1fdc62a3085774783bb30970531589d2028 React-Fabric: 9be6d42b5a1f4353d9e23c2db8532d9e5ccfef4d
React-FabricComponents: 98de5f94cbd35d407f4fc78855298b562d8289cb React-FabricComponents: 897223a1dc15b4e8fa402cba057536cb10852963
React-FabricImage: 0ce8fd83844d9edef5825116d38f0e208b9ad786 React-FabricImage: f4aaac50854c2ef195b79d1d4315b9e32c5ca853
React-featureflags: 37a78859ad71db758e2efdcbdb7384afefa8701e React-featureflags: 357423aa521ff01107895810f8d9758f8147d64d
React-featureflagsnativemodule: 52b46e161a151b4653cf1762285e8e899d534e3f React-featureflagsnativemodule: 3d62c2171740d6f2f60b86f9a08c12b923817472
React-graphics: c16f1bab97a5d473831a79360d84300e93a614e5 React-graphics: e41a17337bf4f4dfba8f7315b8ca0a73296800d7
React-hermes: 7801f8c0e12f326524b461dc368d3e74f3d2a385 React-hermes: 7801f8c0e12f326524b461dc368d3e74f3d2a385
React-idlecallbacksnativemodule: 58de2ac968ee80947d19dc8fe20def607e5c2de8 React-idlecallbacksnativemodule: a7d8ee70043d0c42fad301768ae97997d1c5581c
React-ImageManager: 98a1e5b0b05528dde47ebcd953d916ac66d46c09 React-ImageManager: d24c9e2b772504aafde31455c39585a03377dece
React-jserrorhandler: 08f1c3465a71a6549c27ad82809ce145ad52d4f1 React-jserrorhandler: 571bbbb4569347172cc4c0985a493b7dade32634
React-jsi: 161428ab2c706d5fcd9878d260ff1513fdb356ab React-jsi: 161428ab2c706d5fcd9878d260ff1513fdb356ab
React-jsiexecutor: abfdc7526151c6755f836235bbaa53b267a0803c React-jsiexecutor: abfdc7526151c6755f836235bbaa53b267a0803c
React-jsinspector: f0786053a1a258a4d8dde859d1a820c26ee686f0 React-jsinspector: 02ca2651458d686f47b0803d420fefc1b9c97213
React-jsitracing: 52b849a77d02e2dc262a3031454c23be8dabb4d9 React-jsitracing: a63093da2909d8ee0d5a2224534cf605fa7adecc
React-logger: 8db32983d75dc2ad54f278f344ccb9b256e694fc React-logger: 8db32983d75dc2ad54f278f344ccb9b256e694fc
React-Mapbuffer: 1c08607305558666fd16678b85ef135e455d5c96 React-Mapbuffer: db173bede5ac5cb1c82d4a6a8597477ba87c5648
React-microtasksnativemodule: 87b8de96f937faefece8afd2cb3a518321b2ef99 React-microtasksnativemodule: 0c1d7b6f26fbeae097279569cf2430255fa3d3a9
react-native-blur: a1bf334589f44658a58a859b1f3defe28e367fcf react-native-blur: 0a96a365a933508e8ee20b9b26ee3cf508d618be
react-native-create-thumbnail: 4ffd51a6c02a9313edc74e2460cd07264221f554 react-native-create-thumbnail: 4ffd51a6c02a9313edc74e2460cd07264221f554
react-native-document-picker: 7343222102ece8aec51390717f47ad7119c7921f react-native-document-picker: 1928548d8b19bbc9f2219b01f1d350aa8ff76508
react-native-image-resizer: 6260ba497fb8d1a593c1c92ccd593f570df6f5b7 react-native-image-resizer: 6260ba497fb8d1a593c1c92ccd593f570df6f5b7
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
react-native-safe-area-context: 141eca0fd4e4191288dfc8b96a7c7e1c2983447a react-native-safe-area-context: 141eca0fd4e4191288dfc8b96a7c7e1c2983447a
react-native-sqlite-storage: f6d515e1c446d1e6d026aa5352908a25d4de3261 react-native-sqlite-storage: f6d515e1c446d1e6d026aa5352908a25d4de3261
react-native-video: 578ac626d299a6cece42477681b63a67a75280ca react-native-video: 439a3ee225579691a4b2b36c54c5e4c20676b6cb
React-nativeconfig: 57781b79e11d5af7573e6f77cbf1143b71802a6d React-nativeconfig: 5fc2b05a590eb704128f5a4fc8ea6fa7b847e6e8
React-NativeModulesApple: 7ff2e2cfb2e5fa5bdedcecf28ce37e696c6ef1e1 React-NativeModulesApple: 88313414ddffd1758f76042733e8f0297acfd502
React-perflogger: 8a360ccf603de6ddbe9ff8f54383146d26e6c936 React-perflogger: 8a360ccf603de6ddbe9ff8f54383146d26e6c936
React-performancetimeline: 3cfec915adcb3653a5a633b41e711903844c35d8 React-performancetimeline: 300691014905e8d25b36415fd2f248a2befcce61
React-RCTActionSheet: 1c0e26a88eec41215089cf4436e38188cfe9f01a React-RCTActionSheet: 1c0e26a88eec41215089cf4436e38188cfe9f01a
React-RCTAnimation: d87207841b1e2ae1389e684262ea8c73c887cb04 React-RCTAnimation: d87207841b1e2ae1389e684262ea8c73c887cb04
React-RCTAppDelegate: 4ec7824c0cc9cc4b146ca8ee0fd81b10c316a440 React-RCTAppDelegate: 4ec7824c0cc9cc4b146ca8ee0fd81b10c316a440
React-RCTBlob: 79b42cb7db55f34079297687a480dbcf37f023f6 React-RCTBlob: 79b42cb7db55f34079297687a480dbcf37f023f6
React-RCTFabric: 1dd1661db93716f8cb116e451bd9c211a8d15716 React-RCTFabric: 5015bcf3f9aa59817ad301ead0aa451e780fdb18
React-RCTImage: 0c10a75de59f7384a2a55545d5f36fe783e6ecda React-RCTImage: 0c10a75de59f7384a2a55545d5f36fe783e6ecda
React-RCTLinking: bf08f4f655bf777af292b8d97449072c8bb196ca React-RCTLinking: bf08f4f655bf777af292b8d97449072c8bb196ca
React-RCTNetwork: 1b690846b40fc5685af58e088720657db6814637 React-RCTNetwork: 1b690846b40fc5685af58e088720657db6814637
React-RCTSettings: 097e420926dd44153fb25174835b572aded224d6 React-RCTSettings: 097e420926dd44153fb25174835b572aded224d6
React-RCTText: d8fe2ae9f95b2ccd03b2f534286e938254791992 React-RCTText: d8fe2ae9f95b2ccd03b2f534286e938254791992
React-RCTVibration: 976466dba32c0981a836e45ce38bcd4c8d6d924e React-RCTVibration: 976466dba32c0981a836e45ce38bcd4c8d6d924e
React-rendererconsistency: ee0d6f1b4420e1ad5bb01c02170e7ecbd278e307 React-rendererconsistency: c6085ef7593a14a3ca07b82c533e8ce368403748
React-rendererdebug: 7fbf02f30d1e0bb0d96d65cf2548219cb53b29b6 React-rendererdebug: 945ef6d8128f429becb3769a81591c96e3802fd2
React-rncore: 7ffc5be03adbf0a5cbf1b654483f487a899cff08 React-rncore: 14846f4dd48ba5056b11ab89f4a5498f6f02f20f
React-RuntimeApple: e623f002e1871de30a443291171d3f2fb134a6ec React-RuntimeApple: 171b7b35ec9dc97ba358d691bea07fc81795ca3e
React-RuntimeCore: a67357d4f073b1dbe6fbefc5273072027f201e1c React-RuntimeCore: 7dcad4be47b656fdd67f7a6a78cf746948a11890
React-runtimeexecutor: 5bb52479abf8081086afb0397dc33dc97202a439 React-runtimeexecutor: 5bb52479abf8081086afb0397dc33dc97202a439
React-RuntimeHermes: 860cf64708a12a2fa62366fe51fe000121fa031b React-RuntimeHermes: bfada6b4eb293117496b0b0ef6d31a8142649596
React-runtimescheduler: fff88d51ad2c8815fc75930dbac224d680593e6b React-runtimescheduler: 9577260c8dd7c3c97eb6f5086441784fd5241f62
React-utils: 81a715d9c0a2a49047e77a86f3a2247408540deb React-utils: f908da1113885e2c08b25247e0ea892c68e2eaf6
ReactCodegen: 60973d382704c793c605b9be0fc7f31cb279442f ReactCodegen: de94475c4712a61ba0b1e1c25eb54db32f56836d
ReactCommon: 6ef348087d250257c44c0204461c03f036650e9b ReactCommon: 8da2bad9c1e5901f7b5484e42e59578edeece142
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCClipboard: 69ab8e51324d5b351f6ba72bbdb72478087a2c64 RNCClipboard: 88f7f4933e7731052210d77535560c485ecb75b0
RNFBApp: c0543476dee81ed5fc34d06db2f37b8e7e353cf3
RNFBMessaging: aab4dcf6d121cfe338c9ac45631d90e125b3a5ef
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: aa9690789023c9be8f06aa90e10ce637ea788f4d RNGestureHandler: f6a6630e6bde1a49d1e3fec73b6711f718813538
RNImageCropPicker: 8e39c01f205e00d739c31e682f068aac315587bf RNImageCropPicker: 8e39c01f205e00d739c31e682f068aac315587bf
RNReanimated: 56be6651e5d70985cdc4656372fc70291ecab65f RNReanimated: 4fa1286bc27810821788072c6372b90d3310e7a1
RNScreens: c7ceced6a8384cb9be5e7a5e88e9e714401fd958 RNScreens: 16b782596e80e475b7f3ec769c9a97d789d9b0ed
RNSecureRandom: 07efbdf2cd99efe13497433668e54acd7df49fef RNSecureRandom: 07efbdf2cd99efe13497433668e54acd7df49fef
RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136 RNVectorIcons: 7b81882e9c9369031aede0016dee0fe415cf2f43
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8 Yoga: c6584ec444ef4aee46e0575049f90cd2aab1e6ed
PODFILE CHECKSUM: 8461018d8deceb200962c829584af7c2eb345c80 PODFILE CHECKSUM: 9cf7373afef7b881c911fda82ff1f94eacee3e98
COCOAPODS: 1.15.2 COCOAPODS: 1.15.2

View File

@ -16,6 +16,8 @@
"@openspacelabs/react-native-zoomable-view": "^2.3.1", "@openspacelabs/react-native-zoomable-view": "^2.3.1",
"@react-native-clipboard/clipboard": "^1.14.2", "@react-native-clipboard/clipboard": "^1.14.2",
"@react-native-community/blur": "^4.4.0", "@react-native-community/blur": "^4.4.0",
"@react-native-firebase/app": "^21.6.2",
"@react-native-firebase/messaging": "^21.6.2",
"@react-navigation/drawer": "^6.7.2", "@react-navigation/drawer": "^6.7.2",
"@react-navigation/native": "^6.1.18", "@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0", "@react-navigation/native-stack": "^6.11.0",

View File

@ -288,7 +288,7 @@ export function Access() {
{(alert || otp) && <BlurView style={styles.blur} blurType="dark" blurAmount={2} reducedTransparencyFallbackColor="dark" />} {(alert || otp) && <BlurView style={styles.blur} blurType="dark" blurAmount={2} reducedTransparencyFallbackColor="dark" />}
<Modal visible={alert} onDismiss={() => setAlert(false)} contentContainerStyle={styles.modal}> <Modal visible={alert} onDismiss={() => setAlert(false)} contentContainerStyle={styles.modal}>
<Surface elevation={5} mode="flat" style={styles.content}> <Surface elevation={5} mode="flat" style={styles.content}>
<Text variant="titleLarge">{state.strings.error}</Text> <Text variant="titleLarge">{state.strings.operationFailed}</Text>
<Text variant="titleSmall">{state.strings.tryAgain}</Text> <Text variant="titleSmall">{state.strings.tryAgain}</Text>
<Button mode="text" style={styles.close} onPress={() => setAlert(false)}> <Button mode="text" style={styles.close} onPress={() => setAlert(false)}>
{state.strings.close} {state.strings.close}

View File

@ -106,8 +106,6 @@ export function useAccess() {
}, },
accountLogin: async () => { accountLogin: async () => {
const {username, password, node, secure, code} = state; const {username, password, node, secure, code} = state;
console.log('LOGIN:', username, password, node, secure, code);
await app.actions.accountLogin(username, password, node, secure, code); await app.actions.accountLogin(username, password, node, secure, code);
}, },
accountCreate: async () => { accountCreate: async () => {

View File

@ -4,9 +4,21 @@ import {SessionStore} from '../SessionStore';
import {NativeCrypto} from '../NativeCrypto'; import {NativeCrypto} from '../NativeCrypto';
import {LocalStore} from '../LocalStore'; import {LocalStore} from '../LocalStore';
import { StagingFiles } from '../StagingFiles' import { StagingFiles } from '../StagingFiles'
import messaging from '@react-native-firebase/messaging';
const DATABAG_DB = 'db_v239.db'; const DATABAG_DB = 'db_v239.db';
const SETTINGS_DB = 'ls_v001.db'; const SETTINGS_DB = 'ls_v001.db';
async function requestUserPermission() {
const authStatus = await messaging().requestPermission();
const enabled =
authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
authStatus === messaging.AuthorizationStatus.PROVISIONAL;
if (enabled) {
console.log('**** FIREBASE Authorization status:', authStatus);
}
}
const databag = new DatabagSDK( const databag = new DatabagSDK(
{ {
tagBatch: 24, tagBatch: 24,
@ -18,6 +30,16 @@ const databag = new DatabagSDK(
new StagingFiles(), new StagingFiles(),
); );
const notifications = [
{ event: 'contact.addCard', messageTitle: 'New Contact Request' },
{ event: 'contact.updateCard', messageTitle: 'Contact Update' },
{ event: 'content.addChannel.superbasic', messageTitle: 'New Topic' },
{ event: 'content.addChannel.sealed', messageTitle: 'New Topic' },
{ event: 'content.addChannelTopic.superbasic', messageTitle: 'New Topic Message' },
{ event: 'content.addChannelTopic.sealed', messageTitle: 'New Topic Message' },
{ event: 'ring', messageTitle: 'Incoming Call' },
];
export function useAppContext() { export function useAppContext() {
const local = useRef(new LocalStore()); const local = useRef(new LocalStore());
const sdk = useRef(databag); const sdk = useRef(databag);
@ -60,20 +82,21 @@ export function useAppContext() {
await local.current.set('time_format', fullDayTime ? '24h' : '12h'); await local.current.set('time_format', fullDayTime ? '24h' : '12h');
}, },
accountLogin: async (username: string, password: string, node: string, secure: boolean, code: string) => { accountLogin: async (username: string, password: string, node: string, secure: boolean, code: string) => {
await requestUserPermission();
const deviceToken = await messaging().getToken();
const params = { const params = {
topicBatch: 16, topicBatch: 16,
tagBatch: 16, tagBatch: 16,
channelTypes: ['test'], channelTypes: ['test'],
pushType: 'fcm', pushType: 'fcm',
deviceToken: 'aabbcc', deviceToken: deviceToken,
notifications: [{event: 'msg', messageTitle: 'msgd'}], notifications: notifications,
deviceId: '0011', deviceId: '0011',
version: '0.0.1', version: '0.0.1',
appName: 'databag', appName: 'databag',
}; };
console.log('SDK LOGIN:', username, password, node, secure);
const login = await sdk.current.login(username, password, node, secure, code, params); const login = await sdk.current.login(username, password, node, secure, code, params);
updateState({session: login}); updateState({session: login});
}, },
@ -90,13 +113,16 @@ export function useAppContext() {
} }
}, },
accountCreate: async (handle: string, password: string, node: string, secure: boolean, token: string) => { accountCreate: async (handle: string, password: string, node: string, secure: boolean, token: string) => {
await requestUserPermission();
const deviceToken = await messaging().getToken();
const params = { const params = {
topicBatch: 16, topicBatch: 16,
tagBatch: 16, tagBatch: 16,
channelTypes: ['test'], channelTypes: ['test'],
pushType: 'fcm', pushType: 'fcm',
deviceToken: 'aabbcc', deviceToken: deviceToken,
notifications: [{event: 'msg', messageTitle: 'msgd'}], notifications: notifications,
deviceId: '0011', deviceId: '0011',
version: '0.0.1', version: '0.0.1',
appName: 'databag', appName: 'databag',
@ -105,13 +131,16 @@ export function useAppContext() {
updateState({session}); updateState({session});
}, },
accountAccess: async (node: string, secure: boolean, token: string) => { accountAccess: async (node: string, secure: boolean, token: string) => {
await requestUserPermission();
const deviceToken = await messaging().getToken();
const params = { const params = {
topicBatch: 16, topicBatch: 16,
tagBatch: 16, tagBatch: 16,
channelTypes: ['test'], channelTypes: ['test'],
pushType: 'fcm', pushType: 'fcm',
deviceToken: 'aabbcc', deviceToken: deviceToken,
notifications: [{event: 'msg', messageTitle: 'msgd'}], notifications: notifications,
deviceId: '0011', deviceId: '0011',
version: '0.0.1', version: '0.0.1',
appName: 'databag', appName: 'databag',

View File

@ -188,6 +188,7 @@ export function Conversation({close, openDetails, wide}: {close: ()=>void, openD
const containerStyle = state.layout === 'large' ? { ...styles.conversation, ...styles.largeConversation } : styles.conversation; const containerStyle = state.layout === 'large' ? { ...styles.conversation, ...styles.largeConversation } : styles.conversation;
const headerStyle = state.layout === 'large' ? { ...styles.header, ...styles.largeHeader } : styles.header; const headerStyle = state.layout === 'large' ? { ...styles.header, ...styles.largeHeader } : styles.header;
const padStyle = state.layout === 'large' ? styles.pad : styles.nopad; const padStyle = state.layout === 'large' ? styles.pad : styles.nopad;
const offset = state.layout === 'large' ? state.avoid - 64 : state.avoid - 128;
return ( return (
<View style={containerStyle}> <View style={containerStyle}>
@ -294,7 +295,7 @@ export function Conversation({close, openDetails, wide}: {close: ()=>void, openD
autoComplete="off" autoCapitalize="none" autoCorrect={false} placeholder={state.strings.newMessage} placeholderTextColor={state.textColorSet ? state.textColor : undefined} autoComplete="off" autoCapitalize="none" autoCorrect={false} placeholder={state.strings.newMessage} placeholderTextColor={state.textColorSet ? state.textColor : undefined}
cursorColor={state.textColorSet ? state.textColor : undefined} value={state.message} onChangeText={value => actions.setMessage(value)} /> cursorColor={state.textColorSet ? state.textColor : undefined} value={state.message} onChangeText={value => actions.setMessage(value)} />
{ Platform.OS === 'ios' && avoid && (<View style={{ ...styles.avoid, height: state.avoid - 64}} />) } { Platform.OS === 'ios' && avoid && (<View style={{ ...styles.avoid, height: offset }} />) }
<View style={styles.controls}> <View style={styles.controls}>
<Pressable style={styles.control} onPress={addImage}><Surface style={styles.surface} elevation={2}><Icon style={styles.button} source="camera" size={24} color={Colors.primary} /></Surface></Pressable> <Pressable style={styles.control} onPress={addImage}><Surface style={styles.surface} elevation={2}><Icon style={styles.button} source="camera" size={24} color={Colors.primary} /></Surface></Pressable>

File diff suppressed because it is too large Load Diff