Import Swift Libraries

(Ido Shoshani) #1

How can I import swift libraries in visual studio 2017? When I used a sandbox online I could import libraries by typing “import Foundation” and “import Glibc.”

Now when I try to import the libraries, it says “Unknown Namespace.”

How can I fix this?
Thank You

(marc hoffman) #2

What platform is your project for? Foundation is a Cocoa library, and only available on Cocoa projects.

(Ido Shoshani) #3

Does that mean that I need a Mac in order to use the foundation library?

(marc hoffman) #4

Nof per se. It means Foundation, being a library of Apple’s operating system, will only be available when you create a project for macOS (or iOS/tvOS/watchOS).

Silver supports creating applications for many different platforms, .NET, Java/Android, Cocoa and more. On each platform, you can use the native libraries of that platform. Check out this blog post for four more details on this: