title: SwiftUI on macOS, how to use custom image symbol on Button?
body: <p><strong>READ THE QUESTION CAREFULLY, THIS IS A MAC APP, systemName is not available on mac os</strong></p>
  
  <p>I'm trying to build a simple application using swiftUI on macOS, however I'm having some trouble displaying some icons.</p>
  
  <p>I have now read everywhere that you need to download the SF Symbols app and export the symbols yourself in order to use them, so I did that, then I added the exported symbol to the <code>.xcassets</code> and now I'm trying to create a button with an image, so here is the code:</p>
  
  <pre class="lang-swift prettyprint-override"><code>import SwiftUI
  
  struct ActionBar: View {
  
      var body: some View {
          HStack {
              Spacer()
              Button(action: {
  
              }) {
                  Image("Plus")
                      .font(Font.system(size: 24, weight: .light))
                      .foregroundColor(Color.red)
                  Text("Test")
              }
          }
          .frame(maxWidth: .infinity)
          .padding()
          .background(Color.init(red: 0.8, green: 0.8, blue: 0.8))
      }
  }
  
  struct ActionBar_Previews: PreviewProvider {
      static var previews: some View {
          ActionBar()
      }
  }
  
  </code></pre>
  
  <p>I have tried many variations, for example:</p>
  
  <pre class="lang-swift prettyprint-override"><code>Image(nsImage: NSImage(name: "Plus"))
  </code></pre>
  
  <p>but all the information out there, including apples own <a href="https://developer.apple.com/documentation/uikit/uiimage/configuring_and_displaying_symbol_images_in_your_ui" rel="nofollow noreferrer">documentation</a> only talk about UIImage which as far as I understood is part of UIKit which is the iOS version of the UI framework, has anybody gotten this to work on macOS?</p>
  
  <p>Thanks a lot!</p>
  
  <p>Edit: the asset was imported as a <code>Image Symbol Set</code>, Xcode doesn't throw any errors as I just took the svg generated by the SF Symbols app and put it directly on the assets.</p>
  
  <p>Edit 2: I just run into this <a href="https://forums.developer.apple.com/thread/119331" rel="nofollow noreferrer">post</a> which states SVG support is wonky... I tried converting the SVG into a PNG, but xcode does not accept pngs as Symbol sets... so, I guess this feature is just plain broken? which sucks...</p>