Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are some linked frameworks look like a piece of Lego, while others like a toolbox?

I just noticed that some of the pods that I added appear as a Lego bricks:

enter image description here

And some pods appear as toolboxes:

enter image description here

in the linked libraries and frameworks section. As a whole, all my pods look like this:

enter image description here

Why is that?

Since the name of the section is "Linked Frameworks and Libraries", I assume that one of the icons represents a framework and the other represents a library? But which is which? And how does Xcode know that it is a framework or a library? I checked the podspecs of the pods but I didn't find anything about frameworks/libraries.

like image 294
Sweeper Avatar asked Jul 05 '16 07:07

Sweeper


1 Answers

Toolbox is a standard icon for CocoaTouchFramework and it's usually mean that it uses Foundation framework.

White Cube (lego bricks) means bundle. That can link whatever you need, it can be a pack of Localized.strings (ex: ZendeskSDK) or other assets.

Please note that there is a difference between how it's displayed inside Linked Frameworks and Libraries or Embedded Binaries than it is inside Finder.

enter image description here

And framework to work with both Simulator and Device must be built with different architectures (x86_64) vs (armv7,arm64). And it's handled by Xcode what to take from .framework, since you don't need to link it manually against different architecture. So in Xcode point of view, you always have in this section right .framework file ready for your architecture, so it can be displayed as toolbox. In your case library LTHPasscodeViewController does not contain autobuilding scheme (like SwiftyJSON for example). No xcodeproject besides demo, classes are not linked to .xcodeproj, so it's not created from CocoaTouchFramework.

When you select new Project from Xcode and choose Cocoa Touch Framework it create project for you. When you don't have a project it's just bundle (doesn't matter that has .framework extension).

like image 60
Jakub Avatar answered Nov 02 '22 16:11

Jakub