2017-08-24 09:03:40.130009-0400 cfaNow Watch App Extension[6906:377766] [bg_app_refresh] -[WKRefreshBackgroundTask cleanupStorage]_block_invoke:213: Error attempting to reach file:///Users/justindomnitz/Library/Developer/CoreSimulator/Devices/264AA014-FD6C-426A-88DF-64E502393BAF/data/Containers/Data/PluginKitPlugin/107681EE-B30E-49CD-9416-8F030D1CA0BF/Library/com.apple.watchkit/bktasksnapshot_(null): Error Domain=NSCocoaErrorDomain Code=260 “The file “bktasksnapshot_(null)” Couldn’t be opened because there is no such file.” UserInfo={NSURL=file:///Users/justindomnitz/Library/Developer/CoreSimulator/Devices/264AA014-FD6C-426A-88DF-64E502393BAF/data/Containers/Data/PluginKitPlugin/107681EE-B30E-49CD-9416-8F030D1CA0BF/Library/com.apple.watchkit/bktasksnapshot_(null),NSFilePath=/Users/justindomnitz/Library/Developer/CoreSimulator/Devices/264AA014-FD6C-426A-88DF-64E502393BAF/data/Containers/Data/PluginKitPlugin/107681EE-B30E-49CD-9416-8F030D1CA0BF/Library/com.apple.watchkit/bktasksnapshot_(null),NSUnderlyingError=0x79f3f3c0 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
解决方法
WKExtension.shared().scheduleSnapshotRefresh(withPreferredDate: fireDate,userInfo: nil) { error in if (error == nil) { print("successfully scheduled snapshot. All background work completed.") } }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。