iOS组件框架,目前属于研发阶段,自己先踩踩坑。
主要解决目的:
1.降低框架耦合:目前创业型企业iOS人员比较少,所以iOS代码框架基本都是保持2个project,一个项目project,一个cocoapods project,当然业务复杂的公司早已做了组件化,这样维护成本也低。其实与业务无关的类库可以抽取出来,如果一直放在主工程中,不同的iOS开发人员维护,会导致耦合度的越来越高。
2.抽离出来的类库与业务无关,减少工程之间的依赖,工程搬到哪里都可以使用。
3.可以提高编译速度,维护某一个工程的时候,无需编译其他无关的工程。
4.在业务层也做组件化,业务更清晰,利用urlschema+protocol解耦。