如何正确使用needsInputModeSwitchKey?

pac*_*ion 8 swift ios-keyboard-extension

当我尝试使用(在我的代码中的任何地方和任何时间)needsInputModeSwitchKey属性时,UIInputViewController我面临警告:

- [UIInputViewController requiresInputModeSwitchKey] 在与主机应用程序建立连接之前被调用。这将产生不准确的结果。请确保在您的主视图控制器初始化后调用它。

尽管有警告,但我得到了正确的值,而且看起来很奇怪。我应该怎么做才能消除这个警告?