[英]How to show data from app to Today Extension Swift
I have a app with data stored in core data but I also need to pass that data to my today extension.我有一个数据存储在核心数据中的应用程序,但我还需要将该数据传递给我今天的扩展。 I was trying to do it with core data but it doesn't work.
我试图用核心数据来做,但它不起作用。 Maybe I would have to user userdefaults to pass the data from the app to the today extension.
也许我必须使用 userdefaults 才能将数据从应用程序传递到今天的扩展程序。
Any help will be greatly appreciated.任何帮助将不胜感激。
I think target only missing.我认为目标只是缺少。
Try like this像这样尝试
Add today extension target membership for .xcodeModalId为 .xcodeModalId 添加今天的扩展目标成员资格
Step: Click on your model file, and select both targets under 'Target Membership' on right-hand panel步骤:单击您的模型文件,然后在右侧面板的“Target Membership”下选择两个目标
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.