Follow the instructions for Flutter desktop to create
a Flutter desktop app.

Open the yourapp/macos/Runner.xcworkspace in Xcode.
    
      Drag your precompiled library (libyourlibrary.dylib)
into Runner/Frameworks.
      Click Runner and go to the Build Phases tab.
        
          Drag libyourlibrary.dylib into the
Copy Bundle Resources list.
          Under Embed Libraries, check Code Sign on Copy.
          Under Link Binary With Libraries,
set status to Optional. (We use dynamic linking,
no need to statically link.)
        
      
      Click Runner and go to the General tab.
        
          Drag libyourlibrary.dylib into the Frameworks,
Libraries and Embedded Content list.
          Select Embed & Sign.
        
      
      Click Runner and go to the Build Settings tab.
        
          In the Search Paths section configure the
Library Search Paths to include the path
where libyourlibrary.dylib is located.