Skip to content
  • Romain Bertozzi's avatar
    bridge: replace nsnotification by delegation · 8164698a
    Romain Bertozzi authored
    This patch takes care of replacing the NSNotification events fired
    from the AccountConfigurationManagerAdaptator by a delegation pattern.
    
    Indeed, we only want the AccountsService to be notified of callbacks
    coming from the daemon. NSNotifications fired from the NSNotification
    default center are broadcasted events. We want to avoid them as much
    as possible.
    
    In order to achieve this, a protocol is declared on the Swift part of
    the application.
    Then, the Ring-Swift.h generated file will take care of exposing it to
    the objective-c source code (thanks to the @objc annotation).
    
    We need the pch file to be present to resolve UIKit and Foundation in
    the generated Ring-Swift file.
    
    The accountsService now registers itself to the
    AccountConfigurationManagerAdaptator as the reveiver of its callbacks.
    
    Because notifications are not used anymore at this time, we remove
    the related files factorizing the notifications names.
    
    Tuleap: #1405
    Change-Id: I25c906ef6bcfd019cfb331047768883b39755275
    8164698a