Add object detection, tracking, mobile notifications, and search to any security camera.
check subscription on camera view
roryclear28cf4534e38d
diff --git a/clearcam/SettingsViewController.m b/clearcam/SettingsViewController.mindex a6a66df..560da07 100644--- a/clearcam/SettingsViewController.m+++ b/clearcam/SettingsViewController.m@@ -34,7 +34,13 @@self.view.backgroundColor = [UIColor systemBackgroundColor];self.title = @"Settings";- if(![[NSUserDefaults standardUserDefaults] boolForKey:@"isSubscribed"] || ![[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] || [[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] == NSOrderedDescending) [self checkSubscriptionStatus];+ if(![[NSUserDefaults standardUserDefaults] boolForKey:@"isSubscribed"] || ![[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] || [[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] == NSOrderedDescending){+ [[StoreManager sharedInstance] verifySubscriptionWithCompletion:^(BOOL isActive, NSDate *expiryDate) {+ dispatch_async(dispatch_get_main_queue(), ^{+ [self.tableView reloadData];+ });+ }];+ }NSLog(@"%d %@",[[NSUserDefaults standardUserDefaults] boolForKey:@"isSubscribed"],[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]);// Register for subscription status change notifications@@ -161,15 +167,6 @@[defaults synchronize];}-#pragma mark - Subscription Status--- (void)checkSubscriptionStatus {- [[StoreManager sharedInstance] verifySubscriptionWithCompletion:^(BOOL isActive, NSDate *expiryDate) {- dispatch_async(dispatch_get_main_queue(), ^{- [self.tableView reloadData]; // Refresh the UI based on the subscription status- });- }];-}- (void)subscriptionStatusDidChange:(NSNotification *)notification {// Called when the subscription status changes (e.g., after a successful purchase)diff --git a/clearcam/ViewController.m b/clearcam/ViewController.mindex e468743..61fdc0c 100644--- a/clearcam/ViewController.m+++ b/clearcam/ViewController.m@@ -53,6 +53,11 @@ NSMutableDictionary *classColorMap;- (void)viewDidLoad {[super viewDidLoad];+ if(![[NSUserDefaults standardUserDefaults] boolForKey:@"isSubscribed"] || ![[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] || [[NSDate date] compare:[[NSUserDefaults standardUserDefaults] objectForKey:@"expiry"]] == NSOrderedDescending){+ [[StoreManager sharedInstance] verifySubscriptionWithCompletion:^(BOOL isActive, NSDate *expiryDate) {+ // do nothing+ }];+ }self.recordPressed = NO;self.scene = [[SceneState alloc] init];self.segmentQueue = dispatch_queue_create("com.example.segmentQueue", DISPATCH_QUEUE_SERIAL);