Welcome!

Sprint 4

Duration: 4/04/2019-4/22/2019

Completed Tasks

1. Fix small problems.
2. Link all functions together.
3. Push notification on mobile device.

Contributions:

1. Peilun Lu, 15 hours, contributed in bitbucket set up, programming.
2. Wei Wang, 15 hours, contributed in trello, slides creation, programming.
3. Ce Shi, 15 hours, contributed in document, bitbucket set up, programming.

Sprint reflection

This sprint we are doing the mobile phone. This is really hard for us to do this. In this sprint we try a lot of different way to do push in the mobile. At the beginning, we did not think a best way to do that. After that we did waste a little bit time. Then, we figure out how to push in the mobile phone that is use the browser in mobile phone but here is one big problem we can not fix that is browser update. The browser company wants to protect user privacy it now allow some unauthorized web to send the
push to user. We need to think about this and find the best solution in our final presentation.

 

Sprint Retrospection:

In this sprint, we are almost finish everything for the whole project. After we linked all functions together, we fixed some small bugs of the push function, and make sure it will work on the mobile phone which has a web browser.

Good Could have been better How to improve?
Every function works well in the project

There is an update in google chrome, so this may make our push have some problems.

We cannot do anything fot the update, but if you have the previous version browser it should work well.|


Code
• (void)loadKeychain{ _certificates = [[SecManager allPushCertificatesWithEnvironment:YES] mutableCopy]; if (_lastCerPath.length>0) { Sec *sec = [SecManager secModelWithRef: [SecManager certificatesWithPath:_lastCerPath]]; sec.key = @"lastSelected"; [_certificates addObject:sec]; } [self log:@"Read Keychain certificate" warning:NO]; [self reloadPopButton]; }
pragma mark Private
• (void)loadUserData{ NSLog(@"load userdefaults"); [self log:@"save the infomation" warning:NO];

_defaults = [NSUserDefaults standardUserDefaults]; if ([_defaults valueForKey:KEY_TOKEN]) [self.tokenTextField setStringValue: [_defaults valueForKey:KEY_TOKEN]];

if ([[_defaults valueForKey:KEY_Payload] description].length>0) [self.payload setStringValue:[_defaults valueForKey:KEY_Payload]];

if ([[_defaults valueForKey:KEY_CERNAME] description].length>0) _cerName = [_defaults valueForKey:KEY_CERNAME];

if ([[_defaults valueForKey:KEY_CER] description].length>0) _lastCerPath = [_defaults valueForKey:KEY_CER]; } - (void)saveUserData{ [_defaults setValue:_lastCerPath forKey:KEY_CER]; [_defaults setValue:self.tokenTextField.stringValue forKey:KEY_TOKEN]; [_defaults setValue:self.payload.stringValue forKey:KEY_Payload]; [_defaults setValue:_cerName forKey:KEY_CERNAME]; [_defaults synchronize]; [self log:@"save the push" warning:NO]; } - (void)disconnect { NSLog(@"disconnect"); [self log:@"off-line" warning:NO]; [self log:@"---------------------------------" warning:NO];

// OSStatus result;
// NSLog(@"SSLClose(): %d", _closeResult); if (_closeResult != 0)
{ return; } // _closeResult = SSLClose(_context); //NSLog(@"SSLClose(): %d", _closeResult);
// // Release certificate. // if (_currentSec.certificateRef != NULL) // CFRelease(_currentSec.certificateRef);
// Release identity.
if (_identity != NULL)
CFRelease(_identity);
// Release keychain.
if (_keychain != NULL)
CFRelease(_keychain);
// Close connection to server.
close((int)socket);
// Delete SSL context.
_closeResult = SSLDisposeContext(_context);
// NSLog(@"SSLDisposeContext(): %d", result);
}