AFSecurityPolicy causes App to block and is killed by watchdog

After the system was upgraded to iOS15.1, our App crashed with AFSecurityPolicy. But I checked the code in the project and there is no problem, please tell me what happened to iOS15.1?

Answered by DTS Engineer in 704131022

AFSecurityPolicy is not an Apple API. You might have more luck asking this via their support channel.

However, it seems unlikely that it’s the cause of the problem here. Your app is being killed by the watchdog because it’s taking too long to handle an event. I think that scene-create means that it’s being activated but it’s hard to tell because frame 17 of the main thread’s backtrace is not symbolicated. Frame 12 indicates that AFSecurityPolicy is loading certificates from a bundle, which is probably your app bundle. That shouldn’t take a long time, which suggests that something else has taken a bunch of time and the watchdog has then got around to killing your app later on, which AFSecurityPolicy just happens to be running.

The way forward here is to symbolicate your log and then profile your scene activation code to see why what’s taking the time.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

AFSecurityPolicy is not an Apple API. You might have more luck asking this via their support channel.

However, it seems unlikely that it’s the cause of the problem here. Your app is being killed by the watchdog because it’s taking too long to handle an event. I think that scene-create means that it’s being activated but it’s hard to tell because frame 17 of the main thread’s backtrace is not symbolicated. Frame 12 indicates that AFSecurityPolicy is loading certificates from a bundle, which is probably your app bundle. That shouldn’t take a long time, which suggests that something else has taken a bunch of time and the watchdog has then got around to killing your app later on, which AFSecurityPolicy just happens to be running.

The way forward here is to symbolicate your log and then profile your scene activation code to see why what’s taking the time.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

AFSecurityPolicy causes App to block and is killed by watchdog
 
 
Q