Static Library using frameworks in specific projects

前端 未结 4 1354
时光说笑
时光说笑 2020-12-14 02:39

I have created a static library containing all my generic classes. Some of these classes use frameworks.

Now I have two projects, one that uses some classes that us

4条回答
  •  旧巷少年郎
    2020-12-14 03:12

    It sounds like you have library bloat. To keep things small I think you need to refactor your library into separate libraries with minimal dependencies. You could try turning on "Dead Code Stripping" in the "Linker Flags" section of the build target info (Xcode 3.x) to see if that does what you want (doesn't require frameworks used by classes that are dead-stripped.)

    When you link against a framework on iOS I don't think that really adds any bloat since the framework is on the device and not in your application. But your library is still a bit bloated by having entire classes that never get used but are not stripped out of the library.

提交回复
热议问题