微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

网址和位置的EKReminder问题,始终返回nil

如何解决网址和位置的EKReminder问题,始终返回nil

我正在使用EKReminder,我注意到URL和Location始终返回nil,但其他一切都很好。我想念什么吗?在这里,我的用于获取提醒的代码可以正常工作,但URL和Location始终返回nil:

ReminderDataVar.ReminderIden.append(reminderListDetail(

re_iden: getReminderDetail.calendarItemIdentifier,re_created: Int(getReminderDetail.creationDate?.timeIntervalSince1970 ?? 0),re_lastmodif: Int(getReminderDetail.lastModifiedDate?.timeIntervalSince1970 ?? 0),re_cate: getReminderDetail.calendar.title,re_cateColor: getReminderDetail.calendar.cgColor,re_title: getReminderDetail.title,re_complete_date: Int(getReminderDetail.completionDate?.timeIntervalSince1970 ?? 0),re_is_complete: getReminderDetail.isCompleted,re_primary: getReminderDetail.priority,re_notes: getReminderDetail.notes ?? "NA",re_date_due: Int(getReminderDetail.dueDateComponents?.date?.timeIntervalSince1970 ?? 0),re_url: getReminderDetail.url?.absoluteString ?? "NA",re_recurrence_freq: freqrecurrence,re_recurrence_end: endrecurrence,re_interval: getInterval,re_alarm: getAlarmTime,re_invite: getinvite,re_location_title: getReminderDetail.alarms?.first?.structuredLocation?.title ?? "NA",re_location_mode: locationmode,re_location_latitude: getReminderDetail.alarms?.first?.structuredLocation?.geoLocation?.coordinate.latitude ?? 0.0,re_location_longitude: getReminderDetail.alarms?.first?.structuredLocation?.geoLocation?.coordinate.longitude ?? 0.0,re_location_radius: getReminderDetail.alarms?.first?.structuredLocation?.radius ?? 0.0))

我已经尝试过以下测试调试:

print(getReminderDetail.url?.absoluteString) // return nil
print(getReminderDetail.alarms?.first?.structuredLocation?.title) // return nil

我去检查一下iOS和MacOS上的提醒,它实际上可以正常显示工作,但是为什么我的应用程序始终总是显示nil?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。