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

1 Answer 1

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

1
  • 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. Feb 3, 2015 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.