iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

[feature] A template to make universal dynamic framework

Open dodikk opened this issue 10 years ago • 3 comments

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

  • Device only
  • Simulator only

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 avatar Oct 27 '14 07:10 dodikk

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.

dodikk avatar Oct 27 '14 07:10 dodikk

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

AlexDenisov avatar Oct 27 '14 08:10 AlexDenisov

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)

dodikk avatar Oct 27 '14 08:10 dodikk