Guest User

Untitled

a guest
Nov 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. /*Checking to make sure policy violations are loaded
  2.  
  3. 1. A notification with the name @”PolicyViolationsLoaded” is sent out after the policy violations are loaded into core data
  4.  
  5. 2. you can check the NSUserDefaults to see when the last time policy violations have been loaded*/
  6.  
  7. NSDate *policyViolationsTimeStamp = [[NSUserDefaults standardUserDefaults] objectForKey:@"policy_violations_time_stamp"];
  8.  
  9. /*Checking to see if there are any unsaved changes to policy violations, right now this dictionary isn't being cleared anywhere. I need to implement clearing it upon success*/
  10.  
  11. NSDictionary* decisions = [[NSUserDefaults standardUserDefaults] objectForKey:@"PolicyViolationDecisions"];
  12.  
  13. if(!decisions){
  14. // there are changes that have not been pushed
  15. }
  16.  
  17. else{
  18. // there are no local changes
  19. }
Add Comment
Please, Sign In to add comment