kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 474 forks source link

[feature] A template to make universal dynamic framework #203

Open dodikk opened 9 years ago

dodikk commented 9 years ago

AS a Library vendor I WANT a project template that produces fat binaries SO THAT I can easily distribute them to my customers

As of xCode6, the built-in framework produces binaries for either of

See the log below

dodikk$ pwd
/Users/dodikk/Library/Developer/Xcode/DerivedData/HelloSwiftFramework-gcglkmozajqrsidsqtfcewuujygs/Build/Products/Debug-iphonesimulator/HelloSwiftFramework.framework

dodikk$ ls
Headers         HelloSwiftFramework Info.plist      Modules

dodikk$ file HelloSwiftFramework 
HelloSwiftFramework: Mach-O 64-bit dynamically linked shared library x86_64
dodikk commented 9 years ago

As apple's framework uses dynamic libraries under the hood. For this reason it requires linking the static lib dependencies into it.

So I think, this repo should not be retired since

  1. Static frameworks are still a good option for code sharing
  2. Some lipo create scripts are still required to produce a single dynamic framework binary for both the device and the simulator.
AlexDenisov commented 9 years ago

@dodikk, :+1: I'm still using iOS-Universal-Framework, because new frameworks work only for iOS8.

dodikk commented 9 years ago

It's not apple's largest problem. Here are a few more :

  1. Xcode does not build fat frameworks (for both device and simulator).
  2. Xcode frameworks are dynamic while "most libs out there" are static which causes conflicts and dependency management challenges.
  3. No idea how apple frameworks are going to work with cocoapods due to (2)