with a lot of dependencies ‣ Hard to manage a proper versioning for each module ‣ Easy to link ‣ Versioning management and locking for free • Using a package manager
strict versioning ‣ Useless if you want to point a dependency directly to a branch • Using direct git repository link with a specific branch pod 'iAdvizeLoggerLibrary', :git => 'ssh://(…)/mobile-ios-logger-library.git', :branch => 'master' Step 3 Rebuild with CocoaPods Two different ways to manage dependencies:
• Editing directly module files in the main app workspace like if the module was directly in your app ‣ Impossible with Carthage! • Test locally the integration of a module in the main app
:branch => 'master' 1. Add module dependency in the Podfile 2. Import, configure and use your module in your app import iAdvizeConversationService ConversationServiceManager.shouldDisplayPrincipalImageInChat = true let conversationRootViewController = ConversationServiceManager.initialViewController() as! UISplitViewController addControllerToTabBar(conversationRootViewController, at: 0)
and deserves as a module orchestrator • Instantiates, configures and displays each module • Observes modules events (notifications) and actions (delegate) • Can forward events between modules
sources of a domain (including tests) • Exposes events that apps or modules can observe • Provides a way to configure it • Provides an initial view controller (if it contains some UI) • In a separate project
to have a proper architecture and avoid duplications • Each module has its own Xcode project so it can be developed, run and tested independently (without integrating it in a main application) ‣ Can even be shipped as a single module app for acceptance tests • Lighter Xcode project which means low build time when you work on a module • Easy to integrate with the CocoaPods local link (path) • Even if we don’t use strict versioning, we get the benefits of module version locking with the Podfile.lock • More modules -> more chance you have to work alone at a time -> less conflicts
‣ Continuous integration, lint, localizables, run scripts… • Multiple Podspec and Podfile to work with and maintain • Switching module dependency from remote repository to local sources and vice versa has to be done manually in the Podfile pod 'iAdvizeLoggerLibrary', :git => ‘(…)mobile-ios-logger-library.git’, :branch => 'master' pod 'iAdvizeLoggerLibrary', :path => ‘../mobile-ios-logger-library’
Cocoapods specs repository was not relevant ‣ Use the git repository direct link feature of CocoaPods and point to a specific branch • Trying to use strict versioning on modules can quickly turn into a nightmare ‣ No versioning is applied to our modules. The Podfile.lock prevent from accidental updates and as we own our dependencies we are full aware of break changes • Applying a complex git workflow in the modules repositories is time- consuming ‣ Using a single branch with tags for versions in production seems to be the best solution