title: iOS Share Extension with custom View Controller
body: <p>I'm creating a Share Extension to allow to share Youtube videos into my app and am having a hard time to present my custom UI smoothly. Instead of the default view controller which just contains the raw Youtube URL, I want to do something visually similar to Facebook's extension, displaying a thumbnail and the video title.
  My first attempt at it was editing the MainInterface storyboard ShareViewController, but doing so briefly shows my custom interface and thet get's "overriden" by the default UI layout. So I ended up adding another view controller with my UI to the storyboard and in the ShareViewController I added</p>
  
  
  
  <pre class="lang-swift prettyprint-override"><code>override func presentationAnimationDidFinish() {
      super.presentationAnimationDidFinish()
      DispatchQueue.main.async {
          self.pushConfigurationViewController(customVC)
      }
  </code></pre>
  
  <p>The problem with this obviously is that I still get to see the default View Controller before my custom one is pushed.
  So the question would be how do I get to show my custom UI right away when the share extension is started? I've experimented with the <strong>NSExtensionPrincipalClass</strong> in the .plist but did not have any positive results</p>
  
  <p>Thanks in advance</p>