2

I developed a sample cocoa app using swift language for Yosemite. It looks like following dylibs gets bundled within the app.

libswift_stdlib_core.dylib
libswiftAppKit.dylib
libswiftCoreGraphics.dylib
libswiftDarwin.dylib
libswiftDispatch.dylib
.
.
.

These dylibs takes around 3.5 MB of memory. Why does these dylibs get bundled within the application? I have also seen these dylibs within embedded frameworks which is developed using swift.

I do not want these dylibs to be bundled within the application/framework. It would be very helpful if someone can share information about this.

Thanks, Srinivas

modusCell
  • 13,151
  • 9
  • 53
  • 80
Srinivas
  • 23
  • 3

2 Answers2

3

Until the Swift runtime and libraries are included in the operating system, and you're willing to drop support for all operating systems prior to that version, you'll have to include them in your app like this.

Catfish_Man
  • 41,261
  • 11
  • 67
  • 84
1

A dylib file is a dynamic library. It looks like Swift is not statically linked, so the executable is not standalone. Those dylibs look like they represent the core of the language.

It looks like an overhead you can't get rid of unless you can find a way to statically link them.

Millie Smith
  • 4,536
  • 2
  • 24
  • 60