Confused about the different procedures for creating a thick static library in Xcode 6

I'm a little confused about how to create a universal infrastructure using the latest Xcode 6 and iOS 8. For example, this answer includes the following:

If you need to create universal static library that runs on both simulator and devices, then general steps are: 1. Build library for simulator 2. Build library for device 3. Combine them using lipo lipo -create -output "framework-test-01-universal" "Debug-iphonesimulator/framework-test-01.framework/framework-test-01" "Debug-iphoneos/framework-test-01.framework/framework-test-01" Note that framework-test-01 is my framework project name. 

One of my employees followed these instructions and created an executable file. Well, I don’t think this is what I am looking for. It contains a structure that looks like this:

enter image description here

In the future, another answer here talks about creating an aggregate goal with launching the Script build phase, which I am familiar with in the previous version of Xcode. When I use this process, I get what I expect. The folder structure is as follows:

enter image description here

Can anyone help eliminate this confusion we have?

What is the difference between the two?

I mean, this is the first application creation procedure. , which can work both on the simulator and on the device, and the second - to create a static library ?

+2
cocoa-touch cocoa ios8 xcode6
Nov 25 '14 at 20:30
source share
2 answers

An important distinction between a library and a wireframe. A structure is a specific folder structure that contains your library and headers.

Lipo unites libraries. Thus, the instructions have an example of execution that relates to the library inside the already built structure (once for iphoneos, once for a simulator). The only difference between the structures is the library, therefore, using lipo to combine the libraries, you get a bold (or more complete) library with all supported frameworks.

This first related answer tells you how to create both a framework and an application. Just worry about the frame part. Create a framework twice for different purposes (iOS device and simulator). Verify that the Create Active Architecture Only option is set to None. You probably want to create one for release, not debugging, but it depends on your specific needs.

+3
Nov 25 '14 at 21:29
source share

You are too close to the correct answer. the only thing you need to do is

  • Rename "framework-test-01-universal" to "framework-test-01" (the original name without a suffix) - it is important!

  • Go to one of the * .frameworks (for example, the Debug-ios folder) and replace the library with the new library "framework-test-01".

Here it is! ./Debug-ios/framework-test-01.framework - is ready to use bold binary! You can import it into your project!

Please see here for more details: How to export the "fat" Cocoa Touch Framework (for simulator and device)?

+1
Apr 15 '15 at 13:59 on
source share



All Articles