MSMessageLiveLayout freeze/crash in transcript when info.plist contains privacy request

限于喜欢 提交于 2019-12-08 13:15:11

问题


I have an iMessage extension using MSMessageLiveLayout for messages. I want the extension to access microphone. Adding in info.plist "Privacy - Microphone Usage Description" with correct value causes the liveMessages in transcript to freeze/crash when the extension is closed. Removing the Privacy request from info.plist makes the liveMessages in transcript to work as intended...

To reproduce the problem, just download Apple's "ice cream" iMessage sample extension here: https://developer.apple.com/documentation/messages/icecreambuilder_building_an_imessage_extension

then modify the following 2 lines of code: In the "func composeMessage(...)" add the following:

 let layout = MSMessageLiveLayout(alternateLayout: alternateLayout)

then add in the info.plist any of the following:

  • Privacy - Camera Usage Description
  • Privacy - Location Always Usage Description
  • Privacy - Microphone Usage Description

note that the following privacy request does not cause the crash/freeze: "Privacy - Location When In Use Usage Description"

I expect that quitting the extension does not cause each liveMessage in transcript to freeze/crash. But this is what happens. Any help would be welcome...


回答1:


I have experienced the same thing with the camera plist entries.

It's an XCode bug, confirmed by Apple. You cannot do anything about it - once you have those entries in there you have crashes when you try to debug with XCode.

In my collection of iMessage samples I have a sample which explores this a bit further. It uses different plists so the Debug doesn't have camera permission.



来源:https://stackoverflow.com/questions/56398876/msmessagelivelayout-freeze-crash-in-transcript-when-info-plist-contains-privacy

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