[英]iOS Swift Today Extension: import class from container app?
I have an app with a Today widget. 我有一个带有Today小部件的应用程序。 I would like to use a model class from the container app in the
TodayViewController.swift
. 我想在
TodayViewController.swift
使用容器应用程序中的模型类。
Is such a thing possible? 这样的事情可能吗?
I copied the file into the Today Extension folder and tried to import it. 我将文件复制到Today Extension文件夹并尝试导入它。 No dice.
没有骰子。
I can't find an answer in the documentation or online. 我无法在文档中或在线找到答案。
Thanks 谢谢
You need to include the file in the target membership. 您需要将文件包含在目标成员资格中。 Select the file and then, in the right hand pane, tick the correct target.
选择文件,然后在右侧窗格中勾选正确的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.