I've created a new Xcode project and I added a new Custom Keyboard Extension Target by using Editor > Add Target > Custom Keyboard Extension.
Then, I ran that default templated keyboard on my real device (not happened in simulator). And I opened Instruments > Allocations application to profile memory allocations of extension.
When I was trying the keyboard on WhatsApp, I've noticed that number of Persistent ViewController objects were increased while hide/unhide the keyboard by tap on the outside of the keyboard and tap input area.
Number of Persistent KeyboardViewController:
2 -- hide -- > 1 -- show -- > 3 -- hide --> 2 -- show --> 4 (increasing)
I was trying the keyboard on iOS Messages app too. And there was no duplication.
1 -- hide --> 0 -- show --> 1 -- hide --> 0 ( its ok )
Do u have any idea about this issue ? Why WhatsApp application duplicates the keyboard extension viewController.