currentUserNotificationSettings causes a delay/freeze of 20 seconds or so

In the last month or so I've started getting reports that people starting our app can take 10-20 seconds or more in a freeze where nothing happens. We've logged extensively and isolated it to this call:

UIUserNotificationSettings* currentSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];


For these people, any call to that method causes the device to freeze for that period of time. Here is an example stack trace from a device we could reproduce this with:


https://dl.dropboxusercontent.com/u/9452258/Screen%20Shot%202016-06-06%20at%202.58.14%20PM.png

Any ideas on if we are doing something that could be the problem?

Replies

I also got quite a few ANR problems, caused by this api; any ideas or it's apple's bug?