nova
nova

Reputation: 791

All framework and static library files compiled to app?

  1. I am wondering whether Xcode compile all the .m sources of frameworks and .a to my app, for example, if I import UIKit framework and I only using UIButton.h, will all files in UIKit be compiled to my app? what about static library?

  2. And if I import some frameworks in building my own static library, will the files of frameworks be compiled into .a?

Upvotes: 1

Views: 249

Answers (1)

danielM
danielM

Reputation: 2512

Linking to standard frameworks like UIKit won't add any extra data to your binary. All of the standard frameworks are part of the OS so you're only making a reference to these frameworks. However, any custom static libraries will have to be included because that compiled code is not a part of the OS.

The same thing goes for your own library. Importing standard frameworks should not increase the size of your .a file.

Upvotes: 1

Related Questions