1 Reply
      Latest reply on Mar 18, 2019 10:29 PM by QuinceyMorris
      remy-life-on-air Level 1 Level 1 (0 points)

        I don't know if I'm doing things wrong or if there is a bug in iOS 12 SDK.

        Apple added the `RPSystemBroadcastPickerView` class in iOS 12 so we could have a button that opens the system UI for starting a broadcast.

        If I read the description of the `preferredExtension` property, it says I should just set it to the BundleID of the extension and only that will show up in the list.


        This is what I'm doing, and yet often I get an empty list when I tap the button.


        I know the extension is installed and if I go to control center, manually add the record button, then start the broadcast manually from control center using the extension, then it usually starts working after. If I kill the app and tap that button again, the extension will show. But I don't know why I have to do those convoluted steps before!

        Any idea why this is happenning in the 1st place? Am I not setting a key in the plist of the main app (or extension)?


        • Re: How to set preferredExtension of RPSystemBroadcastPickerView properly
          QuinceyMorris Level 8 Level 8 (5,930 points)

          It's a bug. If an extension other than your preferred extension was previously selected, the "list of 1 thing" that is supposed to show your preferred extension instead shows an empty slot.


          There's no workaround AFAIK, but (as you found out) if you use something that shows all extensions, such as Control Center, then you can choose your extension. The next time you try it from your app that sets the same preferred extension, it will show up.


          Rather than trying to explain that to users, it's probably better to not use the preferred extension setting at all, until the bug is fixed. You can tell your users to choose your extension from the list, which is a little easier to explain.