0
난 항상 즉시 (확인 전무 심지어 수 없습니다)을 BAD_ACCESS 오류birthdayContactIdentifier BAD_ACCESS
이 내가
import UIKit
import EventKit
class ViewController: UIViewController {
let eventStore : EKEventStore = EKEventStore()
override func viewDidLoad() {
super.viewDidLoad()
eventStore.requestAccessToEntityType(.Event) { (granted, error) in
if granted == true {
let startDate = NSDate()
let endDate = startDate.dateByAddingTimeInterval(7.0*86400.0)
let events = self.eventStore.eventsMatchingPredicate(self.eventStore.predicateForEventsWithStartDate(startDate, endDate: endDate, calendars: nil))
for event in events {
if event.calendar.type == .Birthday {
NSLog("\(event.title)")
NSLog("\(event.birthdayContactIdentifier)") // BAD_ACCESS
}
}
}
}
}
}
이전에 사과가 불행히도 해결책을 제시하지 못했습니다. 나는 birthdayPersonID를 시도 할 것인데, 그것이 연락처 프레임 워크와 호환되지 않을 가능성이 높습니다. 그러나 나는 다시보고하려고 노력할 것이다. – Guus
birthdayPersonID로 시도했지만 오류는 발생하지 않지만 식별자가 다르므로 올바른 연락처를 가져 오지 않습니다. – Guus
birthdayContactIdentifier가 잘못되면 어떻게 다른지 확인합니까? (거기에 단서가 있는지 궁금하다면) – Feldur