20

I have an app with a Today widget. I would like to use a model class from the container app in the TodayViewController.swift.

Is such a thing possible?

I copied the file into the Today Extension folder and tried to import it. No dice.

I can't find an answer in the documentation or online.

Thanks

MayNotBe
  • 2,110
  • 3
  • 32
  • 47

1 Answers1

35

You need to include the file in the target membership. Select the file and then, in the right hand pane, tick the correct target.

enter image description here

Gary Riches
  • 2,847
  • 1
  • 22
  • 19
  • 2
    No worries, just make sure you continue to add all assets that you retire to both targets. Some APIs aren't available to a Today extension so test regularly. – Gary Riches Feb 03 '15 at 15:02