Modularización de una aplicación iOS: por qué y cómo dividimos Badoo en módulos

En el desarrollo de Badoo iOS, hemos estado creando mĂłdulos durante varios años y la mayor parte del nuevo cĂłdigo se desarrolla fuera del cĂłdigo base de la aplicaciĂłn. Ahora tenemos más de 100 mĂłdulos para Badoo y Bumble. En este artĂ­culo, compartirĂ© nuestra experiencia y responderĂ© las preguntas más populares sobre modularizaciĂłn: 





  • por quĂ© principio asignar mĂłdulos; 





  • cĂłmo organizar las conexiones entre ellos; 













  • ;













, iOS- Core- , FunCorp « ». .





— , , . , . :





  1. . , — , . .





  2. . , , - . — , , .





, . ?





  1. . : . 





  2. . , , .





  3. . , .





  4. . , , , , . .





, , , - .





? , , , : , , . . : ? :





  • — : «», «», «». .





  • () , - (, ) .





, .   ( ). , - “” -.





— - iOS, Apple ID. , iOS, Apple Apple ID. . ?





  1. .





  2. .





  3. Apple ID .





  4. …





  5. !





, . .





, ?

 





, :





  1. . - , (, , . .), -.





  2. . view- . UIKit -.





  3. , UI. . .





, ( ). :





(, ), — . , , , UI . 





, UI- . : ?





UIGallery, UI-. - — :





  • UI : , ;





  • , ( , );





  • (Visual Regression Test, VRT) . , : . -, VRT : , . .





, Badoo Bumble:





  • 110 ;





  • - , ;





  • ;





  • ;





  • : .





, , . , , . .





, . Badoo, .





, , , , . .





— : . ( 100), , , . , . . , .





, , 1, , . , , , , . . , , . , . «» , , .





, , — . , , .





, . , . - , , , , , — , . . , - , , .





?





  1. Badoo ( Chat, ChatUI ChatService).





  2. Bumble. , , Badoo, Bumble. , Bumble, Badoo. , .





  3. , . — . , , .





  4. , .









  1. . , .





  2. . , , .





  3. , . : , , , - , , . . , .





  4. , . , QA, — , . .





iOS-, . 









, , — . , , 50 - Swift , . Build Settings . , , , .





, : ? Swift? / Bitcode? . . , . .





, : , debug-, Bitcode debug- . . ?





. ( ) CocoaPods. Development-, , post_install- . , , CocoaPods, , . , , , - . , CocoaPods — Enterprise- , . .





. — xcconfig’. . xcconfig:





  1. , Xcode (xcodeproj/project.pbxproj).





  2. . #include.





  3. , .





, , , build- (Debug, Release, Production ). .





: Bundle ID, Info.plist, modulemap:





xcconfig , , :





  1. .





  2. .





  3. .





  4. .





, Git pre-commit hooks Build Settings .









, , — . , , , . Xcode .





, , , build- . — , CocoaPods, , Xcodeproj « , , xcworkspace».





, , . . .





- « », : ? .





-, , . , , .  





-, . , Xcode : Framework Search Paths Derived Data.





(, ).





-, — . , , .





, , . , , . . .









— . , , . :





  1. Xcode . .





  2. — . , .





  3. - , - . . .





  4. . , — . , , , , , .





? — Swift-, , . Standalone- XcodeGen. Deps, . :





, , xcconfig. :





  1. , .





  2. .





  3. xcconfig’.





  4. .





  5. .





, . xcconfig, . , Swift , . 





, , …





. !








All Articles