title: How to trigger screen recording permission system modal dialog on macOS Catalina
body: <p>I have an application which has screen sharing feature in it. On macOS Catalina beta8 (19A558d), you must give <strong>screen recording permission</strong> to share your screen (Without permission, only your background and menubar will be shared with the other side). Unfortunately, I really do not know which event or call triggers the system modal dialog, sometimes the dialog appears, sometimes it does not.</p>
  
  <p>System modal dialog is shown on page 75 in wwdc macos security documentation:<br>
  <a href="https://devstreaming-cdn.apple.com/videos/wwdc/2019/701ngx868rfo8jlj/701/701_advances_in_macos_security.pdf?dl=1" rel="noreferrer">https://devstreaming-cdn.apple.com/videos/wwdc/2019/701ngx868rfo8jlj/701/701_advances_in_macos_security.pdf?dl=1</a> </p>
  
  <p>So it is absolutely non-deterministic. Without interacting with this modal dialog, my application will not be registered under <code>Security &amp; Privacy / Screen Recording</code>, thus I can not give permission for it. Does anybody have any idea, how can I solve this problem?</p>