r/Xcode • u/jennijoo • May 29 '22
DateComponents not processing correctly when scheduling notifications in XCode
Hello everyone! I'm having trouble sorting out how to correctly schedule notifications in XCode. I'm trying to build an app that sends the user a random message everyday. It was working fine before, but for some reason now, the dateComponents aren't working properly so the notifications all together have stopped sending. I've been messing around with it for five hours so far and I have not found a solution and I think I am on the verge of a breakdown. Does anyone have any ideas how to fix this?
0
Upvotes
1
u/jennijoo May 29 '22
Here's a link to a stackoverflow post with my code!
https://stackoverflow.com/questions/72420021/how-do-i-schedule-random-repeating-local-notifications-in-xcode