ReplayKit的RPSystemBroadcastPickerView不显示preferredExtension [英] ReplayKit's RPSystemBroadcastPickerView not showing preferredExtension

查看:808
本文介绍了ReplayKit的RPSystemBroadcastPickerView不显示preferredExtension的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RPSystemBroadcastPickerView显示选择器视图,用户可以从中选择广播服务来记录屏幕.根据文档,preferredExtension应该允许我设置选择器应显示的广播扩展.

I am using RPSystemBroadcastPickerView to show a picker view, from which a user can select a broadcast service to record the screen. Based on documentation, preferredExtension should allow me to set which broadcast extension should the picker show.

代码非常简单:

let broadcastPickerView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 51, height: 51))
view.addSubview(broadcastPickerView)
broadcastPickerView.preferredExtension = "com.milan.nosal.broadcast-extension"
broadcastPickerView.backgroundColor = .clear
broadcastPickerView.showsMicrophoneButton = false

其中"com.milan.nosal.broadcast-extension"是我希望选择器提供的扩展的捆绑包标识符(我多次检查了其正确性).

where "com.milan.nosal.broadcast-extension" is the bundle identifier of the extension I want the picker to offer (I checked its correctness multiple times).

但是,在点击控件时,首先弹出窗口显示空选择:

However, when the control is tapped, at first the pop up shows empty selection:

关闭它,然后再次点击控件,它会显示正确的扩展名.只有在安装(或重新安装)该应用程序后,它才会显示,然后始终显示.

After you close it, and tap the control again, it shows the correct extension. This only happens when the app is installed (or reinstalled), after it shows, then it shows always.

这是iOS 12 beta错误,还是我做错了什么?我可以预注册"扩展程序来解决此问题吗?

Is this the iOS 12 beta bug, or am I doing something incorrectly? Can I "preregister" the extension to work around this?

发布应用程序后,我们的用户遇到了相同的问题,但是这次甚至连多次点击控件都没有帮助-选择器始终为空!该扩展程序似乎已正确安装,因为它可以从控制中心启动.

After publishing the app, we encountered the same problem with our users, but this time not even tapping the control multiple times helps - the picker is always empty! It seems that the extension is installed correctly, because it can be launched from control center.

现在可以在官方版本上运行.

Running on official release now.

推荐答案

我认为这是苹果的错误,但在测试后在iOS 12.2中已修复.

I think it is the apple's bug, but it was fixed in iOS 12.2 after I tested it.

这篇关于ReplayKit的RPSystemBroadcastPickerView不显示preferredExtension的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆