Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

sleep in bg

roryclear8000d1827abd
diff --git a/clearcam/AppDelegate.m b/clearcam/AppDelegate.m
index ded5c65..dc47831 100644
--- a/clearcam/AppDelegate.m
+++ b/clearcam/AppDelegate.m
@@ -66,8 +66,10 @@
- (void)handleNotificationReceived:(NSDictionary *)userInfo {
GalleryViewController *gallery = [[GalleryViewController alloc] init];
- sleep(15); // Consider replacing this with a proper async operation
- [gallery getEvents];
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
+ sleep(15);
+ [gallery getEvents];
+ });
}
#pragma mark - Remote Notification Methods