How to fetch all macos contacts

Hello,
I am trying to fetch all contact information to put it in an array, i saw the contacts framework but i dont understand how to fetch every contact and not only one known.
How can i do that ?
thanks you in advance.

I think you're asking a question about iOS or MacOS development. This forums is mostly about Swift as a programming language, and not about platform specific frameworks, or third party frameworks. You may have better success asking your question over at Apple Developer Forums, on Apple's website.

That said, you may want to search for CNContactFetchRequest and CNContactStore