I'm building an iOS app, and I noticed something odd - sometimes, the line of code
let someVariable = UIApplication.shared.applicationIconBadgeNumber
is extremely laggy (taking on the order of seconds to complete), and sometimes it is not. Is there a reason for the variation in times this line of code takes to complete? It seems like a simple assignment, so I'm a bit confused about why it would take so long.