简体   繁体   中英

iOS Swift Today Extension: import class from container app?

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

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

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM