Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33309840
D6065.1768805807.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D6065.1768805807.diff
View Options
diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj
--- a/native/ios/Comm.xcodeproj/project.pbxproj
+++ b/native/ios/Comm.xcodeproj/project.pbxproj
@@ -205,6 +205,8 @@
CB38F2BE286C6C980010535C /* DeleteEntryMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeleteEntryMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/DeleteEntryMessageSpec.h; sourceTree = "<group>"; };
CB38F2BF286C6C980010535C /* UpdateRelationshipMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UpdateRelationshipMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/UpdateRelationshipMessageSpec.h; sourceTree = "<group>"; };
CB3C621327CE66540054F24C /* libEXSecureStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libEXSecureStore.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ CB7EF17B295C580500B17035 /* CommIOSNotificationsBridgeQueue.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = CommIOSNotificationsBridgeQueue.mm; path = Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.mm; sourceTree = "<group>"; };
+ CB7EF17C295C580500B17035 /* CommIOSNotificationsBridgeQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommIOSNotificationsBridgeQueue.h; path = Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.h; sourceTree = "<group>"; };
CB90951929531663002F2A7F /* CommIOSNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommIOSNotifications.h; path = Comm/CommIOSNotifications/CommIOSNotifications.h; sourceTree = "<group>"; };
CBDEC69928ED859600C17588 /* GlobalDBSingleton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlobalDBSingleton.h; sourceTree = "<group>"; };
CBDEC69A28ED867000C17588 /* GlobalDBSingleton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GlobalDBSingleton.mm; path = Comm/GlobalDBSingleton.mm; sourceTree = "<group>"; };
@@ -556,6 +558,8 @@
CB90951729531647002F2A7F /* CommIOSNotifications */ = {
isa = PBXGroup;
children = (
+ CB7EF17C295C580500B17035 /* CommIOSNotificationsBridgeQueue.h */,
+ CB7EF17B295C580500B17035 /* CommIOSNotificationsBridgeQueue.mm */,
CB90951929531663002F2A7F /* CommIOSNotifications.h */,
);
name = CommIOSNotifications;
diff --git a/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.h b/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.h
new file mode 100644
--- /dev/null
+++ b/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.h
@@ -0,0 +1,13 @@
+#import <Foundation/Foundation.h>
+
+@interface CommIOSNotificationsBridgeQueue : NSObject
+
+@property BOOL jsReady;
+@property NSDictionary *openedRemoteNotification;
+
++ (nonnull instancetype)sharedInstance;
+
+- (void)putNotification:(NSDictionary *)notifInfo;
+- (void)processNotifications:(void (^)(NSDictionary *))block;
+
+@end
diff --git a/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.mm b/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.mm
new file mode 100644
--- /dev/null
+++ b/native/ios/Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.mm
@@ -0,0 +1,40 @@
+#import "CommIOSNotificationsBridgeQueue.h"
+
+@implementation CommIOSNotificationsBridgeQueue
+
+NSMutableArray<NSDictionary *> *commNotificationsQueue;
+
++ (nonnull instancetype)sharedInstance {
+ static CommIOSNotificationsBridgeQueue *sharedInstance = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ sharedInstance = [self new];
+ });
+
+ return sharedInstance;
+}
+
+- (instancetype)init {
+ commNotificationsQueue = [NSMutableArray new];
+ self.jsReady = NO;
+ return self;
+}
+
+- (void)putNotification:(NSDictionary *)notifInfo {
+ if (!commNotificationsQueue) {
+ return;
+ }
+ [commNotificationsQueue addObject:notifInfo];
+}
+
+- (void)processNotifications:(void (^)(NSDictionary *))block {
+ if (!commNotificationsQueue) {
+ return;
+ }
+ for (id notifInfo in commNotificationsQueue) {
+ block(notifInfo);
+ }
+ commNotificationsQueue = nil;
+}
+
+@end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 6:56 AM (9 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5955031
Default Alt Text
D6065.1768805807.diff (4 KB)
Attached To
Mode
D6065: Add NotificationsBridgeQueue module
Attached
Detach File
Event Timeline
Log In to Comment