I am new to Mac development and am using xCode 14 to create a commandline project in swift. I need to use some functions in the messages.framework for iMessage stuff. I went to Build Phases and tried to add the framework with "Link Binary With Libraries" but the framework wasn't listed. So I did the "add other" dropdown and chose "add files" and navigated to "/System/Library/Frameworks/Messages.framework/" but even after I instantiated Messages() but it still says module not found.
How do I sucessfully add that framework to my xcode project so that I can use Messages()?