joereddington / MrsLandingham

An exercise in working out what my workflow actually is.
0 stars 1 forks source link

Local Notifications #25

Closed joereddington closed 6 years ago

joereddington commented 6 years ago

We want local notifications .

Resources

joereddington commented 6 years ago
13/12/17 08:27 to 08:32:

Starting the mapping.

We've commited and found the webpage

08:37:

I'm using this code:

UILocalNotification* localNotification = [[UILocalNotificationalloc] init]; 
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

but warned is deprcated... hmmm.

08:44:

Running, but diesn't giving me the notification. Hmm.. also the app isn't listed in the notificaitons menu...

08:54:

Trying code from all over...

09:07:

Ah-ha! This place sorted me out: https://useyourloaf.com/blog/local-notifications-with-ios-10/ - I needed to ask permission with the app first and now I do. Okay now to commit and get it actually working.

09:16:

I've committed and it appears to be actualyl working. That's crazy. Okay. Better do some work now.

joereddington commented 6 years ago

This works fine. Might be causing some slowdowns tho...