Im working on a large app, and I have divided it into separate targets
. I also have a few extensions
, that are used in many of these targets. I'm wondering if it's better to create separate target
for this shared extensions
and then import it in every module
that uses it, or maybe have these extensions files
added to all targets that will use them by selecting few targets under "Target Membership"? The second option would actually be more convienient to me, but I'm wondering if this would not make all this extensions be compiled few times - for every target selected.
Asked
Active
Viewed 200 times
1

Damian Dudycz
- 2,622
- 19
- 38
3 Answers
1
I think the best would be to have all this extension in one place like a target or an external library and to import it where you need them.

Xavier Bauquet
- 712
- 1
- 6
- 18
0
I would give the extensions multiple targets or alternatively add them to compile sources like it is suggested here. Of course it would be compiled multiple times then, but that's okay.

Josef Zoller
- 921
- 2
- 8
- 24
0
I would recommend you creating custom private pod for this goal, including your extensions. Afterwards, you just need to pod install your pod for the other targets.

dvp.petrov
- 1,110
- 13
- 20