Custom keyboard extension modified to allow full access back to App being killed

Hello, technical friends, I am developing a custom keyboard extension, currently encountered a technical difficulty, almost asked AI and Google have not solved my problem. 



Problem description: 


When my App was first installed, I opened Settings from the App, enabled full access, and crashed when I returned to the App. Run the App for the second time, open the Settings from the App, update the full access permission, and automatically re-run the App after returning to the App, and then the third, fourth, and NTH times will not crash. 



Seems like ios will kill host apps for custom keyboard extensions after full access is updated?

I want my App installed for the first time to update full access to return App without crashing, but don't know how to fix this problem. I look forward to the technical experts working in Apple development to help me provide relevant technical methods and ideas so that I can solve this problem. Thank you very much!

When tracing debugging in xcode, after the App forces exit, the console prompts:

Message from debugger: Terminated due to signal 9

When I was monitoring CPU and memory usage, it was very low and I didn't see anything unusual.

Custom keyboard extension modified to allow full access back to App being killed
 
 
Q