Moldrok
Moldrok

Reputation: 103

Xcode Swift executable size much bigger than Objective-C executable

Executable size of Swift application is much bigger than size of Objective-C application.

For a new empty Cocoa Application project :

If I look at the generated package, there is a lot of frameworks included :

I did not find project parameters to specify to include these libraries...

How is it that Swift executables are not build the same as in Objective-C ?

Version of Xcode used : 6.1.1

Upvotes: 10

Views: 3551

Answers (1)

Mick MacCallum
Mick MacCallum

Reputation: 130222

This is to be expected.

For the time being, Swift itself lives in the binary of each application built with it. This may change when Swift reaches a release that Apple is comfortable bundling with iOS, but for now it's just something we have to live with. This behavior is the reason you can build an iOS 7/8 application in Swift 1.0/1.1/1.2 and it just works when you build and run.

You can find more info on this in this article.

Upvotes: 10

Related Questions