• Romain Bertozzi's avatar
    arch: remove singleton and add DI · 59f7ea31
    Romain Bertozzi authored
    This patch removes the singleton of the AccountService and
    AccountAdapter.
    
    These elements are still instantiated and kept once in the application
    thanks to the AppDelegate.
    They are then injected by initializers to the rest of the app.
    
    In order to achieve this, we had to change the delegate connection
    between the AccountAdapter and its Service. Indeed, we do not have a
    singleton pattern anymore and we can not keep a "self" reference
    because of the exportable_callback behaviour.
    So, we set the delegate to a static delegate.
    
    Tuleap: #1391
    Change-Id: I56d6e79f7d3c09d6ac3166643fa293cf6df67555
    Reviewed-by: default avatarSilbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
    59f7ea31
AppDelegate.swift 7.51 KB