iOS Swift Today Extension: import class from container app?

爷,独闯天下 提交于 2019-11-29 11:20:29

问题


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:


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



来源:https://stackoverflow.com/questions/28301662/ios-swift-today-extension-import-class-from-container-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!