Would you be willing to share what different route you took?
Post
Replies
Boosts
Views
Activity
I just got this error. I hope someone has a good answer to this post.
I mean an instance of the Logger structure.
Xcode 13.1
I see no changes in the top bar.
When I go to the menu to build or to build for running, nothing happens. It doesn't show to be building like it usually does at the top bar when it shows a small circle turning blue in a circle.
I tried to open the issue navigator from the menu, but it won't start.
I did do a Clean Build Folder.
It started working for me, then stopped working, so I came back to this question.
Yeah. That's a good idea. I did that with an app that used reminders. Every time I made a change to the store that kept the reminders, I used the boolean value to let the function that the notification fired know my app was the one that changed the store.
I found this list in the main page for the Contacts framework. This looks like what I need.
Change History Data
class CNChangeHistoryAddContactEvent
class CNChangeHistoryAddGroupEvent
class CNChangeHistoryAddMemberToGroupEvent
class CNChangeHistoryAddSubgroupToGroupEvent
class CNChangeHistoryDeleteContactEvent
class CNChangeHistoryDeleteGroupEvent
class CNChangeHistoryDropEverythingEvent
class CNChangeHistoryEvent
class CNChangeHistoryFetchRequest
class CNChangeHistoryRemoveMemberFromGroupEvent
class CNChangeHistoryRemoveSubgroupFromGroupEvent
class CNChangeHistoryUpdateContactEvent
class CNChangeHistoryUpdateGroupEvent
protocol CNChangeHistoryEventVisitor
I'm trying to paste code in here. Whether I use the inline code feature or not, it doesn't come out right.
From my test code, it looks like they both do the same thing. What do you think about this?
(I wasn't able to uncheck that your answer is correct.)
I tried this code in a test project:
class ViewController: UIViewController {
let store = CNContactStore()
let keys = [CNContactGivenNameKey as CNKeyDescriptor]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
store.requestAccess(for: .contacts) {
permissionGranted, error in
let request = CNContactFetchRequest(keysToFetch: self.keys)
print("enumerate contacts")
do {
try self.store.enumerateContacts(with: request) {
contact, pointer in
print(contact.givenName)
}
} catch {
print("error")
print(error.localizedDescription)
}
print("unified contacts")
do {
let containers = try self.store.containers(matching: nil)
if containers.count > 1 {
fatalError("More than one container!")
}
let predicate = CNContact.predicateForContactsInContainer(withIdentifier: self.store.defaultContainerIdentifier())
let contacts = try self.store.unifiedContacts(matching: predicate, keysToFetch: self.keys)
for contact in contacts {
print(contact.givenName)
}
} catch {
print("error")
print(error.localizedDescription)
}
}
}
}
The result I get in the debug window is:
enumerate contacts
Kate
Daniel
John
Anna
Hank
David
unified contacts
Kate
Daniel
John
Anna
Hank
David
Yes. Thank you. I should probably just accept what the documentation says. I may be complicating things on myself. I'm not sure why anyone would fetch just the unified contacts. Thank you again.
I don't see Xcode 10 anywhere on that download page that Max108 gave in this accepted answer to this post. Am I able to download Xcode 10 anymore?
I have some old Xcode project files that I need to open using Xcode 10.3 or Xcode 10.1 in order to be able to be transitioned to a higher version of Swift than my project files use. I don't think that "transition"is the right word for it. I mean I need one of those older versions of Xcode to open my old Xcode project files so that those older versions of Xcode would notice that I'm using an older version of Swift and would ask me to alter my code to use a higher version of Swift. I have noticed before that if the code is too old, then the current version of Xcode will say the Swift version the code is using is too old for Xcode to alter to use the current version of Swift.