Error while running Custom Keyboard running on simulator Swift

蹲街弑〆低调 提交于 2020-01-15 05:18:10

问题


I am trying to make custom keyboard.For simple custom keyboard it is running fine, but while clicking on emoji it is showing below error :

viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}

I have also tried running this with Device but still it is showing same error. Do anyone know what is the solution for it?


回答1:


I encountered same issue like you.

it's because of memory leak on simulator.

and some other reason can be autolayout and ui contraint update didn't sync well with xcode and simulator. Another possible reasons is that. Custom keyboard app have limited time to first launch. so after few second later.if the layout didn't loaded all. it will be crashed.

So though it's not good solution.

But as it's custom keyboard app. After you click to run project on simulator. you can do several time by clicking global keyboard change button. For example. first time. it crash. and Don't stop running. after crash it will return to normal keyboard. Click Global button. and do few times more until your custom keyboard layout loaded.

By doing like this. I solved above issue and can work on debugging and developing custom keyboard app.




回答2:


What fixed it for me is to enable Full Access on the custom Keyboard.

  1. Click through the error and the system keyboard appears
  2. Cmd+Shift+H (on the simulator)
  3. Go to Settings > General > Keyboards
  4. Select the custom keyboard
  5. Tap the disclosure indicator
  6. Enable (or Toggle off/on) the Full Access indicator
  7. Tap Allow when the Full Access alert shows up
  8. Rerun the keyboard app
  9. Choose your container app to run


来源:https://stackoverflow.com/questions/40131751/error-while-running-custom-keyboard-running-on-simulator-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!