1

I have a project where I want to add in a framework only if required. This is to be done at build time. The framework library size will affect the app's size. Is there a way I can add the framework at build time? I'm trying to use the xconfig file to define the preprocessor macro and if that macro is defined I should want to add the framework, else ignore. Any suggestion on that?

Update: I'm building the project using a script file. The project has a .xcconfig file which holds the value for the preprocessor. When the script finds the preprocessor value not empty it adds the framework to the build.

Siddharthan Asokan
  • 3,832
  • 9
  • 38
  • 75

1 Answers1

2

Lookup @import versus #import

@import will link the framework as needed.

See - @import vs #import - iOS 7

Community
  • 1
  • 1
FitzerIRL
  • 21
  • 3