在swift share扩展中向coredata添加值
我需要在swift share扩展中插入和获取coredata
中的数据。 我怎样才能做到这一点
class ShareViewController: SLComposeServiceViewController,NetworkSelectionViewControllerDelegate, PublishSelectionViewControllerDelegate,ApproverSelectionViewControllerDelegate{ var selectedNetworkName = "Default" var selectedPublishName = "Select" var selectedApproverName = "Select" override func isContentValid() -> Bool { // Do validation of contentText and/or NSExtensionContext attachments here return true }