title: How to connect and debug a custom ClockKit Complications controller?
body: <p>I am trying get a custom ClockKit Complication working. </p>
  
  <ol>
  <li>I created a custom <strong>ComplicationController</strong> conforming to <code>CLKComplicationDataSource</code>. It’s added to the Watch Extension’s plist as <code>CLKComplicationPrincipalClass</code>.</li>
  </ol>
  
  <p>I am able to select a complication on the watch and activate it but I only see "---------------" not my actual placeholder.</p>
  
  <h3>What I tried</h3>
  
  <ul>
  <li><p>I added custom <code>override init(){…}</code> to my ComplicationController and put a break point in it for debugging. But even when running the Complication <strong>build scheme</strong> this break point is never reached. It seems like my custom ComplicationController is never instantiated.</p></li>
  <li><p>I do see a log message <code>Extension received request to wake up for complication support.</code> but it’s not clear to me where this is triggered in the code.</p></li>
  <li><p>I also tried calling the following from my main <code>InterfaceController</code> to find out about my active complications</p>
  
  <pre><code>if let server = CLKComplicationServer.sharedInstance() {
      for complication in server.activeComplications {
          server.reloadTimelineForComplication(complication)
      }
  }
  </code></pre>
  
  <p>… but <code>server</code> returns nil. No complications appear to be active and reloaded.</p></li>
  </ul>
  
  <h3>Question</h3>
  
  <ul>
  <li><p>How do I successfully hook up my custom ComplicationController? </p>
  
  <p>Also any  additional tips for debugging are welcome. </p>
  
  <p>Is it usually enough to remove the complications from the watch simulator or the watch app on the iPhone or do you need to re-install the whole watch app to see a complication related update in effect? Also, when I log something inside my custom ComplicationController, should I only see its output when running with the Complications build scheme or also with the normal Watch App build scheme?</p></li>
  </ul>
  
  <p>Any ideas for finding the issue are welcome.</p>