title: Swizzling methods : Programmatically dismiss system dialogs like “<App> would like to access your contacts” in iOS
body: <p>Is there a way to programmatically dismiss dialogs like the ones where the app wants to access contacts?</p>
  
  <p>I think there's a way by swizzling API methods, but I don't really know which. What is the methodology to find out which methods need to be swizzled? If swizzling is not the way then what could be another alternative?</p>
  
  <p>As a note, this is not for a product, is just for testing so swizzling is a good option if it works.Kindly share sample code if any.</p>