Add object detection, tracking, mobile notifications, and search to any security camera.
deslop
roryclear2191bead11cf
diff --git a/clearcam/GalleryViewController.m b/clearcam/GalleryViewController.mindex f9d9185..2466814 100644--- a/clearcam/GalleryViewController.m+++ b/clearcam/GalleryViewController.m@@ -454,20 +454,18 @@[playerVC.player play];}];}- } else { // Key didn't work, prompt again+ } else {[self showErrorAlertWithMessage:@"The provided key is incorrect. Please try again or cancel." completion:^{[self promptUserForKeyWithAESFileURL:aesFileURL encryptedData:encryptedData];}];}- } else { // User canceled- [self showErrorAlertWithMessage:@"Decryption canceled. A valid key is required to decrypt the file."];}}];}- (void)promptUserForKeyWithCompletion:(void (^)(NSString *))completion {UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Enter Decryption Key"- message:@"Please provide the key to decrypt the file."+ message:@"Please enter the password used by your device to encrypt this data."preferredStyle:UIAlertControllerStyleAlert];[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {diff --git a/clearcam/SecretManager.m b/clearcam/SecretManager.mindex 0ccbc6a..466ed62 100644--- a/clearcam/SecretManager.m+++ b/clearcam/SecretManager.m@@ -310,13 +310,11 @@ static NSString *const kServiceIdentifier = @"com.yourapp.aeskeys"; // Replace wreturn nil;}- // Step 2: Check if the decrypted data is long enough to contain the headerif (numBytesDecrypted < HEADER_SIZE) {free(buffer);- return nil; // Data is too short to contain a valid header+ return nil;}-- // Step 3: Extract and verify the magic number from the header+uint64_t decryptedMagicNumber;memcpy(&decryptedMagicNumber, buffer, HEADER_SIZE);if (decryptedMagicNumber != MAGIC_NUMBER) {diff --git a/clearcam/SettingsViewController.m b/clearcam/SettingsViewController.mindex dba9fc2..51b6bcd 100644--- a/clearcam/SettingsViewController.m+++ b/clearcam/SettingsViewController.m@@ -625,8 +625,8 @@- (void)testnotificationServer {[[notification sharedInstance] sendNotification];- UIAlertController *resultAlert = [UIAlertController alertControllerWithTitle:@"Test Initiated"- message:@"Test notification has been initiated. Check your server logs for results."+ UIAlertController *resultAlert = [UIAlertController alertControllerWithTitle:@"Sent"+ message:@"Test notification sent. Check your server."preferredStyle:UIAlertControllerStyleAlert];UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK"style:UIAlertActionStyleDefault@@ -668,7 +668,7 @@- (void)promptForPasswordWithCompletion:(void (^)(BOOL success))completion {UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Set Password"- message:@"Enter a password to encrypt and decrypt your data"+ message:@"Enter a password to encrypt your data"preferredStyle:UIAlertControllerStyleAlert];[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {diff --git a/clearcam/ViewController.m b/clearcam/ViewController.mindex cc6438e..dead618 100644--- a/clearcam/ViewController.m+++ b/clearcam/ViewController.m@@ -234,7 +234,6 @@ NSMutableDictionary *classColorMap;NSURL *outputURL = [dayFolderURL URLByAppendingPathComponent:[NSString stringWithFormat:@"output_%@.mp4", finalTimestamp]];self.assetWriter = [AVAssetWriter assetWriterWithURL:outputURL fileType:AVFileTypeMPEG4 error:&error];if (error) return;- // Check if the device supports HEVC encodingNSDictionary *videoSettings;videoSettings = @{AVVideoCodecKey: AVVideoCodecTypeH264, // Fallback to H.264@@ -776,7 +775,6 @@ NSMutableDictionary *classColorMap;}double segmentSecondsSinceMidnight = segmentTimeStampNumber.doubleValue;- // Check if the segment is within ±60 seconds of any event timestampBOOL shouldSkipDeletion = NO;for (NSNumber *eventTimestamp in eventTimestamps) {double eventSecondsSinceMidnight = eventTimestamp.doubleValue;@@ -1022,10 +1020,7 @@ NSMutableDictionary *classColorMap;// Check rotationCGAffineTransform transform = self.videoWriterInput.transform;CGFloat angle = atan2(transform.b, transform.a);-- // Convert radians to degreesCGFloat degrees = angle * (180.0 / M_PI);-size_t width_res = CVPixelBufferGetWidth(pixelBuffer);size_t height_res = CVPixelBufferGetHeight(pixelBuffer);@@ -1127,7 +1122,3 @@ NSMutableDictionary *classColorMap;}}@end----