merge refactor
authorbuff <andreas@pep-project.org>
Thu, 06 Jun 2019 17:42:26 +0200
changeset 896018293306da7d
parent 8542 2505bdd9569b
parent 8959 6f60a320e694
child 8963 4698e215d6b2
child 8965 0c001040c45c
child 9044 e76ddbf2c48a
merge refactor
pEpForiOS/Background/AppendMailsOperation.swift
pEpForiOS/Background/BaseOperation.swift
pEpForiOS/Background/CheckOutgoingMessagesOperation.swift
pEpForiOS/Background/ConcurrentBaseOperation.swift
pEpForiOS/Background/CreateRequiredFoldersOperation.swift
pEpForiOS/Background/DecryptMessageOperation.swift
pEpForiOS/Background/DecryptMessagesOperation.swift
pEpForiOS/Background/DeleteFolderOperation.swift
pEpForiOS/Background/DeleteFoldersOperation.swift
pEpForiOS/Background/EncryptAndSendOperation.swift
pEpForiOS/Background/Error/BackgroundError.swift
pEpForiOS/Background/Error/ErrorContainer.swift
pEpForiOS/Background/Error/PantomimeError.swift
pEpForiOS/Background/Error/ReportingErrorContainer.swift
pEpForiOS/Background/Error/ServiceErrorProtocol.swift
pEpForiOS/Background/FetchMessagesOperation.swift
pEpForiOS/Background/FetchNumberOfNewMailsOperation.swift
pEpForiOS/Background/FetchOlderImapMessagesOperation.swift
pEpForiOS/Background/FixAttachmentsOperation.swift
pEpForiOS/Background/FolderInfoOperation.swift
pEpForiOS/Background/ImapFolderBuilder.swift
pEpForiOS/Background/ImapSyncOperation.swift
pEpForiOS/Background/MatchUidToMsnOperation.swift
pEpForiOS/Background/MoveToFolderOperation.swift
pEpForiOS/Background/MySelfOperation.swift
pEpForiOS/Background/PersistentImapFolder.swift
pEpForiOS/Background/SelfReferencingOperation.swift
pEpForiOS/Background/StoreFolderOperation.swift
pEpForiOS/Background/StorePrefetchedMailOperation.swift
pEpForiOS/Background/SyncFlagsToServerOperation.swift
pEpForiOS/Background/SyncFoldersFromServerOperation.swift
pEpForiOS/Background/SyncMessagesOperation.swift
pEpForiOS/Background/UIDCopyOperation.swift
pEpForiOS/Error/ErrorPropagator.swift
pEpForiOS/Models/Account+Extentions.swift
pEpForiOS/Models/AccountUserInput.swift
pEpForiOS/Models/CdAccount+Extension.swift
pEpForiOS/Models/CdAccount+pEp.swift
pEpForiOS/Models/CdAttachment+Extension.swift
pEpForiOS/Models/CdAttachment+Pantomime.swift
pEpForiOS/Models/CdFolder+Extension.swift
pEpForiOS/Models/CdFolder+Pantomime.swift
pEpForiOS/Models/CdFolderPredicateFactory+IMAP.swift
pEpForiOS/Models/CdIdentity+pEp.swift
pEpForiOS/Models/CdImapFlags+Pantomime.swift
pEpForiOS/Models/CdMessage+Extension.swift
pEpForiOS/Models/CdMessage+Pantomime.swift
pEpForiOS/Models/CdMessage+pEp.swift
pEpForiOS/Models/CdMessagePredicateFactory+Extension.swift
pEpForiOS/Models/CdMessagePredicateFactory+Imap.swift
pEpForiOS/Models/ContentDispositionType + Conversion.swift
pEpForiOS/Models/Filter/AttachmentFilter.swift
pEpForiOS/Models/Filter/UnifiedFilter.swift
pEpForiOS/Models/Folder+Imap.swift
pEpForiOS/Models/Folder+pEp.swift
pEpForiOS/Models/FolderType+IMAP.swift
pEpForiOS/Models/ImapFlags+Pantomime.swift
pEpForiOS/Models/Message+FakeMessage.swift
pEpForiOS/Models/Message+IMAP.swift
pEpForiOS/Models/Message+pEp.swift
pEpForiOS/Models/Server+Fetching.swift
pEpForiOS/Models/UnifiedInbox.swift
pEpForiOS/Network/AuthMethod.swift
pEpForiOS/Network/ConnectInfo/ConnectInfo.swift
pEpForiOS/Network/ConnectInfo/EmailConnectInfo+Extension.swift
pEpForiOS/Network/ConnectInfo/EmailConnectInfo.swift
pEpForiOS/Network/ConnectInfo/deprecated/LegacyConnectInfoProvider.swift
pEpForiOS/Network/DefaultImapSyncDelegate.swift
pEpForiOS/Network/EmailService.swift
pEpForiOS/Network/ImapService.swift
pEpForiOS/Network/ImapSyncError.swift
pEpForiOS/Network/NetworkError.swift
pEpForiOS/Network/Service/AccountVerificationService/AccountVerificationService.swift
pEpForiOS/Network/Service/AccountVerificationService/AccountVerificationServiceProtocol.swift
pEpForiOS/Network/Service/FetchImapFoldersService.swift
pEpForiOS/Network/Service/FetchNumberOfNewMailsService.swift
pEpForiOS/Network/Service/FetchOlderImapMessagesService.swift
pEpForiOS/Network/Service/FolderSyncService/FolderSyncService.swift
pEpForiOS/Network/Service/FolderSyncService/FolderSyncServiceProtocol.swift
pEpForiOS/Network/Service/ImapConnectionDataCache.swift
pEpForiOS/Network/Service/LoginImapOperation.swift
pEpForiOS/Network/Service/LoginSmtpOperation.swift
pEpForiOS/Network/Service/MessageSyncService/MessageSyncService.swift
pEpForiOS/Network/Service/MessageSyncService/MessageSyncServiceProtocol.swift
pEpForiOS/Network/Service/NetworkService.swift
pEpForiOS/Network/Service/NetworkServiceWorker.swift
pEpForiOS/Network/Service/QualifyServerIsLocalOperation.swift
pEpForiOS/Network/Service/QualifyServerIsLocalService.swift
pEpForiOS/Network/Service/QualifyServerIsLocalServiceProtocol.swift
pEpForiOS/Network/Service/ServiceUtil.swift
pEpForiOS/Network/Service/SharedObjects.swift
pEpForiOS/Network/SmtpSendError.swift
pEpForiOS/Network/SmtpService.swift
pEpForiOS/UI/EmailDisplay/Util/FlagImages.swift
pEpForiOS/UI/EmailDisplayList/EmailListViewModel+MessageFolderDelegate.swift
pEpForiOS/UI/EmailDisplayList/ProfilePictureComposer.swift
pEpForiOS/UI/Filter/ViewModel/FilterCellViewModel.swift
pEpForiOS/UI/Filter/ViewModel/FilterUpdateProtocol.swift
pEpForiOS/UI/MessageThreading/Message+MessageIdentitfying.swift
pEpForiOS/UI/MessageThreading/MessageIdentitfying.swift
pEpForiOS/Util/BackgroundTaskProtocol.swift
pEpForiOS/Util/ConnectionManager.swift
pEpForiOS/Util/DebugMergePolicy.swift
pEpForiOS/Util/Extensions/Attachment+Extension.swift
pEpForiOS/Util/Extensions/CWIMAPMessage+pEp.swift
pEpForiOS/Util/Extensions/NSSecureCoding+Extension.swift
pEpForiOS/Util/Extensions/Notification+CWServiceClientNotificationParsing.swift
pEpForiOS/Util/Extensions/PEPSession+Extensions.swift
pEpForiOS/Util/Extensions/String+Attachment.swift
pEpForiOS/Util/Extensions/Substring+Email.swift
pEpForiOS/Util/Extensions/URL+MIME.swift
pEpForiOS/Util/IMAP/PantomimeFolderAttribute+Extensions.swift
pEpForiOS/Util/IMAP/VirtualMailbox/Folder+VirtualMailbox.swift
pEpForiOS/Util/IMAP/VirtualMailbox/ProviderSpecific/GmailSpecificInformation.swift
pEpForiOS/Util/IMAP/VirtualMailbox/ProviderSpecific/ProviderSpecificInformationProtocol.swift
pEpForiOS/Util/KickOffMySelfProtocol.swift
pEpForiOS/Util/LimitedOperationQueue.swift
pEpForiOS/Util/Log/Log+ASL.swift
pEpForiOS/Util/Log/Log.swift
pEpForiOS/Util/MimeTypeUtil.swift
pEpForiOS/Util/NSAttributedString+Extension.swift
pEpForiOS/Util/OAuth2/OAuth2AccessToken.swift
pEpForiOS/Util/OAuth2/OAuth2AccessTokenProtocol.swift
pEpForiOS/Util/PEPUtil.swift
pEpForiOS/Util/PeriodicTask.swift
pEpForiOS/Util/Reachability/NetworkReachability.swift
pEpForiOS/Util/Reachability/NetworkReachabilityProtocol.swift
pEpForiOS/Util/Reachability/ReachabilityUtils.swift
pEpForiOS/Util/Reachability/ReachabilityUtilsProtocol.swift
pEpForiOS/Util/ReferenceCounter.swift
pEpForiOS/Util/jsonMimeType.txt
pEpForiOSTests/AccountVerificationServiceTests.swift
pEpForiOSTests/FlagImageTests.swift
pEpForiOSTests/Models/Filter/AttachmentFilterTest.swift
pEpForiOSTests/TestUtils/NetworkServiceObserver.swift
pEpForiOSTests/TestUtils/ReachabilityUtilsTest/NetworkReachibilityMock.swift
pEpForiOSTests/TestUtils/ReachabilityUtilsTest/ReachabilityUtilsTests.swift
pEpForiOSTests/pEpForiOSTests-Bridging-Header.h
subModules/pEpIOSToolbox/pEpIOSToolboxTests/SortedSetTest.swift
     1.1 --- a/.hgignore	Thu May 09 11:47:04 2019 +0200
     1.2 +++ b/.hgignore	Thu Jun 06 17:42:26 2019 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -regexp
     1.5 +syntax: regexp
     1.6  \.DS_Store
     1.7  xcuserdata/.*
     1.8  Pods/.*
     1.9 @@ -15,4 +15,4 @@
    1.10  
    1.11  ^.*\.pyc$
    1.12  
    1.13 -glob
    1.14 +syntax: glob
     2.1 --- a/.hgtags	Thu May 09 11:47:04 2019 +0200
     2.2 +++ b/.hgtags	Thu Jun 06 17:42:26 2019 +0200
     2.3 @@ -53,3 +53,5 @@
     2.4  e6f3a95032a7f1178d5b7667716cd0d91ec9c4c8 v0.0.41_b2
     2.5  43bb6db6c495713868e09008abe1aae32c1e2251 v0.0.41_b3
     2.6  b1a210a695e21af4f626d5e612c16aa7cac15e78 v0.0.42_b1
     2.7 +746a8ed96f6fa5cd0fd3db80279c5896afe0f727 v0.0.46
     2.8 +ad2fe555cc23bac690972ccb7b882bb0efcc426c v0.0.47
     3.1 --- a/CHANGESETS	Thu May 09 11:47:04 2019 +0200
     3.2 +++ b/CHANGESETS	Thu Jun 06 17:42:26 2019 +0200
     3.3 @@ -1,9 +1,9 @@
     3.4 -v0.0.42_b1
     3.5 -pEpEngine f344cad791f2 (sync)
     3.6 -pEpObjCAdapter f5eeb38557f3
     3.7 +v0.0.47
     3.8 +pEpEngine 523fb9710660 (sync)
     3.9 +pEpObjCAdapter ab5cfe7fdccb
    3.10  netpgp-et 8848ce82014d
    3.11 -MessageModel 20449892372f
    3.12 -pantomime-iOS e05d5f2d02bc
    3.13 +MessageModel 2daeac79a9e3
    3.14 +pantomime-iOS 66aee36bcd21
    3.15  libAccountSettings 3d94e78b587e
    3.16  ldns 70cfa2739c2a71db098e738d2fd16ae1025b2362
    3.17  OpenSSL-for-iPhone 10019638e80e8a8a5fc19642a840d8a69fac7349
     4.1 --- a/README.md	Thu May 09 11:47:04 2019 +0200
     4.2 +++ b/README.md	Thu Jun 06 17:42:26 2019 +0200
     4.3 @@ -20,7 +20,6 @@
     4.4  sudo port install py27-lxml
     4.5  
     4.6  sudo port install python_select
     4.7 -0
     4.8  
     4.9  sudo port install autoconf
    4.10  sudo port install libtool
    4.11 @@ -87,10 +86,10 @@
    4.12  java -Dgreenmail.setup.test.all -Dgreenmail.users=test001:pwd@localhost,test002:pwd@localhost,test003:pwd@localhost -jar ~/Downloads/greenmail-standalone-1.5.9.jar
    4.13  ```
    4.14  
    4.15 -The non-existing file referenced in the unit test project, ./pEpForiOSTests/TestUtil/SecretTestData.swift, must be
    4.16 +The non-existing file referenced in the unit test project, pEpForiOSTests/../pEp_for_iOS_intern/SecretTestData.swift, must be
    4.17  created, with a class named SecretTestData, derived from TestDataBase.
    4.18  
    4.19 -In `SecretTestData.swift`, you must override `populateVerifiableAccounts`, adding servers that are either registered in the LAS database or provide DNS SRV for IMAP and SMTP in order to test the "automatic account login".
    4.20 +In `SecretTestData.swift`, you must at least override `populateVerifiableAccounts`, adding servers that are either registered in the LAS database or provide DNS SRV for IMAP and SMTP in order to test the "automatic account login".
    4.21  
    4.22  If you want to run the tests against your own servers, override `populateAccounts` accordingly.
    4.23  
    4.24 @@ -103,13 +102,13 @@
    4.25  
    4.26  ### secret.xcconfig (needed for OAuth2 config secrects and others)
    4.27  
    4.28 -Create secret.xcconfig @ pEpForiOS/secret.xcconfig, with those contents:
    4.29 +Create secret.xcconfig @ pEpForiOS/../pEp_for_iOS_intern/secret.xcconfig, with those contents:
    4.30  
    4.31  ```
    4.32 -OAUTH2_GMAIL_CLIENT_ID = some_content
    4.33 -OAUTH2_GMAIL_REDIRECT_URL_SCHEME = some_content
    4.34 +OAUTH2_GMAIL_CLIENT_ID = your_secret_content
    4.35 +OAUTH2_GMAIL_REDIRECT_URL_SCHEME = your_secret_content
    4.36  
    4.37 -OAUTH2_YAHOO_CLIENT_ID = some_content
    4.38 +OAUTH2_YAHOO_CLIENT_ID = your_secret_content
    4.39  OAUTH2_YAHOO_CLIENT_SECRET = some_content
    4.40  
    4.41  ```
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Modules/Log.swift	Thu Jun 06 17:42:26 2019 +0200
     5.3 @@ -0,0 +1,17 @@
     5.4 +//
     5.5 +//  Log.swift
     5.6 +//  pEpIOSToolbox
     5.7 +//
     5.8 +//  Created by Alejandro Gelos on 03/05/2019.
     5.9 +//  Copyright © 2019 pEp Security SA. All rights reserved.
    5.10 +//
    5.11 +
    5.12 +import Foundation
    5.13 +
    5.14 +/// Shared instance of logger.
    5.15 +class Log {
    5.16 +    static let shared = Logger(subsystem: "security.pEp.pEpForiOS", category: "pEpIOSToolbox")
    5.17 +
    5.18 +    /// Init is forbidden. Singleton...
    5.19 +    private init() {}
    5.20 +}
     6.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Thu May 09 11:47:04 2019 +0200
     6.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Thu Jun 06 17:42:26 2019 +0200
     6.3 @@ -8,13 +8,11 @@
     6.4  
     6.5  import Foundation
     6.6  import os.log
     6.7 -import asl
     6.8  
     6.9  /**
    6.10 - Thin layer over `os_log` or `asl_logger` where not available.
    6.11 - The fallback to asl is only in effect for iOS 9, and currently
    6.12 - doesn't appear anywhere visible on that platform.
    6.13 + Thin layer over `os_log` where not available.
    6.14   */
    6.15 +@available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *)
    6.16  public class Logger {
    6.17      /**
    6.18       Map `os_log` levels.
    6.19 @@ -44,7 +42,6 @@
    6.20           */
    6.21          case fault
    6.22  
    6.23 -        @available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *)
    6.24          public func osLogType() -> OSLogType {
    6.25              switch self {
    6.26              case .info:
    6.27 @@ -59,53 +56,12 @@
    6.28                  return .fault
    6.29              }
    6.30          }
    6.31 -
    6.32 -        /**
    6.33 -         Maps the internal criticality of a log  message into a subsystem of ASL levels.
    6.34 -
    6.35 -         ASL has the following:
    6.36 -         * ASL_LEVEL_EMERG
    6.37 -         * ASL_LEVEL_ALERT
    6.38 -         * ASL_LEVEL_CRIT
    6.39 -         * ASL_LEVEL_ERR
    6.40 -         * ASL_LEVEL_WARNING
    6.41 -         * ASL_LEVEL_NOTICE
    6.42 -         * ASL_LEVEL_INFO
    6.43 -         * ASL_LEVEL_DEBUG
    6.44 -         */
    6.45 -        public func aslLevelString() -> String {
    6.46 -            switch self {
    6.47 -            case .default:
    6.48 -                return "ASL_LEVEL_NOTICE"
    6.49 -            case .info:
    6.50 -                return "ASL_LEVEL_INFO"
    6.51 -            case .debug:
    6.52 -                return "ASL_LEVEL_DEBUG"
    6.53 -            case .error:
    6.54 -                return "ASL_LEVEL_ERR"
    6.55 -            case .fault:
    6.56 -                return "ASL_LEVEL_CRIT"
    6.57 -            }
    6.58 -        }
    6.59      }
    6.60  
    6.61 -    // move this loggers to the app
    6.62 -
    6.63 -    public static let frontendLogger = Logger(category: "frontend")
    6.64 -    public static let backendLogger = Logger(category: "backend")
    6.65 -    public static let utilLogger = Logger(category: "util")
    6.66 -    public static let htmlParsingLogger = Logger(category: "htmlParsing")
    6.67 -    public static let modelLogger = Logger(category: "model")
    6.68 -    public static let appDelegateLogger = Logger(category: "appDelegate")
    6.69 -
    6.70      public init(subsystem: String = "security.pEp.app.iOS", category: String) {
    6.71          self.subsystem = subsystem
    6.72          self.category = category
    6.73 -        if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
    6.74 -            osLogger = OSLog(subsystem: subsystem, category: category)
    6.75 -        } else {
    6.76 -            osLogger = nil
    6.77 -        }
    6.78 +        osLogger = OSLog(subsystem: subsystem, category: category)
    6.79      }
    6.80  
    6.81      /**
    6.82 @@ -217,8 +173,7 @@
    6.83                  fileLine: fileLine,
    6.84                  args: args)
    6.85  
    6.86 -        // This will omit the arguments, but it's still matchable
    6.87 -        SystemUtils.crash("\(message)")
    6.88 +        SystemUtils.crash("\(filePath):\(function):\(fileLine) - \(message)")
    6.89      }
    6.90  
    6.91      /**
    6.92 @@ -245,20 +200,6 @@
    6.93      }
    6.94  
    6.95      /**
    6.96 -     Testing only. If you want to test the fallback to ASL logging you may have to call
    6.97 -     this, as all the logging is deferred to a serial queue.
    6.98 -     */
    6.99 -    public func testFlush() {
   6.100 -        if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
   6.101 -            // no sense on these versions
   6.102 -        } else {
   6.103 -            aslLogQueue.sync {
   6.104 -                // nothing
   6.105 -            }
   6.106 -        }
   6.107 -    }
   6.108 -
   6.109 -    /**
   6.110       Since this kind of logging is used so often in the codebase, it has its
   6.111       own method.
   6.112       */
   6.113 @@ -277,28 +218,18 @@
   6.114                           filePath: String = #file,
   6.115                           fileLine: Int = #line,
   6.116                           args: [CVarArg]) {
   6.117 -        if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
   6.118 -            osLog(message: message,
   6.119 -                  severity: severity,
   6.120 -                  function: function,
   6.121 -                  filePath: filePath,
   6.122 -                  fileLine: fileLine,
   6.123 -                  args: args)
   6.124 -        } else {
   6.125 -            aslLog(message: message,
   6.126 -                   severity: severity,
   6.127 -                   function: function,
   6.128 -                   filePath: filePath,
   6.129 -                   fileLine: fileLine,
   6.130 -                   args: args)
   6.131 -        }
   6.132 +        osLog(message: message,
   6.133 +              severity: severity,
   6.134 +              function: function,
   6.135 +              filePath: filePath,
   6.136 +              fileLine: fileLine,
   6.137 +              args: args)
   6.138      }
   6.139  
   6.140      /**
   6.141       - Note: If the number of arguments to the format string exceeds 10,
   6.142       the logging doesn't work correctly. Can be easily fixed though, if really needed.
   6.143       */
   6.144 -    @available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *)
   6.145      private func osLog(message: StaticString,
   6.146                         severity: Severity,
   6.147                         function: String = #function,
   6.148 @@ -388,67 +319,4 @@
   6.149                     args)
   6.150          }
   6.151      }
   6.152 -
   6.153 -    private func aslLog(message: StaticString,
   6.154 -                        severity: Severity,
   6.155 -                        function: String = #function,
   6.156 -                        filePath: String = #file,
   6.157 -                        fileLine: Int = #line,
   6.158 -                        args: [CVarArg]) {
   6.159 -        aslLogQueue.async { [weak self] in
   6.160 -            if let theSelf = self {
   6.161 -                let logMessage = asl_new(UInt32(ASL_TYPE_MSG))
   6.162 -
   6.163 -                theSelf.checkASLSuccess(asl_set(logMessage, ASL_KEY_SENDER, theSelf.subsystem))
   6.164 -
   6.165 -                theSelf.checkASLSuccess(asl_set(logMessage, ASL_KEY_FACILITY, theSelf.category))
   6.166 -
   6.167 -                theSelf.checkASLSuccess(asl_set(
   6.168 -                    logMessage,
   6.169 -                    ASL_KEY_MSG,
   6.170 -                    "\(filePath):\(fileLine) \(function): \(message) \(args)"))
   6.171 -
   6.172 -                theSelf.checkASLSuccess(asl_set(logMessage, ASL_KEY_LEVEL, "ASL_LEVEL_ERROR"))
   6.173 -
   6.174 -                let nowDate = Date()
   6.175 -                let dateString = "\(Int(nowDate.timeIntervalSince1970))"
   6.176 -                theSelf.checkASLSuccess(asl_set(logMessage, ASL_KEY_TIME, dateString))
   6.177 -
   6.178 -                theSelf.checkASLSuccess(asl_set(logMessage, ASL_KEY_READ_UID, "-1"))
   6.179 -
   6.180 -                theSelf.checkASLSuccess(asl_send(theSelf.consoleLogger(), logMessage))
   6.181 -
   6.182 -                asl_free(logMessage)
   6.183 -            }
   6.184 -        }
   6.185 -    }
   6.186 -
   6.187 -    private var consoleClient: aslclient?
   6.188 -
   6.189 -    private lazy var aslLogQueue = DispatchQueue(label: "security.pEp.asl.log")
   6.190 -
   6.191 -    private let sender = "security.pEp.app.iOS"
   6.192 -
   6.193 -    private func createConsoleLogger() -> asl_object_t {
   6.194 -        return asl_open(self.sender, subsystem, 0)
   6.195 -    }
   6.196 -
   6.197 -    private func consoleLogger() -> aslclient? {
   6.198 -        if consoleClient == nil {
   6.199 -            consoleClient = createConsoleLogger()
   6.200 -        }
   6.201 -        return consoleClient
   6.202 -    }
   6.203 -
   6.204 -    deinit {
   6.205 -        if consoleClient != nil {
   6.206 -            asl_free(consoleClient)
   6.207 -        }
   6.208 -    }
   6.209 -
   6.210 -    private func checkASLSuccess(_ result: Int32, comment: String = "no comment") {
   6.211 -        if result != 0 {
   6.212 -            print("*** error: \(comment)")
   6.213 -        }
   6.214 -    }
   6.215  }
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SelfReferencingOperation.swift	Thu Jun 06 17:42:26 2019 +0200
     7.3 @@ -0,0 +1,25 @@
     7.4 +//
     7.5 +//  Created by Borja González de Pablo on 02/08/2018.
     7.6 +//  Copyright © 2018 p≡p Security S.A. All rights reserved.
     7.7 +//
     7.8 +
     7.9 +import Foundation
    7.10 +
    7.11 +public class SelfReferencingOperation: Operation {
    7.12 +
    7.13 +    private let executionBlock: (_ operation: SelfReferencingOperation?)-> Void
    7.14 +
    7.15 +    public init(executionBlock: @escaping (_ operation: SelfReferencingOperation?) -> Void) {
    7.16 +        self.executionBlock = executionBlock
    7.17 +        super.init()
    7.18 +    }
    7.19 +
    7.20 +    override public func main() {
    7.21 +        guard !isCancelled else {
    7.22 +            return
    7.23 +        }
    7.24 +        weak var weakSelf = self
    7.25 +
    7.26 +        executionBlock(weakSelf)
    7.27 +    }
    7.28 +}
     8.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Thu May 09 11:47:04 2019 +0200
     8.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/SortedSet.swift	Thu Jun 06 17:42:26 2019 +0200
     8.3 @@ -51,7 +51,7 @@
     8.4          defer { objc_sync_exit(self) }
     8.5  
     8.6          guard isValidIndex(index) else {
     8.7 -            Logger.frontendLogger.errorAndCrash("Index out of range")
     8.8 +            Log.shared.errorAndCrash("Index out of range")
     8.9              return
    8.10          }
    8.11          set.removeObject(at: index)
    8.12 @@ -62,7 +62,7 @@
    8.13          defer { objc_sync_exit(self) }
    8.14  
    8.15          guard isValidIndex(index) else {
    8.16 -            Logger.frontendLogger.errorAndCrash("Index out of range")
    8.17 +            Log.shared.errorAndCrash("Index out of range")
    8.18              return
    8.19          }
    8.20          set.replaceObject(at: index, with: object)
    8.21 @@ -73,7 +73,7 @@
    8.22          defer { objc_sync_exit(self) }
    8.23  
    8.24          guard isValidIndex(index) else {
    8.25 -            Logger.frontendLogger.errorAndCrash("Index out of range")
    8.26 +            Log.shared.errorAndCrash("Index out of range")
    8.27              return nil
    8.28          }
    8.29  
    8.30 @@ -101,7 +101,7 @@
    8.31  
    8.32          for i in 0..<set.count {
    8.33              guard let testee = set.object(at: i) as? T else {
    8.34 -                Logger.frontendLogger.errorAndCrash("error casting")
    8.35 +                Log.shared.errorAndCrash("error casting")
    8.36                  return NSNotFound
    8.37              }
    8.38              if testee == object {
    8.39 @@ -187,7 +187,7 @@
    8.40          set.sort { (first: Any, second: Any) -> ComparisonResult in
    8.41              guard let firstT = first as? T,
    8.42                  let secondT = second as? T else {
    8.43 -                    Logger.frontendLogger.errorAndCrash("Error casting.")
    8.44 +                    Log.shared.errorAndCrash("Error casting.")
    8.45                      return .orderedSame
    8.46              }
    8.47              return sortBlock(firstT, secondT)
    8.48 @@ -197,7 +197,7 @@
    8.49      private func indexOfObjectIfInserted(obj: T) -> Int {
    8.50          for i in 0..<set.count {
    8.51              guard let testee = set.object(at: i) as? T else {
    8.52 -                Logger.frontendLogger.errorAndCrash("Error casing")
    8.53 +                Log.shared.errorAndCrash("Error casing")
    8.54                  return 0
    8.55              }
    8.56              if set.count == 0 {
     9.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Thu May 09 11:47:04 2019 +0200
     9.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Thu Jun 06 17:42:26 2019 +0200
     9.3 @@ -24,14 +24,12 @@
     9.4  		0033C07F20D7EBD500224E61 /* ThreadedEmailViewModel+UpdateThreadDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0033C07E20D7EBD500224E61 /* ThreadedEmailViewModel+UpdateThreadDelegate.swift */; };
     9.5  		0033C08120D7F3C600224E61 /* ThreadViewController+ViewModelDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0033C08020D7F3C600224E61 /* ThreadViewController+ViewModelDelegate.swift */; };
     9.6  		0033C08320D7F41600224E61 /* ThreadedEmailViewModelDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0033C08220D7F41600224E61 /* ThreadedEmailViewModelDelegate.swift */; };
     9.7 -		0038494A20D25576008000EA /* ProfilePictureComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0038494920D25576008000EA /* ProfilePictureComposer.swift */; };
     9.8 +		0038494A20D25576008000EA /* ProfilePictureComposerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0038494920D25576008000EA /* ProfilePictureComposerProtocol.swift */; };
     9.9  		0038494C20D2587F008000EA /* PepPictureComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0038494B20D2587F008000EA /* PepPictureComposer.swift */; };
    9.10 -		003C0FA720B5581A0093A987 /* SecretTestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 003C0FA620B5581A0093A987 /* SecretTestData.swift */; };
    9.11  		004422C82179E3C500BDF6DF /* SettingsCellViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004422C72179E3C500BDF6DF /* SettingsCellViewModelTest.swift */; };
    9.12  		004422CA2179ECD600BDF6DF /* PassiveModeViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004422C92179ECD600BDF6DF /* PassiveModeViewModelTest.swift */; };
    9.13  		004422D9217A25AD00BDF6DF /* UnencryptedSubjectViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004422D8217A25AD00BDF6DF /* UnencryptedSubjectViewModelTest.swift */; };
    9.14  		004A8C552112FDD500203143 /* EmailListView+UITableViewDataSourcePrefetching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A8C542112FDD500203143 /* EmailListView+UITableViewDataSourcePrefetching.swift */; };
    9.15 -		004A8C5B211316E100203143 /* SelfReferencingOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A8C5A211316E100203143 /* SelfReferencingOperation.swift */; };
    9.16  		005A21FB20CAA5F50082D19F /* ThreadedEmailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005A21FA20CAA5F50082D19F /* ThreadedEmailViewModel.swift */; };
    9.17  		0069DCFB2110679200846EB1 /* EmailViewController+UIPopoverPresentationControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0069DCFA2110679200846EB1 /* EmailViewController+UIPopoverPresentationControllerDelegate.swift */; };
    9.18  		006BE6BC20F4B63C00DDE8C9 /* EmailDetailType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 006BE6BB20F4B63C00DDE8C9 /* EmailDetailType.swift */; };
    9.19 @@ -45,12 +43,8 @@
    9.20  		00EB89AF20E3E4A000CDFA0D /* ReplyAlertCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00EB89AE20E3E4A000CDFA0D /* ReplyAlertCreator.swift */; };
    9.21  		00FD0CE62101F7D700BA0C56 /* ScreenComposerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00FD0CE52101F7D700BA0C56 /* ScreenComposerProtocol.swift */; };
    9.22  		00FD0CE82102014C00BA0C56 /* PrimarySplitViewcontroller+ScreenComposerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00FD0CE72102014C00BA0C56 /* PrimarySplitViewcontroller+ScreenComposerProtocol.swift */; };
    9.23 -		1500199D1F2B2C73003E670A /* Notification+CWServiceClientNotificationParsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1500199C1F2B2C73003E670A /* Notification+CWServiceClientNotificationParsing.swift */; };
    9.24  		1500199F1F2BA2EF003E670A /* SyncFlagsToServerOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1500199E1F2BA2EF003E670A /* SyncFlagsToServerOperationTest.swift */; };
    9.25  		150707DC21006CD000AA213F /* ComposeUtilTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150707DB21006CD000AA213F /* ComposeUtilTest.swift */; };
    9.26 -		150B84C420A44DE100D8B288 /* MoveToFolderOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150B84C320A44DE100D8B288 /* MoveToFolderOperation.swift */; };
    9.27 -		150B84C620A5DD0600D8B288 /* UIDCopyOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150B84C520A5DD0600D8B288 /* UIDCopyOperation.swift */; };
    9.28 -		150B8E981FCDACBB00374438 /* ErrorPropagator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150B8E961FCDACBB00374438 /* ErrorPropagator.swift */; };
    9.29  		150B8E991FCDACBB00374438 /* AccountSettingsUserInputError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150B8E971FCDACBB00374438 /* AccountSettingsUserInputError.swift */; };
    9.30  		150B8EB31FCEB93D00374438 /* UIUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150B8EB21FCEB93D00374438 /* UIUtils.swift */; };
    9.31  		150DF6D02052A13700A9DCF7 /* SecureWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 150DF6CF2052A13700A9DCF7 /* SecureWebViewController.swift */; };
    9.32 @@ -60,9 +54,8 @@
    9.33  		151DE7DE1FC5D3E200CDC273 /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 151DE7E01FC5D3E200CDC273 /* Settings.storyboard */; };
    9.34  		151DE7E11FC5D3FA00CDC273 /* Handshake.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 151DE7E31FC5D3FA00CDC273 /* Handshake.storyboard */; };
    9.35  		151DE7E41FC5D41600CDC273 /* FolderViews.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 151DE7E61FC5D41600CDC273 /* FolderViews.storyboard */; };
    9.36 -		151F71D22029FA1B0057C74D /* PantomimeFolderAttribute+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71D12029FA1B0057C74D /* PantomimeFolderAttribute+Extensions.swift */; };
    9.37  		151F71F7202A06760057C74D /* TestDataBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71EC202A06750057C74D /* TestDataBase.swift */; };
    9.38 -		151F71F9202A06760057C74D /* NetworkServiceObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71EE202A06750057C74D /* NetworkServiceObserver.swift */; };
    9.39 +		151F71F9202A06760057C74D /* ReplicationServiceObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71EE202A06750057C74D /* ReplicationServiceObserver.swift */; };
    9.40  		151F71FA202A06760057C74D /* DecryptionAttemptCounterDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71EF202A06750057C74D /* DecryptionAttemptCounterDelegate.swift */; };
    9.41  		151F71FB202A06760057C74D /* MockBackgrounder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71F0202A06750057C74D /* MockBackgrounder.swift */; };
    9.42  		151F71FC202A06760057C74D /* CoreDataDrivenTestBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151F71F1202A06750057C74D /* CoreDataDrivenTestBase.swift */; };
    9.43 @@ -118,40 +111,24 @@
    9.44  		153CA6E81FB61B53003C9629 /* IOS-815_pep_rating_zero.txt in Resources */ = {isa = PBXBuildFile; fileRef = 153CA6E71FB61B53003C9629 /* IOS-815_pep_rating_zero.txt */; };
    9.45  		153CA6EA1FB62195003C9629 /* IOS-211-pdfEmail.txt in Resources */ = {isa = PBXBuildFile; fileRef = 153CA6E91FB62194003C9629 /* IOS-211-pdfEmail.txt */; };
    9.46  		153E4E471F500F650021CBD8 /* IOS-211-duplicated-attachments.txt in Resources */ = {isa = PBXBuildFile; fileRef = 153E4E461F500F650021CBD8 /* IOS-211-duplicated-attachments.txt */; };
    9.47 -		153FC45D202A263D0053CCF1 /* FolderType+IMAP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 153FC45C202A263D0053CCF1 /* FolderType+IMAP.swift */; };
    9.48  		15410D1D2199C2E500BBF65F /* SubjectCellViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15410D1C2199C2E500BBF65F /* SubjectCellViewModelTest.swift */; };
    9.49  		15410D1F2199CA1100BBF65F /* XCTTestCase+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15410D1E2199CA1100BBF65F /* XCTTestCase+Utils.swift */; };
    9.50  		15410D222199D83200BBF65F /* AccountCellViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15410D212199D83200BBF65F /* AccountCellViewModelTest.swift */; };
    9.51  		15410D252199ECD700BBF65F /* AttachmentViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15410D242199ECD700BBF65F /* AttachmentViewModelTest.swift */; };
    9.52  		1541D7ED1FC81D4200D52A5D /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */; };
    9.53  		1541D7F01FC81ED900D52A5D /* URL+ExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7EF1FC81ED900D52A5D /* URL+ExtensionsTest.swift */; };
    9.54 -		1541D7F31FC8292D00D52A5D /* URL+MIME.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7F21FC8292D00D52A5D /* URL+MIME.swift */; };
    9.55  		1541D7F51FC82A4900D52A5D /* URL+MIME.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1541D7F41FC82A4900D52A5D /* URL+MIME.swift */; };
    9.56 -		1544BCFE215246F30075C5A0 /* AttachmentFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1544BCFD215246F30075C5A0 /* AttachmentFilter.swift */; };
    9.57 -		1544BD0221524C9F0075C5A0 /* AttachmentFilterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1544BD0121524C9F0075C5A0 /* AttachmentFilterTest.swift */; };
    9.58 -		1547509A1FE7C0B4000D8004 /* FetchNumberOfNewMailsOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154750991FE7C0B4000D8004 /* FetchNumberOfNewMailsOperation.swift */; };
    9.59 -		15484B682105D5AA00F9D962 /* ConnectInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15484B672105D5AA00F9D962 /* ConnectInfo.swift */; };
    9.60 -		15484B6A2105D5C500F9D962 /* EmailConnectInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15484B692105D5C500F9D962 /* EmailConnectInfo.swift */; };
    9.61 -		15484B6C2105E26600F9D962 /* LegacyConnectInfoProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15484B6B2105E26600F9D962 /* LegacyConnectInfoProvider.swift */; };
    9.62  		154D92CF20AC1745009A5868 /* MoveToFolderOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154D92CE20AC1744009A5868 /* MoveToFolderOperationTest.swift */; };
    9.63 -		154F0A802085FC7D00C77D72 /* CdAttachment+Pantomime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154F0A7F2085FC7D00C77D72 /* CdAttachment+Pantomime.swift */; };
    9.64  		154F0A8220874B3E00C77D72 /* ContentDispositionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154F0A8120874B3E00C77D72 /* ContentDispositionTest.swift */; };
    9.65 -		154F0A842087779200C77D72 /* ContentDispositionType + Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154F0A832087779200C77D72 /* ContentDispositionType + Conversion.swift */; };
    9.66  		155050F01FE82356009CEAD2 /* UserNotificationTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155050EF1FE82356009CEAD2 /* UserNotificationTool.swift */; };
    9.67  		155050F21FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155050F11FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift */; };
    9.68 -		155050F61FEAB082009CEAD2 /* ErrorContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155050F51FEAB082009CEAD2 /* ErrorContainer.swift */; };
    9.69 -		155050F81FEAB57F009CEAD2 /* BackgroundError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155050F71FEAB57F009CEAD2 /* BackgroundError.swift */; };
    9.70  		1554755F2137F6F8005A52D0 /* SwipeActionDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1554755E2137F6F8005A52D0 /* SwipeActionDescriptor.swift */; };
    9.71  		155475642137FD96005A52D0 /* FolderType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155475632137FD96005A52D0 /* FolderType+Extensions.swift */; };
    9.72  		1554756621393036005A52D0 /* Folder+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1554756521393036005A52D0 /* Folder+Extensions.swift */; };
    9.73  		15547568213931BC005A52D0 /* Folder+Threading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15547567213931BC005A52D0 /* Folder+Threading.swift */; };
    9.74 -		1554756C213FE139005A52D0 /* UnifiedFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1554756B213FE139005A52D0 /* UnifiedFilter.swift */; };
    9.75 -		15547572213FEC4B005A52D0 /* CdMessagePredicateFactory+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15547570213FEAB7005A52D0 /* CdMessagePredicateFactory+Extension.swift */; };
    9.76  		1555361B207796CE00CDDAFA /* CWInternetAddress+TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1555361A207796CE00CDDAFA /* CWInternetAddress+TestUtils.swift */; };
    9.77 -		1555E97C1FD587A300BF8E0E /* Message+IMAP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1555E97B1FD587A300BF8E0E /* Message+IMAP.swift */; };
    9.78  		155F2D9E20530798001B4B1C /* Reusable.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 155F2DA020530798001B4B1C /* Reusable.storyboard */; };
    9.79 -		1560D1701F6FC99B00A75B39 /* FetchOlderImapMessagesOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1560D16F1F6FC99B00A75B39 /* FetchOlderImapMessagesOperation.swift */; };
    9.80 -		1560D1721F6FD1F600A75B39 /* FetchOlderImapMessagesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1560D1711F6FD1F600A75B39 /* FetchOlderImapMessagesService.swift */; };
    9.81 +		15679F0D2292F4090051DCC3 /* FilterViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15679F0C2292F4090051DCC3 /* FilterViewDelegate.swift */; };
    9.82  		1568FEA11FACDCC600993EA3 /* IOS-211_hi_there.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1568FEA01FACDCC500993EA3 /* IOS-211_hi_there.txt */; };
    9.83  		1569AEA520E14DC3002102A0 /* ReUploadTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1569AEA420E14DC2002102A0 /* ReUploadTest.swift */; };
    9.84  		1569DDB8215395BE007A0398 /* NSAttributedString+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1569DDB7215395BE007A0398 /* NSAttributedString+Extension.swift */; };
    9.85 @@ -161,7 +138,6 @@
    9.86  		1574D09B21186A1D00FEDC93 /* AddToContactsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1574D09A21186A1D00FEDC93 /* AddToContactsViewController.swift */; };
    9.87  		157743B8217885EA0007222C /* RecipientTextViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 157743B7217885EA0007222C /* RecipientTextViewModelTest.swift */; };
    9.88  		157C05482180756300E530DE /* DocumentAttachmentPickerViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 157C05472180756300E530DE /* DocumentAttachmentPickerViewModelTest.swift */; };
    9.89 -		15865A8920319ADC00F7A4B5 /* Folder+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15865A8820319ADC00F7A4B5 /* Folder+pEp.swift */; };
    9.90  		15874BC12127493E00A3A4A6 /* SettingSwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BA82127493E00A3A4A6 /* SettingSwitchTableViewCell.swift */; };
    9.91  		15874BC22127493E00A3A4A6 /* SettingCellViewModelProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BAA2127493E00A3A4A6 /* SettingCellViewModelProtocols.swift */; };
    9.92  		15874BC32127493E00A3A4A6 /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BAB2127493E00A3A4A6 /* SettingsViewModel.swift */; };
    9.93 @@ -180,47 +156,30 @@
    9.94  		15874BD12127493E00A3A4A6 /* TrustedServerSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BBF2127493E00A3A4A6 /* TrustedServerSettingsViewModel.swift */; };
    9.95  		15874BD22127493E00A3A4A6 /* TrustedServerSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BC02127493E00A3A4A6 /* TrustedServerSettingsViewController.swift */; };
    9.96  		15874BD421274BD400A3A4A6 /* TrustedServerSettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15874BD321274BD400A3A4A6 /* TrustedServerSettingCell.swift */; };
    9.97 -		1587D1632049BE7D002C2157 /* ImapConnectionDataCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1587D1622049BE7D002C2157 /* ImapConnectionDataCache.swift */; };
    9.98 -		1594C1D021281FCD00CB06E2 /* Server+Fetching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1594C1CF21281FCD00CB06E2 /* Server+Fetching.swift */; };
    9.99 -		159F4C9C21BEB9ED00244903 /* Message+FakeMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 159F4C9B21BEB9ED00244903 /* Message+FakeMessage.swift */; };
   9.100  		15A536902155136800CF6204 /* PEPUtilTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A5368F2155136800CF6204 /* PEPUtilTest.swift */; };
   9.101 -		15A75CE1202B57BF00C0DA28 /* Folder+VirtualMailbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A75CE0202B57BF00C0DA28 /* Folder+VirtualMailbox.swift */; };
   9.102 -		15A75CEA202DE6B300C0DA28 /* ProviderSpecificInformationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A75CE9202DE6B300C0DA28 /* ProviderSpecificInformationProtocol.swift */; };
   9.103 -		15A75CEC202DED2300C0DA28 /* GmailSpecificInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A75CEB202DED2300C0DA28 /* GmailSpecificInformation.swift */; };
   9.104  		15A763D11F72D68000670313 /* KeyChainTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A763D01F72D68000670313 /* KeyChainTest.swift */; };
   9.105  		15A8B8FC20908D2300D2B0B6 /* Keychain+TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A8B8FB20908D2300D2B0B6 /* Keychain+TestUtils.swift */; };
   9.106 -		15AA6016207CD71D00D57DB4 /* ImapFlags+Pantomime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15AA6015207CD71D00D57DB4 /* ImapFlags+Pantomime.swift */; };
   9.107  		15B220501FBF5D6E00CA52BA /* InfoPlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B2204F1FBF5D6E00CA52BA /* InfoPlist.swift */; };
   9.108  		15B220521FC2DAE200CA52BA /* InfoPlist+pEpStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B220511FC2DAE200CA52BA /* InfoPlist+pEpStrings.swift */; };
   9.109  		15B483DB1F28E2FC000FB2CF /* SpecialUseMailboxesTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B483DA1F28E2FC000FB2CF /* SpecialUseMailboxesTest.swift */; };
   9.110  		15B483E11F290B14000FB2CF /* LoginImapOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B483E01F290B14000FB2CF /* LoginImapOperationTest.swift */; };
   9.111 -		15BA536A20A08B100090F126 /* Account+Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BA536920A08B100090F126 /* Account+Extentions.swift */; };
   9.112 -		15BA536C20A08D270090F126 /* UnifiedInbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BA536B20A08D270090F126 /* UnifiedInbox.swift */; };
   9.113  		15BA536E20A095410090F126 /* UnifiedInboxTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BA536D20A095410090F126 /* UnifiedInboxTest.swift */; };
   9.114 -		15BBBC631FD0496800B9DCC8 /* ReportingErrorContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BBBC621FD0496800B9DCC8 /* ReportingErrorContainer.swift */; };
   9.115  		15BBBC681FD04DFC00B9DCC8 /* ReportingErrorContainerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BBBC671FD04DFC00B9DCC8 /* ReportingErrorContainerTest.swift */; };
   9.116  		15BBBC6B1FD0527200B9DCC8 /* DisplayUserErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BBBC6A1FD0527200B9DCC8 /* DisplayUserErrorTest.swift */; };
   9.117  		15BBBC6C1FD05F4300B9DCC8 /* DisplayUserError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 152130531FD00B7A00688DF2 /* DisplayUserError.swift */; };
   9.118  		15D4399A216E697700EB3933 /* AccountPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D43999216E697700EB3933 /* AccountPickerView.swift */; };
   9.119  		15D4399C216E698E00EB3933 /* AccountPickerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D4399B216E698E00EB3933 /* AccountPickerViewModel.swift */; };
   9.120  		15D439A5216F7E0E00EB3933 /* AccountPickerViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D439A4216F7E0E00EB3933 /* AccountPickerViewModelTest.swift */; };
   9.121 -		15D439A7216FB77600EB3933 /* UnitTestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D439A6216FB77600EB3933 /* UnitTestUtils.swift */; };
   9.122  		15D7D990219AD38B00A1A2B9 /* MediaAttachmentPickerProviderViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D7D98F219AD38B00A1A2B9 /* MediaAttachmentPickerProviderViewModelTest.swift */; };
   9.123  		15D7D992219B154000A1A2B9 /* Attachment+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D7D991219B154000A1A2B9 /* Attachment+Extensions.swift */; };
   9.124  		15D7D995219B2C5C00A1A2B9 /* ComposeViewModel+InitDataTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D7D994219B2C5C00A1A2B9 /* ComposeViewModel+InitDataTest.swift */; };
   9.125  		15D7D997219C374600A1A2B9 /* ComposeViewModelStateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15D7D996219C374600A1A2B9 /* ComposeViewModelStateTest.swift */; };
   9.126 -		15DD3F75211EC68D00A8714D /* DecryptMessageOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15DD3F74211EC68D00A8714D /* DecryptMessageOperation.swift */; };
   9.127  		15EBE43B20E5286500268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 15EBE43920E5286500268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_sec.asc */; };
   9.128  		15EBE43E20E5296900268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_pub.asc in Resources */ = {isa = PBXBuildFile; fileRef = 15EBE43C20E5296900268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_pub.asc */; };
   9.129  		15EBE44220E5353E00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_pub.asc in Resources */ = {isa = PBXBuildFile; fileRef = 15EBE44020E5353D00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_pub.asc */; };
   9.130  		15EBE44320E5353E00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 15EBE44120E5353D00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_sec.asc */; };
   9.131 -		15F0F7AA21358B33002BE853 /* CdMessagePredicateFactory+Imap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F0F7A921358B33002BE853 /* CdMessagePredicateFactory+Imap.swift */; };
   9.132 -		15F0F7AD213594FC002BE853 /* Folder+Imap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F0F7AC213594FC002BE853 /* Folder+Imap.swift */; };
   9.133 -		15F0F7B62136F6D1002BE853 /* CdFolderPredicateFactory+IMAP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F0F7B52136F6D1002BE853 /* CdFolderPredicateFactory+IMAP.swift */; };
   9.134 -		15F835241F34BE1300FCE887 /* AccountUserInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F835231F34BE1300FCE887 /* AccountUserInput.swift */; };
   9.135  		15F835281F3B497D00FCE887 /* FetchMessagesOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F835271F3B497D00FCE887 /* FetchMessagesOperationTest.swift */; };
   9.136  		15FE1F761FE122D900CC2D97 /* CreditsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15FE1F751FE122D900CC2D97 /* CreditsViewController.swift */; };
   9.137 -		15FE1F791FE19A3A00CC2D97 /* AppAuth.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 43B54F971FE02D02008EC427 /* AppAuth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.138  		220DCE2E1E0AB544002FE716 /* MessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 220DCE2C1E0AB544002FE716 /* MessageCell.swift */; };
   9.139  		220DCE2F1E0AB544002FE716 /* MessageData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 220DCE2D1E0AB544002FE716 /* MessageData.plist */; };
   9.140  		220DCE341E0AB5CC002FE716 /* MailinglistCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 220DCE301E0AB5CC002FE716 /* MailinglistCell.swift */; };
   9.141 @@ -229,17 +188,9 @@
   9.142  		220DCE371E0AB5CC002FE716 /* MessageSubjectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 220DCE331E0AB5CC002FE716 /* MessageSubjectCell.swift */; };
   9.143  		222B35581DF96389007A1F82 /* Capability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222B35571DF96389007A1F82 /* Capability.swift */; };
   9.144  		228038681DC9DE6D00F1CB45 /* TextfieldResponder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 228038671DC9DE6D00F1CB45 /* TextfieldResponder.swift */; };
   9.145 -		37A3D61F221429DA00E11415 /* NetworkReachibilityMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37A3D61E221429DA00E11415 /* NetworkReachibilityMock.swift */; };
   9.146 -		37A3D6222214338300E11415 /* NetworkReachabilityProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37A3D6212214338300E11415 /* NetworkReachabilityProtocol.swift */; };
   9.147 -		37A3D6242214372B00E11415 /* NetworkReachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37A3D6232214372B00E11415 /* NetworkReachability.swift */; };
   9.148 -		37A3D6262215695400E11415 /* ReachabilityUtilsProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37A3D6252215695400E11415 /* ReachabilityUtilsProtocol.swift */; };
   9.149 -		37FE82E92211D290008F8CF4 /* ReachabilityUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37FE82E82211D290008F8CF4 /* ReachabilityUtils.swift */; };
   9.150 -		37FE82ED22132B23008F8CF4 /* ReachabilityUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37FE82EC22132B23008F8CF4 /* ReachabilityUtilsTests.swift */; };
   9.151 +		37C3C0E62260C64D003E290C /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C3C0E52260C64D003E290C /* Log.swift */; };
   9.152  		43040A531E9776220083DED8 /* AttachmentSummaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43040A521E9776220083DED8 /* AttachmentSummaryView.swift */; };
   9.153  		4304FD001EBB8EBB0086DADA /* LanguageListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4304FCFE1EBB8C5A0086DADA /* LanguageListViewController.swift */; };
   9.154 -		4307C4701ED81F3100A276A4 /* DefaultImapSyncDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4307C46F1ED81F3100A276A4 /* DefaultImapSyncDelegate.swift */; };
   9.155 -		4307C4721ED826E400A276A4 /* SmtpSendError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4307C4711ED826E400A276A4 /* SmtpSendError.swift */; };
   9.156 -		430A2EEC1E81357A00878837 /* CdImapFlags+Pantomime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430A2EEB1E81357A00878837 /* CdImapFlags+Pantomime.swift */; };
   9.157  		430BA229203438A3003B041C /* CdMessagePEPMessageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430BA228203438A3003B041C /* CdMessagePEPMessageTests.swift */; };
   9.158  		430C80D51D0EAB6E00CD4582 /* pEpTrustWords.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 430C80D41D0EAB6E00CD4582 /* pEpTrustWords.bundle */; };
   9.159  		430C80D61D0EAB6E00CD4582 /* pEpTrustWords.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 430C80D41D0EAB6E00CD4582 /* pEpTrustWords.bundle */; };
   9.160 @@ -249,85 +200,47 @@
   9.161  		430E0BE71EAF5E2600378EC2 /* NSMutableDictionary+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430E0BE61EAF5E2600378EC2 /* NSMutableDictionary+pEp.swift */; };
   9.162  		430E5F201EBC87A700E5D5D3 /* LanguageListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430E5F1F1EBC87A700E5D5D3 /* LanguageListTableViewCell.swift */; };
   9.163  		43106A192045716000693144 /* OAuth2ConfigurationProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43106A182045716000693144 /* OAuth2ConfigurationProtocol+Extension.swift */; };
   9.164 -		431144B51CC0FCA40007639D /* StoreFolderOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431144B41CC0FCA40007639D /* StoreFolderOperation.swift */; };
   9.165 -		431144B71CC11D6A0007639D /* BaseOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431144B61CC11D6A0007639D /* BaseOperation.swift */; };
   9.166 -		431144B91CC11DF30007639D /* StorePrefetchedMailOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431144B81CC11DF30007639D /* StorePrefetchedMailOperation.swift */; };
   9.167 -		43122B191DF5B48B00610253 /* EmailService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43122B141DF5B48B00610253 /* EmailService.swift */; };
   9.168 -		43122B1A1DF5B48B00610253 /* ImapService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43122B151DF5B48B00610253 /* ImapService.swift */; };
   9.169 -		43122B1B1DF5B48B00610253 /* SmtpService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43122B161DF5B48B00610253 /* SmtpService.swift */; };
   9.170 -		43122B3C1DF5B75000610253 /* NetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43122B3B1DF5B75000610253 /* NetworkService.swift */; };
   9.171 -		43122B3E1DF5BB6600610253 /* MySelfOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43122B3D1DF5BB6600610253 /* MySelfOperation.swift */; };
   9.172 +		4312BE89228439670002129D /* SecretUITestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4312BE88228439670002129D /* SecretUITestData.swift */; };
   9.173  		431394A91E4B03AA00D92F33 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 431394A81E4B03AA00D92F33 /* Settings.bundle */; };
   9.174 -		4315E4BF2011FD6900F68763 /* AuthMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4315E4BE2011FD6900F68763 /* AuthMethod.swift */; };
   9.175 -		4315E4C120120F1600F68763 /* NSSecureCoding+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4315E4C020120F1600F68763 /* NSSecureCoding+Extension.swift */; };
   9.176  		4315E4C3201242BB00F68763 /* OAuth2Type+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4315E4C2201242BB00F68763 /* OAuth2Type+Extension.swift */; };
   9.177 -		431798771CF87FE6007DD655 /* ReferenceCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431798761CF87FE6007DD655 /* ReferenceCounter.swift */; };
   9.178 -		431B047A1DE5772000E40CD3 /* CdMessage+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431B04791DE5772000E40CD3 /* CdMessage+pEp.swift */; };
   9.179 -		431B04801DE5774800E40CD3 /* CdMessage+Pantomime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431B047F1DE5774800E40CD3 /* CdMessage+Pantomime.swift */; };
   9.180 -		431B04821DE583A000E40CD3 /* CdAttachment+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431B04811DE583A000E40CD3 /* CdAttachment+Extension.swift */; };
   9.181  		431BB9451E49B7A9000BCBF1 /* PorpoiseGalaxy_HubbleFraile_960.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 431BB9441E49B7A9000BCBF1 /* PorpoiseGalaxy_HubbleFraile_960.jpg */; };
   9.182  		431C2B171F387C4100D87FFD /* LoginViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431C2B161F387C4100D87FFD /* LoginViewModelTests.swift */; };
   9.183  		431C2B191F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431C2B181F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift */; };
   9.184  		431C6E041FE7A85200E23BE0 /* OAuth2ConfigurationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431C6E031FE7A85200E23BE0 /* OAuth2ConfigurationProtocol.swift */; };
   9.185  		431D60DB1E93BB2D001266D7 /* AttachmentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431D60DA1E93BB2D001266D7 /* AttachmentsView.swift */; };
   9.186  		431D60DD1E93D580001266D7 /* MessageAttachmentsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431D60DC1E93D580001266D7 /* MessageAttachmentsCell.swift */; };
   9.187 -		431E2B071F02550C000035FA /* CheckOutgoingMessagesOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E2B061F02550C000035FA /* CheckOutgoingMessagesOperation.swift */; };
   9.188 -		431E58F61ED57F6500EFA77F /* AccountVerificationServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E58F51ED57F6500EFA77F /* AccountVerificationServiceProtocol.swift */; };
   9.189 -		431E58FA1ED591E900EFA77F /* AccountVerificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E58F91ED591E900EFA77F /* AccountVerificationService.swift */; };
   9.190 -		431E58FC1ED5926B00EFA77F /* AccountVerificationServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E58FB1ED5926B00EFA77F /* AccountVerificationServiceTests.swift */; };
   9.191  		431E65631EEAE65200B8BBFC /* HandshakeUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E65621EEAE65200B8BBFC /* HandshakeUITest.swift */; };
   9.192  		431E8F7E1CFDCF3A00C33647 /* EmailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431E8F7D1CFDCF3A00C33647 /* EmailViewController.swift */; };
   9.193  		431F987F1F6FD3E300A1E4D2 /* HandshakePartnerTableViewCellViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 431F987E1F6FD3E300A1E4D2 /* HandshakePartnerTableViewCellViewModelTests.swift */; };
   9.194 -		43209B541ECC5A9B007E7E2E /* libpEpObjCAdapter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43209B531ECC5A9B007E7E2E /* libpEpObjCAdapter.a */; };
   9.195 -		432142641E8FD66900FBE987 /* FetchNumberOfNewMailsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432142631E8FD66900FBE987 /* FetchNumberOfNewMailsService.swift */; };
   9.196 -		432142661E8FD6A400FBE987 /* ServiceUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432142651E8FD6A400FBE987 /* ServiceUtil.swift */; };
   9.197 -		432198E81DF6B51B00318A74 /* LoginImapOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432198E71DF6B51B00318A74 /* LoginImapOperation.swift */; };
   9.198 -		432198ED1DF6B66800318A74 /* SharedObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432198EC1DF6B66800318A74 /* SharedObjects.swift */; };
   9.199  		4322E82F1F9DE8260011FC55 /* Microsoft_Outlook_Probing_Message_001.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4322E82E1F9DE8260011FC55 /* Microsoft_Outlook_Probing_Message_001.txt */; };
   9.200 -		4323FE861E83D6FF006785E1 /* ImapFolderBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4323FE851E83D6FF006785E1 /* ImapFolderBuilder.swift */; };
   9.201  		43257C801F50064100DDC7F0 /* HtmlToTextSaxParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43257C7F1F50064100DDC7F0 /* HtmlToTextSaxParser.swift */; };
   9.202  		43257C821F50179800DDC7F0 /* BasicSaxParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43257C811F50179800DDC7F0 /* BasicSaxParser.swift */; };
   9.203  		43257C841F50629700DDC7F0 /* HtmlToAttributedTextSaxParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43257C831F50629700DDC7F0 /* HtmlToAttributedTextSaxParser.swift */; };
   9.204  		43257C861F50659200DDC7F0 /* StringHTMLExtensionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43257C851F50659200DDC7F0 /* StringHTMLExtensionTests.swift */; };
   9.205  		43257C891F50683600DDC7F0 /* NSAttributedString+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43257C871F5067BE00DDC7F0 /* NSAttributedString+pEp.swift */; };
   9.206 -		43264E9B1D76B7110098DCAC /* SyncFlagsToServerOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43264E9A1D76B7110098DCAC /* SyncFlagsToServerOperation.swift */; };
   9.207 -		4326D3FF1EFBC8DB0016AB0D /* FolderInfoOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4326D3FE1EFBC8DB0016AB0D /* FolderInfoOperation.swift */; };
   9.208  		43293EFB1EB9DD6700EEE010 /* UIViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43293EFA1EB9DD6700EEE010 /* UIViewController+Extension.swift */; };
   9.209  		432A24D71DE714A200DAAC5C /* MessagePantomimeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432A24D61DE714A200DAAC5C /* MessagePantomimeTests.swift */; };
   9.210  		432A5E261EB344C3007CB670 /* PEP_color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432A5E251EB344C3007CB670 /* PEP_color+Extension.swift */; };
   9.211 -		432AC3061ECB0C44007DC418 /* CWIMAPMessage+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432AC3051ECB0C44007DC418 /* CWIMAPMessage+pEp.swift */; };
   9.212 -		432DA7441EE01E3300B30BAA /* MessageSyncServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432DA7431EE01E3300B30BAA /* MessageSyncServiceProtocol.swift */; };
   9.213 -		432DA7461EE027EB00B30BAA /* MessageSyncService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432DA7451EE027EB00B30BAA /* MessageSyncService.swift */; };
   9.214  		432E80FD2191AF5100359879 /* UniversLTStd.otf in Resources */ = {isa = PBXBuildFile; fileRef = 432E80FB2191AF5100359879 /* UniversLTStd.otf */; };
   9.215  		432E80FE2191AF5100359879 /* UniversLTStd-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 432E80FC2191AF5100359879 /* UniversLTStd-Bold.otf */; };
   9.216  		432F7D611D2102F10094F097 /* PEPSessionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432F7D601D2102F10094F097 /* PEPSessionTest.swift */; };
   9.217 -		433019E61E01A71300788B89 /* PeriodicTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 433019E51E01A71300788B89 /* PeriodicTask.swift */; };
   9.218  		4330278E1F7BABFF00D685F8 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4330278D1F7BABFF00D685F8 /* GradientView.swift */; };
   9.219  		43306EBE1FE125B50045DD00 /* OAuth2Authorization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43306EBD1FE125B50045DD00 /* OAuth2Authorization.swift */; };
   9.220  		43306EC21FE129840045DD00 /* OAuth2Type.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43306EC11FE129840045DD00 /* OAuth2Type.swift */; };
   9.221 -		43313DFC1DEC7F6000C111C8 /* DeleteFoldersOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43313DFB1DEC7F6000C111C8 /* DeleteFoldersOperation.swift */; };
   9.222 -		4333A2A51E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4333A2A41E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift */; };
   9.223  		4334CF302020CFFE00B3193E /* OAuth2Type+LibAccountSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4334CF2F2020CFFE00B3193E /* OAuth2Type+LibAccountSettings.swift */; };
   9.224  		4336229E1DC76B8100133B3D /* MessageModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4336229D1DC76B8100133B3D /* MessageModelTests.swift */; };
   9.225  		433BCD951D5388C100DD98EF /* ReplyUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 433BCD941D5388C100DD98EF /* ReplyUtil.swift */; };
   9.226 -		433C51D31E66CCA900272E19 /* CreateRequiredFoldersOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 433C51D11E66CB9C00272E19 /* CreateRequiredFoldersOperation.swift */; };
   9.227 +		433E7438225B564400B84CD9 /* Account+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 433E7437225B564400B84CD9 /* Account+Extension.swift */; };
   9.228  		433F2E2A21E3581800E1CA49 /* ENGINE-505_Mail_NullInnerMimeType.txt in Resources */ = {isa = PBXBuildFile; fileRef = 433F2E2921E3581800E1CA49 /* ENGINE-505_Mail_NullInnerMimeType.txt */; };
   9.229 -		4341EBCF2089F674004CE6B8 /* QualifyServerIsLocalOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4341EBCE2089F674004CE6B8 /* QualifyServerIsLocalOperation.swift */; };
   9.230 -		4341EBD1208A0961004CE6B8 /* QualifyServerIsLocalServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4341EBD0208A0961004CE6B8 /* QualifyServerIsLocalServiceProtocol.swift */; };
   9.231  		43425EDB1FE3DE6E004A2728 /* OAuth2ProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43425EDA1FE3DE6E004A2728 /* OAuth2ProviderProtocol.swift */; };
   9.232  		43425EDD1FE3DF3B004A2728 /* OAuth2Provider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43425EDC1FE3DF3B004A2728 /* OAuth2Provider.swift */; };
   9.233  		43425EDF1FE3E052004A2728 /* OAuth2ProviderFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43425EDE1FE3E052004A2728 /* OAuth2ProviderFactory.swift */; };
   9.234 -		4348EF0D1E27ABA100F441A9 /* LoginSmtpOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4348EF0C1E27ABA100F441A9 /* LoginSmtpOperation.swift */; };
   9.235  		4348EF151E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc in Resources */ = {isa = PBXBuildFile; fileRef = 4348EF141E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc */; };
   9.236 -		43497B38211C62DE00AC42B0 /* MessageIdentitfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */; };
   9.237 -		43497B3A211C63CA00AC42B0 /* Message+MessageIdentitfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */; };
   9.238  		43498CDB200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43498CDA200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift */; };
   9.239  		43498CDD200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43498CDC200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift */; };
   9.240  		434AC3E320A450D800C11B7F /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434AC3E220A450D700C11B7F /* UIAlertController+Extension.swift */; };
   9.241 -		434B5D191DDF67E400BEDEF0 /* CdMessage+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434B5D181DDF67E400BEDEF0 /* CdMessage+Extension.swift */; };
   9.242  		434C051B20F8BAB6009B271D /* XCUIElement+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434C051A20F8BAB6009B271D /* XCUIElement+Extension.swift */; };
   9.243  		434DDC2B20D10F9A00755F44 /* EncryptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434DDC2A20D10F9A00755F44 /* EncryptionTests.swift */; };
   9.244 -		434E5A1B20DB9C4600D7F88A /* EmailListViewModel+MessageFolderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434E5A1A20DB9C4600D7F88A /* EmailListViewModel+MessageFolderDelegate.swift */; };
   9.245  		434F40941EB0B173002FBF0D /* ObservableValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434F40931EB0B173002FBF0D /* ObservableValue.swift */; };
   9.246  		434F40961EB0DB5E002FBF0D /* HandshakePartnerTableViewCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434F40951EB0DB5E002FBF0D /* HandshakePartnerTableViewCellViewModel.swift */; };
   9.247  		4351C2C81F4441190053381F /* blocks.c in Sources */ = {isa = PBXBuildFile; fileRef = 4351C2B31F4441190053381F /* blocks.c */; };
   9.248 @@ -350,14 +263,10 @@
   9.249  		4351C2DB1F4441190053381F /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 4351C2C61F4441190053381F /* utf8.c */; };
   9.250  		4351C2DC1F4441190053381F /* xml.c in Sources */ = {isa = PBXBuildFile; fileRef = 4351C2C71F4441190053381F /* xml.c */; };
   9.251  		4351C2DE1F4457620053381F /* NSString+Markdown.m in Sources */ = {isa = PBXBuildFile; fileRef = 4351C2DD1F4457620053381F /* NSString+Markdown.m */; };
   9.252 -		4356102C1DEF019400808C8E /* SyncMessagesOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4356102B1DEF019400808C8E /* SyncMessagesOperation.swift */; };
   9.253  		4356FFE52135448600804089 /* ReplyAllPossibleChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4356FFE42135448600804089 /* ReplyAllPossibleChecker.swift */; };
   9.254  		4356FFE721354A4B00804089 /* ReplyAllPossibleCheckerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4356FFE621354A4B00804089 /* ReplyAllPossibleCheckerProtocol.swift */; };
   9.255  		4356FFEC21356CB600804089 /* ReplyAllPossibleCheckerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4356FFEB21356CB600804089 /* ReplyAllPossibleCheckerTest.swift */; };
   9.256  		435F7C75215E05DA00F21EFD /* 1364_Mail_missing_attached_image.txt in Resources */ = {isa = PBXBuildFile; fileRef = 435F7C74215E05DA00F21EFD /* 1364_Mail_missing_attached_image.txt */; };
   9.257 -		4360282D1ED6F27600C95FC4 /* NetworkError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4360282C1ED6F27600C95FC4 /* NetworkError.swift */; };
   9.258 -		4360282F1ED6F33400C95FC4 /* ImapSyncError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4360282E1ED6F33400C95FC4 /* ImapSyncError.swift */; };
   9.259 -		436239931EAE08F400BD2EB9 /* PEPSession+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4362398F1EAE08F400BD2EB9 /* PEPSession+Extensions.swift */; };
   9.260  		43628766213D7A5E0066CD03 /* IOS-1300_odt_attachment.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43628765213D7A5E0066CD03 /* IOS-1300_odt_attachment.txt */; };
   9.261  		436795F81EE98B9A00B03E23 /* MessageReevalutionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436795F71EE98B9A00B03E23 /* MessageReevalutionTests.swift */; };
   9.262  		436795FB1EE98E9900B03E23 /* CommunicationTypeTests_test002@peptest.ch_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 436795F91EE98E9900B03E23 /* CommunicationTypeTests_test002@peptest.ch_sec.asc */; };
   9.263 @@ -365,24 +274,17 @@
   9.264  		436795FF1EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 436795FD1EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch_sec.asc */; };
   9.265  		436796001EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch.asc in Resources */ = {isa = PBXBuildFile; fileRef = 436795FE1EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch.asc */; };
   9.266  		436796021EE9909100B03E23 /* CommunicationTypeTests_Message_test001_to_test002.txt in Resources */ = {isa = PBXBuildFile; fileRef = 436796011EE9909100B03E23 /* CommunicationTypeTests_Message_test001_to_test002.txt */; };
   9.267 -		436C23281E02948400071430 /* BackgroundTaskProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436C23271E02948400071430 /* BackgroundTaskProtocol.swift */; };
   9.268 -		436C232D1E02A2D900071430 /* KickOffMySelfProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436C232C1E02A2D900071430 /* KickOffMySelfProtocol.swift */; };
   9.269 -		436C232F1E02A52D00071430 /* LimitedOperationQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436C232E1E02A52D00071430 /* LimitedOperationQueue.swift */; };
   9.270 +		436981AD2282F6460006FA2D /* secret.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 436981AC2282F6460006FA2D /* secret.xcconfig */; };
   9.271 +		436981C022830AF60006FA2D /* SecretTestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436981BF22830AF60006FA2D /* SecretTestData.swift */; };
   9.272  		436D0066215B5F3800966CC2 /* Undisplayable_HTML_Message.txt in Resources */ = {isa = PBXBuildFile; fileRef = 436D0065215B5F3800966CC2 /* Undisplayable_HTML_Message.txt */; };
   9.273  		436F8E141D36706A007E9829 /* StringExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436F8E131D36706A007E9829 /* StringExtensionsTest.swift */; };
   9.274 -		43754AC61FCD7ABC009A8E63 /* ldns_xcode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43754AC71FCD7ABC009A8E63 /* ldns_xcode.framework */; };
   9.275 -		43754AC81FCD8348009A8E63 /* ldns_xcode.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 43754AC71FCD7ABC009A8E63 /* ldns_xcode.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.276 -		437671481D8FF2A5004DD205 /* DeleteFolderOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437671471D8FF2A5004DD205 /* DeleteFolderOperation.swift */; };
   9.277 +		437027A122315B5700A77AEC /* PEPAppUtilWrappers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437027A022315B5700A77AEC /* PEPAppUtilWrappers.swift */; };
   9.278  		437795C82154D6FD00CC62C2 /* PEPMessage+TestExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437795C72154D6FD00CC62C2 /* PEPMessage+TestExtension.swift */; };
   9.279 -		43800D991D112A2A00821E34 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 43800D981D112A2A00821E34 /* libxml2.tbd */; };
   9.280  		438052871FE3E1B100ACF729 /* OAuth2AuthorizationFactoryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438052861FE3E1B100ACF729 /* OAuth2AuthorizationFactoryProtocol.swift */; };
   9.281  		438052891FE3E24400ACF729 /* OAuth2AuthorizationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438052881FE3E24400ACF729 /* OAuth2AuthorizationProtocol.swift */; };
   9.282  		4380528B1FE3E2E800ACF729 /* OAuth2AuthorizationURLHandlerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4380528A1FE3E2E800ACF729 /* OAuth2AuthorizationURLHandlerProtocol.swift */; };
   9.283 -		4381D0FF1E51A124002743C3 /* NetworkServiceWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4381D0FE1E51A124002743C3 /* NetworkServiceWorker.swift */; };
   9.284  		438281831E891B7E00087343 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438281821E891B7E00087343 /* DateTests.swift */; };
   9.285 -		4382E6431CC600FF00AA27EA /* PersistentImapFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4382E6421CC600FF00AA27EA /* PersistentImapFolder.swift */; };
   9.286 -		4388A0E22008F813008CB98D /* OAuth2AccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4388A0E12008F813008CB98D /* OAuth2AccessToken.swift */; };
   9.287 -		4388A0E42008F8F4008CB98D /* OAuth2AccessTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4388A0E32008F8F4008CB98D /* OAuth2AccessTokenProtocol.swift */; };
   9.288 +		4388A0E22008F813008CB98D /* (null) in Sources */ = {isa = PBXBuildFile; };
   9.289  		438BA0F5214F89CD001A4A82 /* MailParsingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438BA0F4214F89CC001A4A82 /* MailParsingTests.swift */; };
   9.290  		438D253C1D4B9E7500BFF7AA /* MimeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438D253B1D4B9E7500BFF7AA /* MimeTests.swift */; };
   9.291  		438D25401D4B9EDB00BFF7AA /* PGPMimeMail.txt in Resources */ = {isa = PBXBuildFile; fileRef = 438D253F1D4B9EDB00BFF7AA /* PGPMimeMail.txt */; };
   9.292 @@ -393,7 +295,6 @@
   9.293  		438F4EE9215FB99400168B5E /* Leon Kowalski (19B9EE3B) – Private.asc in Resources */ = {isa = PBXBuildFile; fileRef = 438F4EE8215FB99400168B5E /* Leon Kowalski (19B9EE3B) – Private.asc */; };
   9.294  		4395CDEE20AAC909003FC5F1 /* UIImageExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4395CDED20AAC909003FC5F1 /* UIImageExtensionsTests.swift */; };
   9.295  		4395CDF020AAD0D7003FC5F1 /* icon_001.gif in Resources */ = {isa = PBXBuildFile; fileRef = 4395CDEF20AAD0D6003FC5F1 /* icon_001.gif */; };
   9.296 -		439680981D1855D400DA31D2 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439680971D1855D400DA31D2 /* WebKit.framework */; };
   9.297  		43980E271CBD0BC900A7FC3C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43980E261CBD0BC900A7FC3C /* AppDelegate.swift */; };
   9.298  		43980E2C1CBD0BC900A7FC3C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43980E2A1CBD0BC900A7FC3C /* Main.storyboard */; };
   9.299  		43980E311CBD0BCA00A7FC3C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43980E301CBD0BCA00A7FC3C /* Assets.xcassets */; };
   9.300 @@ -401,15 +302,8 @@
   9.301  		43980EFA1CBD415700A7FC3C /* AppConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43980EF91CBD415700A7FC3C /* AppConfig.swift */; };
   9.302  		43985D0A2044296D0080FA9A /* OAuth2AuthViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43985D092044296D0080FA9A /* OAuth2AuthViewModel.swift */; };
   9.303  		43985D0E204438480080FA9A /* AccountSettingsProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43985D0D204438480080FA9A /* AccountSettingsProtocol+Extension.swift */; };
   9.304 -		439932301FEA9B7200E92C35 /* SwipeCellKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439932311FEA9B7200E92C35 /* SwipeCellKit.framework */; };
   9.305  		439A23E520B40FAC00417AF5 /* PEP_rating+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439A23E420B40FAC00417AF5 /* PEP_rating+Extension.swift */; };
   9.306 -		439AAC561F21D0CC0018A29E /* CdFolder+Pantomime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439AAC551F21D0CC0018A29E /* CdFolder+Pantomime.swift */; };
   9.307 -		439D40701CC78930009A4E7C /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D406F1CC78930009A4E7C /* libz.tbd */; };
   9.308 -		439D40721CC78958009A4E7C /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D40711CC78958009A4E7C /* libbz2.tbd */; };
   9.309 -		439D40741CC7897B009A4E7C /* libiconv.2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D40731CC7897B009A4E7C /* libiconv.2.tbd */; };
   9.310  		43A0B2CF214006FC00FB779D /* ReplyUtilTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A0B2CE214006FC00FB779D /* ReplyUtilTests.swift */; };
   9.311 -		43A26FBA1E0408FB00AF0B84 /* ServiceErrorProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A26FB91E0408FB00AF0B84 /* ServiceErrorProtocol.swift */; };
   9.312 -		43A26FBF1E041BF200AF0B84 /* ImapSyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A26FBE1E041BF200AF0B84 /* ImapSyncOperation.swift */; };
   9.313  		43A384812153E4BF006AC8F8 /* 8B691AD204E22FD1BF018E0D6C9EAD5A798018D1_pub_sec.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43A384802153E4BF006AC8F8 /* 8B691AD204E22FD1BF018E0D6C9EAD5A798018D1_pub_sec.txt */; };
   9.314  		43A469FA21513B10002E1036 /* PEPSwipeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A469F921513B10002E1036 /* PEPSwipeTableViewCell.swift */; };
   9.315  		43A5DE381D631D49001153AF /* UnencryptedHTMLMail.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43A5DE371D631D49001153AF /* UnencryptedHTMLMail.txt */; };
   9.316 @@ -419,53 +313,54 @@
   9.317  		43AA825D1E9BD60600ABD5A8 /* AttachmentsViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AA825C1E9BD60600ABD5A8 /* AttachmentsViewDelegate.swift */; };
   9.318  		43AAC22A1F7A5AEE00F435F4 /* BaseTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AAC2281F7A5AED00F435F4 /* BaseTableViewController.swift */; };
   9.319  		43AAC22B1F7A5AEE00F435F4 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AAC2291F7A5AEE00F435F4 /* BaseViewController.swift */; };
   9.320 -		43AE48E71EEFC93900B92BB6 /* DebugMergePolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AE48E61EEFC93900B92BB6 /* DebugMergePolicy.swift */; };
   9.321 +		43AE3C582298007A00E1AA7B /* NotifyHandshakeDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AE3C572298007A00E1AA7B /* NotifyHandshakeDelegate.swift */; };
   9.322  		43B0443920067CC7007BCE3F /* UIAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0443820067CC7007BCE3F /* UIAccount.swift */; };
   9.323  		43B0443B20067D25007BCE3F /* UITestDataProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0443A20067D25007BCE3F /* UITestDataProtocol.swift */; };
   9.324  		43B0444C20077323007BCE3F /* OAuth2Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B0444B20077323007BCE3F /* OAuth2Configuration.swift */; };
   9.325 -		43B10C7D1EC2ECA3003E849F /* libAccountSettingsAdapter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43B10C7C1EC2ECA3003E849F /* libAccountSettingsAdapter.a */; };
   9.326  		43B10C801EC2EE7F003E849F /* CppDummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B10C7F1EC2EE7F003E849F /* CppDummy.cpp */; };
   9.327 -		43B2660D1D252C93009D57E8 /* ConcurrentBaseOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B2660C1D252C93009D57E8 /* ConcurrentBaseOperation.swift */; };
   9.328  		43B2C31B1D2280ED00A08557 /* 5A90_3590_0E48_AB85_F3DB__045E_4623_C5D1_EAB6_643E.asc in Resources */ = {isa = PBXBuildFile; fileRef = 43B2C3161D2280ED00A08557 /* 5A90_3590_0E48_AB85_F3DB__045E_4623_C5D1_EAB6_643E.asc */; };
   9.329 -		43B54F961FE02D02008EC427 /* AppAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43B54F971FE02D02008EC427 /* AppAuth.framework */; };
   9.330  		43B7154D1CECAADA0027861A /* ViewWidthsAligner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B7154C1CECAADA0027861A /* ViewWidthsAligner.swift */; };
   9.331 -		43BB86941DB4E76D00980267 /* CdAccount+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BB86931DB4E76D00980267 /* CdAccount+Extension.swift */; };
   9.332 -		43BBB5E71E267A3800104070 /* EncryptAndSendOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BBB5E61E267A3800104070 /* EncryptAndSendOperation.swift */; };
   9.333 -		43C046BF1CF48EA500BD0D9D /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43C046BE1CF48EA500BD0D9D /* AddressBook.framework */; };
   9.334  		43C273DD21C9024A002EB4C8 /* LoggerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C273DC21C9024A002EB4C8 /* LoggerTest.swift */; };
   9.335  		43C322051EA89EED005073FB /* HandshakePartnerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C322041EA89EED005073FB /* HandshakePartnerTableViewCell.swift */; };
   9.336  		43C322091EA90192005073FB /* PEP+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C322081EA90192005073FB /* PEP+UI.swift */; };
   9.337  		43C3B1602003851100ED48A4 /* DecryptImportedMessagesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C3B15F2003851100ED48A4 /* DecryptImportedMessagesTests.swift */; };
   9.338  		43C3B1622003896800ED48A4 /* IOS-884_001_Mail_from_P4A.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43C3B1612003896800ED48A4 /* IOS-884_001_Mail_from_P4A.txt */; };
   9.339  		43C3B16820038B2500ED48A4 /* IOS-884_001_test010@peptest.ch.pub.key in Resources */ = {isa = PBXBuildFile; fileRef = 43C3B16520038B2500ED48A4 /* IOS-884_001_test010@peptest.ch.pub.key */; };
   9.340 -		43C6F35B1CBE7496006A2A18 /* ConnectionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C6F35A1CBE7496006A2A18 /* ConnectionManager.swift */; };
   9.341  		43C7B9D11CEC4DDF007A612F /* MiscTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C7B9D01CEC4DDF007A612F /* MiscTests.swift */; };
   9.342  		43C98AC3219C275E006418B0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 43C98AC1219C275E006418B0 /* Localizable.strings */; };
   9.343  		43C98AC7219C3691006418B0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 43C98AC5219C3691006418B0 /* InfoPlist.strings */; };
   9.344  		43CE63C51DE87FB200FAC505 /* Identity+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE63C41DE87FB200FAC505 /* Identity+pEp.swift */; };
   9.345 -		43CE63CB1DE8830100FAC505 /* CdAccount+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE63CA1DE8830100FAC505 /* CdAccount+pEp.swift */; };
   9.346 -		43CE63D11DE8866C00FAC505 /* Message+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CE63D01DE8866C00FAC505 /* Message+pEp.swift */; };
   9.347  		43D0702F2133DB3F0013B120 /* AppSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D0702E2133DB3F0013B120 /* AppSettings.swift */; };
   9.348  		43D070312133DB920013B120 /* AppSettingsProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D070302133DB920013B120 /* AppSettingsProtocol.swift */; };
   9.349  		43D070332133DC500013B120 /* DefaultAppSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D070322133DC500013B120 /* DefaultAppSettings.swift */; };
   9.350 +		43D213272237BE4B00C060A1 /* AppAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213262237BE4B00C060A1 /* AppAuth.framework */; };
   9.351 +		43D213282237BE4B00C060A1 /* AppAuth.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213262237BE4B00C060A1 /* AppAuth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.352 +		43D2132B2237BE6D00C060A1 /* pEpIOSToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2132A2237BE6D00C060A1 /* pEpIOSToolbox.framework */; };
   9.353 +		43D2132C2237BE6D00C060A1 /* pEpIOSToolbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2132A2237BE6D00C060A1 /* pEpIOSToolbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.354 +		43D2132E2237BE8000C060A1 /* MessageModel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2132D2237BE8000C060A1 /* MessageModel.framework */; };
   9.355 +		43D2132F2237BE8000C060A1 /* MessageModel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2132D2237BE8000C060A1 /* MessageModel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.356 +		43D213312237C86900C060A1 /* SwipeCellKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213302237C86900C060A1 /* SwipeCellKit.framework */; };
   9.357 +		43D213322237C86900C060A1 /* SwipeCellKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213302237C86900C060A1 /* SwipeCellKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.358 +		43D213342237C8CA00C060A1 /* libAccountSettingsAdapter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213332237C8CA00C060A1 /* libAccountSettingsAdapter.a */; };
   9.359 +		43D213362237C90400C060A1 /* ldns_xcode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213352237C90400C060A1 /* ldns_xcode.framework */; };
   9.360 +		43D213372237C90400C060A1 /* ldns_xcode.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D213352237C90400C060A1 /* ldns_xcode.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.361 +		43D2133B2237CABD00C060A1 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 43800D981D112A2A00821E34 /* libxml2.tbd */; };
   9.362 +		43D2133D2237CB1600C060A1 /* PEPObjCAdapterFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2133C2237CB1600C060A1 /* PEPObjCAdapterFramework.framework */; };
   9.363 +		43D2133E2237CB1600C060A1 /* PEPObjCAdapterFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2133C2237CB1600C060A1 /* PEPObjCAdapterFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.364 +		43D213402237CB3900C060A1 /* PantomimeFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2133F2237CB3900C060A1 /* PantomimeFramework.framework */; };
   9.365 +		43D213412237CB3900C060A1 /* PantomimeFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43D2133F2237CB3900C060A1 /* PantomimeFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.366  		43D3379021A3F32500E40114 /* ImapUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D3378F21A3F32500E40114 /* ImapUtil.swift */; };
   9.367  		43D3F8A121EDDF19002D5AFC /* ENGINE-456_Mail_PEP_OUT_OF_MEMORY.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43D3F8A021EDDF19002D5AFC /* ENGINE-456_Mail_PEP_OUT_OF_MEMORY.txt */; };
   9.368 +		43D47AC0225DD1C500E97C5B /* PantomimeFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D47ABF225DD1C500E97C5B /* PantomimeFramework.framework */; };
   9.369 +		43D47AC2225DD1CE00E97C5B /* PEPObjCAdapterFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D47AC1225DD1CE00E97C5B /* PEPObjCAdapterFramework.framework */; };
   9.370  		43D51E891DD5D902008B77A8 /* SimpleOperationsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D51E881DD5D902008B77A8 /* SimpleOperationsTest.swift */; };
   9.371 -		43D755EB1F25D234006F933A /* MatchUidToMsnOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D755EA1F25D234006F933A /* MatchUidToMsnOperation.swift */; };
   9.372 -		43D755F61F262B37006F933A /* PantomimeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D755F51F262B37006F933A /* PantomimeError.swift */; };
   9.373 -		43D755FC1F26382B006F933A /* EmailConnectInfo+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D755FB1F26382B006F933A /* EmailConnectInfo+Extension.swift */; };
   9.374  		43DA52681CEF1B4F0023D540 /* NewAccountSetupUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DA52671CEF1B4F0023D540 /* NewAccountSetupUITest.swift */; };
   9.375 -		43DB81331E2A56BE00A20902 /* AppendMailsOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DB81321E2A56BE00A20902 /* AppendMailsOperation.swift */; };
   9.376  		43DFB0331E36083D00175C9C /* MessageHeapBufferOverflow.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43DFB0321E36083D00175C9C /* MessageHeapBufferOverflow.txt */; };
   9.377 -		43E0CA2A1F4AB81600D9BB7E /* Attachment+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E0CA291F4AB81600D9BB7E /* Attachment+Extension.swift */; };
   9.378  		43E1619120D7B2D6003F1514 /* UpdateThreadListDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E1619020D7B2D6003F1514 /* UpdateThreadListDelegate.swift */; };
   9.379  		43E657D11F3C33C30014CBEC /* String+HTML.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E657D01F3C33C30014CBEC /* String+HTML.swift */; };
   9.380  		43E657E01F3C74030014CBEC /* AXHTMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 43E657DD1F3C72360014CBEC /* AXHTMLParser.m */; };
   9.381  		43E657E71F3CAB310014CBEC /* HtmlToMarkdownSaxParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E657E61F3CAB310014CBEC /* HtmlToMarkdownSaxParser.swift */; };
   9.382  		43E74C741E38DE2200A2F7A6 /* ImapFlagsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E74C731E38DE2200A2F7A6 /* ImapFlagsTests.swift */; };
   9.383 -		43E7B6751DE4A53A0017D707 /* CdIdentity+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E7B6741DE4A53A0017D707 /* CdIdentity+pEp.swift */; };
   9.384 -		43E9BC641DB518A700AD2352 /* CdFolder+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43E9BC631DB518A700AD2352 /* CdFolder+Extension.swift */; };
   9.385 -		43EC03481F4AE28F0026E152 /* String+Attachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EC03471F4AE28F0026E152 /* String+Attachment.swift */; };
   9.386  		43EC75AC2164C26100048CFE /* SetOwnKeyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EC75AB2164C26100048CFE /* SetOwnKeyViewController.swift */; };
   9.387  		43EC75AE2164D03500048CFE /* SetOwnKeyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EC75AD2164D03500048CFE /* SetOwnKeyViewModel.swift */; };
   9.388  		43EC75B32164E97800048CFE /* DecryptionUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EC75B22164E97800048CFE /* DecryptionUtil.swift */; };
   9.389 @@ -477,16 +372,11 @@
   9.390  		43ED53781CC77F95006AB156 /* SMTPSettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43ED536D1CC77F95006AB156 /* SMTPSettingsTableViewController.swift */; };
   9.391  		43ED53791CC77F95006AB156 /* UserInfoTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43ED536E1CC77F95006AB156 /* UserInfoTableViewController.swift */; };
   9.392  		43EDCB84219ED7F000771240 /* FetchNumberOfNewMailsServiceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EDCB83219ED7F000771240 /* FetchNumberOfNewMailsServiceTest.swift */; };
   9.393 -		43EE99481E438E320060EACE /* FlagImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EE99471E438E320060EACE /* FlagImages.swift */; };
   9.394 -		43EE994E1E4392530060EACE /* FlagImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EE994D1E4392530060EACE /* FlagImageTests.swift */; };
   9.395 -		43F6DFD71DEEC752006B526F /* FetchMessagesOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F6DFD61DEEC752006B526F /* FetchMessagesOperation.swift */; };
   9.396  		43F7F07A1F6AD44600BDF151 /* HandshakeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F7F0791F6AD44600BDF151 /* HandshakeTests.swift */; };
   9.397  		43F7F07C1F6AD4FD00BDF151 /* HandshakeTests_mail_001.txt in Resources */ = {isa = PBXBuildFile; fileRef = 43F7F07B1F6AD4FD00BDF151 /* HandshakeTests_mail_001.txt */; };
   9.398 -		43F84CD21CD899760092FCAE /* SyncFoldersFromServerOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F84CD11CD899760092FCAE /* SyncFoldersFromServerOperation.swift */; };
   9.399  		43F9D99A1E92725700F78A1C /* AttachmentsViewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F9D9991E92725700F78A1C /* AttachmentsViewHelper.swift */; };
   9.400  		43FAA0D41EC9CBC0005BFC4B /* DecryptionTestsInternal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FAA0D31EC9CBC0005BFC4B /* DecryptionTestsInternal.swift */; };
   9.401  		43FC02121F4D913D00273304 /* NSHTML_2017-08-09 15_40_53 +0000.html in Resources */ = {isa = PBXBuildFile; fileRef = 43FC02111F4D913D00273304 /* NSHTML_2017-08-09 15_40_53 +0000.html */; };
   9.402 -		43FE802E209992B800E97AB3 /* QualifyServerIsLocalService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FE802D209992B800E97AB3 /* QualifyServerIsLocalService.swift */; };
   9.403  		43FE8030209995AD00E97AB3 /* QualifyServerIsLocalServiceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FE802F209995AD00E97AB3 /* QualifyServerIsLocalServiceTest.swift */; };
   9.404  		4902244F20E50488000E8D7C /* ThreadNavigationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4902244E20E50488000E8D7C /* ThreadNavigationDelegate.swift */; };
   9.405  		490CEBA72100EAD500E8579C /* SelfDismissable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 490CEBA62100EAD500E8579C /* SelfDismissable.swift */; };
   9.406 @@ -499,7 +389,6 @@
   9.407  		492EF92A20C18C6C004EAE14 /* DisplayedMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492EF92920C18C6C004EAE14 /* DisplayedMessage.swift */; };
   9.408  		492EF92D20C6957D004EAE14 /* ThreadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492EF92C20C6957D004EAE14 /* ThreadViewController.swift */; };
   9.409  		492EF92F20C699D0004EAE14 /* ThreadViewController+TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 492EF92E20C699D0004EAE14 /* ThreadViewController+TableView.swift */; };
   9.410 -		495560861E7150ED0016579E /* libPantomimeStatic.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 495560851E7150ED0016579E /* libPantomimeStatic.a */; };
   9.411  		495D69BF20DBAEE900986007 /* ThreadViewController+SwipeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 495D69BE20DBAEE900986007 /* ThreadViewController+SwipeCell.swift */; };
   9.412  		495F607C20B564CD00F47BD6 /* EmailViewController+SizeClasses.swift in Sources */ = {isa = PBXBuildFile; fileRef = 495F607B20B564CD00F47BD6 /* EmailViewController+SizeClasses.swift */; };
   9.413  		496355B120ECEA2900AA4387 /* ThreadedEmailViewModel+EmailDisplayDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 496355B020ECEA2900AA4387 /* ThreadedEmailViewModel+EmailDisplayDelegate.swift */; };
   9.414 @@ -510,41 +399,28 @@
   9.415  		49C2750120C04DDB0075F6FF /* EmailViewController+DisplayedMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C2750020C04DDB0075F6FF /* EmailViewController+DisplayedMessage.swift */; };
   9.416  		49C34AF620E4F649009D11CC /* CellDetailTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49C34AF520E4F649009D11CC /* CellDetailTransition.swift */; };
   9.417  		49D3BECC20F8F7330043E05D /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49D3BECB20F8F7330043E05D /* LoginViewController.swift */; };
   9.418 -		49D521541E73E1C20097987B /* MessageModel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49D521531E73E1C20097987B /* MessageModel.framework */; };
   9.419 -		49D521551E73E1C20097987B /* MessageModel.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 49D521531E73E1C20097987B /* MessageModel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.420  		49DCCD2521E8ABA900ABE487 /* SecurePDFScreenshotTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A2BC0B21DCE78D00E10C1A /* SecurePDFScreenshotTest.swift */; };
   9.421  		49DCCD2621E8ABD300ABE487 /* nojavascript.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 49DCCD1F21E75BE300ABE487 /* nojavascript.pdf */; };
   9.422  		49DCCD2721E8ABD600ABE487 /* javascript.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 49079D9821E3867900D15A0D /* javascript.pdf */; };
   9.423  		49DCCD2821E8ABDF00ABE487 /* ScreenshotTestUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 495F689921E6600500A10C63 /* ScreenshotTestUtil.swift */; };
   9.424 -		5D039A9C1D0EE7F900AD59EC /* PEPUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D039A9B1D0EE7F900AD59EC /* PEPUtil.swift */; };
   9.425 -		5D039AA21D0EEA3700AD59EC /* DecryptMessagesOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D039AA11D0EEA3700AD59EC /* DecryptMessagesOperation.swift */; };
   9.426 -		5DEBAA481DE59C3B00FAE12C /* NetworkServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DEBAA471DE59C3B00FAE12C /* NetworkServiceTests.swift */; };
   9.427 +		5DEBAA481DE59C3B00FAE12C /* ReplicationServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DEBAA471DE59C3B00FAE12C /* ReplicationServiceTests.swift */; };
   9.428  		8B69E3991E30F80E0022959E /* Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B69E3981E30F80E0022959E /* Appearance.swift */; };
   9.429  		A1014DA71D1173CD00C472A8 /* UIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436C5A8D1CFEDF59006A195F /* UIHelper.swift */; };
   9.430  		A1B50A841CD26FF100B1A997 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B50A811CD26FF100B1A997 /* Constants.swift */; };
   9.431  		B70A3A63220065F600EDCE61 /* String+pEp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70A3A62220065F500EDCE61 /* String+pEp.swift */; };
   9.432 -		B70A3A9322089D5000EDCE61 /* Log+ASL.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70A3A9122089D5000EDCE61 /* Log+ASL.swift */; };
   9.433 -		B70A3A9422089D5000EDCE61 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70A3A9222089D5000EDCE61 /* Log.swift */; };
   9.434  		B70A3C401E817CFA0036876F /* FolderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70A3C3F1E817CFA0036876F /* FolderViewModel.swift */; };
   9.435  		B716056020D3ECC900A733D6 /* MoveToFolderTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B716055F20D3ECC900A733D6 /* MoveToFolderTableViewController.swift */; };
   9.436  		B71EBBBC1E55E4AE00150177 /* FolderTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B71EBBBB1E55E4AE00150177 /* FolderTableViewController.swift */; };
   9.437  		B722EC4D1E5B01B300A2B9D5 /* FolderCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC4C1E5B01B300A2B9D5 /* FolderCellViewModel.swift */; };
   9.438  		B722EC651E5B49BA00A2B9D5 /* FolderSectionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */; };
   9.439  		B722EC7A1E5C879000A2B9D5 /* FolderUiProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */; };
   9.440 -		B729BEC61E7C35E200793110 /* FilterUpdateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B729BEC51E7C35E200793110 /* FilterUpdateProtocol.swift */; };
   9.441 -		B73119001FEBE2DB0006573B /* SwipeCellKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 439932311FEA9B7200E92C35 /* SwipeCellKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.442 -		B740B75D1E4B1C2D002585E1 /* jsonMimeType.txt in Resources */ = {isa = PBXBuildFile; fileRef = B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */; };
   9.443 -		B740B75F1E4B1C46002585E1 /* MimeTypeUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */; };
   9.444  		B74F81021EB0E20000519FCC /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B74F81011EB0E20000519FCC /* LoginViewModel.swift */; };
   9.445  		B75FF00B1EFD420F00C57289 /* EmailListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B75FF00A1EFD420F00C57289 /* EmailListViewModel.swift */; };
   9.446  		B76CF8B320D2739B002429A8 /* MoveToFolderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B76CF8B220D2739B002429A8 /* MoveToFolderViewModel.swift */; };
   9.447 -		B7745839221C191600664282 /* SecretUITestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7745838221C191600664282 /* SecretUITestData.swift */; };
   9.448 -		B774583A221C320B00664282 /* pEpIOSToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7DB7FEA221AFE10003968DA /* pEpIOSToolbox.framework */; };
   9.449 -		B774583B221C320B00664282 /* pEpIOSToolbox.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B7DB7FEA221AFE10003968DA /* pEpIOSToolbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
   9.450 +		B776A47B223962B50047A41D /* EmailListViewModel+MessageQueryResultsDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B776A47A223962B50047A41D /* EmailListViewModel+MessageQueryResultsDelegate.swift */; };
   9.451  		B78309C81EAA09040051A2E0 /* AccountCreation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B78309C61EAA09040051A2E0 /* AccountCreation.storyboard */; };
   9.452  		B78CF8251E76D706008C1739 /* FilterTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8241E76D706008C1739 /* FilterTableViewController.swift */; };
   9.453 -		B78CF8291E76E0F1008C1739 /* FilterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */; };
   9.454 -		B78CF82B1E76E146008C1739 /* FilterCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */; };
   9.455 +		B7A50746224CD27A007B988F /* FilterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7A50745224CD27A007B988F /* FilterViewModel.swift */; };
   9.456  		B7D1EEC81E8BEC8D00F190E3 /* CollapsibleTableViewHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D1EEC71E8BEC8D00F190E3 /* CollapsibleTableViewHeader.swift */; };
   9.457  		B7DB7FC42215C4FF003968DA /* UINavigationController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DB7FC32215C4FF003968DA /* UINavigationController+Extensions.swift */; };
   9.458  		B7DB7FC72215C57F003968DA /* UIView+Autolayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DB7FC52215C57F003968DA /* UIView+Autolayout.swift */; };
   9.459 @@ -556,12 +432,13 @@
   9.460  		B7DB7FD8221AD3BB003968DA /* UITableView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DB7FD5221AD3BB003968DA /* UITableView+Extension.swift */; };
   9.461  		B7DB7FDA221ADDAF003968DA /* UIBarButtonItem+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DB7FD9221ADDAF003968DA /* UIBarButtonItem+Extension.swift */; };
   9.462  		B7DB7FDC221ADDBD003968DA /* UIImageView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DB7FDB221ADDBD003968DA /* UIImageView+Extension.swift */; };
   9.463 +		B7DFEA52225368670080A2BA /* VirtualFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DFEA51225368670080A2BA /* VirtualFolder.swift */; };
   9.464 +		B7DFEA5422536D5E0080A2BA /* UnifiedInbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DFEA5322536D5E0080A2BA /* UnifiedInbox.swift */; };
   9.465 +		B7DFEA56225397AB0080A2BA /* Folder+LocalizedName.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DFEA55225397AB0080A2BA /* Folder+LocalizedName.swift */; };
   9.466  		B7F4A793212DDFC500507B76 /* EmailListViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7F4A792212DDFC500507B76 /* EmailListViewModelTest.swift */; };
   9.467 +		B7F676BD227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7F676BC227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift */; };
   9.468  		F73E4F72217F238300CCFFED /* FolderSectionViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73E4F71217F238300CCFFED /* FolderSectionViewModelTests.swift */; };
   9.469  		F73E4F7A2180744700CCFFED /* FolderCellViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73E4F792180744700CCFFED /* FolderCellViewModelTests.swift */; };
   9.470 -		F7C16A5721A56436004B44F2 /* FolderSyncServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C16A5621A56436004B44F2 /* FolderSyncServiceProtocol.swift */; };
   9.471 -		F7C16A5921A56445004B44F2 /* FolderSyncService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C16A5821A56445004B44F2 /* FolderSyncService.swift */; };
   9.472 -		F7C16A5B21A56DBA004B44F2 /* FetchImapFoldersService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C16A5A21A56DBA004B44F2 /* FetchImapFoldersService.swift */; };
   9.473  		F7C16A5D21A59187004B44F2 /* FolderViewModelDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C16A5C21A59186004B44F2 /* FolderViewModelDelegate.swift */; };
   9.474  /* End PBXBuildFile section */
   9.475  
   9.476 @@ -583,18 +460,21 @@
   9.477  /* End PBXContainerItemProxy section */
   9.478  
   9.479  /* Begin PBXCopyFilesBuildPhase section */
   9.480 -		4377D92F1DB7EB03003432BB /* CopyFiles */ = {
   9.481 +		43D213292237BE4B00C060A1 /* Embed Frameworks */ = {
   9.482  			isa = PBXCopyFilesBuildPhase;
   9.483  			buildActionMask = 2147483647;
   9.484  			dstPath = "";
   9.485  			dstSubfolderSpec = 10;
   9.486  			files = (
   9.487 -				B774583B221C320B00664282 /* pEpIOSToolbox.framework in CopyFiles */,
   9.488 -				15FE1F791FE19A3A00CC2D97 /* AppAuth.framework in CopyFiles */,
   9.489 -				43754AC81FCD8348009A8E63 /* ldns_xcode.framework in CopyFiles */,
   9.490 -				B73119001FEBE2DB0006573B /* SwipeCellKit.framework in CopyFiles */,
   9.491 -				49D521551E73E1C20097987B /* MessageModel.framework in CopyFiles */,
   9.492 +				43D2132C2237BE6D00C060A1 /* pEpIOSToolbox.framework in Embed Frameworks */,
   9.493 +				43D2133E2237CB1600C060A1 /* PEPObjCAdapterFramework.framework in Embed Frameworks */,
   9.494 +				43D213412237CB3900C060A1 /* PantomimeFramework.framework in Embed Frameworks */,
   9.495 +				43D2132F2237BE8000C060A1 /* MessageModel.framework in Embed Frameworks */,
   9.496 +				43D213322237C86900C060A1 /* SwipeCellKit.framework in Embed Frameworks */,
   9.497 +				43D213372237C90400C060A1 /* ldns_xcode.framework in Embed Frameworks */,
   9.498 +				43D213282237BE4B00C060A1 /* AppAuth.framework in Embed Frameworks */,
   9.499  			);
   9.500 +			name = "Embed Frameworks";
   9.501  			runOnlyForDeploymentPostprocessing = 0;
   9.502  		};
   9.503  /* End PBXCopyFilesBuildPhase section */
   9.504 @@ -616,14 +496,12 @@
   9.505  		0033C07E20D7EBD500224E61 /* ThreadedEmailViewModel+UpdateThreadDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ThreadedEmailViewModel+UpdateThreadDelegate.swift"; sourceTree = "<group>"; };
   9.506  		0033C08020D7F3C600224E61 /* ThreadViewController+ViewModelDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ThreadViewController+ViewModelDelegate.swift"; sourceTree = "<group>"; };
   9.507  		0033C08220D7F41600224E61 /* ThreadedEmailViewModelDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadedEmailViewModelDelegate.swift; sourceTree = "<group>"; };
   9.508 -		0038494920D25576008000EA /* ProfilePictureComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePictureComposer.swift; sourceTree = "<group>"; };
   9.509 +		0038494920D25576008000EA /* ProfilePictureComposerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePictureComposerProtocol.swift; sourceTree = "<group>"; };
   9.510  		0038494B20D2587F008000EA /* PepPictureComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PepPictureComposer.swift; sourceTree = "<group>"; };
   9.511 -		003C0FA620B5581A0093A987 /* SecretTestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecretTestData.swift; sourceTree = "<group>"; };
   9.512  		004422C72179E3C500BDF6DF /* SettingsCellViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsCellViewModelTest.swift; sourceTree = "<group>"; };
   9.513  		004422C92179ECD600BDF6DF /* PassiveModeViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PassiveModeViewModelTest.swift; sourceTree = "<group>"; };
   9.514  		004422D8217A25AD00BDF6DF /* UnencryptedSubjectViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnencryptedSubjectViewModelTest.swift; sourceTree = "<group>"; };
   9.515  		004A8C542112FDD500203143 /* EmailListView+UITableViewDataSourcePrefetching.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailListView+UITableViewDataSourcePrefetching.swift"; sourceTree = "<group>"; };
   9.516 -		004A8C5A211316E100203143 /* SelfReferencingOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfReferencingOperation.swift; sourceTree = "<group>"; };
   9.517  		005A21FA20CAA5F50082D19F /* ThreadedEmailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreadedEmailViewModel.swift; sourceTree = "<group>"; };
   9.518  		0069DCFA2110679200846EB1 /* EmailViewController+UIPopoverPresentationControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailViewController+UIPopoverPresentationControllerDelegate.swift"; sourceTree = "<group>"; };
   9.519  		006BE6BB20F4B63C00DDE8C9 /* EmailDetailType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailDetailType.swift; sourceTree = "<group>"; };
   9.520 @@ -637,12 +515,8 @@
   9.521  		00EB89AE20E3E4A000CDFA0D /* ReplyAlertCreator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyAlertCreator.swift; sourceTree = "<group>"; };
   9.522  		00FD0CE52101F7D700BA0C56 /* ScreenComposerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenComposerProtocol.swift; sourceTree = "<group>"; };
   9.523  		00FD0CE72102014C00BA0C56 /* PrimarySplitViewcontroller+ScreenComposerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PrimarySplitViewcontroller+ScreenComposerProtocol.swift"; sourceTree = "<group>"; };
   9.524 -		1500199C1F2B2C73003E670A /* Notification+CWServiceClientNotificationParsing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Notification+CWServiceClientNotificationParsing.swift"; sourceTree = "<group>"; };
   9.525  		1500199E1F2BA2EF003E670A /* SyncFlagsToServerOperationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncFlagsToServerOperationTest.swift; sourceTree = "<group>"; };
   9.526  		150707DB21006CD000AA213F /* ComposeUtilTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeUtilTest.swift; sourceTree = "<group>"; };
   9.527 -		150B84C320A44DE100D8B288 /* MoveToFolderOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderOperation.swift; sourceTree = "<group>"; };
   9.528 -		150B84C520A5DD0600D8B288 /* UIDCopyOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDCopyOperation.swift; sourceTree = "<group>"; };
   9.529 -		150B8E961FCDACBB00374438 /* ErrorPropagator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorPropagator.swift; sourceTree = "<group>"; };
   9.530  		150B8E971FCDACBB00374438 /* AccountSettingsUserInputError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountSettingsUserInputError.swift; sourceTree = "<group>"; };
   9.531  		150B8EB21FCEB93D00374438 /* UIUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIUtils.swift; sourceTree = "<group>"; };
   9.532  		150DF6CF2052A13700A9DCF7 /* SecureWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureWebViewController.swift; sourceTree = "<group>"; };
   9.533 @@ -652,9 +526,8 @@
   9.534  		151DE7DF1FC5D3E200CDC273 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Settings.storyboard; sourceTree = "<group>"; };
   9.535  		151DE7E21FC5D3FA00CDC273 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Handshake.storyboard; sourceTree = "<group>"; };
   9.536  		151DE7E51FC5D41600CDC273 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/FolderViews.storyboard; sourceTree = "<group>"; };
   9.537 -		151F71D12029FA1B0057C74D /* PantomimeFolderAttribute+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PantomimeFolderAttribute+Extensions.swift"; sourceTree = "<group>"; };
   9.538  		151F71EC202A06750057C74D /* TestDataBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestDataBase.swift; sourceTree = "<group>"; };
   9.539 -		151F71EE202A06750057C74D /* NetworkServiceObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkServiceObserver.swift; sourceTree = "<group>"; };
   9.540 +		151F71EE202A06750057C74D /* ReplicationServiceObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplicationServiceObserver.swift; sourceTree = "<group>"; };
   9.541  		151F71EF202A06750057C74D /* DecryptionAttemptCounterDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecryptionAttemptCounterDelegate.swift; sourceTree = "<group>"; };
   9.542  		151F71F0202A06750057C74D /* MockBackgrounder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockBackgrounder.swift; sourceTree = "<group>"; };
   9.543  		151F71F1202A06750057C74D /* CoreDataDrivenTestBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataDrivenTestBase.swift; sourceTree = "<group>"; };
   9.544 @@ -711,50 +584,33 @@
   9.545  		153CA6E71FB61B53003C9629 /* IOS-815_pep_rating_zero.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-815_pep_rating_zero.txt"; sourceTree = "<group>"; };
   9.546  		153CA6E91FB62194003C9629 /* IOS-211-pdfEmail.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-211-pdfEmail.txt"; sourceTree = "<group>"; };
   9.547  		153E4E461F500F650021CBD8 /* IOS-211-duplicated-attachments.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-211-duplicated-attachments.txt"; sourceTree = "<group>"; };
   9.548 -		153FC45C202A263D0053CCF1 /* FolderType+IMAP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FolderType+IMAP.swift"; sourceTree = "<group>"; };
   9.549  		15410D1C2199C2E500BBF65F /* SubjectCellViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubjectCellViewModelTest.swift; sourceTree = "<group>"; };
   9.550  		15410D1E2199CA1100BBF65F /* XCTTestCase+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "XCTTestCase+Utils.swift"; sourceTree = "<group>"; };
   9.551  		15410D212199D83200BBF65F /* AccountCellViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountCellViewModelTest.swift; sourceTree = "<group>"; };
   9.552  		15410D242199ECD700BBF65F /* AttachmentViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttachmentViewModelTest.swift; sourceTree = "<group>"; };
   9.553  		1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Extensions.swift"; sourceTree = "<group>"; };
   9.554  		1541D7EF1FC81ED900D52A5D /* URL+ExtensionsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+ExtensionsTest.swift"; sourceTree = "<group>"; };
   9.555 -		1541D7F21FC8292D00D52A5D /* URL+MIME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MIME.swift"; sourceTree = "<group>"; };
   9.556  		1541D7F41FC82A4900D52A5D /* URL+MIME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MIME.swift"; sourceTree = "<group>"; };
   9.557 -		1544BCFD215246F30075C5A0 /* AttachmentFilter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttachmentFilter.swift; sourceTree = "<group>"; };
   9.558 -		1544BD0121524C9F0075C5A0 /* AttachmentFilterTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AttachmentFilterTest.swift; path = pEpForiOSTests/Models/Filter/AttachmentFilterTest.swift; sourceTree = SOURCE_ROOT; };
   9.559 -		154750991FE7C0B4000D8004 /* FetchNumberOfNewMailsOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchNumberOfNewMailsOperation.swift; sourceTree = "<group>"; };
   9.560 -		15484B672105D5AA00F9D962 /* ConnectInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectInfo.swift; sourceTree = "<group>"; };
   9.561 -		15484B692105D5C500F9D962 /* EmailConnectInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailConnectInfo.swift; sourceTree = "<group>"; };
   9.562 -		15484B6B2105E26600F9D962 /* LegacyConnectInfoProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyConnectInfoProvider.swift; sourceTree = "<group>"; };
   9.563  		154D92CE20AC1744009A5868 /* MoveToFolderOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderOperationTest.swift; sourceTree = "<group>"; };
   9.564 -		154F0A7F2085FC7D00C77D72 /* CdAttachment+Pantomime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CdAttachment+Pantomime.swift"; sourceTree = "<group>"; };
   9.565  		154F0A8120874B3E00C77D72 /* ContentDispositionTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentDispositionTest.swift; sourceTree = "<group>"; };
   9.566 -		154F0A832087779200C77D72 /* ContentDispositionType + Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContentDispositionType + Conversion.swift"; sourceTree = "<group>"; };
   9.567  		155050EF1FE82356009CEAD2 /* UserNotificationTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationTool.swift; sourceTree = "<group>"; };
   9.568  		155050F11FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserNotificationTool+pEp.swift"; sourceTree = "<group>"; };
   9.569 -		155050F51FEAB082009CEAD2 /* ErrorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorContainer.swift; sourceTree = "<group>"; };
   9.570 -		155050F71FEAB57F009CEAD2 /* BackgroundError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundError.swift; sourceTree = "<group>"; };
   9.571  		1554755E2137F6F8005A52D0 /* SwipeActionDescriptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwipeActionDescriptor.swift; sourceTree = "<group>"; };
   9.572  		155475632137FD96005A52D0 /* FolderType+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "FolderType+Extensions.swift"; sourceTree = "<group>"; };
   9.573  		1554756521393036005A52D0 /* Folder+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Folder+Extensions.swift"; path = "pEpForiOS/Models/Folder+Extensions.swift"; sourceTree = SOURCE_ROOT; };
   9.574  		15547567213931BC005A52D0 /* Folder+Threading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+Threading.swift"; sourceTree = "<group>"; };
   9.575 -		1554756B213FE139005A52D0 /* UnifiedFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnifiedFilter.swift; sourceTree = "<group>"; };
   9.576 -		15547570213FEAB7005A52D0 /* CdMessagePredicateFactory+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CdMessagePredicateFactory+Extension.swift"; sourceTree = "<group>"; };
   9.577  		1555361A207796CE00CDDAFA /* CWInternetAddress+TestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CWInternetAddress+TestUtils.swift"; sourceTree = "<group>"; };
   9.578 -		1555E97B1FD587A300BF8E0E /* Message+IMAP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Message+IMAP.swift"; sourceTree = "<group>"; };
   9.579  		155F2D9F20530798001B4B1C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Reusable.storyboard; sourceTree = "<group>"; };
   9.580 -		1560D16F1F6FC99B00A75B39 /* FetchOlderImapMessagesOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchOlderImapMessagesOperation.swift; sourceTree = "<group>"; };
   9.581 -		1560D1711F6FD1F600A75B39 /* FetchOlderImapMessagesService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchOlderImapMessagesService.swift; sourceTree = "<group>"; };
   9.582 +		15679F0C2292F4090051DCC3 /* FilterViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterViewDelegate.swift; path = Filter/ViewModel/FilterViewDelegate.swift; sourceTree = "<group>"; };
   9.583  		1568FEA01FACDCC500993EA3 /* IOS-211_hi_there.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-211_hi_there.txt"; sourceTree = "<group>"; };
   9.584  		1569AEA420E14DC2002102A0 /* ReUploadTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReUploadTest.swift; sourceTree = "<group>"; };
   9.585 -		1569DDB7215395BE007A0398 /* NSAttributedString+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSAttributedString+Extension.swift"; path = "pEpForiOS/Util/NSAttributedString+Extension.swift"; sourceTree = SOURCE_ROOT; };
   9.586 +		1569DDB7215395BE007A0398 /* NSAttributedString+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSAttributedString+Extension.swift"; path = "pEpForiOS/Util/Extensions/NSAttributedString+Extension.swift"; sourceTree = SOURCE_ROOT; };
   9.587  		1574D077211356E000FEDC93 /* UrlClickHandlerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlClickHandlerProtocol.swift; sourceTree = "<group>"; };
   9.588  		1574D079211464CC00FEDC93 /* URL+MailTo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MailTo.swift"; sourceTree = "<group>"; };
   9.589  		1574D07C2114696B00FEDC93 /* URL+MailToTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+MailToTest.swift"; sourceTree = "<group>"; };
   9.590  		1574D09A21186A1D00FEDC93 /* AddToContactsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AddToContactsViewController.swift; path = AddToContactsViewController/AddToContactsViewController.swift; sourceTree = "<group>"; };
   9.591  		157743B7217885EA0007222C /* RecipientTextViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipientTextViewModelTest.swift; sourceTree = "<group>"; };
   9.592  		157C05472180756300E530DE /* DocumentAttachmentPickerViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentAttachmentPickerViewModelTest.swift; sourceTree = "<group>"; };
   9.593 -		15865A8820319ADC00F7A4B5 /* Folder+pEp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+pEp.swift"; sourceTree = "<group>"; };
   9.594  		15874BA82127493E00A3A4A6 /* SettingSwitchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingSwitchTableViewCell.swift; sourceTree = "<group>"; };
   9.595  		15874BAA2127493E00A3A4A6 /* SettingCellViewModelProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingCellViewModelProtocols.swift; sourceTree = "<group>"; };
   9.596  		15874BAB2127493E00A3A4A6 /* SettingsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewModel.swift; sourceTree = "<group>"; };
   9.597 @@ -773,25 +629,15 @@
   9.598  		15874BBF2127493E00A3A4A6 /* TrustedServerSettingsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrustedServerSettingsViewModel.swift; sourceTree = "<group>"; };
   9.599  		15874BC02127493E00A3A4A6 /* TrustedServerSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrustedServerSettingsViewController.swift; sourceTree = "<group>"; };
   9.600  		15874BD321274BD400A3A4A6 /* TrustedServerSettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedServerSettingCell.swift; sourceTree = "<group>"; };
   9.601 -		1587D1622049BE7D002C2157 /* ImapConnectionDataCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImapConnectionDataCache.swift; sourceTree = "<group>"; };
   9.602 -		1594C1CF21281FCD00CB06E2 /* Server+Fetching.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Server+Fetching.swift"; sourceTree = "<group>"; };
   9.603 -		159F4C9B21BEB9ED00244903 /* Message+FakeMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Message+FakeMessage.swift"; sourceTree = "<group>"; };
   9.604  		15A5368F2155136800CF6204 /* PEPUtilTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PEPUtilTest.swift; sourceTree = "<group>"; };
   9.605 -		15A75CE0202B57BF00C0DA28 /* Folder+VirtualMailbox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+VirtualMailbox.swift"; sourceTree = "<group>"; };
   9.606 -		15A75CE9202DE6B300C0DA28 /* ProviderSpecificInformationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProviderSpecificInformationProtocol.swift; sourceTree = "<group>"; };
   9.607 -		15A75CEB202DED2300C0DA28 /* GmailSpecificInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmailSpecificInformation.swift; sourceTree = "<group>"; };
   9.608  		15A763D01F72D68000670313 /* KeyChainTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyChainTest.swift; sourceTree = "<group>"; };
   9.609  		15A8B8FB20908D2300D2B0B6 /* Keychain+TestUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Keychain+TestUtils.swift"; sourceTree = "<group>"; };
   9.610 -		15AA6015207CD71D00D57DB4 /* ImapFlags+Pantomime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ImapFlags+Pantomime.swift"; sourceTree = "<group>"; };
   9.611  		15B2204F1FBF5D6E00CA52BA /* InfoPlist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoPlist.swift; sourceTree = "<group>"; };
   9.612  		15B220511FC2DAE200CA52BA /* InfoPlist+pEpStrings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InfoPlist+pEpStrings.swift"; sourceTree = "<group>"; };
   9.613  		15B483DA1F28E2FC000FB2CF /* SpecialUseMailboxesTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpecialUseMailboxesTest.swift; sourceTree = "<group>"; };
   9.614  		15B483E01F290B14000FB2CF /* LoginImapOperationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginImapOperationTest.swift; sourceTree = "<group>"; };
   9.615 -		15BA536920A08B100090F126 /* Account+Extentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Account+Extentions.swift"; sourceTree = "<group>"; };
   9.616 -		15BA536B20A08D270090F126 /* UnifiedInbox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnifiedInbox.swift; sourceTree = "<group>"; };
   9.617  		15BA536D20A095410090F126 /* UnifiedInboxTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnifiedInboxTest.swift; sourceTree = "<group>"; };
   9.618  		15BA537B20A1F5F50090F126 /* MoveToAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToAccountViewController.swift; sourceTree = "<group>"; };
   9.619 -		15BBBC621FD0496800B9DCC8 /* ReportingErrorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportingErrorContainer.swift; sourceTree = "<group>"; };
   9.620  		15BBBC671FD04DFC00B9DCC8 /* ReportingErrorContainerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportingErrorContainerTest.swift; sourceTree = "<group>"; };
   9.621  		15BBBC6A1FD0527200B9DCC8 /* DisplayUserErrorTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayUserErrorTest.swift; sourceTree = "<group>"; };
   9.622  		15D43999216E697700EB3933 /* AccountPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountPickerView.swift; sourceTree = "<group>"; };
   9.623 @@ -802,15 +648,10 @@
   9.624  		15D7D991219B154000A1A2B9 /* Attachment+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Attachment+Extensions.swift"; sourceTree = "<group>"; };
   9.625  		15D7D994219B2C5C00A1A2B9 /* ComposeViewModel+InitDataTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ComposeViewModel+InitDataTest.swift"; sourceTree = "<group>"; };
   9.626  		15D7D996219C374600A1A2B9 /* ComposeViewModelStateTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeViewModelStateTest.swift; sourceTree = "<group>"; };
   9.627 -		15DD3F74211EC68D00A8714D /* DecryptMessageOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecryptMessageOperation.swift; sourceTree = "<group>"; };
   9.628  		15EBE43920E5286500268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_sec.asc; sourceTree = "<group>"; };
   9.629  		15EBE43C20E5296900268859 /* unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_pub.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unittest_ios_4_peptest_ch_66AF_5804_A879_1E01_B407_125A_CAF0_D838_1542_49C4_pub.asc; sourceTree = "<group>"; };
   9.630  		15EBE44020E5353D00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_pub.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_pub.asc; sourceTree = "<group>"; };
   9.631  		15EBE44120E5353D00268859 /* unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unittest_ios_3_peptest_ch_550A_9E62_6822_040E_57CB_151A_651C_4A5D_B15B_77A3_sec.asc; sourceTree = "<group>"; };
   9.632 -		15F0F7A921358B33002BE853 /* CdMessagePredicateFactory+Imap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CdMessagePredicateFactory+Imap.swift"; sourceTree = "<group>"; };
   9.633 -		15F0F7AC213594FC002BE853 /* Folder+Imap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+Imap.swift"; sourceTree = "<group>"; };
   9.634 -		15F0F7B52136F6D1002BE853 /* CdFolderPredicateFactory+IMAP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CdFolderPredicateFactory+IMAP.swift"; sourceTree = "<group>"; };
   9.635 -		15F835231F34BE1300FCE887 /* AccountUserInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountUserInput.swift; sourceTree = "<group>"; };
   9.636  		15F835271F3B497D00FCE887 /* FetchMessagesOperationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchMessagesOperationTest.swift; sourceTree = "<group>"; };
   9.637  		15FE1F751FE122D900CC2D97 /* CreditsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsViewController.swift; sourceTree = "<group>"; };
   9.638  		220DCE2C1E0AB544002FE716 /* MessageCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageCell.swift; sourceTree = "<group>"; };
   9.639 @@ -821,17 +662,9 @@
   9.640  		220DCE331E0AB5CC002FE716 /* MessageSubjectCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSubjectCell.swift; sourceTree = "<group>"; };
   9.641  		222B35571DF96389007A1F82 /* Capability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Capability.swift; sourceTree = "<group>"; };
   9.642  		228038671DC9DE6D00F1CB45 /* TextfieldResponder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextfieldResponder.swift; sourceTree = "<group>"; };
   9.643 -		37A3D61E221429DA00E11415 /* NetworkReachibilityMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkReachibilityMock.swift; sourceTree = "<group>"; };
   9.644 -		37A3D6212214338300E11415 /* NetworkReachabilityProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkReachabilityProtocol.swift; sourceTree = "<group>"; };
   9.645 -		37A3D6232214372B00E11415 /* NetworkReachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkReachability.swift; sourceTree = "<group>"; };
   9.646 -		37A3D6252215695400E11415 /* ReachabilityUtilsProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReachabilityUtilsProtocol.swift; sourceTree = "<group>"; };
   9.647 -		37FE82E82211D290008F8CF4 /* ReachabilityUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReachabilityUtils.swift; sourceTree = "<group>"; };
   9.648 -		37FE82EC22132B23008F8CF4 /* ReachabilityUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReachabilityUtilsTests.swift; sourceTree = "<group>"; };
   9.649 +		37C3C0E52260C64D003E290C /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
   9.650  		43040A521E9776220083DED8 /* AttachmentSummaryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentSummaryView.swift; sourceTree = "<group>"; };
   9.651  		4304FCFE1EBB8C5A0086DADA /* LanguageListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LanguageListViewController.swift; sourceTree = "<group>"; };
   9.652 -		4307C46F1ED81F3100A276A4 /* DefaultImapSyncDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DefaultImapSyncDelegate.swift; path = ../DefaultImapSyncDelegate.swift; sourceTree = "<group>"; };
   9.653 -		4307C4711ED826E400A276A4 /* SmtpSendError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SmtpSendError.swift; sourceTree = "<group>"; };
   9.654 -		430A2EEB1E81357A00878837 /* CdImapFlags+Pantomime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdImapFlags+Pantomime.swift"; sourceTree = "<group>"; };
   9.655  		430BA228203438A3003B041C /* CdMessagePEPMessageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CdMessagePEPMessageTests.swift; sourceTree = "<group>"; };
   9.656  		430C80D41D0EAB6E00CD4582 /* pEpTrustWords.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = pEpTrustWords.bundle; path = ../pEpTrustWords.bundle; sourceTree = "<group>"; };
   9.657  		430C80DF1D0EADC200CD4582 /* PepAdapterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PepAdapterTests.swift; sourceTree = "<group>"; };
   9.658 @@ -840,89 +673,90 @@
   9.659  		430E0BE61EAF5E2600378EC2 /* NSMutableDictionary+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSMutableDictionary+pEp.swift"; sourceTree = "<group>"; };
   9.660  		430E5F1F1EBC87A700E5D5D3 /* LanguageListTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LanguageListTableViewCell.swift; sourceTree = "<group>"; };
   9.661  		43106A182045716000693144 /* OAuth2ConfigurationProtocol+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OAuth2ConfigurationProtocol+Extension.swift"; sourceTree = "<group>"; };
   9.662 -		431144B41CC0FCA40007639D /* StoreFolderOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreFolderOperation.swift; sourceTree = "<group>"; };
   9.663 -		431144B61CC11D6A0007639D /* BaseOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseOperation.swift; sourceTree = "<group>"; };
   9.664 -		431144B81CC11DF30007639D /* StorePrefetchedMailOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorePrefetchedMailOperation.swift; sourceTree = "<group>"; };
   9.665 -		43122B141DF5B48B00610253 /* EmailService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailService.swift; sourceTree = "<group>"; };
   9.666 -		43122B151DF5B48B00610253 /* ImapService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapService.swift; sourceTree = "<group>"; };
   9.667 -		43122B161DF5B48B00610253 /* SmtpService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SmtpService.swift; sourceTree = "<group>"; };
   9.668 -		43122B3B1DF5B75000610253 /* NetworkService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkService.swift; sourceTree = "<group>"; };
   9.669 -		43122B3D1DF5BB6600610253 /* MySelfOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MySelfOperation.swift; sourceTree = "<group>"; };
   9.670 +		4312BE88228439670002129D /* SecretUITestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SecretUITestData.swift; path = ../../pEp_for_iOS_intern/SecretUITestData.swift; sourceTree = "<group>"; };
   9.671  		431394A81E4B03AA00D92F33 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
   9.672 -		4315E4BE2011FD6900F68763 /* AuthMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthMethod.swift; sourceTree = "<group>"; };
   9.673 -		4315E4C020120F1600F68763 /* NSSecureCoding+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSSecureCoding+Extension.swift"; sourceTree = "<group>"; };
   9.674  		4315E4C2201242BB00F68763 /* OAuth2Type+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OAuth2Type+Extension.swift"; sourceTree = "<group>"; };
   9.675 -		431798761CF87FE6007DD655 /* ReferenceCounter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReferenceCounter.swift; sourceTree = "<group>"; };
   9.676 -		431799391CF8A39F007DD655 /* pEpForiOSTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "pEpForiOSTests-Bridging-Header.h"; sourceTree = "<group>"; };
   9.677 -		431B04791DE5772000E40CD3 /* CdMessage+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdMessage+pEp.swift"; sourceTree = "<group>"; };
   9.678 -		431B047F1DE5774800E40CD3 /* CdMessage+Pantomime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdMessage+Pantomime.swift"; sourceTree = "<group>"; };
   9.679 -		431B04811DE583A000E40CD3 /* CdAttachment+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdAttachment+Extension.swift"; sourceTree = "<group>"; };
   9.680  		431BB9441E49B7A9000BCBF1 /* PorpoiseGalaxy_HubbleFraile_960.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = PorpoiseGalaxy_HubbleFraile_960.jpg; sourceTree = "<group>"; };
   9.681  		431C2B161F387C4100D87FFD /* LoginViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewModelTests.swift; sourceTree = "<group>"; };
   9.682  		431C2B181F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ConnectionTransport+AccountSettings.swift"; sourceTree = "<group>"; };
   9.683  		431C6E031FE7A85200E23BE0 /* OAuth2ConfigurationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2ConfigurationProtocol.swift; sourceTree = "<group>"; };
   9.684  		431D60DA1E93BB2D001266D7 /* AttachmentsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentsView.swift; sourceTree = "<group>"; };
   9.685  		431D60DC1E93D580001266D7 /* MessageAttachmentsCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageAttachmentsCell.swift; sourceTree = "<group>"; };
   9.686 -		431E2B061F02550C000035FA /* CheckOutgoingMessagesOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckOutgoingMessagesOperation.swift; sourceTree = "<group>"; };
   9.687 -		431E58F51ED57F6500EFA77F /* AccountVerificationServiceProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountVerificationServiceProtocol.swift; sourceTree = "<group>"; };
   9.688 -		431E58F91ED591E900EFA77F /* AccountVerificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountVerificationService.swift; sourceTree = "<group>"; };
   9.689 -		431E58FB1ED5926B00EFA77F /* AccountVerificationServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountVerificationServiceTests.swift; sourceTree = "<group>"; };
   9.690  		431E65621EEAE65200B8BBFC /* HandshakeUITest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandshakeUITest.swift; sourceTree = "<group>"; };
   9.691  		431E8F7D1CFDCF3A00C33647 /* EmailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailViewController.swift; sourceTree = "<group>"; };
   9.692  		431F987E1F6FD3E300A1E4D2 /* HandshakePartnerTableViewCellViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandshakePartnerTableViewCellViewModelTests.swift; sourceTree = "<group>"; };
   9.693 -		43209B531ECC5A9B007E7E2E /* libpEpObjCAdapter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpEpObjCAdapter.a; path = "../pEpObjCAdapter/build/Debug-iphoneos/libpEpObjCAdapter.a"; sourceTree = "<group>"; };
   9.694 -		432142631E8FD66900FBE987 /* FetchNumberOfNewMailsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchNumberOfNewMailsService.swift; sourceTree = "<group>"; };
   9.695 -		432142651E8FD6A400FBE987 /* ServiceUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServiceUtil.swift; sourceTree = "<group>"; };
   9.696 -		432198E71DF6B51B00318A74 /* LoginImapOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginImapOperation.swift; sourceTree = "<group>"; };
   9.697 -		432198EC1DF6B66800318A74 /* SharedObjects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedObjects.swift; sourceTree = "<group>"; };
   9.698  		4322E82E1F9DE8260011FC55 /* Microsoft_Outlook_Probing_Message_001.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Microsoft_Outlook_Probing_Message_001.txt; sourceTree = "<group>"; };
   9.699 -		4323FE851E83D6FF006785E1 /* ImapFolderBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapFolderBuilder.swift; sourceTree = "<group>"; };
   9.700  		43257C7F1F50064100DDC7F0 /* HtmlToTextSaxParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlToTextSaxParser.swift; sourceTree = "<group>"; };
   9.701  		43257C811F50179800DDC7F0 /* BasicSaxParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicSaxParser.swift; sourceTree = "<group>"; };
   9.702  		43257C831F50629700DDC7F0 /* HtmlToAttributedTextSaxParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlToAttributedTextSaxParser.swift; sourceTree = "<group>"; };
   9.703  		43257C851F50659200DDC7F0 /* StringHTMLExtensionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringHTMLExtensionTests.swift; sourceTree = "<group>"; };
   9.704  		43257C871F5067BE00DDC7F0 /* NSAttributedString+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+pEp.swift"; sourceTree = "<group>"; };
   9.705 -		43264E9A1D76B7110098DCAC /* SyncFlagsToServerOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncFlagsToServerOperation.swift; sourceTree = "<group>"; };
   9.706 -		4326D3FE1EFBC8DB0016AB0D /* FolderInfoOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FolderInfoOperation.swift; sourceTree = "<group>"; };
   9.707  		43293EFA1EB9DD6700EEE010 /* UIViewController+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extension.swift"; sourceTree = "<group>"; };
   9.708  		432A24D61DE714A200DAAC5C /* MessagePantomimeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessagePantomimeTests.swift; sourceTree = "<group>"; };
   9.709  		432A5E251EB344C3007CB670 /* PEP_color+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PEP_color+Extension.swift"; sourceTree = "<group>"; };
   9.710 -		432AC3051ECB0C44007DC418 /* CWIMAPMessage+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CWIMAPMessage+pEp.swift"; sourceTree = "<group>"; };
   9.711 -		432DA7431EE01E3300B30BAA /* MessageSyncServiceProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSyncServiceProtocol.swift; sourceTree = "<group>"; };
   9.712 -		432DA7451EE027EB00B30BAA /* MessageSyncService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSyncService.swift; sourceTree = "<group>"; };
   9.713  		432E80FB2191AF5100359879 /* UniversLTStd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = UniversLTStd.otf; sourceTree = "<group>"; };
   9.714  		432E80FC2191AF5100359879 /* UniversLTStd-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "UniversLTStd-Bold.otf"; sourceTree = "<group>"; };
   9.715  		432F7D601D2102F10094F097 /* PEPSessionTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PEPSessionTest.swift; sourceTree = "<group>"; };
   9.716 -		433019E51E01A71300788B89 /* PeriodicTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeriodicTask.swift; sourceTree = "<group>"; };
   9.717  		4330278D1F7BABFF00D685F8 /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
   9.718  		43306EBD1FE125B50045DD00 /* OAuth2Authorization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Authorization.swift; sourceTree = "<group>"; };
   9.719  		43306EC11FE129840045DD00 /* OAuth2Type.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2Type.swift; sourceTree = "<group>"; };
   9.720 -		43313DFB1DEC7F6000C111C8 /* DeleteFoldersOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeleteFoldersOperation.swift; sourceTree = "<group>"; };
   9.721 -		4333A2A41E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FixAttachmentsOperation.swift; sourceTree = "<group>"; };
   9.722  		4334CF2F2020CFFE00B3193E /* OAuth2Type+LibAccountSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OAuth2Type+LibAccountSettings.swift"; sourceTree = "<group>"; };
   9.723  		4336229D1DC76B8100133B3D /* MessageModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageModelTests.swift; sourceTree = "<group>"; };
   9.724  		433724FC1DA2C2B1005E8DF5 /* pEp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = pEp.entitlements; path = ../pEp.entitlements; sourceTree = "<group>"; };
   9.725  		433BCD941D5388C100DD98EF /* ReplyUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyUtil.swift; sourceTree = "<group>"; };
   9.726 -		433C51D11E66CB9C00272E19 /* CreateRequiredFoldersOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateRequiredFoldersOperation.swift; sourceTree = "<group>"; };
   9.727 +		433E7437225B564400B84CD9 /* Account+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Account+Extension.swift"; sourceTree = "<group>"; };
   9.728  		433F2E2921E3581800E1CA49 /* ENGINE-505_Mail_NullInnerMimeType.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "ENGINE-505_Mail_NullInnerMimeType.txt"; sourceTree = "<group>"; };
   9.729 -		4341EBCE2089F674004CE6B8 /* QualifyServerIsLocalOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QualifyServerIsLocalOperation.swift; sourceTree = "<group>"; };
   9.730 -		4341EBD0208A0961004CE6B8 /* QualifyServerIsLocalServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QualifyServerIsLocalServiceProtocol.swift; sourceTree = "<group>"; };
   9.731  		43425EDA1FE3DE6E004A2728 /* OAuth2ProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2ProviderProtocol.swift; sourceTree = "<group>"; };
   9.732  		43425EDC1FE3DF3B004A2728 /* OAuth2Provider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2Provider.swift; sourceTree = "<group>"; };
   9.733  		43425EDE1FE3E052004A2728 /* OAuth2ProviderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2ProviderFactory.swift; sourceTree = "<group>"; };
   9.734 -		4348EF0C1E27ABA100F441A9 /* LoginSmtpOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginSmtpOperation.swift; sourceTree = "<group>"; };
   9.735  		4348EF141E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc"; sourceTree = "<group>"; };
   9.736 -		43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageIdentitfying.swift; sourceTree = "<group>"; };
   9.737 -		43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Message+MessageIdentitfying.swift"; sourceTree = "<group>"; };
   9.738  		43498CDA200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModelLoginErrorDelegate.swift; sourceTree = "<group>"; };
   9.739  		43498CDC200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModelOAuth2ErrorDelegate.swift; sourceTree = "<group>"; };
   9.740  		434AC3E220A450D700C11B7F /* UIAlertController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+Extension.swift"; sourceTree = "<group>"; };
   9.741 -		434B5D181DDF67E400BEDEF0 /* CdMessage+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdMessage+Extension.swift"; sourceTree = "<group>"; };
   9.742  		434C051A20F8BAB6009B271D /* XCUIElement+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "XCUIElement+Extension.swift"; sourceTree = "<group>"; };
   9.743  		434DDC2A20D10F9A00755F44 /* EncryptionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionTests.swift; sourceTree = "<group>"; };
   9.744 -		434E5A1A20DB9C4600D7F88A /* EmailListViewModel+MessageFolderDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailListViewModel+MessageFolderDelegate.swift"; sourceTree = "<group>"; };
   9.745  		434F40931EB0B173002FBF0D /* ObservableValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObservableValue.swift; sourceTree = "<group>"; };
   9.746  		434F40951EB0DB5E002FBF0D /* HandshakePartnerTableViewCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandshakePartnerTableViewCellViewModel.swift; sourceTree = "<group>"; };
   9.747 +		435171FE229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = "<group>"; };
   9.748 +		435171FF229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Settings.strings; sourceTree = "<group>"; };
   9.749 +		43517200229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/AccountCreation.strings; sourceTree = "<group>"; };
   9.750 +		43517201229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Handshake.strings; sourceTree = "<group>"; };
   9.751 +		43517202229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
   9.752 +		43517203229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/FolderViews.strings; sourceTree = "<group>"; };
   9.753 +		43517204229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Reusable.strings; sourceTree = "<group>"; };
   9.754 +		43517205229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Thread.strings; sourceTree = "<group>"; };
   9.755 +		43517206229FBC9700D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
   9.756 +		43517207229FBC9800D92026 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
   9.757 +		43517208229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Main.strings; sourceTree = "<group>"; };
   9.758 +		43517209229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Settings.strings; sourceTree = "<group>"; };
   9.759 +		4351720A229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/AccountCreation.strings; sourceTree = "<group>"; };
   9.760 +		4351720B229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Handshake.strings; sourceTree = "<group>"; };
   9.761 +		4351720C229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
   9.762 +		4351720D229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/FolderViews.strings; sourceTree = "<group>"; };
   9.763 +		4351720E229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Reusable.strings; sourceTree = "<group>"; };
   9.764 +		4351720F229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Thread.strings; sourceTree = "<group>"; };
   9.765 +		43517210229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
   9.766 +		43517211229FC51A00D92026 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
   9.767 +		43517212229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Main.strings; sourceTree = "<group>"; };
   9.768 +		43517213229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Settings.strings; sourceTree = "<group>"; };
   9.769 +		43517214229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/AccountCreation.strings; sourceTree = "<group>"; };
   9.770 +		43517215229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Handshake.strings; sourceTree = "<group>"; };
   9.771 +		43517216229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
   9.772 +		43517217229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/FolderViews.strings; sourceTree = "<group>"; };
   9.773 +		43517218229FC57400D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Reusable.strings; sourceTree = "<group>"; };
   9.774 +		43517219229FC57500D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Thread.strings; sourceTree = "<group>"; };
   9.775 +		4351721A229FC57500D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/InfoPlist.strings; sourceTree = "<group>"; };
   9.776 +		4351721B229FC57500D92026 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
   9.777 +		4351721C229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Main.strings; sourceTree = "<group>"; };
   9.778 +		4351721D229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Settings.strings; sourceTree = "<group>"; };
   9.779 +		4351721E229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/AccountCreation.strings; sourceTree = "<group>"; };
   9.780 +		4351721F229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Handshake.strings; sourceTree = "<group>"; };
   9.781 +		43517220229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
   9.782 +		43517221229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/FolderViews.strings; sourceTree = "<group>"; };
   9.783 +		43517222229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Reusable.strings; sourceTree = "<group>"; };
   9.784 +		43517223229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Thread.strings; sourceTree = "<group>"; };
   9.785 +		43517224229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
   9.786 +		43517225229FC59E00D92026 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = "<group>"; };
   9.787  		4351C2A21F4441190053381F /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
   9.788  		4351C2A31F4441190053381F /* chunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chunk.h; sourceTree = "<group>"; };
   9.789  		4351C2A41F4441190053381F /* cmark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmark.h; sourceTree = "<group>"; };
   9.790 @@ -962,14 +796,10 @@
   9.791  		4351C2C71F4441190053381F /* xml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xml.c; sourceTree = "<group>"; };
   9.792  		4351C2DD1F4457620053381F /* NSString+Markdown.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Markdown.m"; sourceTree = "<group>"; };
   9.793  		4351C2DF1F44581A0053381F /* NSString+Markdown.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Markdown.h"; sourceTree = "<group>"; };
   9.794 -		4356102B1DEF019400808C8E /* SyncMessagesOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncMessagesOperation.swift; sourceTree = "<group>"; };
   9.795  		4356FFE42135448600804089 /* ReplyAllPossibleChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyAllPossibleChecker.swift; sourceTree = "<group>"; };
   9.796  		4356FFE621354A4B00804089 /* ReplyAllPossibleCheckerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyAllPossibleCheckerProtocol.swift; sourceTree = "<group>"; };
   9.797  		4356FFEB21356CB600804089 /* ReplyAllPossibleCheckerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyAllPossibleCheckerTest.swift; sourceTree = "<group>"; };
   9.798  		435F7C74215E05DA00F21EFD /* 1364_Mail_missing_attached_image.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 1364_Mail_missing_attached_image.txt; sourceTree = "<group>"; };
   9.799 -		4360282C1ED6F27600C95FC4 /* NetworkError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkError.swift; sourceTree = "<group>"; };
   9.800 -		4360282E1ED6F33400C95FC4 /* ImapSyncError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapSyncError.swift; sourceTree = "<group>"; };
   9.801 -		4362398F1EAE08F400BD2EB9 /* PEPSession+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PEPSession+Extensions.swift"; sourceTree = "<group>"; };
   9.802  		43628765213D7A5E0066CD03 /* IOS-1300_odt_attachment.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-1300_odt_attachment.txt"; sourceTree = "<group>"; };
   9.803  		436795F71EE98B9A00B03E23 /* MessageReevalutionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageReevalutionTests.swift; sourceTree = "<group>"; };
   9.804  		436795F91EE98E9900B03E23 /* CommunicationTypeTests_test002@peptest.ch_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "CommunicationTypeTests_test002@peptest.ch_sec.asc"; sourceTree = "<group>"; };
   9.805 @@ -977,28 +807,22 @@
   9.806  		436795FD1EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "CommunicationTypeTests_test001@peptest.ch_sec.asc"; sourceTree = "<group>"; };
   9.807  		436795FE1EE98F6E00B03E23 /* CommunicationTypeTests_test001@peptest.ch.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "CommunicationTypeTests_test001@peptest.ch.asc"; sourceTree = "<group>"; };
   9.808  		436796011EE9909100B03E23 /* CommunicationTypeTests_Message_test001_to_test002.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CommunicationTypeTests_Message_test001_to_test002.txt; sourceTree = "<group>"; };
   9.809 -		436C23271E02948400071430 /* BackgroundTaskProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackgroundTaskProtocol.swift; sourceTree = "<group>"; };
   9.810 -		436C232C1E02A2D900071430 /* KickOffMySelfProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KickOffMySelfProtocol.swift; sourceTree = "<group>"; };
   9.811 -		436C232E1E02A52D00071430 /* LimitedOperationQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LimitedOperationQueue.swift; sourceTree = "<group>"; };
   9.812 +		436981AC2282F6460006FA2D /* secret.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = secret.xcconfig; path = ../../pEp_for_iOS_intern/secret.xcconfig; sourceTree = "<group>"; };
   9.813 +		436981BF22830AF60006FA2D /* SecretTestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SecretTestData.swift; path = ../../../pEp_for_iOS_intern/SecretTestData.swift; sourceTree = "<group>"; };
   9.814  		436C5A8D1CFEDF59006A195F /* UIHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIHelper.swift; sourceTree = "<group>"; };
   9.815  		436D0065215B5F3800966CC2 /* Undisplayable_HTML_Message.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Undisplayable_HTML_Message.txt; sourceTree = "<group>"; };
   9.816  		436F8E131D36706A007E9829 /* StringExtensionsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtensionsTest.swift; sourceTree = "<group>"; };
   9.817 +		437027A022315B5700A77AEC /* PEPAppUtilWrappers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PEPAppUtilWrappers.swift; sourceTree = "<group>"; };
   9.818  		4372ECD5219C436D00F84099 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/FolderViews.strings; sourceTree = "<group>"; };
   9.819  		4372ECD6219C436D00F84099 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Reusable.strings; sourceTree = "<group>"; };
   9.820  		4372ECD7219C436D00F84099 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Thread.strings; sourceTree = "<group>"; };
   9.821 -		43754AC71FCD7ABC009A8E63 /* ldns_xcode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ldns_xcode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.822 -		437671471D8FF2A5004DD205 /* DeleteFolderOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeleteFolderOperation.swift; sourceTree = "<group>"; };
   9.823  		437795C72154D6FD00CC62C2 /* PEPMessage+TestExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PEPMessage+TestExtension.swift"; sourceTree = "<group>"; };
   9.824  		43800D981D112A2A00821E34 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
   9.825  		438052861FE3E1B100ACF729 /* OAuth2AuthorizationFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizationFactoryProtocol.swift; sourceTree = "<group>"; };
   9.826  		438052881FE3E24400ACF729 /* OAuth2AuthorizationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizationProtocol.swift; sourceTree = "<group>"; };
   9.827  		4380528A1FE3E2E800ACF729 /* OAuth2AuthorizationURLHandlerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizationURLHandlerProtocol.swift; sourceTree = "<group>"; };
   9.828 -		4381D0FE1E51A124002743C3 /* NetworkServiceWorker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkServiceWorker.swift; sourceTree = "<group>"; };
   9.829  		438281821E891B7E00087343 /* DateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = "<group>"; };
   9.830 -		4382E6421CC600FF00AA27EA /* PersistentImapFolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersistentImapFolder.swift; sourceTree = "<group>"; };
   9.831  		4388A0E02008AF61008CB98D /* public.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = public.xcconfig; sourceTree = "<group>"; };
   9.832 -		4388A0E12008F813008CB98D /* OAuth2AccessToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AccessToken.swift; sourceTree = "<group>"; };
   9.833 -		4388A0E32008F8F4008CB98D /* OAuth2AccessTokenProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AccessTokenProtocol.swift; sourceTree = "<group>"; };
   9.834  		438BA0F4214F89CC001A4A82 /* MailParsingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailParsingTests.swift; sourceTree = "<group>"; };
   9.835  		438D253B1D4B9E7500BFF7AA /* MimeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MimeTests.swift; sourceTree = "<group>"; };
   9.836  		438D253F1D4B9EDB00BFF7AA /* PGPMimeMail.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PGPMimeMail.txt; sourceTree = "<group>"; };
   9.837 @@ -1024,15 +848,11 @@
   9.838  		43980EF91CBD415700A7FC3C /* AppConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppConfig.swift; sourceTree = "<group>"; };
   9.839  		43985D092044296D0080FA9A /* OAuth2AuthViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2AuthViewModel.swift; sourceTree = "<group>"; };
   9.840  		43985D0D204438480080FA9A /* AccountSettingsProtocol+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccountSettingsProtocol+Extension.swift"; sourceTree = "<group>"; };
   9.841 -		439932311FEA9B7200E92C35 /* SwipeCellKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwipeCellKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.842  		439A23E420B40FAC00417AF5 /* PEP_rating+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PEP_rating+Extension.swift"; sourceTree = "<group>"; };
   9.843 -		439AAC551F21D0CC0018A29E /* CdFolder+Pantomime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdFolder+Pantomime.swift"; sourceTree = "<group>"; };
   9.844  		439D406F1CC78930009A4E7C /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
   9.845  		439D40711CC78958009A4E7C /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
   9.846  		439D40731CC7897B009A4E7C /* libiconv.2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.2.tbd; path = usr/lib/libiconv.2.tbd; sourceTree = SDKROOT; };
   9.847  		43A0B2CE214006FC00FB779D /* ReplyUtilTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyUtilTests.swift; sourceTree = "<group>"; };
   9.848 -		43A26FB91E0408FB00AF0B84 /* ServiceErrorProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServiceErrorProtocol.swift; sourceTree = "<group>"; };
   9.849 -		43A26FBE1E041BF200AF0B84 /* ImapSyncOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapSyncOperation.swift; sourceTree = "<group>"; };
   9.850  		43A384802153E4BF006AC8F8 /* 8B691AD204E22FD1BF018E0D6C9EAD5A798018D1_pub_sec.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 8B691AD204E22FD1BF018E0D6C9EAD5A798018D1_pub_sec.txt; sourceTree = "<group>"; };
   9.851  		43A469F921513B10002E1036 /* PEPSwipeTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PEPSwipeTableViewCell.swift; sourceTree = "<group>"; };
   9.852  		43A5DE371D631D49001153AF /* UnencryptedHTMLMail.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UnencryptedHTMLMail.txt; sourceTree = "<group>"; };
   9.853 @@ -1042,19 +862,13 @@
   9.854  		43AA825C1E9BD60600ABD5A8 /* AttachmentsViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentsViewDelegate.swift; sourceTree = "<group>"; };
   9.855  		43AAC2281F7A5AED00F435F4 /* BaseTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTableViewController.swift; sourceTree = "<group>"; };
   9.856  		43AAC2291F7A5AEE00F435F4 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
   9.857 -		43AE48E61EEFC93900B92BB6 /* DebugMergePolicy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugMergePolicy.swift; sourceTree = "<group>"; };
   9.858 +		43AE3C572298007A00E1AA7B /* NotifyHandshakeDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotifyHandshakeDelegate.swift; sourceTree = "<group>"; };
   9.859  		43B0443820067CC7007BCE3F /* UIAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIAccount.swift; sourceTree = "<group>"; };
   9.860  		43B0443A20067D25007BCE3F /* UITestDataProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITestDataProtocol.swift; sourceTree = "<group>"; };
   9.861 -		43B044412007683E007BCE3F /* secret.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = secret.xcconfig; sourceTree = "<group>"; };
   9.862  		43B0444B20077323007BCE3F /* OAuth2Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2Configuration.swift; sourceTree = "<group>"; };
   9.863 -		43B10C7C1EC2ECA3003E849F /* libAccountSettingsAdapter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libAccountSettingsAdapter.a; path = "../../../Library/Developer/Xcode/DerivedData/pEpForiOS-hgrtosyrynxrmfdxochylcgjfvka/Build/Products/Debug-iphonesimulator/libAccountSettingsAdapter.a"; sourceTree = "<group>"; };
   9.864  		43B10C7F1EC2EE7F003E849F /* CppDummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CppDummy.cpp; sourceTree = "<group>"; };
   9.865 -		43B2660C1D252C93009D57E8 /* ConcurrentBaseOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConcurrentBaseOperation.swift; sourceTree = "<group>"; };
   9.866  		43B2C3161D2280ED00A08557 /* 5A90_3590_0E48_AB85_F3DB__045E_4623_C5D1_EAB6_643E.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 5A90_3590_0E48_AB85_F3DB__045E_4623_C5D1_EAB6_643E.asc; sourceTree = "<group>"; };
   9.867 -		43B54F971FE02D02008EC427 /* AppAuth.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppAuth.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.868  		43B7154C1CECAADA0027861A /* ViewWidthsAligner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewWidthsAligner.swift; sourceTree = "<group>"; };
   9.869 -		43BB86931DB4E76D00980267 /* CdAccount+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdAccount+Extension.swift"; sourceTree = "<group>"; };
   9.870 -		43BBB5E61E267A3800104070 /* EncryptAndSendOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EncryptAndSendOperation.swift; sourceTree = "<group>"; };
   9.871  		43C046BE1CF48EA500BD0D9D /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
   9.872  		43C273DC21C9024A002EB4C8 /* LoggerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerTest.swift; sourceTree = "<group>"; };
   9.873  		43C322041EA89EED005073FB /* HandshakePartnerTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandshakePartnerTableViewCell.swift; sourceTree = "<group>"; };
   9.874 @@ -1062,7 +876,6 @@
   9.875  		43C3B15F2003851100ED48A4 /* DecryptImportedMessagesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecryptImportedMessagesTests.swift; sourceTree = "<group>"; };
   9.876  		43C3B1612003896800ED48A4 /* IOS-884_001_Mail_from_P4A.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-884_001_Mail_from_P4A.txt"; sourceTree = "<group>"; };
   9.877  		43C3B16520038B2500ED48A4 /* IOS-884_001_test010@peptest.ch.pub.key */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "IOS-884_001_test010@peptest.ch.pub.key"; sourceTree = "<group>"; };
   9.878 -		43C6F35A1CBE7496006A2A18 /* ConnectionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionManager.swift; sourceTree = "<group>"; };
   9.879  		43C7B9D01CEC4DDF007A612F /* MiscTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MiscTests.swift; sourceTree = "<group>"; };
   9.880  		43C98ABF219C22E8006418B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/AccountCreation.strings; sourceTree = "<group>"; };
   9.881  		43C98AC0219C22E8006418B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Settings.strings; sourceTree = "<group>"; };
   9.882 @@ -1071,22 +884,24 @@
   9.883  		43C98AC6219C3691006418B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
   9.884  		43C98AC8219C3691006418B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Handshake.strings; sourceTree = "<group>"; };
   9.885  		43CE63C41DE87FB200FAC505 /* Identity+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Identity+pEp.swift"; sourceTree = "<group>"; };
   9.886 -		43CE63CA1DE8830100FAC505 /* CdAccount+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdAccount+pEp.swift"; sourceTree = "<group>"; };
   9.887 -		43CE63D01DE8866C00FAC505 /* Message+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Message+pEp.swift"; sourceTree = "<group>"; };
   9.888  		43D0702E2133DB3F0013B120 /* AppSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppSettings.swift; sourceTree = "<group>"; };
   9.889  		43D070302133DB920013B120 /* AppSettingsProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSettingsProtocol.swift; sourceTree = "<group>"; };
   9.890  		43D070322133DC500013B120 /* DefaultAppSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultAppSettings.swift; sourceTree = "<group>"; };
   9.891 +		43D213262237BE4B00C060A1 /* AppAuth.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppAuth.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.892 +		43D2132A2237BE6D00C060A1 /* pEpIOSToolbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = pEpIOSToolbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.893 +		43D2132D2237BE8000C060A1 /* MessageModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MessageModel.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.894 +		43D213302237C86900C060A1 /* SwipeCellKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwipeCellKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.895 +		43D213332237C8CA00C060A1 /* libAccountSettingsAdapter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libAccountSettingsAdapter.a; sourceTree = BUILT_PRODUCTS_DIR; };
   9.896 +		43D213352237C90400C060A1 /* ldns_xcode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ldns_xcode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.897 +		43D2133C2237CB1600C060A1 /* PEPObjCAdapterFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PEPObjCAdapterFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.898 +		43D2133F2237CB3900C060A1 /* PantomimeFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PantomimeFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.899  		43D3378F21A3F32500E40114 /* ImapUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImapUtil.swift; sourceTree = "<group>"; };
   9.900  		43D3F8A021EDDF19002D5AFC /* ENGINE-456_Mail_PEP_OUT_OF_MEMORY.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ENGINE-456_Mail_PEP_OUT_OF_MEMORY.txt"; sourceTree = "<group>"; };
   9.901 +		43D47ABF225DD1C500E97C5B /* PantomimeFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PantomimeFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.902 +		43D47AC1225DD1CE00E97C5B /* PEPObjCAdapterFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PEPObjCAdapterFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.903  		43D51E881DD5D902008B77A8 /* SimpleOperationsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleOperationsTest.swift; sourceTree = "<group>"; };
   9.904 -		43D755EA1F25D234006F933A /* MatchUidToMsnOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchUidToMsnOperation.swift; sourceTree = "<group>"; };
   9.905 -		43D755F51F262B37006F933A /* PantomimeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PantomimeError.swift; sourceTree = "<group>"; };
   9.906 -		43D755FB1F26382B006F933A /* EmailConnectInfo+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EmailConnectInfo+Extension.swift"; sourceTree = "<group>"; };
   9.907 -		43D86ECA21BE6C7B00C18418 /* CleanroomASL.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CleanroomASL.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.908  		43DA52671CEF1B4F0023D540 /* NewAccountSetupUITest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewAccountSetupUITest.swift; sourceTree = "<group>"; };
   9.909 -		43DB81321E2A56BE00A20902 /* AppendMailsOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppendMailsOperation.swift; sourceTree = "<group>"; };
   9.910  		43DFB0321E36083D00175C9C /* MessageHeapBufferOverflow.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MessageHeapBufferOverflow.txt; sourceTree = "<group>"; };
   9.911 -		43E0CA291F4AB81600D9BB7E /* Attachment+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Attachment+Extension.swift"; sourceTree = "<group>"; };
   9.912  		43E1619020D7B2D6003F1514 /* UpdateThreadListDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateThreadListDelegate.swift; sourceTree = "<group>"; };
   9.913  		43E657D01F3C33C30014CBEC /* String+HTML.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+HTML.swift"; sourceTree = "<group>"; };
   9.914  		43E657DC1F3C72360014CBEC /* AXHTMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AXHTMLParser.h; sourceTree = "<group>"; };
   9.915 @@ -1094,9 +909,6 @@
   9.916  		43E657DE1F3C72360014CBEC /* Axt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Axt.h; sourceTree = "<group>"; };
   9.917  		43E657E61F3CAB310014CBEC /* HtmlToMarkdownSaxParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlToMarkdownSaxParser.swift; sourceTree = "<group>"; };
   9.918  		43E74C731E38DE2200A2F7A6 /* ImapFlagsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapFlagsTests.swift; sourceTree = "<group>"; };
   9.919 -		43E7B6741DE4A53A0017D707 /* CdIdentity+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdIdentity+pEp.swift"; sourceTree = "<group>"; };
   9.920 -		43E9BC631DB518A700AD2352 /* CdFolder+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdFolder+Extension.swift"; sourceTree = "<group>"; };
   9.921 -		43EC03471F4AE28F0026E152 /* String+Attachment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Attachment.swift"; sourceTree = "<group>"; };
   9.922  		43EC75AB2164C26100048CFE /* SetOwnKeyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetOwnKeyViewController.swift; sourceTree = "<group>"; };
   9.923  		43EC75AD2164D03500048CFE /* SetOwnKeyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetOwnKeyViewModel.swift; sourceTree = "<group>"; };
   9.924  		43EC75B22164E97800048CFE /* DecryptionUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecryptionUtil.swift; sourceTree = "<group>"; };
   9.925 @@ -1108,16 +920,11 @@
   9.926  		43ED536D1CC77F95006AB156 /* SMTPSettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMTPSettingsTableViewController.swift; sourceTree = "<group>"; };
   9.927  		43ED536E1CC77F95006AB156 /* UserInfoTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserInfoTableViewController.swift; sourceTree = "<group>"; };
   9.928  		43EDCB83219ED7F000771240 /* FetchNumberOfNewMailsServiceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchNumberOfNewMailsServiceTest.swift; sourceTree = "<group>"; };
   9.929 -		43EE99471E438E320060EACE /* FlagImages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlagImages.swift; sourceTree = "<group>"; };
   9.930 -		43EE994D1E4392530060EACE /* FlagImageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlagImageTests.swift; sourceTree = "<group>"; };
   9.931 -		43F6DFD61DEEC752006B526F /* FetchMessagesOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchMessagesOperation.swift; sourceTree = "<group>"; };
   9.932  		43F7F0791F6AD44600BDF151 /* HandshakeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HandshakeTests.swift; sourceTree = "<group>"; };
   9.933  		43F7F07B1F6AD4FD00BDF151 /* HandshakeTests_mail_001.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HandshakeTests_mail_001.txt; sourceTree = "<group>"; };
   9.934 -		43F84CD11CD899760092FCAE /* SyncFoldersFromServerOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncFoldersFromServerOperation.swift; sourceTree = "<group>"; };
   9.935  		43F9D9991E92725700F78A1C /* AttachmentsViewHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentsViewHelper.swift; sourceTree = "<group>"; };
   9.936  		43FAA0D31EC9CBC0005BFC4B /* DecryptionTestsInternal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecryptionTestsInternal.swift; sourceTree = "<group>"; };
   9.937  		43FC02111F4D913D00273304 /* NSHTML_2017-08-09 15_40_53 +0000.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "NSHTML_2017-08-09 15_40_53 +0000.html"; sourceTree = "<group>"; };
   9.938 -		43FE802D209992B800E97AB3 /* QualifyServerIsLocalService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QualifyServerIsLocalService.swift; sourceTree = "<group>"; };
   9.939  		43FE802F209995AD00E97AB3 /* QualifyServerIsLocalServiceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QualifyServerIsLocalServiceTest.swift; sourceTree = "<group>"; };
   9.940  		4902244E20E50488000E8D7C /* ThreadNavigationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadNavigationDelegate.swift; sourceTree = "<group>"; };
   9.941  		49079D9821E3867900D15A0D /* javascript.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = javascript.pdf; sourceTree = "<group>"; };
   9.942 @@ -1131,8 +938,6 @@
   9.943  		492EF92920C18C6C004EAE14 /* DisplayedMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayedMessage.swift; sourceTree = "<group>"; };
   9.944  		492EF92C20C6957D004EAE14 /* ThreadViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadViewController.swift; sourceTree = "<group>"; };
   9.945  		492EF92E20C699D0004EAE14 /* ThreadViewController+TableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ThreadViewController+TableView.swift"; sourceTree = "<group>"; };
   9.946 -		495560851E7150ED0016579E /* libPantomimeStatic.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPantomimeStatic.a; path = "../../Library/Developer/Xcode/DerivedData/pEpForiOS-cryqwhejxdsfocdwswvsgjrywqhr/Build/Products/Debug-iphonesimulator/libPantomimeStatic.a"; sourceTree = "<group>"; };
   9.947 -		495560871E71517F0016579E /* libpEpiOSAdapter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpEpiOSAdapter.a; path = "../../Library/Developer/Xcode/DerivedData/pEpForiOS-cryqwhejxdsfocdwswvsgjrywqhr/Build/Products/Debug-iphonesimulator/libpEpiOSAdapter.a"; sourceTree = "<group>"; };
   9.948  		495D69BE20DBAEE900986007 /* ThreadViewController+SwipeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ThreadViewController+SwipeCell.swift"; sourceTree = "<group>"; };
   9.949  		495F607B20B564CD00F47BD6 /* EmailViewController+SizeClasses.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailViewController+SizeClasses.swift"; sourceTree = "<group>"; };
   9.950  		495F689921E6600500A10C63 /* ScreenshotTestUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenshotTestUtil.swift; sourceTree = "<group>"; };
   9.951 @@ -1145,34 +950,24 @@
   9.952  		49C2750020C04DDB0075F6FF /* EmailViewController+DisplayedMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailViewController+DisplayedMessage.swift"; sourceTree = "<group>"; };
   9.953  		49C34AF520E4F649009D11CC /* CellDetailTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellDetailTransition.swift; sourceTree = "<group>"; };
   9.954  		49D3BECB20F8F7330043E05D /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
   9.955 -		49D521531E73E1C20097987B /* MessageModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MessageModel.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.956 -		49D521561E73E1C70097987B /* ServerConfig.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ServerConfig.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.957  		49DCCD1F21E75BE300ABE487 /* nojavascript.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = nojavascript.pdf; sourceTree = "<group>"; };
   9.958 -		5D039A9B1D0EE7F900AD59EC /* PEPUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PEPUtil.swift; sourceTree = "<group>"; };
   9.959 -		5D039AA11D0EEA3700AD59EC /* DecryptMessagesOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecryptMessagesOperation.swift; sourceTree = "<group>"; };
   9.960 -		5DEBAA471DE59C3B00FAE12C /* NetworkServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkServiceTests.swift; sourceTree = "<group>"; };
   9.961 +		5DEBAA471DE59C3B00FAE12C /* ReplicationServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplicationServiceTests.swift; sourceTree = "<group>"; };
   9.962  		8B69E3981E30F80E0022959E /* Appearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = "<group>"; };
   9.963  		A1B50A811CD26FF100B1A997 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
   9.964  		B70A3A62220065F500EDCE61 /* String+pEp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+pEp.swift"; sourceTree = "<group>"; };
   9.965 -		B70A3A9122089D5000EDCE61 /* Log+ASL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Log+ASL.swift"; sourceTree = "<group>"; };
   9.966 -		B70A3A9222089D5000EDCE61 /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
   9.967  		B70A3C3F1E817CFA0036876F /* FolderViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderViewModel.swift; path = Folder/ViewModel/FolderViewModel.swift; sourceTree = "<group>"; };
   9.968  		B716055F20D3ECC900A733D6 /* MoveToFolderTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderTableViewController.swift; sourceTree = "<group>"; };
   9.969  		B71EBBBB1E55E4AE00150177 /* FolderTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderTableViewController.swift; path = Folder/FolderTableViewController.swift; sourceTree = "<group>"; };
   9.970  		B722EC4C1E5B01B300A2B9D5 /* FolderCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderCellViewModel.swift; path = Folder/ViewModel/FolderCellViewModel.swift; sourceTree = "<group>"; };
   9.971  		B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderSectionViewModel.swift; path = Folder/ViewModel/FolderSectionViewModel.swift; sourceTree = "<group>"; };
   9.972  		B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FolderUiProtocols.swift; sourceTree = "<group>"; };
   9.973 -		B729BEC51E7C35E200793110 /* FilterUpdateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterUpdateProtocol.swift; path = Filter/ViewModel/FilterUpdateProtocol.swift; sourceTree = "<group>"; };
   9.974 -		B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = jsonMimeType.txt; sourceTree = "<group>"; };
   9.975 -		B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MimeTypeUtil.swift; sourceTree = "<group>"; };
   9.976  		B74F81011EB0E20000519FCC /* LoginViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = "<group>"; };
   9.977  		B75FF00A1EFD420F00C57289 /* EmailListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailListViewModel.swift; sourceTree = "<group>"; };
   9.978  		B76CF8B220D2739B002429A8 /* MoveToFolderViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderViewModel.swift; sourceTree = "<group>"; };
   9.979 -		B7745838221C191600664282 /* SecretUITestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecretUITestData.swift; sourceTree = "<group>"; };
   9.980 +		B776A47A223962B50047A41D /* EmailListViewModel+MessageQueryResultsDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmailListViewModel+MessageQueryResultsDelegate.swift"; sourceTree = "<group>"; };
   9.981  		B78309C71EAA09040051A2E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/AccountCreation.storyboard; sourceTree = "<group>"; };
   9.982  		B78CF8241E76D706008C1739 /* FilterTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterTableViewController.swift; path = Filter/FilterTableViewController.swift; sourceTree = "<group>"; };
   9.983 -		B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterViewModel.swift; path = Filter/ViewModel/FilterViewModel.swift; sourceTree = "<group>"; };
   9.984 -		B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterCellViewModel.swift; path = Filter/ViewModel/FilterCellViewModel.swift; sourceTree = "<group>"; };
   9.985 +		B7A50745224CD27A007B988F /* FilterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FilterViewModel.swift; path = Filter/ViewModel/FilterViewModel.swift; sourceTree = "<group>"; };
   9.986  		B7D1EEC71E8BEC8D00F190E3 /* CollapsibleTableViewHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CollapsibleTableViewHeader.swift; path = Folder/CollapsibleTableViewHeader.swift; sourceTree = "<group>"; };
   9.987  		B7DB7FC32215C4FF003968DA /* UINavigationController+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Extensions.swift"; sourceTree = "<group>"; };
   9.988  		B7DB7FC52215C57F003968DA /* UIView+Autolayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Autolayout.swift"; sourceTree = "<group>"; };
   9.989 @@ -1184,13 +979,13 @@
   9.990  		B7DB7FD5221AD3BB003968DA /* UITableView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Extension.swift"; sourceTree = "<group>"; };
   9.991  		B7DB7FD9221ADDAF003968DA /* UIBarButtonItem+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Extension.swift"; sourceTree = "<group>"; };
   9.992  		B7DB7FDB221ADDBD003968DA /* UIImageView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extension.swift"; sourceTree = "<group>"; };
   9.993 -		B7DB7FEA221AFE10003968DA /* pEpIOSToolbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = pEpIOSToolbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
   9.994 +		B7DFEA51225368670080A2BA /* VirtualFolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VirtualFolder.swift; sourceTree = "<group>"; };
   9.995 +		B7DFEA5322536D5E0080A2BA /* UnifiedInbox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnifiedInbox.swift; sourceTree = "<group>"; };
   9.996 +		B7DFEA55225397AB0080A2BA /* Folder+LocalizedName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Folder+LocalizedName.swift"; sourceTree = "<group>"; };
   9.997  		B7F4A792212DDFC500507B76 /* EmailListViewModelTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailListViewModelTest.swift; sourceTree = "<group>"; };
   9.998 +		B7F676BC227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MessageQueryResultsFilter+FilterButtonTitle.swift"; sourceTree = "<group>"; };
   9.999  		F73E4F71217F238300CCFFED /* FolderSectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderSectionViewModelTests.swift; sourceTree = "<group>"; };
  9.1000  		F73E4F792180744700CCFFED /* FolderCellViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderCellViewModelTests.swift; sourceTree = "<group>"; };
  9.1001 -		F7C16A5621A56436004B44F2 /* FolderSyncServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderSyncServiceProtocol.swift; sourceTree = "<group>"; };
  9.1002 -		F7C16A5821A56445004B44F2 /* FolderSyncService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderSyncService.swift; sourceTree = "<group>"; };
  9.1003 -		F7C16A5A21A56DBA004B44F2 /* FetchImapFoldersService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchImapFoldersService.swift; sourceTree = "<group>"; };
  9.1004  		F7C16A5C21A59186004B44F2 /* FolderViewModelDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderViewModelDelegate.swift; sourceTree = "<group>"; };
  9.1005  /* End PBXFileReference section */
  9.1006  
  9.1007 @@ -1199,20 +994,15 @@
  9.1008  			isa = PBXFrameworksBuildPhase;
  9.1009  			buildActionMask = 2147483647;
  9.1010  			files = (
  9.1011 -				439932301FEA9B7200E92C35 /* SwipeCellKit.framework in Frameworks */,
  9.1012 -				43B54F961FE02D02008EC427 /* AppAuth.framework in Frameworks */,
  9.1013 -				43754AC61FCD7ABC009A8E63 /* ldns_xcode.framework in Frameworks */,
  9.1014 -				43209B541ECC5A9B007E7E2E /* libpEpObjCAdapter.a in Frameworks */,
  9.1015 -				43B10C7D1EC2ECA3003E849F /* libAccountSettingsAdapter.a in Frameworks */,
  9.1016 -				495560861E7150ED0016579E /* libPantomimeStatic.a in Frameworks */,
  9.1017 -				439680981D1855D400DA31D2 /* WebKit.framework in Frameworks */,
  9.1018 -				43800D991D112A2A00821E34 /* libxml2.tbd in Frameworks */,
  9.1019 -				43C046BF1CF48EA500BD0D9D /* AddressBook.framework in Frameworks */,
  9.1020 -				B774583A221C320B00664282 /* pEpIOSToolbox.framework in Frameworks */,
  9.1021 -				439D40741CC7897B009A4E7C /* libiconv.2.tbd in Frameworks */,
  9.1022 -				439D40721CC78958009A4E7C /* libbz2.tbd in Frameworks */,
  9.1023 -				49D521541E73E1C20097987B /* MessageModel.framework in Frameworks */,
  9.1024 -				439D40701CC78930009A4E7C /* libz.tbd in Frameworks */,
  9.1025 +				43D2133B2237CABD00C060A1 /* libxml2.tbd in Frameworks */,
  9.1026 +				43D213342237C8CA00C060A1 /* libAccountSettingsAdapter.a in Frameworks */,
  9.1027 +				43D2132B2237BE6D00C060A1 /* pEpIOSToolbox.framework in Frameworks */,
  9.1028 +				43D2132E2237BE8000C060A1 /* MessageModel.framework in Frameworks */,
  9.1029 +				43D213312237C86900C060A1 /* SwipeCellKit.framework in Frameworks */,
  9.1030 +				43D2133D2237CB1600C060A1 /* PEPObjCAdapterFramework.framework in Frameworks */,
  9.1031 +				43D213272237BE4B00C060A1 /* AppAuth.framework in Frameworks */,
  9.1032 +				43D213362237C90400C060A1 /* ldns_xcode.framework in Frameworks */,
  9.1033 +				43D213402237CB3900C060A1 /* PantomimeFramework.framework in Frameworks */,
  9.1034  			);
  9.1035  			runOnlyForDeploymentPostprocessing = 0;
  9.1036  		};
  9.1037 @@ -1220,6 +1010,8 @@
  9.1038  			isa = PBXFrameworksBuildPhase;
  9.1039  			buildActionMask = 2147483647;
  9.1040  			files = (
  9.1041 +				43D47AC2225DD1CE00E97C5B /* PEPObjCAdapterFramework.framework in Frameworks */,
  9.1042 +				43D47AC0225DD1C500E97C5B /* PantomimeFramework.framework in Frameworks */,
  9.1043  			);
  9.1044  			runOnlyForDeploymentPostprocessing = 0;
  9.1045  		};
  9.1046 @@ -1258,18 +1050,11 @@
  9.1047  			path = SplitView;
  9.1048  			sourceTree = "<group>";
  9.1049  		};
  9.1050 -		00A12CAA20D3D90B00B82BE3 /* Recovered References */ = {
  9.1051 -			isa = PBXGroup;
  9.1052 -			children = (
  9.1053 -			);
  9.1054 -			name = "Recovered References";
  9.1055 -			sourceTree = "<group>";
  9.1056 -		};
  9.1057  		00EA5F6D20CFD46F00900097 /* Row */ = {
  9.1058  			isa = PBXGroup;
  9.1059  			children = (
  9.1060  				000D3C2E20D12BFD006B11B2 /* MessageViewModel.swift */,
  9.1061 -				0038494920D25576008000EA /* ProfilePictureComposer.swift */,
  9.1062 +				0038494920D25576008000EA /* ProfilePictureComposerProtocol.swift */,
  9.1063  				0038494B20D2587F008000EA /* PepPictureComposer.swift */,
  9.1064  			);
  9.1065  			name = Row;
  9.1066 @@ -1287,7 +1072,6 @@
  9.1067  		150B8E951FCDACBB00374438 /* Error */ = {
  9.1068  			isa = PBXGroup;
  9.1069  			children = (
  9.1070 -				150B8E961FCDACBB00374438 /* ErrorPropagator.swift */,
  9.1071  				150B8E971FCDACBB00374438 /* AccountSettingsUserInputError.swift */,
  9.1072  				152130531FD00B7A00688DF2 /* DisplayUserError.swift */,
  9.1073  			);
  9.1074 @@ -1304,28 +1088,18 @@
  9.1075  			path = SecureWebViewController;
  9.1076  			sourceTree = "<group>";
  9.1077  		};
  9.1078 -		151F71D02029F9F80057C74D /* IMAP */ = {
  9.1079 -			isa = PBXGroup;
  9.1080 -			children = (
  9.1081 -				15A75CE7202DE65700C0DA28 /* VirtualMailbox */,
  9.1082 -				151F71D12029FA1B0057C74D /* PantomimeFolderAttribute+Extensions.swift */,
  9.1083 -			);
  9.1084 -			path = IMAP;
  9.1085 -			sourceTree = "<group>";
  9.1086 -		};
  9.1087  		151F71EB202A06750057C74D /* TestUtils */ = {
  9.1088  			isa = PBXGroup;
  9.1089  			children = (
  9.1090 -				37A3D61D2214292B00E11415 /* ReachabilityUtilsTest */,
  9.1091 +				436981BF22830AF60006FA2D /* SecretTestData.swift */,
  9.1092  				151F71F6202A06750057C74D /* CdAccount+TestUtils.swift */,
  9.1093  				151F71F3202A06750057C74D /* CdMessage+TestUtils.swift */,
  9.1094  				151F71F1202A06750057C74D /* CoreDataDrivenTestBase.swift */,
  9.1095  				1555361A207796CE00CDDAFA /* CWInternetAddress+TestUtils.swift */,
  9.1096  				151F71EF202A06750057C74D /* DecryptionAttemptCounterDelegate.swift */,
  9.1097  				151F71F4202A06750057C74D /* Message+TestUtils.swift */,
  9.1098 -				003C0FA620B5581A0093A987 /* SecretTestData.swift */,
  9.1099  				151F71F0202A06750057C74D /* MockBackgrounder.swift */,
  9.1100 -				151F71EE202A06750057C74D /* NetworkServiceObserver.swift */,
  9.1101 +				151F71EE202A06750057C74D /* ReplicationServiceObserver.swift */,
  9.1102  				151F71EC202A06750057C74D /* TestDataBase.swift */,
  9.1103  				151F71F5202A06750057C74D /* TestUtil.swift */,
  9.1104  				495F689921E6600500A10C63 /* ScreenshotTestUtil.swift */,
  9.1105 @@ -1335,6 +1109,7 @@
  9.1106  				437795C72154D6FD00CC62C2 /* PEPMessage+TestExtension.swift */,
  9.1107  				15D439A6216FB77600EB3933 /* UnitTestUtils.swift */,
  9.1108  				15410D1E2199CA1100BBF65F /* XCTTestCase+Utils.swift */,
  9.1109 +				437027A022315B5700A77AEC /* PEPAppUtilWrappers.swift */,
  9.1110  			);
  9.1111  			path = TestUtils;
  9.1112  			sourceTree = "<group>";
  9.1113 @@ -1558,31 +1333,11 @@
  9.1114  			isa = PBXGroup;
  9.1115  			children = (
  9.1116  				15BA536D20A095410090F126 /* UnifiedInboxTest.swift */,
  9.1117 -				1544BD0121524C9F0075C5A0 /* AttachmentFilterTest.swift */,
  9.1118  				00227E6921635DED000D9BDB /* FilterViewModelTest.swift */,
  9.1119  			);
  9.1120  			path = Filter;
  9.1121  			sourceTree = "<group>";
  9.1122  		};
  9.1123 -		15484B652105D55600F9D962 /* ConnectInfo */ = {
  9.1124 -			isa = PBXGroup;
  9.1125 -			children = (
  9.1126 -				15484B662105D58800F9D962 /* deprecated */,
  9.1127 -				15484B672105D5AA00F9D962 /* ConnectInfo.swift */,
  9.1128 -				43D755FB1F26382B006F933A /* EmailConnectInfo+Extension.swift */,
  9.1129 -				15484B692105D5C500F9D962 /* EmailConnectInfo.swift */,
  9.1130 -			);
  9.1131 -			path = ConnectInfo;
  9.1132 -			sourceTree = "<group>";
  9.1133 -		};
  9.1134 -		15484B662105D58800F9D962 /* deprecated */ = {
  9.1135 -			isa = PBXGroup;
  9.1136 -			children = (
  9.1137 -				15484B6B2105E26600F9D962 /* LegacyConnectInfoProvider.swift */,
  9.1138 -			);
  9.1139 -			path = deprecated;
  9.1140 -			sourceTree = "<group>";
  9.1141 -		};
  9.1142  		1569AEA320E14DC2002102A0 /* Features */ = {
  9.1143  			isa = PBXGroup;
  9.1144  			children = (
  9.1145 @@ -1726,24 +1481,6 @@
  9.1146  			path = TrustedServerSetting;
  9.1147  			sourceTree = "<group>";
  9.1148  		};
  9.1149 -		15A75CE7202DE65700C0DA28 /* VirtualMailbox */ = {
  9.1150 -			isa = PBXGroup;
  9.1151 -			children = (
  9.1152 -				15A75CED202E085E00C0DA28 /* ProviderSpecific */,
  9.1153 -				15A75CE0202B57BF00C0DA28 /* Folder+VirtualMailbox.swift */,
  9.1154 -			);
  9.1155 -			path = VirtualMailbox;
  9.1156 -			sourceTree = "<group>";
  9.1157 -		};
  9.1158 -		15A75CED202E085E00C0DA28 /* ProviderSpecific */ = {
  9.1159 -			isa = PBXGroup;
  9.1160 -			children = (
  9.1161 -				15A75CEB202DED2300C0DA28 /* GmailSpecificInformation.swift */,
  9.1162 -				15A75CE9202DE6B300C0DA28 /* ProviderSpecificInformationProtocol.swift */,
  9.1163 -			);
  9.1164 -			path = ProviderSpecific;
  9.1165 -			sourceTree = "<group>";
  9.1166 -		};
  9.1167  		15B483DF1F290B14000FB2CF /* Background */ = {
  9.1168  			isa = PBXGroup;
  9.1169  			children = (
  9.1170 @@ -1768,18 +1505,6 @@
  9.1171  			path = MoveToFolder;
  9.1172  			sourceTree = "<group>";
  9.1173  		};
  9.1174 -		15BBBC611FD0461000B9DCC8 /* Error */ = {
  9.1175 -			isa = PBXGroup;
  9.1176 -			children = (
  9.1177 -				43D755F51F262B37006F933A /* PantomimeError.swift */,
  9.1178 -				43A26FB91E0408FB00AF0B84 /* ServiceErrorProtocol.swift */,
  9.1179 -				155050F51FEAB082009CEAD2 /* ErrorContainer.swift */,
  9.1180 -				15BBBC621FD0496800B9DCC8 /* ReportingErrorContainer.swift */,
  9.1181 -				155050F71FEAB57F009CEAD2 /* BackgroundError.swift */,
  9.1182 -			);
  9.1183 -			path = Error;
  9.1184 -			sourceTree = "<group>";
  9.1185 -		};
  9.1186  		15BBBC641FD04CF700B9DCC8 /* Error */ = {
  9.1187  			isa = PBXGroup;
  9.1188  			children = (
  9.1189 @@ -1842,15 +1567,6 @@
  9.1190  			path = ViewModel;
  9.1191  			sourceTree = "<group>";
  9.1192  		};
  9.1193 -		15F0F7AB21359372002BE853 /* Filter */ = {
  9.1194 -			isa = PBXGroup;
  9.1195 -			children = (
  9.1196 -				1554756B213FE139005A52D0 /* UnifiedFilter.swift */,
  9.1197 -				1544BCFD215246F30075C5A0 /* AttachmentFilter.swift */,
  9.1198 -			);
  9.1199 -			path = Filter;
  9.1200 -			sourceTree = "<group>";
  9.1201 -		};
  9.1202  		15F82A072006552B0084F9EA /* Tests from MessageModel in Exile due to Apple Bug */ = {
  9.1203  			isa = PBXGroup;
  9.1204  			children = (
  9.1205 @@ -1876,26 +1592,6 @@
  9.1206  			name = Cells;
  9.1207  			sourceTree = "<group>";
  9.1208  		};
  9.1209 -		37A3D61D2214292B00E11415 /* ReachabilityUtilsTest */ = {
  9.1210 -			isa = PBXGroup;
  9.1211 -			children = (
  9.1212 -				37FE82EC22132B23008F8CF4 /* ReachabilityUtilsTests.swift */,
  9.1213 -				37A3D61E221429DA00E11415 /* NetworkReachibilityMock.swift */,
  9.1214 -			);
  9.1215 -			path = ReachabilityUtilsTest;
  9.1216 -			sourceTree = "<group>";
  9.1217 -		};
  9.1218 -		37A3D6202214333200E11415 /* Reachability */ = {
  9.1219 -			isa = PBXGroup;
  9.1220 -			children = (
  9.1221 -				37A3D6252215695400E11415 /* ReachabilityUtilsProtocol.swift */,
  9.1222 -				37FE82E82211D290008F8CF4 /* ReachabilityUtils.swift */,
  9.1223 -				37A3D6212214338300E11415 /* NetworkReachabilityProtocol.swift */,
  9.1224 -				37A3D6232214372B00E11415 /* NetworkReachability.swift */,
  9.1225 -			);
  9.1226 -			path = Reachability;
  9.1227 -			sourceTree = "<group>";
  9.1228 -		};
  9.1229  		4304FCFD1EBB8C2C0086DADA /* LanguageList */ = {
  9.1230  			isa = PBXGroup;
  9.1231  			children = (
  9.1232 @@ -1914,83 +1610,6 @@
  9.1233  			path = Background;
  9.1234  			sourceTree = "<group>";
  9.1235  		};
  9.1236 -		431144A61CC0CB0A0007639D /* Background */ = {
  9.1237 -			isa = PBXGroup;
  9.1238 -			children = (
  9.1239 -				15BBBC611FD0461000B9DCC8 /* Error */,
  9.1240 -				43F6DFD61DEEC752006B526F /* FetchMessagesOperation.swift */,
  9.1241 -				1560D16F1F6FC99B00A75B39 /* FetchOlderImapMessagesOperation.swift */,
  9.1242 -				4356102B1DEF019400808C8E /* SyncMessagesOperation.swift */,
  9.1243 -				431144B61CC11D6A0007639D /* BaseOperation.swift */,
  9.1244 -				43B2660C1D252C93009D57E8 /* ConcurrentBaseOperation.swift */,
  9.1245 -				5D039AA11D0EEA3700AD59EC /* DecryptMessagesOperation.swift */,
  9.1246 -				433C51D11E66CB9C00272E19 /* CreateRequiredFoldersOperation.swift */,
  9.1247 -				437671471D8FF2A5004DD205 /* DeleteFolderOperation.swift */,
  9.1248 -				43313DFB1DEC7F6000C111C8 /* DeleteFoldersOperation.swift */,
  9.1249 -				4323FE851E83D6FF006785E1 /* ImapFolderBuilder.swift */,
  9.1250 -				43F84CD11CD899760092FCAE /* SyncFoldersFromServerOperation.swift */,
  9.1251 -				4382E6421CC600FF00AA27EA /* PersistentImapFolder.swift */,
  9.1252 -				431144B41CC0FCA40007639D /* StoreFolderOperation.swift */,
  9.1253 -				431144B81CC11DF30007639D /* StorePrefetchedMailOperation.swift */,
  9.1254 -				43264E9A1D76B7110098DCAC /* SyncFlagsToServerOperation.swift */,
  9.1255 -				43122B3D1DF5BB6600610253 /* MySelfOperation.swift */,
  9.1256 -				43A26FBE1E041BF200AF0B84 /* ImapSyncOperation.swift */,
  9.1257 -				43BBB5E61E267A3800104070 /* EncryptAndSendOperation.swift */,
  9.1258 -				43DB81321E2A56BE00A20902 /* AppendMailsOperation.swift */,
  9.1259 -				4333A2A41E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift */,
  9.1260 -				4326D3FE1EFBC8DB0016AB0D /* FolderInfoOperation.swift */,
  9.1261 -				431E2B061F02550C000035FA /* CheckOutgoingMessagesOperation.swift */,
  9.1262 -				43D755EA1F25D234006F933A /* MatchUidToMsnOperation.swift */,
  9.1263 -				154750991FE7C0B4000D8004 /* FetchNumberOfNewMailsOperation.swift */,
  9.1264 -				150B84C320A44DE100D8B288 /* MoveToFolderOperation.swift */,
  9.1265 -				150B84C520A5DD0600D8B288 /* UIDCopyOperation.swift */,
  9.1266 -				004A8C5A211316E100203143 /* SelfReferencingOperation.swift */,
  9.1267 -				15DD3F74211EC68D00A8714D /* DecryptMessageOperation.swift */,
  9.1268 -			);
  9.1269 -			path = Background;
  9.1270 -			sourceTree = "<group>";
  9.1271 -		};
  9.1272 -		43122B111DF5B48B00610253 /* Network */ = {
  9.1273 -			isa = PBXGroup;
  9.1274 -			children = (
  9.1275 -				15484B652105D55600F9D962 /* ConnectInfo */,
  9.1276 -				43122B3A1DF5B75000610253 /* Service */,
  9.1277 -				4315E4BE2011FD6900F68763 /* AuthMethod.swift */,
  9.1278 -				43122B141DF5B48B00610253 /* EmailService.swift */,
  9.1279 -				43122B151DF5B48B00610253 /* ImapService.swift */,
  9.1280 -				43122B161DF5B48B00610253 /* SmtpService.swift */,
  9.1281 -				4360282C1ED6F27600C95FC4 /* NetworkError.swift */,
  9.1282 -				4360282E1ED6F33400C95FC4 /* ImapSyncError.swift */,
  9.1283 -				4307C4711ED826E400A276A4 /* SmtpSendError.swift */,
  9.1284 -				1569DDB7215395BE007A0398 /* NSAttributedString+Extension.swift */,
  9.1285 -			);
  9.1286 -			path = Network;
  9.1287 -			sourceTree = "<group>";
  9.1288 -		};
  9.1289 -		43122B3A1DF5B75000610253 /* Service */ = {
  9.1290 -			isa = PBXGroup;
  9.1291 -			children = (
  9.1292 -				F7C16A5521A56412004B44F2 /* FolderSyncService */,
  9.1293 -				432DA7421EE01E1000B30BAA /* MessageSyncService */,
  9.1294 -				431E58F41ED57F4D00EFA77F /* AccountVerificationService */,
  9.1295 -				1587D1622049BE7D002C2157 /* ImapConnectionDataCache.swift */,
  9.1296 -				432142651E8FD6A400FBE987 /* ServiceUtil.swift */,
  9.1297 -				43122B3B1DF5B75000610253 /* NetworkService.swift */,
  9.1298 -				4381D0FE1E51A124002743C3 /* NetworkServiceWorker.swift */,
  9.1299 -				432142631E8FD66900FBE987 /* FetchNumberOfNewMailsService.swift */,
  9.1300 -				432198E71DF6B51B00318A74 /* LoginImapOperation.swift */,
  9.1301 -				4348EF0C1E27ABA100F441A9 /* LoginSmtpOperation.swift */,
  9.1302 -				432198EC1DF6B66800318A74 /* SharedObjects.swift */,
  9.1303 -				4307C46F1ED81F3100A276A4 /* DefaultImapSyncDelegate.swift */,
  9.1304 -				1560D1711F6FD1F600A75B39 /* FetchOlderImapMessagesService.swift */,
  9.1305 -				F7C16A5A21A56DBA004B44F2 /* FetchImapFoldersService.swift */,
  9.1306 -				4341EBCE2089F674004CE6B8 /* QualifyServerIsLocalOperation.swift */,
  9.1307 -				4341EBD0208A0961004CE6B8 /* QualifyServerIsLocalServiceProtocol.swift */,
  9.1308 -				43FE802D209992B800E97AB3 /* QualifyServerIsLocalService.swift */,
  9.1309 -			);
  9.1310 -			path = Service;
  9.1311 -			sourceTree = "<group>";
  9.1312 -		};
  9.1313  		431394A31E4B036000D92F33 /* Settings */ = {
  9.1314  			isa = PBXGroup;
  9.1315  			children = (
  9.1316 @@ -1999,20 +1618,10 @@
  9.1317  			path = Settings;
  9.1318  			sourceTree = "<group>";
  9.1319  		};
  9.1320 -		431E58F41ED57F4D00EFA77F /* AccountVerificationService */ = {
  9.1321 -			isa = PBXGroup;
  9.1322 -			children = (
  9.1323 -				431E58F51ED57F6500EFA77F /* AccountVerificationServiceProtocol.swift */,
  9.1324 -				431E58F91ED591E900EFA77F /* AccountVerificationService.swift */,
  9.1325 -			);
  9.1326 -			path = AccountVerificationService;
  9.1327 -			sourceTree = "<group>";
  9.1328 -		};
  9.1329  		4323FE871E83E502006785E1 /* Util */ = {
  9.1330  			isa = PBXGroup;
  9.1331  			children = (
  9.1332  				43A6E0571E57400E005BEE69 /* RatingReEvaluator.swift */,
  9.1333 -				43EE99471E438E320060EACE /* FlagImages.swift */,
  9.1334  				43F9D9991E92725700F78A1C /* AttachmentsViewHelper.swift */,
  9.1335  				431D60DA1E93BB2D001266D7 /* AttachmentsView.swift */,
  9.1336  				43040A521E9776220083DED8 /* AttachmentSummaryView.swift */,
  9.1337 @@ -2022,15 +1631,6 @@
  9.1338  			path = Util;
  9.1339  			sourceTree = "<group>";
  9.1340  		};
  9.1341 -		432DA7421EE01E1000B30BAA /* MessageSyncService */ = {
  9.1342 -			isa = PBXGroup;
  9.1343 -			children = (
  9.1344 -				432DA7431EE01E3300B30BAA /* MessageSyncServiceProtocol.swift */,
  9.1345 -				432DA7451EE027EB00B30BAA /* MessageSyncService.swift */,
  9.1346 -			);
  9.1347 -			path = MessageSyncService;
  9.1348 -			sourceTree = "<group>";
  9.1349 -		};
  9.1350  		432E80FA2191AF5100359879 /* Fonts */ = {
  9.1351  			isa = PBXGroup;
  9.1352  			children = (
  9.1353 @@ -2045,8 +1645,6 @@
  9.1354  			children = (
  9.1355  				43425EDA1FE3DE6E004A2728 /* OAuth2ProviderProtocol.swift */,
  9.1356  				438052861FE3E1B100ACF729 /* OAuth2AuthorizationFactoryProtocol.swift */,
  9.1357 -				4388A0E32008F8F4008CB98D /* OAuth2AccessTokenProtocol.swift */,
  9.1358 -				4388A0E12008F813008CB98D /* OAuth2AccessToken.swift */,
  9.1359  				438052881FE3E24400ACF729 /* OAuth2AuthorizationProtocol.swift */,
  9.1360  				4380528A1FE3E2E800ACF729 /* OAuth2AuthorizationURLHandlerProtocol.swift */,
  9.1361  				43306EC11FE129840045DD00 /* OAuth2Type.swift */,
  9.1362 @@ -2137,23 +1735,19 @@
  9.1363  		4362398D1EAE08F400BD2EB9 /* Extensions */ = {
  9.1364  			isa = PBXGroup;
  9.1365  			children = (
  9.1366 -				4362398F1EAE08F400BD2EB9 /* PEPSession+Extensions.swift */,
  9.1367 +				1569DDB7215395BE007A0398 /* NSAttributedString+Extension.swift */,
  9.1368  				B70A3A62220065F500EDCE61 /* String+pEp.swift */,
  9.1369  				43E657D01F3C33C30014CBEC /* String+HTML.swift */,
  9.1370 -				43EC03471F4AE28F0026E152 /* String+Attachment.swift */,
  9.1371  				430E0BE61EAF5E2600378EC2 /* NSMutableDictionary+pEp.swift */,
  9.1372  				432A5E251EB344C3007CB670 /* PEP_color+Extension.swift */,
  9.1373 -				432AC3051ECB0C44007DC418 /* CWIMAPMessage+pEp.swift */,
  9.1374 -				1500199C1F2B2C73003E670A /* Notification+CWServiceClientNotificationParsing.swift */,
  9.1375  				431C2B181F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift */,
  9.1376 -				43E0CA291F4AB81600D9BB7E /* Attachment+Extension.swift */,
  9.1377  				43257C871F5067BE00DDC7F0 /* NSAttributedString+pEp.swift */,
  9.1378  				1541D7EC1FC81D4200D52A5D /* URL+Extensions.swift */,
  9.1379 -				1541D7F21FC8292D00D52A5D /* URL+MIME.swift */,
  9.1380  				155050F11FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift */,
  9.1381 -				4315E4C020120F1600F68763 /* NSSecureCoding+Extension.swift */,
  9.1382  				439A23E420B40FAC00417AF5 /* PEP_rating+Extension.swift */,
  9.1383  				1574D079211464CC00FEDC93 /* URL+MailTo.swift */,
  9.1384 +				B7DFEA55225397AB0080A2BA /* Folder+LocalizedName.swift */,
  9.1385 +				B7F676BC227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift */,
  9.1386  			);
  9.1387  			path = Extensions;
  9.1388  			sourceTree = "<group>";
  9.1389 @@ -2180,13 +1774,19 @@
  9.1390  		43980E1A1CBD0BC900A7FC3C = {
  9.1391  			isa = PBXGroup;
  9.1392  			children = (
  9.1393 +				43D2133F2237CB3900C060A1 /* PantomimeFramework.framework */,
  9.1394 +				43D2133C2237CB1600C060A1 /* PEPObjCAdapterFramework.framework */,
  9.1395 +				43D213352237C90400C060A1 /* ldns_xcode.framework */,
  9.1396 +				43D213302237C86900C060A1 /* SwipeCellKit.framework */,
  9.1397 +				43D2132D2237BE8000C060A1 /* MessageModel.framework */,
  9.1398 +				43D2132A2237BE6D00C060A1 /* pEpIOSToolbox.framework */,
  9.1399 +				43D213262237BE4B00C060A1 /* AppAuth.framework */,
  9.1400  				43980ECE1CBD1CAD00A7FC3C /* Libraries */,
  9.1401  				43980E251CBD0BC900A7FC3C /* pEpForiOS */,
  9.1402  				43980E3D1CBD0BCA00A7FC3C /* pEpForiOSTests */,
  9.1403  				43980E481CBD0BCA00A7FC3C /* pEpForiOSUITests */,
  9.1404  				43980E241CBD0BC900A7FC3C /* Products */,
  9.1405  				495560841E7150ED0016579E /* Frameworks */,
  9.1406 -				00A12CAA20D3D90B00B82BE3 /* Recovered References */,
  9.1407  			);
  9.1408  			sourceTree = "<group>";
  9.1409  		};
  9.1410 @@ -2206,10 +1806,8 @@
  9.1411  				150B8E951FCDACBB00374438 /* Error */,
  9.1412  				43800D8C1D112A0800821E34 /* HTMLParser */,
  9.1413  				4351C2A01F4441190053381F /* Markdown */,
  9.1414 -				431144A61CC0CB0A0007639D /* Background */,
  9.1415  				43E58EB21CBF8301008AA7A7 /* Models */,
  9.1416  				43ED53611CC77F95006AB156 /* UI */,
  9.1417 -				43122B111DF5B48B00610253 /* Network */,
  9.1418  				43980EDE1CBD24B000A7FC3C /* Util */,
  9.1419  				431394A31E4B036000D92F33 /* Settings */,
  9.1420  				43B10C7E1EC2EE65003E849F /* cpp */,
  9.1421 @@ -2220,8 +1818,8 @@
  9.1422  				43980E351CBD0BCA00A7FC3C /* Info.plist */,
  9.1423  				43C98AC5219C3691006418B0 /* InfoPlist.strings */,
  9.1424  				43C98AC1219C275E006418B0 /* Localizable.strings */,
  9.1425 +				436981AC2282F6460006FA2D /* secret.xcconfig */,
  9.1426  				4388A0E02008AF61008CB98D /* public.xcconfig */,
  9.1427 -				43B044412007683E007BCE3F /* secret.xcconfig */,
  9.1428  				433724FC1DA2C2B1005E8DF5 /* pEp.entitlements */,
  9.1429  				430C80D41D0EAB6E00CD4582 /* pEpTrustWords.bundle */,
  9.1430  			);
  9.1431 @@ -2247,19 +1845,16 @@
  9.1432  				438D253B1D4B9E7500BFF7AA /* MimeTests.swift */,
  9.1433  				43C7B9D01CEC4DDF007A612F /* MiscTests.swift */,
  9.1434  				430C80DF1D0EADC200CD4582 /* PepAdapterTests.swift */,
  9.1435 -				431799391CF8A39F007DD655 /* pEpForiOSTests-Bridging-Header.h */,
  9.1436  				432F7D601D2102F10094F097 /* PEPSessionTest.swift */,
  9.1437  				43D51E881DD5D902008B77A8 /* SimpleOperationsTest.swift */,
  9.1438  				436F8E131D36706A007E9829 /* StringExtensionsTest.swift */,
  9.1439  				43257C851F50659200DDC7F0 /* StringHTMLExtensionTests.swift */,
  9.1440  				432A24D61DE714A200DAAC5C /* MessagePantomimeTests.swift */,
  9.1441 -				5DEBAA471DE59C3B00FAE12C /* NetworkServiceTests.swift */,
  9.1442 +				5DEBAA471DE59C3B00FAE12C /* ReplicationServiceTests.swift */,
  9.1443  				43E74C731E38DE2200A2F7A6 /* ImapFlagsTests.swift */,
  9.1444 -				43EE994D1E4392530060EACE /* FlagImageTests.swift */,
  9.1445  				438281821E891B7E00087343 /* DateTests.swift */,
  9.1446  				43FAA0D31EC9CBC0005BFC4B /* DecryptionTestsInternal.swift */,
  9.1447  				43C3B15F2003851100ED48A4 /* DecryptImportedMessagesTests.swift */,
  9.1448 -				431E58FB1ED5926B00EFA77F /* AccountVerificationServiceTests.swift */,
  9.1449  				436795F71EE98B9A00B03E23 /* MessageReevalutionTests.swift */,
  9.1450  				15B483DA1F28E2FC000FB2CF /* SpecialUseMailboxesTest.swift */,
  9.1451  				43F7F0791F6AD44600BDF151 /* HandshakeTests.swift */,
  9.1452 @@ -2279,7 +1874,7 @@
  9.1453  		43980E481CBD0BCA00A7FC3C /* pEpForiOSUITests */ = {
  9.1454  			isa = PBXGroup;
  9.1455  			children = (
  9.1456 -				B7745838221C191600664282 /* SecretUITestData.swift */,
  9.1457 +				4312BE88228439670002129D /* SecretUITestData.swift */,
  9.1458  				43B0443A20067D25007BCE3F /* UITestDataProtocol.swift */,
  9.1459  				43B0443820067CC7007BCE3F /* UIAccount.swift */,
  9.1460  				43980E4B1CBD0BCA00A7FC3C /* Info.plist */,
  9.1461 @@ -2303,29 +1898,17 @@
  9.1462  		43980EDE1CBD24B000A7FC3C /* Util */ = {
  9.1463  			isa = PBXGroup;
  9.1464  			children = (
  9.1465 -				B70A3A9022089D3C00EDCE61 /* Log */,
  9.1466 -				151F71D02029F9F80057C74D /* IMAP */,
  9.1467  				4362398D1EAE08F400BD2EB9 /* Extensions */,
  9.1468 -				B740B7571E4B1B80002585E1 /* MimeTypes */,
  9.1469  				43306EBC1FE125950045DD00 /* OAuth2 */,
  9.1470 -				37A3D6202214333200E11415 /* Reachability */,
  9.1471  				43980EF91CBD415700A7FC3C /* AppConfig.swift */,
  9.1472 -				43C6F35A1CBE7496006A2A18 /* ConnectionManager.swift */,
  9.1473  				A1B50A811CD26FF100B1A997 /* Constants.swift */,
  9.1474 -				5D039A9B1D0EE7F900AD59EC /* PEPUtil.swift */,
  9.1475 -				431798761CF87FE6007DD655 /* ReferenceCounter.swift */,
  9.1476  				433BCD941D5388C100DD98EF /* ReplyUtil.swift */,
  9.1477  				228038671DC9DE6D00F1CB45 /* TextfieldResponder.swift */,
  9.1478  				436C5A8D1CFEDF59006A195F /* UIHelper.swift */,
  9.1479  				43B7154C1CECAADA0027861A /* ViewWidthsAligner.swift */,
  9.1480  				222B35571DF96389007A1F82 /* Capability.swift */,
  9.1481 -				433019E51E01A71300788B89 /* PeriodicTask.swift */,
  9.1482 -				436C23271E02948400071430 /* BackgroundTaskProtocol.swift */,
  9.1483 -				436C232C1E02A2D900071430 /* KickOffMySelfProtocol.swift */,
  9.1484 -				436C232E1E02A52D00071430 /* LimitedOperationQueue.swift */,
  9.1485  				8B69E3981E30F80E0022959E /* Appearance.swift */,
  9.1486  				434F40931EB0B173002FBF0D /* ObservableValue.swift */,
  9.1487 -				43AE48E61EEFC93900B92BB6 /* DebugMergePolicy.swift */,
  9.1488  				15255B021F825CD100A2CFC9 /* IdentityImageTool.swift */,
  9.1489  				155050EF1FE82356009CEAD2 /* UserNotificationTool.swift */,
  9.1490  			);
  9.1491 @@ -2375,10 +1958,20 @@
  9.1492  				1554755E2137F6F8005A52D0 /* SwipeActionDescriptor.swift */,
  9.1493  				43A469F921513B10002E1036 /* PEPSwipeTableViewCell.swift */,
  9.1494  				152A39932190587100D9F8E4 /* TextViewInTableViewScrollUtil.swift */,
  9.1495 +				B7DFEA51225368670080A2BA /* VirtualFolder.swift */,
  9.1496 +				B7DFEA5322536D5E0080A2BA /* UnifiedInbox.swift */,
  9.1497  			);
  9.1498  			path = Util;
  9.1499  			sourceTree = "<group>";
  9.1500  		};
  9.1501 +		43AE3C562298001E00E1AA7B /* KeySync */ = {
  9.1502 +			isa = PBXGroup;
  9.1503 +			children = (
  9.1504 +				43AE3C572298007A00E1AA7B /* NotifyHandshakeDelegate.swift */,
  9.1505 +			);
  9.1506 +			path = KeySync;
  9.1507 +			sourceTree = "<group>";
  9.1508 +		};
  9.1509  		43B10C7E1EC2EE65003E849F /* cpp */ = {
  9.1510  			isa = PBXGroup;
  9.1511  			children = (
  9.1512 @@ -2442,38 +2035,13 @@
  9.1513  		43E58EB21CBF8301008AA7A7 /* Models */ = {
  9.1514  			isa = PBXGroup;
  9.1515  			children = (
  9.1516 -				15F0F7AB21359372002BE853 /* Filter */,
  9.1517 -				15BA536920A08B100090F126 /* Account+Extentions.swift */,
  9.1518 -				15F835231F34BE1300FCE887 /* AccountUserInput.swift */,
  9.1519 -				43CE63CA1DE8830100FAC505 /* CdAccount+pEp.swift */,
  9.1520 -				431B04811DE583A000E40CD3 /* CdAttachment+Extension.swift */,
  9.1521 -				154F0A7F2085FC7D00C77D72 /* CdAttachment+Pantomime.swift */,
  9.1522 -				434B5D181DDF67E400BEDEF0 /* CdMessage+Extension.swift */,
  9.1523 -				431B04791DE5772000E40CD3 /* CdMessage+pEp.swift */,
  9.1524 -				431B047F1DE5774800E40CD3 /* CdMessage+Pantomime.swift */,
  9.1525 -				43BB86931DB4E76D00980267 /* CdAccount+Extension.swift */,
  9.1526 -				43E9BC631DB518A700AD2352 /* CdFolder+Extension.swift */,
  9.1527 -				43E7B6741DE4A53A0017D707 /* CdIdentity+pEp.swift */,
  9.1528 -				430A2EEB1E81357A00878837 /* CdImapFlags+Pantomime.swift */,
  9.1529 -				439AAC551F21D0CC0018A29E /* CdFolder+Pantomime.swift */,
  9.1530 -				154F0A832087779200C77D72 /* ContentDispositionType + Conversion.swift */,
  9.1531 +				37C3C0E52260C64D003E290C /* Log.swift */,
  9.1532  				43CE63C41DE87FB200FAC505 /* Identity+pEp.swift */,
  9.1533 -				15AA6015207CD71D00D57DB4 /* ImapFlags+Pantomime.swift */,
  9.1534 -				153FC45C202A263D0053CCF1 /* FolderType+IMAP.swift */,
  9.1535  				155475632137FD96005A52D0 /* FolderType+Extensions.swift */,
  9.1536  				1554756521393036005A52D0 /* Folder+Extensions.swift */,
  9.1537 -				15F0F7AC213594FC002BE853 /* Folder+Imap.swift */,
  9.1538 -				15865A8820319ADC00F7A4B5 /* Folder+pEp.swift */,
  9.1539 -				1555E97B1FD587A300BF8E0E /* Message+IMAP.swift */,
  9.1540 -				43CE63D01DE8866C00FAC505 /* Message+pEp.swift */,
  9.1541 -				15BA536B20A08D270090F126 /* UnifiedInbox.swift */,
  9.1542 -				1594C1CF21281FCD00CB06E2 /* Server+Fetching.swift */,
  9.1543 -				15547570213FEAB7005A52D0 /* CdMessagePredicateFactory+Extension.swift */,
  9.1544 -				15F0F7A921358B33002BE853 /* CdMessagePredicateFactory+Imap.swift */,
  9.1545 -				15F0F7B52136F6D1002BE853 /* CdFolderPredicateFactory+IMAP.swift */,
  9.1546  				15547567213931BC005A52D0 /* Folder+Threading.swift */,
  9.1547  				15D7D991219B154000A1A2B9 /* Attachment+Extensions.swift */,
  9.1548 -				159F4C9B21BEB9ED00244903 /* Message+FakeMessage.swift */,
  9.1549 +				433E7437225B564400B84CD9 /* Account+Extension.swift */,
  9.1550  			);
  9.1551  			path = Models;
  9.1552  			sourceTree = "<group>";
  9.1553 @@ -2504,10 +2072,10 @@
  9.1554  		43ED53611CC77F95006AB156 /* UI */ = {
  9.1555  			isa = PBXGroup;
  9.1556  			children = (
  9.1557 +				43AE3C562298001E00E1AA7B /* KeySync */,
  9.1558  				B706C0EF1EA8C378006B2F6C /* StoryboardFiles */,
  9.1559  				432E80FA2191AF5100359879 /* Fonts */,
  9.1560  				43AA82511E9B925000ABD5A8 /* Util */,
  9.1561 -				43F8D80020C537640038ABD5 /* MessageThreading */,
  9.1562  				003C0FAA20B57C2E0093A987 /* SplitView */,
  9.1563  				15BA537A20A1F5CA0090F126 /* MoveToFolder */,
  9.1564  				15265942216230B0006A78DF /* Compose */,
  9.1565 @@ -2547,15 +2115,6 @@
  9.1566  			path = ImapSetup;
  9.1567  			sourceTree = "<group>";
  9.1568  		};
  9.1569 -		43F8D80020C537640038ABD5 /* MessageThreading */ = {
  9.1570 -			isa = PBXGroup;
  9.1571 -			children = (
  9.1572 -				43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */,
  9.1573 -				43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */,
  9.1574 -			);
  9.1575 -			path = MessageThreading;
  9.1576 -			sourceTree = "<group>";
  9.1577 -		};
  9.1578  		49174CAD21EE408F006DBD63 /* PDF Security Tests */ = {
  9.1579  			isa = PBXGroup;
  9.1580  			children = (
  9.1581 @@ -2614,17 +2173,9 @@
  9.1582  		495560841E7150ED0016579E /* Frameworks */ = {
  9.1583  			isa = PBXGroup;
  9.1584  			children = (
  9.1585 -				B7DB7FEA221AFE10003968DA /* pEpIOSToolbox.framework */,
  9.1586 -				43D86ECA21BE6C7B00C18418 /* CleanroomASL.framework */,
  9.1587 -				439932311FEA9B7200E92C35 /* SwipeCellKit.framework */,
  9.1588 -				43B54F971FE02D02008EC427 /* AppAuth.framework */,
  9.1589 -				43754AC71FCD7ABC009A8E63 /* ldns_xcode.framework */,
  9.1590 -				43209B531ECC5A9B007E7E2E /* libpEpObjCAdapter.a */,
  9.1591 -				43B10C7C1EC2ECA3003E849F /* libAccountSettingsAdapter.a */,
  9.1592 -				49D521561E73E1C70097987B /* ServerConfig.framework */,
  9.1593 -				49D521531E73E1C20097987B /* MessageModel.framework */,
  9.1594 -				495560871E71517F0016579E /* libpEpiOSAdapter.a */,
  9.1595 -				495560851E7150ED0016579E /* libPantomimeStatic.a */,
  9.1596 +				43D47AC1225DD1CE00E97C5B /* PEPObjCAdapterFramework.framework */,
  9.1597 +				43D47ABF225DD1C500E97C5B /* PantomimeFramework.framework */,
  9.1598 +				43D213332237C8CA00C060A1 /* libAccountSettingsAdapter.a */,
  9.1599  			);
  9.1600  			name = Frameworks;
  9.1601  			sourceTree = "<group>";
  9.1602 @@ -2685,15 +2236,6 @@
  9.1603  			path = ..;
  9.1604  			sourceTree = "<group>";
  9.1605  		};
  9.1606 -		B70A3A9022089D3C00EDCE61 /* Log */ = {
  9.1607 -			isa = PBXGroup;
  9.1608 -			children = (
  9.1609 -				B70A3A9122089D5000EDCE61 /* Log+ASL.swift */,
  9.1610 -				B70A3A9222089D5000EDCE61 /* Log.swift */,
  9.1611 -			);
  9.1612 -			path = Log;
  9.1613 -			sourceTree = "<group>";
  9.1614 -		};
  9.1615  		B70D32A5205BCC020094A92A /* ViewModel */ = {
  9.1616  			isa = PBXGroup;
  9.1617  			children = (
  9.1618 @@ -2835,15 +2377,6 @@
  9.1619  			name = CellsAndSections;
  9.1620  			sourceTree = "<group>";
  9.1621  		};
  9.1622 -		B740B7571E4B1B80002585E1 /* MimeTypes */ = {
  9.1623 -			isa = PBXGroup;
  9.1624 -			children = (
  9.1625 -				B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */,
  9.1626 -				B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */,
  9.1627 -			);
  9.1628 -			name = MimeTypes;
  9.1629 -			sourceTree = "<group>";
  9.1630 -		};
  9.1631  		B74D08BF1F013F15003D092C /* ViewModel */ = {
  9.1632  			isa = PBXGroup;
  9.1633  			children = (
  9.1634 @@ -2851,8 +2384,8 @@
  9.1635  				001D365F20C56524002434EB /* EmailListViewModel+MoveToFolderDelegate.swift */,
  9.1636  				B75FF00A1EFD420F00C57289 /* EmailListViewModel.swift */,
  9.1637  				49691B1420D7FD0200CA9367 /* MessageViewModelConfigurable.swift */,
  9.1638 -				434E5A1A20DB9C4600D7F88A /* EmailListViewModel+MessageFolderDelegate.swift */,
  9.1639  				43E1619020D7B2D6003F1514 /* UpdateThreadListDelegate.swift */,
  9.1640 +				B776A47A223962B50047A41D /* EmailListViewModel+MessageQueryResultsDelegate.swift */,
  9.1641  			);
  9.1642  			name = ViewModel;
  9.1643  			sourceTree = "<group>";
  9.1644 @@ -2871,7 +2404,6 @@
  9.1645  			children = (
  9.1646  				B78CF8271E76E0DF008C1739 /* ViewModel */,
  9.1647  				B78CF8241E76D706008C1739 /* FilterTableViewController.swift */,
  9.1648 -				B729BEC51E7C35E200793110 /* FilterUpdateProtocol.swift */,
  9.1649  			);
  9.1650  			name = Filter;
  9.1651  			sourceTree = "<group>";
  9.1652 @@ -2879,8 +2411,8 @@
  9.1653  		B78CF8271E76E0DF008C1739 /* ViewModel */ = {
  9.1654  			isa = PBXGroup;
  9.1655  			children = (
  9.1656 -				B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */,
  9.1657 -				B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */,
  9.1658 +				15679F0C2292F4090051DCC3 /* FilterViewDelegate.swift */,
  9.1659 +				B7A50745224CD27A007B988F /* FilterViewModel.swift */,
  9.1660  			);
  9.1661  			name = ViewModel;
  9.1662  			sourceTree = "<group>";
  9.1663 @@ -2912,15 +2444,6 @@
  9.1664  			path = Folder;
  9.1665  			sourceTree = "<group>";
  9.1666  		};
  9.1667 -		F7C16A5521A56412004B44F2 /* FolderSyncService */ = {
  9.1668 -			isa = PBXGroup;
  9.1669 -			children = (
  9.1670 -				F7C16A5621A56436004B44F2 /* FolderSyncServiceProtocol.swift */,
  9.1671 -				F7C16A5821A56445004B44F2 /* FolderSyncService.swift */,
  9.1672 -			);
  9.1673 -			path = FolderSyncService;
  9.1674 -			sourceTree = "<group>";
  9.1675 -		};
  9.1676  /* End PBXGroup section */
  9.1677  
  9.1678  /* Begin PBXNativeTarget section */
  9.1679 @@ -2933,9 +2456,9 @@
  9.1680  				43980E1F1CBD0BC900A7FC3C /* Sources */,
  9.1681  				43980E201CBD0BC900A7FC3C /* Frameworks */,
  9.1682  				43980E211CBD0BC900A7FC3C /* Resources */,
  9.1683 -				4377D92F1DB7EB03003432BB /* CopyFiles */,
  9.1684  				4961BA0D1E7BEA4200920DF8 /* Warnings for TODO++ Script */,
  9.1685  				151573B41F2091910049BB0B /* Log Time Finished Script */,
  9.1686 +				43D213292237BE4B00C060A1 /* Embed Frameworks */,
  9.1687  			);
  9.1688  			buildRules = (
  9.1689  			);
  9.1690 @@ -2990,13 +2513,13 @@
  9.1691  			isa = PBXProject;
  9.1692  			attributes = {
  9.1693  				LastSwiftUpdateCheck = 0730;
  9.1694 -				LastUpgradeCheck = 1000;
  9.1695 +				LastUpgradeCheck = 1010;
  9.1696  				ORGANIZATIONNAME = "p≡p Security S.A.";
  9.1697  				TargetAttributes = {
  9.1698  					43980E221CBD0BC900A7FC3C = {
  9.1699  						CreatedOnToolsVersion = 7.3;
  9.1700  						DevelopmentTeam = NQLYU6MGPN;
  9.1701 -						LastSwiftMigration = 0900;
  9.1702 +						LastSwiftMigration = 1020;
  9.1703  						ProvisioningStyle = Automatic;
  9.1704  						SystemCapabilities = {
  9.1705  							com.apple.Keychain = {
  9.1706 @@ -3012,13 +2535,13 @@
  9.1707  					};
  9.1708  					43980E391CBD0BCA00A7FC3C = {
  9.1709  						CreatedOnToolsVersion = 7.3;
  9.1710 -						LastSwiftMigration = 0900;
  9.1711 +						LastSwiftMigration = 1020;
  9.1712  						TestTargetID = 43980E221CBD0BC900A7FC3C;
  9.1713  					};
  9.1714  					43980E441CBD0BCA00A7FC3C = {
  9.1715  						CreatedOnToolsVersion = 7.3;
  9.1716  						DevelopmentTeam = SBPJ2E4G5X;
  9.1717 -						LastSwiftMigration = 0900;
  9.1718 +						LastSwiftMigration = 1020;
  9.1719  						ProvisioningStyle = Automatic;
  9.1720  						TestTargetID = 43980E221CBD0BC900A7FC3C;
  9.1721  					};
  9.1722 @@ -3029,8 +2552,13 @@
  9.1723  			developmentRegion = English;
  9.1724  			hasScannedForEncodings = 0;
  9.1725  			knownRegions = (
  9.1726 +				English,
  9.1727  				Base,
  9.1728  				de,
  9.1729 +				fr,
  9.1730 +				es,
  9.1731 +				ca,
  9.1732 +				tr,
  9.1733  			);
  9.1734  			mainGroup = 43980E1A1CBD0BC900A7FC3C;
  9.1735  			productRefGroup = 43980E241CBD0BC900A7FC3C /* Products */;
  9.1736 @@ -3053,10 +2581,10 @@
  9.1737  				1526596C216230B1006A78DF /* ComposeData.plist in Resources */,
  9.1738  				43980E341CBD0BCA00A7FC3C /* LaunchScreen.storyboard in Resources */,
  9.1739  				155F2D9E20530798001B4B1C /* Reusable.storyboard in Resources */,
  9.1740 +				436981AD2282F6460006FA2D /* secret.xcconfig in Resources */,
  9.1741  				220DCE2F1E0AB544002FE716 /* MessageData.plist in Resources */,
  9.1742  				432E80FE2191AF5100359879 /* UniversLTStd-Bold.otf in Resources */,
  9.1743  				43980E311CBD0BCA00A7FC3C /* Assets.xcassets in Resources */,
  9.1744 -				B740B75D1E4B1C2D002585E1 /* jsonMimeType.txt in Resources */,
  9.1745  				151DE7E41FC5D41600CDC273 /* FolderViews.storyboard in Resources */,
  9.1746  				152A39D221905C3E00D9F8E4 /* AttachmentCell.xib in Resources */,
  9.1747  				43C98AC7219C3691006418B0 /* InfoPlist.strings in Resources */,
  9.1748 @@ -3152,7 +2680,7 @@
  9.1749  			);
  9.1750  			runOnlyForDeploymentPostprocessing = 0;
  9.1751  			shellPath = /bin/sh;
  9.1752 -			shellScript = "echo \"BUILD_TIME START pEp_for_iOS: \"`date \"+%Y_%m_%d--%H:%M:%S\"`";
  9.1753 +			shellScript = "echo \"BUILD_TIME START pEp_for_iOS: \"`date \"+%Y_%m_%d--%H:%M:%S\"`\necho \"##########\"\necho ${ARCHS}\n";
  9.1754  		};
  9.1755  		151573B41F2091910049BB0B /* Log Time Finished Script */ = {
  9.1756  			isa = PBXShellScriptBuildPhase;
  9.1757 @@ -3205,80 +2733,54 @@
  9.1758  			files = (
  9.1759  				002375D420DCF59D00663961 /* MoveToAccountViewController.swift in Sources */,
  9.1760  				496C0EEB20BC4B370009B5B9 /* EmailListViewModel+EmailDisplayDelegate.swift in Sources */,
  9.1761 -				B70A3A9422089D5000EDCE61 /* Log.swift in Sources */,
  9.1762  				4315E4C3201242BB00F68763 /* OAuth2Type+Extension.swift in Sources */,
  9.1763 -				43264E9B1D76B7110098DCAC /* SyncFlagsToServerOperation.swift in Sources */,
  9.1764  				4351C2D11F4441190053381F /* houdini_html_u.c in Sources */,
  9.1765  				B70A3C401E817CFA0036876F /* FolderViewModel.swift in Sources */,
  9.1766 -				0038494A20D25576008000EA /* ProfilePictureComposer.swift in Sources */,
  9.1767 +				0038494A20D25576008000EA /* ProfilePictureComposerProtocol.swift in Sources */,
  9.1768  				15874BCA2127493E00A3A4A6 /* UnecryptedSubjectViewModel.swift in Sources */,
  9.1769 -				43EE99481E438E320060EACE /* FlagImages.swift in Sources */,
  9.1770  				220DCE341E0AB5CC002FE716 /* MailinglistCell.swift in Sources */,
  9.1771  				43AA825D1E9BD60600ABD5A8 /* AttachmentsViewDelegate.swift in Sources */,
  9.1772  				152A39D821905C3E00D9F8E4 /* BodyCellViewModel.swift in Sources */,
  9.1773  				220DCE371E0AB5CC002FE716 /* MessageSubjectCell.swift in Sources */,
  9.1774  				1526596F216230B2006A78DF /* ComposeFieldModel.swift in Sources */,
  9.1775 -				43AE48E71EEFC93900B92BB6 /* DebugMergePolicy.swift in Sources */,
  9.1776  				492EF92D20C6957D004EAE14 /* ThreadViewController.swift in Sources */,
  9.1777  				43257C821F50179800DDC7F0 /* BasicSaxParser.swift in Sources */,
  9.1778 -				4315E4C120120F1600F68763 /* NSSecureCoding+Extension.swift in Sources */,
  9.1779  				150DF6D02052A13700A9DCF7 /* SecureWebViewController.swift in Sources */,
  9.1780  				4351C2D71F4441190053381F /* node.c in Sources */,
  9.1781  				00D3CD3E20B58976009ABBC9 /* PrimarySplitViewController.swift in Sources */,
  9.1782 +				B7DFEA56225397AB0080A2BA /* Folder+LocalizedName.swift in Sources */,
  9.1783  				43ED53771CC77F95006AB156 /* OneValueSettingCell.swift in Sources */,
  9.1784 -				5D039AA21D0EEA3700AD59EC /* DecryptMessagesOperation.swift in Sources */,
  9.1785 -				439AAC561F21D0CC0018A29E /* CdFolder+Pantomime.swift in Sources */,
  9.1786  				4351C2D51F4441190053381F /* latex.c in Sources */,
  9.1787 -				37A3D6262215695400E11415 /* ReachabilityUtilsProtocol.swift in Sources */,
  9.1788  				43498CDB200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift in Sources */,
  9.1789 -				1560D1721F6FD1F600A75B39 /* FetchOlderImapMessagesService.swift in Sources */,
  9.1790  				15874BC42127493E00A3A4A6 /* SettingsCellViewModel.swift in Sources */,
  9.1791  				438D5A711EA77CFC001A37E1 /* HandshakeViewController.swift in Sources */,
  9.1792 -				B729BEC61E7C35E200793110 /* FilterUpdateProtocol.swift in Sources */,
  9.1793 -				431798771CF87FE6007DD655 /* ReferenceCounter.swift in Sources */,
  9.1794  				B7DB7FDA221ADDAF003968DA /* UIBarButtonItem+Extension.swift in Sources */,
  9.1795  				15874BC62127493E00A3A4A6 /* SettingsTableViewController.swift in Sources */,
  9.1796 -				B740B75F1E4B1C46002585E1 /* MimeTypeUtil.swift in Sources */,
  9.1797 -				1555E97C1FD587A300BF8E0E /* Message+IMAP.swift in Sources */,
  9.1798 -				37A3D6242214372B00E11415 /* NetworkReachability.swift in Sources */,
  9.1799  				002375D320DCDC7300663961 /* FullMessageCell+SecureWebViewControllerDelegate.swift in Sources */,
  9.1800  				4351C2C91F4441190053381F /* buffer.c in Sources */,
  9.1801 -				434B5D191DDF67E400BEDEF0 /* CdMessage+Extension.swift in Sources */,
  9.1802  				152A39C621905C3E00D9F8E4 /* ComposeViewModelState.swift in Sources */,
  9.1803 -				F7C16A5921A56445004B44F2 /* FolderSyncService.swift in Sources */,
  9.1804  				15874BC92127493E00A3A4A6 /* PassiveModeViewModel.swift in Sources */,
  9.1805 +				B7DFEA5422536D5E0080A2BA /* UnifiedInbox.swift in Sources */,
  9.1806  				4334CF302020CFFE00B3193E /* OAuth2Type+LibAccountSettings.swift in Sources */,
  9.1807 -				4356102C1DEF019400808C8E /* SyncMessagesOperation.swift in Sources */,
  9.1808 -				433019E61E01A71300788B89 /* PeriodicTask.swift in Sources */,
  9.1809  				00A12CAE20D3D9AC00B82BE3 /* FullMessageCell.swift in Sources */,
  9.1810  				006BE6BC20F4B63C00DDE8C9 /* EmailDetailType.swift in Sources */,
  9.1811  				00EB89AB20E3A27C00CDFA0D /* ThreadViewcontroller+SizeClasses.swift in Sources */,
  9.1812 -				5D039A9C1D0EE7F900AD59EC /* PEPUtil.swift in Sources */,
  9.1813  				43257C841F50629700DDC7F0 /* HtmlToAttributedTextSaxParser.swift in Sources */,
  9.1814 -				1541D7F31FC8292D00D52A5D /* URL+MIME.swift in Sources */,
  9.1815  				4351C2D61F4441190053381F /* man.c in Sources */,
  9.1816 -				43F6DFD71DEEC752006B526F /* FetchMessagesOperation.swift in Sources */,
  9.1817  				150B8EB31FCEB93D00374438 /* UIUtils.swift in Sources */,
  9.1818  				43AAC22A1F7A5AEE00F435F4 /* BaseTableViewController.swift in Sources */,
  9.1819 -				436C232D1E02A2D900071430 /* KickOffMySelfProtocol.swift in Sources */,
  9.1820  				220DCE351E0AB5CC002FE716 /* MessageContentCell.swift in Sources */,
  9.1821  				1526597A21623652006A78DF /* SuggestViewModel.swift in Sources */,
  9.1822  				4351C2D31F4441190053381F /* inlines.c in Sources */,
  9.1823 -				4360282F1ED6F33400C95FC4 /* ImapSyncError.swift in Sources */,
  9.1824  				220DCE361E0AB5CC002FE716 /* MessageSenderCell.swift in Sources */,
  9.1825 +				43AE3C582298007A00E1AA7B /* NotifyHandshakeDelegate.swift in Sources */,
  9.1826  				15874BCD2127493E00A3A4A6 /* AccountSettingsError.swift in Sources */,
  9.1827 -				15484B6A2105D5C500F9D962 /* EmailConnectInfo.swift in Sources */,
  9.1828  				15D4399A216E697700EB3933 /* AccountPickerView.swift in Sources */,
  9.1829 -				1554756C213FE139005A52D0 /* UnifiedFilter.swift in Sources */,
  9.1830 -				4341EBCF2089F674004CE6B8 /* QualifyServerIsLocalOperation.swift in Sources */,
  9.1831  				15265962216230B1006A78DF /* ContactCell.swift in Sources */,
  9.1832  				43425EDF1FE3E052004A2728 /* OAuth2ProviderFactory.swift in Sources */,
  9.1833  				43E657E01F3C74030014CBEC /* AXHTMLParser.m in Sources */,
  9.1834  				B76CF8B320D2739B002429A8 /* MoveToFolderViewModel.swift in Sources */,
  9.1835 -				155050F61FEAB082009CEAD2 /* ErrorContainer.swift in Sources */,
  9.1836 -				151F71D22029FA1B0057C74D /* PantomimeFolderAttribute+Extensions.swift in Sources */,
  9.1837  				43425EDD1FE3DF3B004A2728 /* OAuth2Provider.swift in Sources */,
  9.1838 -				431144B51CC0FCA40007639D /* StoreFolderOperation.swift in Sources */,
  9.1839  				152A39E021905C3E00D9F8E4 /* RecipientCell.swift in Sources */,
  9.1840  				152A39C721905C3E00D9F8E4 /* ComposeViewModel.swift in Sources */,
  9.1841  				43040A531E9776220083DED8 /* AttachmentSummaryView.swift in Sources */,
  9.1842 @@ -3287,212 +2789,145 @@
  9.1843  				1574D078211356E000FEDC93 /* UrlClickHandlerProtocol.swift in Sources */,
  9.1844  				152A39D621905C3E00D9F8E4 /* BodyCell.swift in Sources */,
  9.1845  				43ED53791CC77F95006AB156 /* UserInfoTableViewController.swift in Sources */,
  9.1846 -				15865A8920319ADC00F7A4B5 /* Folder+pEp.swift in Sources */,
  9.1847 -				1547509A1FE7C0B4000D8004 /* FetchNumberOfNewMailsOperation.swift in Sources */,
  9.1848 -				43C6F35B1CBE7496006A2A18 /* ConnectionManager.swift in Sources */,
  9.1849  				43EC75AC2164C26100048CFE /* SetOwnKeyViewController.swift in Sources */,
  9.1850 -				43122B1B1DF5B48B00610253 /* SmtpService.swift in Sources */,
  9.1851  				43CE63C51DE87FB200FAC505 /* Identity+pEp.swift in Sources */,
  9.1852 +				B7F676BD227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift in Sources */,
  9.1853 +				B7A50746224CD27A007B988F /* FilterViewModel.swift in Sources */,
  9.1854  				220DCE2E1E0AB544002FE716 /* MessageCell.swift in Sources */,
  9.1855  				B7DB7FD8221AD3BB003968DA /* UITableView+Extension.swift in Sources */,
  9.1856 -				43DB81331E2A56BE00A20902 /* AppendMailsOperation.swift in Sources */,
  9.1857  				8B69E3991E30F80E0022959E /* Appearance.swift in Sources */,
  9.1858  				B7DB7FD6221AD3BB003968DA /* UITextField+Extension.swift in Sources */,
  9.1859 -				1544BCFE215246F30075C5A0 /* AttachmentFilter.swift in Sources */,
  9.1860  				B716056020D3ECC900A733D6 /* MoveToFolderTableViewController.swift in Sources */,
  9.1861 -				43D755FC1F26382B006F933A /* EmailConnectInfo+Extension.swift in Sources */,
  9.1862  				15874BCB2127493E00A3A4A6 /* AccountVerificationResultDelegate.swift in Sources */,
  9.1863 -				4381D0FF1E51A124002743C3 /* NetworkServiceWorker.swift in Sources */,
  9.1864  				43E657E71F3CAB310014CBEC /* HtmlToMarkdownSaxParser.swift in Sources */,
  9.1865  				43E1619120D7B2D6003F1514 /* UpdateThreadListDelegate.swift in Sources */,
  9.1866  				155475642137FD96005A52D0 /* FolderType+Extensions.swift in Sources */,
  9.1867  				49C2750120C04DDB0075F6FF /* EmailViewController+DisplayedMessage.swift in Sources */,
  9.1868  				43E657D11F3C33C30014CBEC /* String+HTML.swift in Sources */,
  9.1869 -				437671481D8FF2A5004DD205 /* DeleteFolderOperation.swift in Sources */,
  9.1870 -				432DA7461EE027EB00B30BAA /* MessageSyncService.swift in Sources */,
  9.1871 -				43A26FBA1E0408FB00AF0B84 /* ServiceErrorProtocol.swift in Sources */,
  9.1872  				15874BC52127493E00A3A4A6 /* SettingsSectionViewModel.swift in Sources */,
  9.1873  				B70A3A63220065F600EDCE61 /* String+pEp.swift in Sources */,
  9.1874  				15874BC12127493E00A3A4A6 /* SettingSwitchTableViewCell.swift in Sources */,
  9.1875  				152A39E721905C3E00D9F8E4 /* RecipientTextViewModel.swift in Sources */,
  9.1876 -				43FE802E209992B800E97AB3 /* QualifyServerIsLocalService.swift in Sources */,
  9.1877 +				B776A47B223962B50047A41D /* EmailListViewModel+MessageQueryResultsDelegate.swift in Sources */,
  9.1878  				4351C2D41F4441190053381F /* iterator.c in Sources */,
  9.1879  				43AA825B1E9BC5FF00ABD5A8 /* AttachmentViewContainer.swift in Sources */,
  9.1880  				490CEBA921020BF900E8579C /* LoginViewController+Keyboard.swift in Sources */,
  9.1881 -				4326D3FF1EFBC8DB0016AB0D /* FolderInfoOperation.swift in Sources */,
  9.1882 -				43122B3C1DF5B75000610253 /* NetworkService.swift in Sources */,
  9.1883 -				1594C1D021281FCD00CB06E2 /* Server+Fetching.swift in Sources */,
  9.1884  				152A39D721905C3E00D9F8E4 /* TextAttachment.swift in Sources */,
  9.1885  				43ED53711CC77F95006AB156 /* IMAPSettingsTableViewController.swift in Sources */,
  9.1886  				43EC75AE2164D03500048CFE /* SetOwnKeyViewModel.swift in Sources */,
  9.1887  				43257C891F50683600DDC7F0 /* NSAttributedString+pEp.swift in Sources */,
  9.1888 -				154F0A842087779200C77D72 /* ContentDispositionType + Conversion.swift in Sources */,
  9.1889 -				431144B91CC11DF30007639D /* StorePrefetchedMailOperation.swift in Sources */,
  9.1890  				431E8F7E1CFDCF3A00C33647 /* EmailViewController.swift in Sources */,
  9.1891  				49228A5320D3D29900A51E9D /* ThreadViewController+SegueHandlerType.swift in Sources */,
  9.1892  				434AC3E320A450D800C11B7F /* UIAlertController+Extension.swift in Sources */,
  9.1893  				152A39C921905C3E00D9F8E4 /* Message+ComposeUtils.swift in Sources */,
  9.1894  				438052891FE3E24400ACF729 /* OAuth2AuthorizationProtocol.swift in Sources */,
  9.1895 -				43E7B6751DE4A53A0017D707 /* CdIdentity+pEp.swift in Sources */,
  9.1896  				439A23E520B40FAC00417AF5 /* PEP_rating+Extension.swift in Sources */,
  9.1897  				43B0444C20077323007BCE3F /* OAuth2Configuration.swift in Sources */,
  9.1898  				43257C801F50064100DDC7F0 /* HtmlToTextSaxParser.swift in Sources */,
  9.1899  				431C2B191F38888B00D87FFD /* ConnectionTransport+AccountSettings.swift in Sources */,
  9.1900  				00EB89AF20E3E4A000CDFA0D /* ReplyAlertCreator.swift in Sources */,
  9.1901  				B78CF8251E76D706008C1739 /* FilterTableViewController.swift in Sources */,
  9.1902 -				F7C16A5B21A56DBA004B44F2 /* FetchImapFoldersService.swift in Sources */,
  9.1903  				222B35581DF96389007A1F82 /* Capability.swift in Sources */,
  9.1904 -				43CE63D11DE8866C00FAC505 /* Message+pEp.swift in Sources */,
  9.1905  				15874BC82127493E00A3A4A6 /* ThreadedSettingViewModel.swift in Sources */,
  9.1906  				0033C07F20D7EBD500224E61 /* ThreadedEmailViewModel+UpdateThreadDelegate.swift in Sources */,
  9.1907 -				43BB86941DB4E76D00980267 /* CdAccount+Extension.swift in Sources */,
  9.1908  				15175CEC205929FB00A8D9D0 /* CidHandler.swift in Sources */,
  9.1909 -				15F0F7AA21358B33002BE853 /* CdMessagePredicateFactory+Imap.swift in Sources */,
  9.1910 -				43B2660D1D252C93009D57E8 /* ConcurrentBaseOperation.swift in Sources */,
  9.1911  				152A39CB21905C3E00D9F8E4 /* DocumentAttachmentPickerViewModel.swift in Sources */,
  9.1912 -				436239931EAE08F400BD2EB9 /* PEPSession+Extensions.swift in Sources */,
  9.1913 -				4382E6431CC600FF00AA27EA /* PersistentImapFolder.swift in Sources */,
  9.1914  				43AAC22B1F7A5AEE00F435F4 /* BaseViewController.swift in Sources */,
  9.1915  				43B7154D1CECAADA0027861A /* ViewWidthsAligner.swift in Sources */,
  9.1916  				43C322091EA90192005073FB /* PEP+UI.swift in Sources */,
  9.1917  				004A8C552112FDD500203143 /* EmailListView+UITableViewDataSourcePrefetching.swift in Sources */,
  9.1918 -				1587D1632049BE7D002C2157 /* ImapConnectionDataCache.swift in Sources */,
  9.1919  				002375D620DD185100663961 /* TreadedEmailViewModel+DisplayedMessage.swift in Sources */,
  9.1920  				431D60DD1E93D580001266D7 /* MessageAttachmentsCell.swift in Sources */,
  9.1921  				00AEB2F620DBA7DA00DA185A /* NeedsRefreshDelegate.swift in Sources */,
  9.1922 -				15A75CE1202B57BF00C0DA28 /* Folder+VirtualMailbox.swift in Sources */,
  9.1923 -				43122B1A1DF5B48B00610253 /* ImapService.swift in Sources */,
  9.1924  				1526597821623637006A78DF /* SuggestTableViewController.swift in Sources */,
  9.1925  				15874BD22127493E00A3A4A6 /* TrustedServerSettingsViewController.swift in Sources */,
  9.1926  				1554755F2137F6F8005A52D0 /* SwipeActionDescriptor.swift in Sources */,
  9.1927  				43A6E04B1E5726C8005BEE69 /* ReevaluateMessageRatingOperation.swift in Sources */,
  9.1928  				15B220521FC2DAE200CA52BA /* InfoPlist+pEpStrings.swift in Sources */,
  9.1929 -				431E2B071F02550C000035FA /* CheckOutgoingMessagesOperation.swift in Sources */,
  9.1930  				496355B120ECEA2900AA4387 /* ThreadedEmailViewModel+EmailDisplayDelegate.swift in Sources */,
  9.1931  				43D070332133DC500013B120 /* DefaultAppSettings.swift in Sources */,
  9.1932  				43ED536F1CC77F95006AB156 /* EmailListViewCell.swift in Sources */,
  9.1933 -				432142641E8FD66900FBE987 /* FetchNumberOfNewMailsService.swift in Sources */,
  9.1934  				4351C2C81F4441190053381F /* blocks.c in Sources */,
  9.1935  				15BBBC6C1FD05F4300B9DCC8 /* DisplayUserError.swift in Sources */,
  9.1936  				43A469FA21513B10002E1036 /* PEPSwipeTableViewCell.swift in Sources */,
  9.1937  				00BEC89720B85FD300A36E60 /* NoMessagesViewController.swift in Sources */,
  9.1938 -				43F84CD21CD899760092FCAE /* SyncFoldersFromServerOperation.swift in Sources */,
  9.1939  				431C6E041FE7A85200E23BE0 /* OAuth2ConfigurationProtocol.swift in Sources */,
  9.1940  				1541D7ED1FC81D4200D52A5D /* URL+Extensions.swift in Sources */,
  9.1941  				152A39D421905C3E00D9F8E4 /* SubjectCell.swift in Sources */,
  9.1942 -				15F835241F34BE1300FCE887 /* AccountUserInput.swift in Sources */,
  9.1943 -				43122B191DF5B48B00610253 /* EmailService.swift in Sources */,
  9.1944  				B7DB7FD2221AD332003968DA /* SegueHandlerType.swift in Sources */,
  9.1945  				0033C08320D7F41600224E61 /* ThreadedEmailViewModelDelegate.swift in Sources */,
  9.1946  				43498CDD200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift in Sources */,
  9.1947  				152A39DF21905C3E00D9F8E4 /* WrappedBccViewModel.swift in Sources */,
  9.1948  				B74F81021EB0E20000519FCC /* LoginViewModel.swift in Sources */,
  9.1949  				001D366020C56524002434EB /* EmailListViewModel+MoveToFolderDelegate.swift in Sources */,
  9.1950 +				B7DFEA52225368670080A2BA /* VirtualFolder.swift in Sources */,
  9.1951  				B722EC7A1E5C879000A2B9D5 /* FolderUiProtocols.swift in Sources */,
  9.1952 -				4307C4721ED826E400A276A4 /* SmtpSendError.swift in Sources */,
  9.1953 -				15DD3F75211EC68D00A8714D /* DecryptMessageOperation.swift in Sources */,
  9.1954 -				432198ED1DF6B66800318A74 /* SharedObjects.swift in Sources */,
  9.1955  				A1B50A841CD26FF100B1A997 /* Constants.swift in Sources */,
  9.1956  				15D4399C216E698E00EB3933 /* AccountPickerViewModel.swift in Sources */,
  9.1957  				43985D0E204438480080FA9A /* AccountSettingsProtocol+Extension.swift in Sources */,
  9.1958 -				43D755EB1F25D234006F933A /* MatchUidToMsnOperation.swift in Sources */,
  9.1959  				B7DB7FCA2215D69C003968DA /* CredentialTextField.swift in Sources */,
  9.1960 +				15679F0D2292F4090051DCC3 /* FilterViewDelegate.swift in Sources */,
  9.1961 +				433E7438225B564400B84CD9 /* Account+Extension.swift in Sources */,
  9.1962  				005A21FB20CAA5F50082D19F /* ThreadedEmailViewModel.swift in Sources */,
  9.1963  				15874BD12127493E00A3A4A6 /* TrustedServerSettingsViewModel.swift in Sources */,
  9.1964 -				436C23281E02948400071430 /* BackgroundTaskProtocol.swift in Sources */,
  9.1965  				4351C2DC1F4441190053381F /* xml.c in Sources */,
  9.1966  				430E0BE71EAF5E2600378EC2 /* NSMutableDictionary+pEp.swift in Sources */,
  9.1967  				152A39D921905C3E00D9F8E4 /* NSAttributedString+BodyTextUtils.swift in Sources */,
  9.1968  				152A39E421905C3E00D9F8E4 /* NSAttributedString+RecipientTextUtils.swift in Sources */,
  9.1969 -				155050F81FEAB57F009CEAD2 /* BackgroundError.swift in Sources */,
  9.1970 -				159F4C9C21BEB9ED00244903 /* Message+FakeMessage.swift in Sources */,
  9.1971  				00EB89AD20E3D3C200CDFA0D /* ThreadedEmailViewModel+MoveToFolderDelegate.swift in Sources */,
  9.1972 -				431B04801DE5774800E40CD3 /* CdMessage+Pantomime.swift in Sources */,
  9.1973 -				431144B71CC11D6A0007639D /* BaseOperation.swift in Sources */,
  9.1974 -				432198E81DF6B51B00318A74 /* LoginImapOperation.swift in Sources */,
  9.1975  				155050F21FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift in Sources */,
  9.1976 -				B78CF82B1E76E146008C1739 /* FilterCellViewModel.swift in Sources */,
  9.1977 -				43497B3A211C63CA00AC42B0 /* Message+MessageIdentitfying.swift in Sources */,
  9.1978 -				4333A2A51E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift in Sources */,
  9.1979 -				431E58FA1ED591E900EFA77F /* AccountVerificationService.swift in Sources */,
  9.1980 -				150B84C420A44DE100D8B288 /* MoveToFolderOperation.swift in Sources */,
  9.1981  				15874BC72127493E00A3A4A6 /* SettingDefaultAccountTableViewController.swift in Sources */,
  9.1982 -				4388A0E22008F813008CB98D /* OAuth2AccessToken.swift in Sources */,
  9.1983 +				4388A0E22008F813008CB98D /* (null) in Sources */,
  9.1984  				152A39D021905C3E00D9F8E4 /* AttachmentCell.swift in Sources */,
  9.1985  				0033C08120D7F3C600224E61 /* ThreadViewController+ViewModelDelegate.swift in Sources */,
  9.1986  				4351C2DB1F4441190053381F /* utf8.c in Sources */,
  9.1987 -				4348EF0D1E27ABA100F441A9 /* LoginSmtpOperation.swift in Sources */,
  9.1988  				152A39CA21905C3E00D9F8E4 /* DocumentAttachmentPickerViewController.swift in Sources */,
  9.1989  				152A39CD21905C3E00D9F8E4 /* MediaAttachmentPickerProviderViewModel.swift in Sources */,
  9.1990  				495D69BF20DBAEE900986007 /* ThreadViewController+SwipeCell.swift in Sources */,
  9.1991  				4351C2CF1F4441190053381F /* houdini_href_e.c in Sources */,
  9.1992  				4351C2D01F4441190053381F /* houdini_html_e.c in Sources */,
  9.1993  				15D7D992219B154000A1A2B9 /* Attachment+Extensions.swift in Sources */,
  9.1994 -				15A75CEC202DED2300C0DA28 /* GmailSpecificInformation.swift in Sources */,
  9.1995 -				430A2EEC1E81357A00878837 /* CdImapFlags+Pantomime.swift in Sources */,
  9.1996  				15874BCC2127493E00A3A4A6 /* AccountSettingsViewModel.swift in Sources */,
  9.1997 -				436C232F1E02A52D00071430 /* LimitedOperationQueue.swift in Sources */,
  9.1998  				434F40941EB0B173002FBF0D /* ObservableValue.swift in Sources */,
  9.1999  				B7DB7FC42215C4FF003968DA /* UINavigationController+Extensions.swift in Sources */,
  9.2000 -				15F0F7AD213594FC002BE853 /* Folder+Imap.swift in Sources */,
  9.2001  				430D73651E9CBD4E00EA6FA9 /* AttachmentsViewOperation.swift in Sources */,
  9.2002  				B7DB7FC82215C57F003968DA /* UIView+Util.swift in Sources */,
  9.2003  				495F607C20B564CD00F47BD6 /* EmailViewController+SizeClasses.swift in Sources */,
  9.2004 -				43313DFC1DEC7F6000C111C8 /* DeleteFoldersOperation.swift in Sources */,
  9.2005  				152A39CC21905C3E00D9F8E4 /* MediaAttachmentPickerProvider.swift in Sources */,
  9.2006  				4351C2CD1F4441190053381F /* commonmark.c in Sources */,
  9.2007  				B722EC651E5B49BA00A2B9D5 /* FolderSectionViewModel.swift in Sources */,
  9.2008 -				150B84C620A5DD0600D8B288 /* UIDCopyOperation.swift in Sources */,
  9.2009  				490CEBA72100EAD500E8579C /* SelfDismissable.swift in Sources */,
  9.2010  				152A39E321905C3E00D9F8E4 /* RecipientTextView.swift in Sources */,
  9.2011 -				1560D1701F6FC99B00A75B39 /* FetchOlderImapMessagesOperation.swift in Sources */,
  9.2012  				43ED53701CC77F95006AB156 /* EmailListViewController.swift in Sources */,
  9.2013 -				432DA7441EE01E3300B30BAA /* MessageSyncServiceProtocol.swift in Sources */,
  9.2014 -				1500199D1F2B2C73003E670A /* Notification+CWServiceClientNotificationParsing.swift in Sources */,
  9.2015  				496C0EE720BC2A880009B5B9 /* EmailDisplayDelegate.swift in Sources */,
  9.2016  				152A39DD21905C3E00D9F8E4 /* AccountCell.swift in Sources */,
  9.2017  				B7DB7FDC221ADDBD003968DA /* UIImageView+Extension.swift in Sources */,
  9.2018 +				37C3C0E62260C64D003E290C /* Log.swift in Sources */,
  9.2019  				43306EC21FE129840045DD00 /* OAuth2Type.swift in Sources */,
  9.2020 -				43CE63CB1DE8830100FAC505 /* CdAccount+pEp.swift in Sources */,
  9.2021  				438052871FE3E1B100ACF729 /* OAuth2AuthorizationFactoryProtocol.swift in Sources */,
  9.2022  				4356FFE52135448600804089 /* ReplyAllPossibleChecker.swift in Sources */,
  9.2023 -				153FC45D202A263D0053CCF1 /* FolderType+IMAP.swift in Sources */,
  9.2024 -				15BA536A20A08B100090F126 /* Account+Extentions.swift in Sources */,
  9.2025  				15255B031F825CD100A2CFC9 /* IdentityImageTool.swift in Sources */,
  9.2026 -				43BBB5E71E267A3800104070 /* EncryptAndSendOperation.swift in Sources */,
  9.2027 -				004A8C5B211316E100203143 /* SelfReferencingOperation.swift in Sources */,
  9.2028  				152A39D121905C3E00D9F8E4 /* AttachmentViewModel.swift in Sources */,
  9.2029  				15547568213931BC005A52D0 /* Folder+Threading.swift in Sources */,
  9.2030  				4330278E1F7BABFF00D685F8 /* GradientView.swift in Sources */,
  9.2031 -				4315E4BF2011FD6900F68763 /* AuthMethod.swift in Sources */,
  9.2032  				434F40961EB0DB5E002FBF0D /* HandshakePartnerTableViewCellViewModel.swift in Sources */,
  9.2033 -				43E9BC641DB518A700AD2352 /* CdFolder+Extension.swift in Sources */,
  9.2034 -				15F0F7B62136F6D1002BE853 /* CdFolderPredicateFactory+IMAP.swift in Sources */,
  9.2035  				15874BD02127493E00A3A4A6 /* LogViewController.swift in Sources */,
  9.2036  				152A39E121905C3E00D9F8E4 /* RecipientCellViewModel+FieldType.swift in Sources */,
  9.2037  				4351C2CC1F4441190053381F /* cmark_ctype.c in Sources */,
  9.2038  				152A39DB21905C3E00D9F8E4 /* CellViewModel.swift in Sources */,
  9.2039 -				432AC3061ECB0C44007DC418 /* CWIMAPMessage+pEp.swift in Sources */,
  9.2040 -				431B047A1DE5772000E40CD3 /* CdMessage+pEp.swift in Sources */,
  9.2041 -				15A75CEA202DE6B300C0DA28 /* ProviderSpecificInformationProtocol.swift in Sources */,
  9.2042  				155050F01FE82356009CEAD2 /* UserNotificationTool.swift in Sources */,
  9.2043  				430D73671E9CC54000EA6FA9 /* AttachmentToLocalURLOperation.swift in Sources */,
  9.2044  				4351C2D21F4441190053381F /* html.c in Sources */,
  9.2045  				152A39DE21905C3E00D9F8E4 /* AccountCellViewModel.swift in Sources */,
  9.2046  				4304FD001EBB8EBB0086DADA /* LanguageListViewController.swift in Sources */,
  9.2047  				430E5F201EBC87A700E5D5D3 /* LanguageListTableViewCell.swift in Sources */,
  9.2048 -				431B04821DE583A000E40CD3 /* CdAttachment+Extension.swift in Sources */,
  9.2049  				49D3BECC20F8F7330043E05D /* LoginViewController.swift in Sources */,
  9.2050  				43425EDB1FE3DE6E004A2728 /* OAuth2ProviderProtocol.swift in Sources */,
  9.2051  				1526596A216230B1006A78DF /* ComposeDataSource.swift in Sources */,
  9.2052  				1554756621393036005A52D0 /* Folder+Extensions.swift in Sources */,
  9.2053  				0069DCFB2110679200846EB1 /* EmailViewController+UIPopoverPresentationControllerDelegate.swift in Sources */,
  9.2054  				43106A192045716000693144 /* OAuth2ConfigurationProtocol+Extension.swift in Sources */,
  9.2055 -				432142661E8FD6A400FBE987 /* ServiceUtil.swift in Sources */,
  9.2056 -				15484B6C2105E26600F9D962 /* LegacyConnectInfoProvider.swift in Sources */,
  9.2057  				43C322051EA89EED005073FB /* HandshakePartnerTableViewCell.swift in Sources */,
  9.2058 -				43E0CA2A1F4AB81600D9BB7E /* Attachment+Extension.swift in Sources */,
  9.2059 -				15BA536C20A08D270090F126 /* UnifiedInbox.swift in Sources */,
  9.2060  				152A39C521905C3E00D9F8E4 /* ComposeTableViewController.swift in Sources */,
  9.2061  				150B8E991FCDACBB00374438 /* AccountSettingsUserInputError.swift in Sources */,
  9.2062  				4351C2DE1F4457620053381F /* NSString+Markdown.m in Sources */,
  9.2063 @@ -3503,51 +2938,30 @@
  9.2064  				1574D09B21186A1D00FEDC93 /* AddToContactsViewController.swift in Sources */,
  9.2065  				15FE1F761FE122D900CC2D97 /* CreditsViewController.swift in Sources */,
  9.2066  				152A39942190587200D9F8E4 /* TextViewInTableViewScrollUtil.swift in Sources */,
  9.2067 -				154F0A802085FC7D00C77D72 /* CdAttachment+Pantomime.swift in Sources */,
  9.2068  				43F9D99A1E92725700F78A1C /* AttachmentsViewHelper.swift in Sources */,
  9.2069  				F7C16A5D21A59187004B44F2 /* FolderViewModelDelegate.swift in Sources */,
  9.2070  				43B10C801EC2EE7F003E849F /* CppDummy.cpp in Sources */,
  9.2071  				15B220501FBF5D6E00CA52BA /* InfoPlist.swift in Sources */,
  9.2072  				15874BD421274BD400A3A4A6 /* TrustedServerSettingCell.swift in Sources */,
  9.2073  				A1014DA71D1173CD00C472A8 /* UIHelper.swift in Sources */,
  9.2074 -				4388A0E42008F8F4008CB98D /* OAuth2AccessTokenProtocol.swift in Sources */,
  9.2075  				43A6E0581E57400E005BEE69 /* RatingReEvaluator.swift in Sources */,
  9.2076  				49C34AF620E4F649009D11CC /* CellDetailTransition.swift in Sources */,
  9.2077  				492EF92A20C18C6C004EAE14 /* DisplayedMessage.swift in Sources */,
  9.2078 -				37A3D6222214338300E11415 /* NetworkReachabilityProtocol.swift in Sources */,
  9.2079 -				15AA6016207CD71D00D57DB4 /* ImapFlags+Pantomime.swift in Sources */,
  9.2080 -				B70A3A9322089D5000EDCE61 /* Log+ASL.swift in Sources */,
  9.2081  				49228A5520D4035100A51E9D /* DetailCellSegue.swift in Sources */,
  9.2082 -				43497B38211C62DE00AC42B0 /* MessageIdentitfying.swift in Sources */,
  9.2083 -				4307C4701ED81F3100A276A4 /* DefaultImapSyncDelegate.swift in Sources */,
  9.2084  				00FD0CE82102014C00BA0C56 /* PrimarySplitViewcontroller+ScreenComposerProtocol.swift in Sources */,
  9.2085 -				434E5A1B20DB9C4600D7F88A /* EmailListViewModel+MessageFolderDelegate.swift in Sources */,
  9.2086 -				431E58F61ED57F6500EFA77F /* AccountVerificationServiceProtocol.swift in Sources */,
  9.2087 -				37FE82E92211D290008F8CF4 /* ReachabilityUtils.swift in Sources */,
  9.2088  				152A39E821905C3E00D9F8E4 /* RecipientCellViewModel.swift in Sources */,
  9.2089 -				43A26FBF1E041BF200AF0B84 /* ImapSyncOperation.swift in Sources */,
  9.2090  				152A39CE21905C3E00D9F8E4 /* ComposeHelpers.swift in Sources */,
  9.2091 -				43EC03481F4AE28F0026E152 /* String+Attachment.swift in Sources */,
  9.2092 -				15BBBC631FD0496800B9DCC8 /* ReportingErrorContainer.swift in Sources */,
  9.2093  				43985D0A2044296D0080FA9A /* OAuth2AuthViewModel.swift in Sources */,
  9.2094 -				150B8E981FCDACBB00374438 /* ErrorPropagator.swift in Sources */,
  9.2095  				49691B1520D7FD0200CA9367 /* MessageViewModelConfigurable.swift in Sources */,
  9.2096 -				15484B682105D5AA00F9D962 /* ConnectInfo.swift in Sources */,
  9.2097  				152A39CF21905C3E00D9F8E4 /* ComposeUtil.swift in Sources */,
  9.2098  				152A39C821905C3E00D9F8E4 /* ComposeViewModel+InitData.swift in Sources */,
  9.2099  				0038494C20D2587F008000EA /* PepPictureComposer.swift in Sources */,
  9.2100  				4356FFE721354A4B00804089 /* ReplyAllPossibleCheckerProtocol.swift in Sources */,
  9.2101  				228038681DC9DE6D00F1CB45 /* TextfieldResponder.swift in Sources */,
  9.2102 -				4360282D1ED6F27600C95FC4 /* NetworkError.swift in Sources */,
  9.2103 -				433C51D31E66CCA900272E19 /* CreateRequiredFoldersOperation.swift in Sources */,
  9.2104 -				4323FE861E83D6FF006785E1 /* ImapFolderBuilder.swift in Sources */,
  9.2105 -				F7C16A5721A56436004B44F2 /* FolderSyncServiceProtocol.swift in Sources */,
  9.2106  				B75FF00B1EFD420F00C57289 /* EmailListViewModel.swift in Sources */,
  9.2107  				4380528B1FE3E2E800ACF729 /* OAuth2AuthorizationURLHandlerProtocol.swift in Sources */,
  9.2108 -				B78CF8291E76E0F1008C1739 /* FilterViewModel.swift in Sources */,
  9.2109  				43293EFB1EB9DD6700EEE010 /* UIViewController+Extension.swift in Sources */,
  9.2110  				152A39D521905C3E00D9F8E4 /* SubjectCellViewModel.swift in Sources */,
  9.2111 -				4341EBD1208A0961004CE6B8 /* QualifyServerIsLocalServiceProtocol.swift in Sources */,
  9.2112  				43D0702F2133DB3F0013B120 /* AppSettings.swift in Sources */,
  9.2113  				00FD0CE62101F7D700BA0C56 /* ScreenComposerProtocol.swift in Sources */,
  9.2114  				4351C2D81F4441190053381F /* references.c in Sources */,
  9.2115 @@ -3567,15 +2981,12 @@
  9.2116  				4351C2D91F4441190053381F /* render.c in Sources */,
  9.2117  				B722EC4D1E5B01B300A2B9D5 /* FolderCellViewModel.swift in Sources */,
  9.2118  				15874BCF2127493E00A3A4A6 /* AccountSettingsTableViewController.swift in Sources */,
  9.2119 -				43122B3E1DF5BB6600610253 /* MySelfOperation.swift in Sources */,
  9.2120  				B7DB7FC72215C57F003968DA /* UIView+Autolayout.swift in Sources */,
  9.2121 -				15547572213FEC4B005A52D0 /* CdMessagePredicateFactory+Extension.swift in Sources */,
  9.2122  				B71EBBBC1E55E4AE00150177 /* FolderTableViewController.swift in Sources */,
  9.2123  				492EF92F20C699D0004EAE14 /* ThreadViewController+TableView.swift in Sources */,
  9.2124  				43D070312133DB920013B120 /* AppSettingsProtocol.swift in Sources */,
  9.2125  				43ED53781CC77F95006AB156 /* SMTPSettingsTableViewController.swift in Sources */,
  9.2126  				15874BC22127493E00A3A4A6 /* SettingCellViewModelProtocols.swift in Sources */,
  9.2127 -				43D755F61F262B37006F933A /* PantomimeError.swift in Sources */,
  9.2128  			);
  9.2129  			runOnlyForDeploymentPostprocessing = 0;
  9.2130  		};
  9.2131 @@ -3585,10 +2996,8 @@
  9.2132  			files = (
  9.2133  				438D253C1D4B9E7500BFF7AA /* MimeTests.swift in Sources */,
  9.2134  				004422CA2179ECD600BDF6DF /* PassiveModeViewModelTest.swift in Sources */,
  9.2135 -				003C0FA720B5581A0093A987 /* SecretTestData.swift in Sources */,
  9.2136  				1555361B207796CE00CDDAFA /* CWInternetAddress+TestUtils.swift in Sources */,
  9.2137  				154D92CF20AC1745009A5868 /* MoveToFolderOperationTest.swift in Sources */,
  9.2138 -				1544BD0221524C9F0075C5A0 /* AttachmentFilterTest.swift in Sources */,
  9.2139  				15A536902155136800CF6204 /* PEPUtilTest.swift in Sources */,
  9.2140  				4918EBFC1E783C70006207FC /* CdMessage+PantomimeTest.swift in Sources */,
  9.2141  				151F7201202A06760057C74D /* CdAccount+TestUtils.swift in Sources */,
  9.2142 @@ -3598,7 +3007,6 @@
  9.2143  				153B2188219472A400497D3D /* BodyCellViewModelTest.swift in Sources */,
  9.2144  				438BA0F5214F89CD001A4A82 /* MailParsingTests.swift in Sources */,
  9.2145  				15A8B8FC20908D2300D2B0B6 /* Keychain+TestUtils.swift in Sources */,
  9.2146 -				431E58FC1ED5926B00EFA77F /* AccountVerificationServiceTests.swift in Sources */,
  9.2147  				0017CD1D2162614400F62F13 /* MoveToFolderCellViewModelTests.swift in Sources */,
  9.2148  				0017CD1B21621E2200F62F13 /* MoveToFolderViewModelTest.swift in Sources */,
  9.2149  				4336229E1DC76B8100133B3D /* MessageModelTests.swift in Sources */,
  9.2150 @@ -3606,6 +3014,7 @@
  9.2151  				43FAA0D41EC9CBC0005BFC4B /* DecryptionTestsInternal.swift in Sources */,
  9.2152  				F73E4F72217F238300CCFFED /* FolderSectionViewModelTests.swift in Sources */,
  9.2153  				15A763D11F72D68000670313 /* KeyChainTest.swift in Sources */,
  9.2154 +				436981C022830AF60006FA2D /* SecretTestData.swift in Sources */,
  9.2155  				43EC75B32164E97800048CFE /* DecryptionUtil.swift in Sources */,
  9.2156  				43C7B9D11CEC4DDF007A612F /* MiscTests.swift in Sources */,
  9.2157  				434DDC2B20D10F9A00755F44 /* EncryptionTests.swift in Sources */,
  9.2158 @@ -3614,7 +3023,6 @@
  9.2159  				15F835281F3B497D00FCE887 /* FetchMessagesOperationTest.swift in Sources */,
  9.2160  				151AD7AD219D74C700FC36FF /* ComposeViewModelTest.swift in Sources */,
  9.2161  				436795F81EE98B9A00B03E23 /* MessageReevalutionTests.swift in Sources */,
  9.2162 -				43EE994E1E4392530060EACE /* FlagImageTests.swift in Sources */,
  9.2163  				00227E6A21635DED000D9BDB /* FilterViewModelTest.swift in Sources */,
  9.2164  				437795C82154D6FD00CC62C2 /* PEPMessage+TestExtension.swift in Sources */,
  9.2165  				153CA6E41FB60D99003C9629 /* DercyptMessagesOperationTest.swift in Sources */,
  9.2166 @@ -3658,27 +3066,25 @@
  9.2167  				151F71FB202A06760057C74D /* MockBackgrounder.swift in Sources */,
  9.2168  				43D51E891DD5D902008B77A8 /* SimpleOperationsTest.swift in Sources */,
  9.2169  				151F71FE202A06760057C74D /* CdMessage+TestUtils.swift in Sources */,
  9.2170 -				151F71F9202A06760057C74D /* NetworkServiceObserver.swift in Sources */,
  9.2171 +				151F71F9202A06760057C74D /* ReplicationServiceObserver.swift in Sources */,
  9.2172  				150E18C0219D8C6C009E9048 /* ComposeViewModelSectionTest.swift in Sources */,
  9.2173  				43F7F07A1F6AD44600BDF151 /* HandshakeTests.swift in Sources */,
  9.2174  				1569AEA520E14DC3002102A0 /* ReUploadTest.swift in Sources */,
  9.2175 +				437027A122315B5700A77AEC /* PEPAppUtilWrappers.swift in Sources */,
  9.2176  				00262058217DE97100DDAFB5 /* AccountSettingsViewModelTest.swift in Sources */,
  9.2177  				004422C82179E3C500BDF6DF /* SettingsCellViewModelTest.swift in Sources */,
  9.2178 -				37A3D61F221429DA00E11415 /* NetworkReachibilityMock.swift in Sources */,
  9.2179  				150707DC21006CD000AA213F /* ComposeUtilTest.swift in Sources */,
  9.2180  				15D439A5216F7E0E00EB3933 /* AccountPickerViewModelTest.swift in Sources */,
  9.2181  				1574D07D2114696B00FEDC93 /* URL+MailToTest.swift in Sources */,
  9.2182  				43C273DD21C9024A002EB4C8 /* LoggerTest.swift in Sources */,
  9.2183  				4356FFEC21356CB600804089 /* ReplyAllPossibleCheckerTest.swift in Sources */,
  9.2184 -				37FE82ED22132B23008F8CF4 /* ReachabilityUtilsTests.swift in Sources */,
  9.2185  				430C80E01D0EADC200CD4582 /* PepAdapterTests.swift in Sources */,
  9.2186  				00DF2C3B2164C53F004EBA6C /* FolderViewModelTest.swift in Sources */,
  9.2187 -				5DEBAA481DE59C3B00FAE12C /* NetworkServiceTests.swift in Sources */,
  9.2188 +				5DEBAA481DE59C3B00FAE12C /* ReplicationServiceTests.swift in Sources */,
  9.2189  				157C05482180756300E530DE /* DocumentAttachmentPickerViewModelTest.swift in Sources */,
  9.2190  				49DCCD2521E8ABA900ABE487 /* SecurePDFScreenshotTest.swift in Sources */,
  9.2191  				151F7200202A06760057C74D /* TestUtil.swift in Sources */,
  9.2192  				43FE8030209995AD00E97AB3 /* QualifyServerIsLocalServiceTest.swift in Sources */,
  9.2193 -				15D439A7216FB77600EB3933 /* UnitTestUtils.swift in Sources */,
  9.2194  				15410D252199ECD700BBF65F /* AttachmentViewModelTest.swift in Sources */,
  9.2195  				152B665C21E508F500FB925F /* Message+FakeMessageTest.swift in Sources */,
  9.2196  				43257C861F50659200DDC7F0 /* StringHTMLExtensionTests.swift in Sources */,
  9.2197 @@ -3696,7 +3102,7 @@
  9.2198  				434C051B20F8BAB6009B271D /* XCUIElement+Extension.swift in Sources */,
  9.2199  				431E65631EEAE65200B8BBFC /* HandshakeUITest.swift in Sources */,
  9.2200  				43B0443B20067D25007BCE3F /* UITestDataProtocol.swift in Sources */,
  9.2201 -				B7745839221C191600664282 /* SecretUITestData.swift in Sources */,
  9.2202 +				4312BE89228439670002129D /* SecretUITestData.swift in Sources */,
  9.2203  			);
  9.2204  			runOnlyForDeploymentPostprocessing = 0;
  9.2205  		};
  9.2206 @@ -3721,6 +3127,10 @@
  9.2207  			children = (
  9.2208  				151DE7DF1FC5D3E200CDC273 /* Base */,
  9.2209  				43C98AC0219C22E8006418B0 /* de */,
  9.2210 +				435171FF229FBC9700D92026 /* fr */,
  9.2211 +				43517209229FC51A00D92026 /* es */,
  9.2212 +				43517213229FC57400D92026 /* ca */,
  9.2213 +				4351721D229FC59E00D92026 /* tr */,
  9.2214  			);
  9.2215  			name = Settings.storyboard;
  9.2216  			sourceTree = "<group>";
  9.2217 @@ -3730,6 +3140,10 @@
  9.2218  			children = (
  9.2219  				151DE7E21FC5D3FA00CDC273 /* Base */,
  9.2220  				43C98AC8219C3691006418B0 /* de */,
  9.2221 +				43517201229FBC9700D92026 /* fr */,
  9.2222 +				4351720B229FC51A00D92026 /* es */,
  9.2223 +				43517215229FC57400D92026 /* ca */,
  9.2224 +				4351721F229FC59E00D92026 /* tr */,
  9.2225  			);
  9.2226  			name = Handshake.storyboard;
  9.2227  			sourceTree = "<group>";
  9.2228 @@ -3739,6 +3153,10 @@
  9.2229  			children = (
  9.2230  				151DE7E51FC5D41600CDC273 /* Base */,
  9.2231  				4372ECD5219C436D00F84099 /* de */,
  9.2232 +				43517203229FBC9700D92026 /* fr */,
  9.2233 +				4351720D229FC51A00D92026 /* es */,
  9.2234 +				43517217229FC57400D92026 /* ca */,
  9.2235 +				43517221229FC59E00D92026 /* tr */,
  9.2236  			);
  9.2237  			name = FolderViews.storyboard;
  9.2238  			sourceTree = "<group>";
  9.2239 @@ -3748,6 +3166,10 @@
  9.2240  			children = (
  9.2241  				155F2D9F20530798001B4B1C /* Base */,
  9.2242  				4372ECD6219C436D00F84099 /* de */,
  9.2243 +				43517204229FBC9700D92026 /* fr */,
  9.2244 +				4351720E229FC51A00D92026 /* es */,
  9.2245 +				43517218229FC57400D92026 /* ca */,
  9.2246 +				43517222229FC59E00D92026 /* tr */,
  9.2247  			);
  9.2248  			name = Reusable.storyboard;
  9.2249  			sourceTree = "<group>";
  9.2250 @@ -3757,6 +3179,10 @@
  9.2251  			children = (
  9.2252  				43980E2B1CBD0BC900A7FC3C /* Base */,
  9.2253  				43C98AC4219C275E006418B0 /* de */,
  9.2254 +				435171FE229FBC9700D92026 /* fr */,
  9.2255 +				43517208229FC51A00D92026 /* es */,
  9.2256 +				43517212229FC57400D92026 /* ca */,
  9.2257 +				4351721C229FC59E00D92026 /* tr */,
  9.2258  			);
  9.2259  			name = Main.storyboard;
  9.2260  			sourceTree = "<group>";
  9.2261 @@ -3765,6 +3191,10 @@
  9.2262  			isa = PBXVariantGroup;
  9.2263  			children = (
  9.2264  				43980E331CBD0BCA00A7FC3C /* Base */,
  9.2265 +				43517202229FBC9700D92026 /* fr */,
  9.2266 +				4351720C229FC51A00D92026 /* es */,
  9.2267 +				43517216229FC57400D92026 /* ca */,
  9.2268 +				43517220229FC59E00D92026 /* tr */,
  9.2269  			);
  9.2270  			name = LaunchScreen.storyboard;
  9.2271  			sourceTree = "<group>";
  9.2272 @@ -3773,6 +3203,10 @@
  9.2273  			isa = PBXVariantGroup;
  9.2274  			children = (
  9.2275  				43C98AC2219C275E006418B0 /* de */,
  9.2276 +				43517207229FBC9800D92026 /* fr */,
  9.2277 +				43517211229FC51A00D92026 /* es */,
  9.2278 +				4351721B229FC57500D92026 /* ca */,
  9.2279 +				43517225229FC59E00D92026 /* tr */,
  9.2280  			);
  9.2281  			name = Localizable.strings;
  9.2282  			sourceTree = "<group>";
  9.2283 @@ -3781,6 +3215,10 @@
  9.2284  			isa = PBXVariantGroup;
  9.2285  			children = (
  9.2286  				43C98AC6219C3691006418B0 /* de */,
  9.2287 +				43517206229FBC9700D92026 /* fr */,
  9.2288 +				43517210229FC51A00D92026 /* es */,
  9.2289 +				4351721A229FC57500D92026 /* ca */,
  9.2290 +				43517224229FC59E00D92026 /* tr */,
  9.2291  			);
  9.2292  			name = InfoPlist.strings;
  9.2293  			sourceTree = "<group>";
  9.2294 @@ -3790,6 +3228,10 @@
  9.2295  			children = (
  9.2296  				491B656120CFE0FD00C2ADDA /* Base */,
  9.2297  				4372ECD7219C436D00F84099 /* de */,
  9.2298 +				43517205229FBC9700D92026 /* fr */,
  9.2299 +				4351720F229FC51A00D92026 /* es */,
  9.2300 +				43517219229FC57500D92026 /* ca */,
  9.2301 +				43517223229FC59E00D92026 /* tr */,
  9.2302  			);
  9.2303  			name = Thread.storyboard;
  9.2304  			sourceTree = "<group>";
  9.2305 @@ -3799,6 +3241,10 @@
  9.2306  			children = (
  9.2307  				B78309C71EAA09040051A2E0 /* Base */,
  9.2308  				43C98ABF219C22E8006418B0 /* de */,
  9.2309 +				43517200229FBC9700D92026 /* fr */,
  9.2310 +				4351720A229FC51A00D92026 /* es */,
  9.2311 +				43517214229FC57400D92026 /* ca */,
  9.2312 +				4351721E229FC59E00D92026 /* tr */,
  9.2313  			);
  9.2314  			name = AccountCreation.storyboard;
  9.2315  			sourceTree = "<group>";
  9.2316 @@ -3864,7 +3310,7 @@
  9.2317  					"$(SRCROOT)/../pEpEngine/src",
  9.2318  					"$(SRCROOT)/pEpForiOS/Markdown/include",
  9.2319  				);
  9.2320 -				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
  9.2321 +				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
  9.2322  				MTL_ENABLE_DEBUG_INFO = YES;
  9.2323  				ONLY_ACTIVE_ARCH = YES;
  9.2324  				OTHER_LDFLAGS = "-ObjC";
  9.2325 @@ -3872,7 +3318,7 @@
  9.2326  				SDKROOT = iphoneos;
  9.2327  				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
  9.2328  				TARGETED_DEVICE_FAMILY = "1,2";
  9.2329 -				VALID_ARCHS = arm64;
  9.2330 +				VALID_ARCHS = "$(inherited)";
  9.2331  			};
  9.2332  			name = Debug;
  9.2333  		};
  9.2334 @@ -3928,7 +3374,7 @@
  9.2335  					"$(SRCROOT)/../pEpEngine/src",
  9.2336  					"$(SRCROOT)/pEpForiOS/Markdown/include",
  9.2337  				);
  9.2338 -				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
  9.2339 +				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
  9.2340  				MTL_ENABLE_DEBUG_INFO = NO;
  9.2341  				OTHER_LDFLAGS = "-ObjC";
  9.2342  				OTHER_SWIFT_FLAGS = "";
  9.2343 @@ -3936,14 +3382,13 @@
  9.2344  				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
  9.2345  				TARGETED_DEVICE_FAMILY = "1,2";
  9.2346  				VALIDATE_PRODUCT = YES;
  9.2347 -				VALID_ARCHS = arm64;
  9.2348 +				VALID_ARCHS = "$(inherited)";
  9.2349  			};
  9.2350  			name = Release;
  9.2351  		};
  9.2352  		43980E4F1CBD0BCA00A7FC3C /* Debug */ = {
  9.2353  			isa = XCBuildConfiguration;
  9.2354  			buildSettings = {
  9.2355 -				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
  9.2356  				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  9.2357  				CODE_SIGN_ENTITLEMENTS = pEp.entitlements;
  9.2358  				CODE_SIGN_IDENTITY = "iPhone Developer";
  9.2359 @@ -3953,7 +3398,6 @@
  9.2360  				FRAMEWORK_SEARCH_PATHS = "";
  9.2361  				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
  9.2362  				HEADER_SEARCH_PATHS = (
  9.2363 -					"$(SRCROOT)/../pantomime-iOS/pantomime-lib/Framework",
  9.2364  					"$(SRCROOT)/../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter",
  9.2365  					"$(SDKROOT)/usr/include/libxml2",
  9.2366  					"$(SRCROOT)/../libAccountSettings/include",
  9.2367 @@ -3964,7 +3408,7 @@
  9.2368  					"$(SRCROOT)/../AppAuth-iOS/Source/iOS",
  9.2369  				);
  9.2370  				INFOPLIST_FILE = pEpForiOS/Info.plist;
  9.2371 -				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
  9.2372 +				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
  9.2373  				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  9.2374  				ONLY_ACTIVE_ARCH = "$(inherited)";
  9.2375  				OTHER_SWIFT_FLAGS = "-DDEBUG_LOGGING -D DEBUG $(inherited)";
  9.2376 @@ -3976,16 +3420,14 @@
  9.2377  				SWIFT_COMPILATION_MODE = singlefile;
  9.2378  				SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)//pEpForiOS/pEpForiOS-Bridging-Header.h";
  9.2379  				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
  9.2380 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2381 -				SWIFT_VERSION = 4.0;
  9.2382 -				VALID_ARCHS = "arm64 armv7s armv7";
  9.2383 +				SWIFT_VERSION = 5.0;
  9.2384 +				VALID_ARCHS = "$(inherited)";
  9.2385  			};
  9.2386  			name = Debug;
  9.2387  		};
  9.2388  		43980E501CBD0BCA00A7FC3C /* Release */ = {
  9.2389  			isa = XCBuildConfiguration;
  9.2390  			buildSettings = {
  9.2391 -				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
  9.2392  				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  9.2393  				CODE_SIGN_ENTITLEMENTS = pEp.entitlements;
  9.2394  				CODE_SIGN_IDENTITY = "iPhone Developer";
  9.2395 @@ -3994,7 +3436,6 @@
  9.2396  				DEVELOPMENT_TEAM = NQLYU6MGPN;
  9.2397  				FRAMEWORK_SEARCH_PATHS = "";
  9.2398  				HEADER_SEARCH_PATHS = (
  9.2399 -					"$(SRCROOT)/../pantomime-iOS/pantomime-lib/Framework",
  9.2400  					"$(SRCROOT)/../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter",
  9.2401  					"$(SDKROOT)/usr/include/libxml2",
  9.2402  					"$(SRCROOT)/../libAccountSettings/include",
  9.2403 @@ -4005,7 +3446,7 @@
  9.2404  					"$(SRCROOT)/../AppAuth-iOS/Source/iOS",
  9.2405  				);
  9.2406  				INFOPLIST_FILE = pEpForiOS/Info.plist;
  9.2407 -				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
  9.2408 +				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
  9.2409  				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  9.2410  				ONLY_ACTIVE_ARCH = "$(inherited)";
  9.2411  				PRODUCT_BUNDLE_IDENTIFIER = security.pEp;
  9.2412 @@ -4013,11 +3454,10 @@
  9.2413  				PRODUCT_NAME = "$(TARGET_NAME)";
  9.2414  				PROVISIONING_PROFILE = "";
  9.2415  				PROVISIONING_PROFILE_SPECIFIER = "";
  9.2416 -				SWIFT_COMPILATION_MODE = singlefile;
  9.2417 +				SWIFT_COMPILATION_MODE = wholemodule;
  9.2418  				SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)//pEpForiOS/pEpForiOS-Bridging-Header.h";
  9.2419 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2420 -				SWIFT_VERSION = 4.0;
  9.2421 -				VALID_ARCHS = "arm64 armv7s armv7";
  9.2422 +				SWIFT_VERSION = 5.0;
  9.2423 +				VALID_ARCHS = "$(inherited)";
  9.2424  			};
  9.2425  			name = Release;
  9.2426  		};
  9.2427 @@ -4033,10 +3473,8 @@
  9.2428  				PRODUCT_BUNDLE_IDENTIFIER = "net.pep-security.apps.pEpForiOSTests";
  9.2429  				PRODUCT_NAME = "$(TARGET_NAME)";
  9.2430  				SWIFT_COMPILATION_MODE = singlefile;
  9.2431 -				SWIFT_OBJC_BRIDGING_HEADER = "pEpForiOSTests/pEpForiOSTests-Bridging-Header.h";
  9.2432  				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
  9.2433 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2434 -				SWIFT_VERSION = 4.0;
  9.2435 +				SWIFT_VERSION = 5.0;
  9.2436  				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/pEp.app/pEp";
  9.2437  			};
  9.2438  			name = Debug;
  9.2439 @@ -4051,10 +3489,8 @@
  9.2440  				ONLY_ACTIVE_ARCH = "$(inherited)";
  9.2441  				PRODUCT_BUNDLE_IDENTIFIER = "net.pep-security.apps.pEpForiOSTests";
  9.2442  				PRODUCT_NAME = "$(TARGET_NAME)";
  9.2443 -				SWIFT_COMPILATION_MODE = singlefile;
  9.2444 -				SWIFT_OBJC_BRIDGING_HEADER = "pEpForiOSTests/pEpForiOSTests-Bridging-Header.h";
  9.2445 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2446 -				SWIFT_VERSION = 4.0;
  9.2447 +				SWIFT_COMPILATION_MODE = wholemodule;
  9.2448 +				SWIFT_VERSION = 5.0;
  9.2449  				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/pEp.app/pEp";
  9.2450  			};
  9.2451  			name = Release;
  9.2452 @@ -4072,8 +3508,7 @@
  9.2453  				PRODUCT_NAME = "$(TARGET_NAME)";
  9.2454  				PROVISIONING_PROFILE = "";
  9.2455  				PROVISIONING_PROFILE_SPECIFIER = "";
  9.2456 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2457 -				SWIFT_VERSION = 4.0;
  9.2458 +				SWIFT_VERSION = 5.0;
  9.2459  				TEST_TARGET_NAME = pEp;
  9.2460  			};
  9.2461  			name = Debug;
  9.2462 @@ -4090,8 +3525,7 @@
  9.2463  				PRODUCT_NAME = "$(TARGET_NAME)";
  9.2464  				PROVISIONING_PROFILE = "";
  9.2465  				PROVISIONING_PROFILE_SPECIFIER = "";
  9.2466 -				SWIFT_SWIFT3_OBJC_INFERENCE = Default;
  9.2467 -				SWIFT_VERSION = 4.0;
  9.2468 +				SWIFT_VERSION = 5.0;
  9.2469  				TEST_TARGET_NAME = pEp;
  9.2470  			};
  9.2471  			name = Release;
    10.1 --- a/pEpForiOS.xcodeproj/xcshareddata/xcschemes/pEp.xcscheme	Thu May 09 11:47:04 2019 +0200
    10.2 +++ b/pEpForiOS.xcodeproj/xcshareddata/xcschemes/pEp.xcscheme	Thu Jun 06 17:42:26 2019 +0200
    10.3 @@ -1,6 +1,6 @@
    10.4  <?xml version="1.0" encoding="UTF-8"?>
    10.5  <Scheme
    10.6 -   LastUpgradeVersion = "0940"
    10.7 +   LastUpgradeVersion = "1010"
    10.8     version = "1.3">
    10.9     <BuildAction
   10.10        parallelizeBuildables = "NO"
   10.11 @@ -56,6 +56,20 @@
   10.12              buildForAnalyzing = "YES">
   10.13              <BuildableReference
   10.14                 BuildableIdentifier = "primary"
   10.15 +               BlueprintIdentifier = "43E3985A221D7E56008E7983"
   10.16 +               BuildableName = "PEPObjCAdapterFramework.framework"
   10.17 +               BlueprintName = "PEPObjCAdapterFramework"
   10.18 +               ReferencedContainer = "container:../pEpObjCAdapter/pEpObjCAdapter.xcodeproj">
   10.19 +            </BuildableReference>
   10.20 +         </BuildActionEntry>
   10.21 +         <BuildActionEntry
   10.22 +            buildForTesting = "YES"
   10.23 +            buildForRunning = "YES"
   10.24 +            buildForProfiling = "YES"
   10.25 +            buildForArchiving = "YES"
   10.26 +            buildForAnalyzing = "YES">
   10.27 +            <BuildableReference
   10.28 +               BuildableIdentifier = "primary"
   10.29                 BlueprintIdentifier = "43CB60811DA4EB4E0015281E"
   10.30                 BuildableName = "MessageModel.framework"
   10.31                 BlueprintName = "MessageModel"
   10.32 @@ -98,38 +112,10 @@
   10.33              buildForAnalyzing = "YES">
   10.34              <BuildableReference
   10.35                 BuildableIdentifier = "primary"
   10.36 -               BlueprintIdentifier = "43980E5A1CBD1B3E00A7FC3C"
   10.37 -               BuildableName = "libPantomimeStatic.a"
   10.38 -               BlueprintName = "PantomimeStatic"
   10.39 -               ReferencedContainer = "container:../pantomime-iOS/Pantomime.xcodeproj">
   10.40 -            </BuildableReference>
   10.41 -         </BuildActionEntry>
   10.42 -         <BuildActionEntry
   10.43 -            buildForTesting = "YES"
   10.44 -            buildForRunning = "YES"
   10.45 -            buildForProfiling = "YES"
   10.46 -            buildForArchiving = "YES"
   10.47 -            buildForAnalyzing = "YES">
   10.48 -            <BuildableReference
   10.49 -               BuildableIdentifier = "primary"
   10.50 -               BlueprintIdentifier = "352988A91AEF964100FA7E2E"
   10.51 -               BuildableName = "libpEpObjCAdapter.a"
   10.52 -               BlueprintName = "pEpObjCAdapter"
   10.53 -               ReferencedContainer = "container:../pEpObjCAdapter/pEpObjCAdapter.xcodeproj">
   10.54 -            </BuildableReference>
   10.55 -         </BuildActionEntry>
   10.56 -         <BuildActionEntry
   10.57 -            buildForTesting = "YES"
   10.58 -            buildForRunning = "YES"
   10.59 -            buildForProfiling = "YES"
   10.60 -            buildForArchiving = "YES"
   10.61 -            buildForAnalyzing = "YES">
   10.62 -            <BuildableReference
   10.63 -               BuildableIdentifier = "primary"
   10.64 -               BlueprintIdentifier = "B72A64D71EC0525500F71131"
   10.65 -               BuildableName = "AccountSettingsAdapterTests.xctest"
   10.66 -               BlueprintName = "AccountSettingsAdapterTests"
   10.67 -               ReferencedContainer = "container:../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter.xcodeproj">
   10.68 +               BlueprintIdentifier = "4329CA572238FCBF007D377E"
   10.69 +               BuildableName = "PantomimeFramework.framework"
   10.70 +               BlueprintName = "PantomimeFramework"
   10.71 +               ReferencedContainer = "container:../pantomime-iOS/PantomimeFramework/PantomimeFramework.xcodeproj">
   10.72              </BuildableReference>
   10.73           </BuildActionEntry>
   10.74           <BuildActionEntry
   10.75 @@ -146,6 +132,34 @@
   10.76                 ReferencedContainer = "container:../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter.xcodeproj">
   10.77              </BuildableReference>
   10.78           </BuildActionEntry>
   10.79 +         <BuildActionEntry
   10.80 +            buildForTesting = "YES"
   10.81 +            buildForRunning = "NO"
   10.82 +            buildForProfiling = "NO"
   10.83 +            buildForArchiving = "NO"
   10.84 +            buildForAnalyzing = "NO">
   10.85 +            <BuildableReference
   10.86 +               BuildableIdentifier = "primary"
   10.87 +               BlueprintIdentifier = "B72A64D71EC0525500F71131"
   10.88 +               BuildableName = "AccountSettingsAdapterTests.xctest"
   10.89 +               BlueprintName = "AccountSettingsAdapterTests"
   10.90 +               ReferencedContainer = "container:../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter.xcodeproj">
   10.91 +            </BuildableReference>
   10.92 +         </BuildActionEntry>
   10.93 +         <BuildActionEntry
   10.94 +            buildForTesting = "YES"
   10.95 +            buildForRunning = "NO"
   10.96 +            buildForProfiling = "NO"
   10.97 +            buildForArchiving = "NO"
   10.98 +            buildForAnalyzing = "NO">
   10.99 +            <BuildableReference
  10.100 +               BuildableIdentifier = "primary"
  10.101 +               BlueprintIdentifier = "43980E441CBD0BCA00A7FC3C"
  10.102 +               BuildableName = "pEpForiOSUITests.xctest"
  10.103 +               BlueprintName = "pEpForiOSUITests"
  10.104 +               ReferencedContainer = "container:pEpForiOS.xcodeproj">
  10.105 +            </BuildableReference>
  10.106 +         </BuildActionEntry>
  10.107        </BuildActionEntries>
  10.108     </BuildAction>
  10.109     <TestAction
  10.110 @@ -171,16 +185,6 @@
  10.111              skipped = "NO">
  10.112              <BuildableReference
  10.113                 BuildableIdentifier = "primary"
  10.114 -               BlueprintIdentifier = "43E854CE1CB7EA9B006867C0"
  10.115 -               BuildableName = "PantomimeTests.xctest"
  10.116 -               BlueprintName = "PantomimeTests"
  10.117 -               ReferencedContainer = "container:../pantomime-iOS/Pantomime.xcodeproj">
  10.118 -            </BuildableReference>
  10.119 -         </TestableReference>
  10.120 -         <TestableReference
  10.121 -            skipped = "NO">
  10.122 -            <BuildableReference
  10.123 -               BuildableIdentifier = "primary"
  10.124                 BlueprintIdentifier = "43CB608A1DA4EB4E0015281E"
  10.125                 BuildableName = "MessageModelTests.xctest"
  10.126                 BlueprintName = "MessageModelTests"
  10.127 @@ -217,6 +221,16 @@
  10.128                 ReferencedContainer = "container:subModules/pEpIOSToolbox/pEpIOSToolbox.xcodeproj">
  10.129              </BuildableReference>
  10.130           </TestableReference>
  10.131 +         <TestableReference
  10.132 +            skipped = "NO">
  10.133 +            <BuildableReference
  10.134 +               BuildableIdentifier = "primary"
  10.135 +               BlueprintIdentifier = "4329CB8622391DBD007D377E"
  10.136 +               BuildableName = "PantomimeFrameworkTests.xctest"
  10.137 +               BlueprintName = "PantomimeFrameworkTests"
  10.138 +               ReferencedContainer = "container:../pantomime-iOS/PantomimeFramework/PantomimeFramework.xcodeproj">
  10.139 +            </BuildableReference>
  10.140 +         </TestableReference>
  10.141        </Testables>
  10.142        <MacroExpansion>
  10.143           <BuildableReference
  10.144 @@ -255,7 +269,7 @@
  10.145        stopOnEveryUBSanitizerIssue = "YES"
  10.146        stopOnEveryMainThreadCheckerIssue = "YES"
  10.147        debugServiceExtension = "internal"
  10.148 -      allowLocationSimulation = "YES">
  10.149 +      allowLocationSimulation = "NO">
  10.150        <BuildableProductRunnable
  10.151           runnableDebuggingMode = "0">
  10.152           <BuildableReference
  10.153 @@ -285,16 +299,6 @@
  10.154           </EnvironmentVariable>
  10.155        </EnvironmentVariables>
  10.156        <AdditionalOptions>
  10.157 -         <AdditionalOption
  10.158 -            key = "NSZombieEnabled"
  10.159 -            value = "YES"
  10.160 -            isEnabled = "YES">
  10.161 -         </AdditionalOption>
  10.162 -         <AdditionalOption
  10.163 -            key = "MallocScribble"
  10.164 -            value = ""
  10.165 -            isEnabled = "YES">
  10.166 -         </AdditionalOption>
  10.167        </AdditionalOptions>
  10.168     </LaunchAction>
  10.169     <ProfileAction
    11.1 --- a/pEpForiOS.xcworkspace/contents.xcworkspacedata	Thu May 09 11:47:04 2019 +0200
    11.2 +++ b/pEpForiOS.xcworkspace/contents.xcworkspacedata	Thu Jun 06 17:42:26 2019 +0200
    11.3 @@ -14,7 +14,7 @@
    11.4        location = "container:../pEpObjCAdapter/pEpObjCAdapter.xcodeproj">
    11.5     </FileRef>
    11.6     <FileRef
    11.7 -      location = "container:../pantomime-iOS/Pantomime.xcodeproj">
    11.8 +      location = "container:../pantomime-iOS/PantomimeFramework/PantomimeFramework.xcodeproj">
    11.9     </FileRef>
   11.10     <FileRef
   11.11        location = "container:../libAccountSettings/xcode/AccountSettingsAdapter/AccountSettingsAdapter.xcodeproj">
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/pEpForiOS.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings	Thu Jun 06 17:42:26 2019 +0200
    12.3 @@ -0,0 +1,5 @@
    12.4 +<?xml version="1.0" encoding="UTF-8"?>
    12.5 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    12.6 +<plist version="1.0">
    12.7 +<dict/>
    12.8 +</plist>
    13.1 --- a/pEpForiOS/AppDelegate.swift	Thu May 09 11:47:04 2019 +0200
    13.2 +++ b/pEpForiOS/AppDelegate.swift	Thu Jun 06 17:42:26 2019 +0200
    13.3 @@ -7,8 +7,10 @@
    13.4  //
    13.5  
    13.6  import CoreData
    13.7 +
    13.8  import pEpIOSToolbox
    13.9  import MessageModel
   13.10 +import PEPObjCAdapterFramework
   13.11  
   13.12  @UIApplicationMain
   13.13  class AppDelegate: UIResponder, UIApplicationDelegate {
   13.14 @@ -17,12 +19,7 @@
   13.15      var appConfig: AppConfig?
   13.16  
   13.17      /** The SMTP/IMAP backend */
   13.18 -    var networkService: NetworkService?
   13.19 -
   13.20 -    /**
   13.21 -     UI triggerable actions for syncing messages.
   13.22 -     */
   13.23 -    var messageSyncService: MessageSyncService?
   13.24 +    var messageModelService: MessageModelService?
   13.25  
   13.26      /**
   13.27       Error Handler to connect backend with UI
   13.28 @@ -35,21 +32,21 @@
   13.29  
   13.30      let mySelfQueue = LimitedOperationQueue()
   13.31  
   13.32 -    let sendLayerDelegate = DefaultUISendLayerDelegate()
   13.33 -
   13.34      /**
   13.35       This is used to handle OAuth2 requests.
   13.36       */
   13.37      let oauth2Provider = OAuth2ProviderFactory().oauth2Provider()
   13.38  
   13.39 -    var syncUserActionsAndCleanupbackgroundTaskId = UIBackgroundTaskInvalid
   13.40 -    var mySelfTaskId = UIBackgroundTaskInvalid
   13.41 +    var syncUserActionsAndCleanupbackgroundTaskId = UIBackgroundTaskIdentifier.invalid
   13.42 +    var mySelfTaskId = UIBackgroundTaskIdentifier.invalid
   13.43  
   13.44      /**
   13.45       Set to true whever the app goes into background, so the main session gets cleaned up.
   13.46       */
   13.47      var shouldDestroySession = false
   13.48  
   13.49 +    let notifyHandshakeDelegate: PEPNotifyHandshakeDelegate = NotifyHandshakeDelegate()
   13.50 +
   13.51      func applicationDirectory() -> URL? {
   13.52          let fm = FileManager.default
   13.53          let dirs = fm.urls(for: .libraryDirectory, in: .userDomainMask)
   13.54 @@ -58,7 +55,7 @@
   13.55  
   13.56      private func setupInitialViewController() -> Bool {
   13.57          guard let appConfig = appConfig else {
   13.58 -            Logger.appDelegateLogger.errorAndCrash("No AppConfig")
   13.59 +            Log.shared.errorAndCrash("No AppConfig")
   13.60              return false
   13.61          }
   13.62          let mainStoryboard: UIStoryboard = UIStoryboard(name: "FolderViews", bundle: nil)
   13.63 @@ -66,7 +63,7 @@
   13.64              let navController = initialNVC.viewControllers.first as? UINavigationController,
   13.65              let rootVC = navController.rootViewController as? FolderTableViewController
   13.66              else {
   13.67 -                Logger.appDelegateLogger.errorAndCrash("Problem initializing UI")
   13.68 +                Log.shared.errorAndCrash("Problem initializing UI")
   13.69                  return false
   13.70          }
   13.71          rootVC.appConfig = appConfig
   13.72 @@ -81,27 +78,24 @@
   13.73      /// Signals al services to start/resume.
   13.74      /// Also signals it is save to use PEPSessions (again)
   13.75      private func startServices() {
   13.76 -        networkService?.start()
   13.77 +        messageModelService?.start()
   13.78      }
   13.79  
   13.80      /// Signals all PEPSession users to stop using a session as soon as possible.
   13.81 -    /// NetworkService will assure all local changes triggered by the user are synced to the server
   13.82 +    /// ReplicationService will assure all local changes triggered by the user are synced to the server
   13.83      /// and call it's delegate (me) after the last sync operation has finished.
   13.84      private func stopUsingPepSession() {
   13.85          syncUserActionsAndCleanupbackgroundTaskId =
   13.86 -            application.beginBackgroundTask(expirationHandler: { [weak self] in
   13.87 -                guard let me = self else {
   13.88 -                    Logger.frontendLogger.lostMySelf()
   13.89 -                    return
   13.90 -                }
   13.91 -                Logger.appDelegateLogger.errorAndCrash(
   13.92 +            application.beginBackgroundTask(expirationHandler: { [unowned self] in
   13.93 +                Log.shared.errorAndCrash(
   13.94                      "syncUserActionsAndCleanupbackgroundTask with ID %{public}@ expired",
   13.95 -                    me.syncUserActionsAndCleanupbackgroundTaskId)
   13.96 -                // We migh want to call some (yet unexisting) emergency shutdown on NetworkService here
   13.97 -                // that brutally shuts down everything.
   13.98 -                me.application.endBackgroundTask(me.syncUserActionsAndCleanupbackgroundTaskId)
   13.99 +                    self.syncUserActionsAndCleanupbackgroundTaskId as CVarArg)
  13.100 +                // We migh want to call some (yet unexisting) emergency shutdown on
  13.101 +                // ReplicationService here that brutally shuts down everything.
  13.102 +                self.application.endBackgroundTask(UIBackgroundTaskIdentifier(
  13.103 +                    rawValue: self.syncUserActionsAndCleanupbackgroundTaskId.rawValue))
  13.104              })
  13.105 -        networkService?.processAllUserActionsAndstop()
  13.106 +        messageModelService?.processAllUserActionsAndStop()
  13.107      }
  13.108  
  13.109      func cleanupPEPSessionIfNeeded() {
  13.110 @@ -111,32 +105,23 @@
  13.111      }
  13.112  
  13.113      func kickOffMySelf() {
  13.114 -        mySelfTaskId = application.beginBackgroundTask(expirationHandler: { [weak self] in
  13.115 -            guard let me = self else {
  13.116 -                Logger.frontendLogger.lostMySelf()
  13.117 +        mySelfTaskId = application.beginBackgroundTask(expirationHandler: { [unowned self] in
  13.118 +            Log.shared.log("mySelfTaskId with ID expired.")
  13.119 +            // We migh want to call some (yet unexisting) emergency shutdown on
  13.120 +            // ReplicationService here here that brutally shuts down everything.
  13.121 +            self.application.endBackgroundTask(
  13.122 +                UIBackgroundTaskIdentifier(rawValue:self.mySelfTaskId.rawValue))
  13.123 +        })
  13.124 +        let op = MySelfOperation()
  13.125 +        op.completionBlock = { [unowned self] in
  13.126 +            // We might be the last service that finishes, so we have to cleanup.
  13.127 +            self.cleanupPEPSessionIfNeeded()
  13.128 +            if self.mySelfTaskId == UIBackgroundTaskIdentifier.invalid {
  13.129                  return
  13.130              }
  13.131 -            Logger.appDelegateLogger.log(
  13.132 -                "mySelfTaskId with ID %{public}@ expired.",
  13.133 -                me.mySelfTaskId)
  13.134 -            // We migh want to call some (yet unexisting) emergency shutdown on NetworkService here
  13.135 -            // that brutally shuts down everything.
  13.136 -            me.application.endBackgroundTask(me.mySelfTaskId)
  13.137 -        })
  13.138 -        let op = MySelfOperation()
  13.139 -        op.completionBlock = { [weak self] in
  13.140 -            guard let me = self else {
  13.141 -                Logger.frontendLogger.lostMySelf()
  13.142 -                return
  13.143 -            }
  13.144 -            // We might be the last service that finishes, so we have to cleanup.
  13.145 -            self?.cleanupPEPSessionIfNeeded()
  13.146 -            if me.mySelfTaskId == UIBackgroundTaskInvalid {
  13.147 -                return
  13.148 -            }
  13.149 -            me.application.endBackgroundTask(me.mySelfTaskId)
  13.150 -            me.mySelfTaskId = UIBackgroundTaskInvalid
  13.151 -
  13.152 +            self.application.endBackgroundTask(
  13.153 +                UIBackgroundTaskIdentifier(rawValue: self.mySelfTaskId.rawValue))
  13.154 +            self.mySelfTaskId = UIBackgroundTaskIdentifier.invalid
  13.155          }
  13.156          mySelfQueue.addOperation(op)
  13.157      }
  13.158 @@ -150,7 +135,7 @@
  13.159                                           storeURL: nil,
  13.160                                           options: options)
  13.161          } catch {
  13.162 -            Logger.appDelegateLogger.errorAndCrash("Error while Loading DataStack")
  13.163 +            Log.shared.errorAndCrash("Error while Loading DataStack")
  13.164          }
  13.165      }
  13.166  
  13.167 @@ -167,6 +152,7 @@
  13.168          return false
  13.169      }
  13.170  
  13.171 +    //!!!: uses CD. Must go away (rm? else to MM)
  13.172      /**
  13.173       If pEp has been reinitialized, delete all folders and messsages.
  13.174       */
  13.175 @@ -191,12 +177,10 @@
  13.176      }
  13.177  
  13.178      private func setupServices() {
  13.179 -        let theMessageSyncService = MessageSyncService()
  13.180 -        messageSyncService = theMessageSyncService
  13.181 -        let theAppConfig = AppConfig(mySelfer: self,
  13.182 -                                     messageSyncService: theMessageSyncService,
  13.183 -                                     errorPropagator: errorPropagator,
  13.184 -                                     oauth2AuthorizationFactory: oauth2Provider)
  13.185 +        let theAppConfig = AppConfig(
  13.186 +            mySelfer: self,
  13.187 +            errorPropagator: errorPropagator,
  13.188 +            oauth2AuthorizationFactory: oauth2Provider)
  13.189          appConfig = theAppConfig
  13.190          // This is a very dirty hack!! See SecureWebViewController docs for details.
  13.191          SecureWebViewController.appConfigDirtyHack = theAppConfig
  13.192 @@ -206,44 +190,56 @@
  13.193          // TODO: IOS-1276 set MessageModelConfig.logger
  13.194  
  13.195          loadCoreDataStack()
  13.196 -
  13.197 -        networkService = NetworkService(mySelfer: self, errorPropagator: errorPropagator)
  13.198 -        networkService?.sendLayerDelegate = sendLayerDelegate
  13.199 -        networkService?.delegate = self
  13.200 -        CdAccount.sendLayer = networkService
  13.201 +        messageModelService = MessageModelService(
  13.202 +            mySelfer: self,
  13.203 +            errorPropagator: errorPropagator,
  13.204 +            notifyHandShakeDelegate: notifyHandshakeDelegate)
  13.205 +        messageModelService?.delegate = self
  13.206      }
  13.207  
  13.208      // Safely restarts all services
  13.209      private func shutdownAndPrepareServicesForRestart() {
  13.210          // We cancel the Network Service to make sure it is idle and ready for a clean restart.
  13.211 -        // The actual restart of the services happens in NetworkServiceDelegate callbacks.
  13.212 -        networkService?.cancel()
  13.213 +        // The actual restart of the services happens in ReplicationServiceDelegate callbacks.
  13.214 +        messageModelService?.cancel()
  13.215      }
  13.216  
  13.217 -    private func prepareUserNotifications() {
  13.218 +    private func askUserForPermissions() {
  13.219          UserNotificationTool.resetApplicationIconBadgeNumber()
  13.220 -        UserNotificationTool.askForPermissions() { granted in
  13.221 +        UserNotificationTool.askForPermissions() { [weak self] _ in
  13.222              // We do not care about whether or not the user granted permissions to
  13.223              // post notifications here (e.g. we ignore granted)
  13.224              // The calls are nested to avoid simultaniously showing permissions alert for notifications
  13.225              // and contact access.
  13.226 -            DispatchQueue.global(qos: .userInitiated).async {
  13.227 -                MessageModel.perform {
  13.228 -                    AddressBook.checkAndTransfer()
  13.229 +            self?.askForContactAccessPermissionsAndImportContacts()
  13.230 +        }
  13.231 +    }
  13.232 +
  13.233 +    private func askForContactAccessPermissionsAndImportContacts() {
  13.234 +        DispatchQueue.global(qos: .userInitiated).async { [weak self] in
  13.235 +            if AddressBook.shared.isAuthorized() {
  13.236 +                DispatchQueue.main.async {
  13.237 +                    self?.importContacts()
  13.238                  }
  13.239              }
  13.240          }
  13.241      }
  13.242  
  13.243 +    private func importContacts() {
  13.244 +        DispatchQueue.global(qos: .background).async { //!!!: Must become background task. Or stoped when going to background imo.
  13.245 +            AddressBook.shared.transferContacts()
  13.246 +        }
  13.247 +    }
  13.248 +
  13.249      // MARK: - UIApplicationDelegate
  13.250  
  13.251      func applicationDidReceiveMemoryWarning(_ application: UIApplication) {
  13.252 -        Logger.appDelegateLogger.log("applicationDidReceiveMemoryWarning")
  13.253 +        Log.shared.log("applicationDidReceiveMemoryWarning")
  13.254      }
  13.255  
  13.256      func application(
  13.257          _ application: UIApplication, didFinishLaunchingWithOptions
  13.258 -        launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  13.259 +        launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  13.260  
  13.261          if MiscUtil.isUnitTest() {
  13.262              // If unit tests are running, leave the stage for them
  13.263 @@ -258,10 +254,10 @@
  13.264          let pEpReInitialized = deleteManagementDBIfRequired()
  13.265  
  13.266          setupServices()
  13.267 -        Logger.appDelegateLogger.log("Library url: %{public}@", String(describing: applicationDirectory()))
  13.268 +        Log.shared.log("Library url: %{public}@", String(describing: applicationDirectory()))
  13.269          deleteAllFolders(pEpReInitialized: pEpReInitialized)
  13.270  
  13.271 -        prepareUserNotifications()
  13.272 +        askUserForPermissions()
  13.273  
  13.274          let result = setupInitialViewController()
  13.275  
  13.276 @@ -282,11 +278,7 @@
  13.277      }
  13.278  
  13.279      func applicationWillEnterForeground(_ application: UIApplication) {
  13.280 -        DispatchQueue.global(qos: .userInitiated).async {
  13.281 -            MessageModel.perform {
  13.282 -                AddressBook.checkAndTransfer()
  13.283 -            }
  13.284 -        }
  13.285 +        importContacts()
  13.286          // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
  13.287      }
  13.288  
  13.289 @@ -319,40 +311,36 @@
  13.290      func application(_ application: UIApplication, performFetchWithCompletionHandler
  13.291          completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
  13.292          
  13.293 -        guard let networkService = networkService else {
  13.294 -            Logger.appDelegateLogger.error("no networkService")
  13.295 +        guard let messageModelService = messageModelService else {
  13.296 +            Log.shared.error("no networkService")
  13.297              return
  13.298          }
  13.299          
  13.300 -        networkService.checkForNewMails() {[weak self] (numMails: Int?) in
  13.301 -            guard let me = self else {
  13.302 -                Logger.frontendLogger.lostMySelf()
  13.303 -                return
  13.304 -            }
  13.305 +        messageModelService.checkForNewMails() {[unowned self] (numMails: Int?) in
  13.306              guard let numMails = numMails else {
  13.307 -                me.cleanupAndCall(completionHandler: completionHandler, result: .failed)
  13.308 +                self.cleanupAndCall(completionHandler: completionHandler, result: .failed)
  13.309                  return
  13.310              }
  13.311              switch numMails {
  13.312              case 0:
  13.313 -                me.cleanupAndCall(completionHandler: completionHandler, result: .noData)
  13.314 +                self.cleanupAndCall(completionHandler: completionHandler, result: .noData)
  13.315              default:
  13.316 -                me.informUser(numNewMails: numMails) {
  13.317 -                    me.cleanupAndCall(completionHandler: completionHandler, result: .newData)
  13.318 +                self.informUser(numNewMails: numMails) {
  13.319 +                    self.cleanupAndCall(completionHandler: completionHandler, result: .newData)
  13.320                  }
  13.321              }
  13.322          }
  13.323      }
  13.324  
  13.325      func application(_ app: UIApplication, open url: URL,
  13.326 -                     options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
  13.327 +                     options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
  13.328          // Unclear if this is needed, presumabley doesn't get invoked for OAuth2 because
  13.329          // SFSafariViewController is involved there.
  13.330          return oauth2Provider.processAuthorizationRedirect(url: url)
  13.331      }
  13.332  
  13.333      func application(_ application: UIApplication, continue userActivity: NSUserActivity,
  13.334 -                     restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
  13.335 +                     restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
  13.336          if userActivity.activityType == NSUserActivityTypeBrowsingWeb,
  13.337              let theUrl = userActivity.webpageURL {
  13.338              return oauth2Provider.processAuthorizationRedirect(url: theUrl)
  13.339 @@ -377,13 +365,14 @@
  13.340      }
  13.341  }
  13.342  
  13.343 -// MARK: - NetworkServiceDelegate
  13.344 +// MARK: - ReplicationServiceDelegate
  13.345  
  13.346 -extension AppDelegate: NetworkServiceDelegate {
  13.347 -    func networkServiceDidFinishLastSyncLoop(service: NetworkService) {
  13.348 +extension AppDelegate: MessageModelServiceDelegate {
  13.349 +
  13.350 +    func messageModelServiceDidFinishLastSyncLoop() {
  13.351          // Cleanup sessions.
  13.352          PEPSession.cleanup()
  13.353 -        if syncUserActionsAndCleanupbackgroundTaskId == UIBackgroundTaskInvalid {
  13.354 +        if syncUserActionsAndCleanupbackgroundTaskId == UIBackgroundTaskIdentifier.invalid {
  13.355              return
  13.356          }
  13.357          if UIApplication.shared.applicationState != .background {
  13.358 @@ -391,11 +380,11 @@
  13.359              // No problem, start regular sync loop.
  13.360              startServices()
  13.361          }
  13.362 -        application.endBackgroundTask(syncUserActionsAndCleanupbackgroundTaskId)
  13.363 -        syncUserActionsAndCleanupbackgroundTaskId = UIBackgroundTaskInvalid
  13.364 +        application.endBackgroundTask(UIBackgroundTaskIdentifier(rawValue: syncUserActionsAndCleanupbackgroundTaskId.rawValue))
  13.365 +        syncUserActionsAndCleanupbackgroundTaskId = UIBackgroundTaskIdentifier.invalid
  13.366      }
  13.367  
  13.368 -    func networkServiceDidCancel(service: NetworkService) {
  13.369 +    func messageModelServiceDidCancel() {
  13.370          switch UIApplication.shared.applicationState {
  13.371          case .background:
  13.372              // We have been cancelled because we are entering background.
    14.1 --- a/pEpForiOS/AppSettings/AppSettings.swift	Thu May 09 11:47:04 2019 +0200
    14.2 +++ b/pEpForiOS/AppSettings/AppSettings.swift	Thu Jun 06 17:42:26 2019 +0200
    14.3 @@ -18,7 +18,6 @@
    14.4      static public let keyDefaultAccountAddress = "keyDefaultAccountAddress"
    14.5      static public let keyThreadedViewEnabled = "keyThreadedViewEnabled"
    14.6      static public let keyPassiveMode = "keyPassiveMode"
    14.7 -    static public let keyManuallyTrustedServers = "keyManuallyTrustedServers"
    14.8  
    14.9      /**
   14.10       The actual implementation of `AppSettingsProtocol` to defer to.
   14.11 @@ -72,28 +71,4 @@
   14.12              settingsHandler.defaultAccount = newValue
   14.13          }
   14.14      }
   14.15 -
   14.16 -    // MARK: manuallyTrustedServers
   14.17 -
   14.18 -    /// Addresses of all accounts the user explicitly trusted
   14.19 -    static var manuallyTrustedServers: [String] {
   14.20 -        get {
   14.21 -            return settingsHandler.manuallyTrustedServers
   14.22 -        }
   14.23 -        set {
   14.24 -            settingsHandler.manuallyTrustedServers = newValue
   14.25 -        }
   14.26 -    }
   14.27 -
   14.28 -    static func isManuallyTrustedServer(address: String) -> Bool {
   14.29 -        return manuallyTrustedServers.contains(address)
   14.30 -    }
   14.31 -
   14.32 -    static func addToManuallyTrustedServers(address: String) {
   14.33 -        settingsHandler.addToManuallyTrustedServers(address: address)
   14.34 -    }
   14.35 -
   14.36 -    static func removeFromManuallyTrustedServers(address: String) {
   14.37 -        settingsHandler.removeFromManuallyTrustedServers(address: address)
   14.38 -    }
   14.39  }
    15.1 --- a/pEpForiOS/AppSettings/AppSettingsProtocol.swift	Thu May 09 11:47:04 2019 +0200
    15.2 +++ b/pEpForiOS/AppSettings/AppSettingsProtocol.swift	Thu Jun 06 17:42:26 2019 +0200
    15.3 @@ -14,9 +14,4 @@
    15.4      var threadedViewEnabled: Bool { get set }
    15.5      var passiveMode: Bool { get set }
    15.6      var defaultAccount: String? { get set }
    15.7 -    var manuallyTrustedServers: [String] { get set }
    15.8 -
    15.9 -    func isManuallyTrustedServer(address: String) -> Bool
   15.10 -    func addToManuallyTrustedServers(address: String)
   15.11 -    func removeFromManuallyTrustedServers(address: String)
   15.12  }
    16.1 --- a/pEpForiOS/AppSettings/DefaultAppSettings.swift	Thu May 09 11:47:04 2019 +0200
    16.2 +++ b/pEpForiOS/AppSettings/DefaultAppSettings.swift	Thu Jun 06 17:42:26 2019 +0200
    16.3 @@ -9,6 +9,7 @@
    16.4  import Foundation
    16.5  
    16.6  import MessageModel
    16.7 +import PEPObjCAdapterFramework
    16.8  
    16.9  public class DefaultAppSettings: AppSettingsProtocol {
   16.10      init() {
   16.11 @@ -65,35 +66,6 @@
   16.12          }
   16.13      }
   16.14  
   16.15 -    // MARK: manuallyTrustedServers
   16.16 -
   16.17 -    /// Addresses of all accounts the user explicitly trusted
   16.18 -    public var manuallyTrustedServers: [String] {
   16.19 -        get {
   16.20 -            return UserDefaults.standard.stringArray(
   16.21 -                forKey: AppSettings.keyManuallyTrustedServers) ?? []
   16.22 -        }
   16.23 -        set {
   16.24 -            UserDefaults.standard.set(newValue, forKey: AppSettings.keyManuallyTrustedServers)
   16.25 -        }
   16.26 -    }
   16.27 -
   16.28 -    public func isManuallyTrustedServer(address: String) -> Bool {
   16.29 -        return manuallyTrustedServers.contains(address)
   16.30 -    }
   16.31 -
   16.32 -    public func addToManuallyTrustedServers(address: String) {
   16.33 -        var addresses = Set(manuallyTrustedServers)
   16.34 -        addresses.insert(address)
   16.35 -        manuallyTrustedServers = Array(addresses)
   16.36 -    }
   16.37 -
   16.38 -    public func removeFromManuallyTrustedServers(address: String) {
   16.39 -        var addresses = Set(manuallyTrustedServers)
   16.40 -        addresses.remove(address)
   16.41 -        manuallyTrustedServers = Array(addresses)
   16.42 -    }
   16.43 -
   16.44      // MARK: - Setup
   16.45  
   16.46      private func setup() {
    17.1 --- a/pEpForiOS/Background/AppendMailsOperation.swift	Thu May 09 11:47:04 2019 +0200
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,189 +0,0 @@
    17.4 -//
    17.5 -//  AppendDraftMailsOperation.swift
    17.6 -//  pEpForiOS
    17.7 -//
    17.8 -//  Created by Dirk Zimmermann on 14/01/2017.
    17.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   17.10 -//
   17.11 -
   17.12 -import UIKit
   17.13 -import CoreData
   17.14 -import pEpIOSToolbox
   17.15 -import MessageModel
   17.16 -
   17.17 -/// Operation for storing mails in any type of IMAP folder.
   17.18 -public class AppendMailsOperation: ImapSyncOperation {
   17.19 -    enum EncryptMode {
   17.20 -        case forSelf
   17.21 -        case unencryptedForTrustedServer
   17.22 -    }
   17.23 -    private var encryptMode: EncryptMode {
   17.24 -        return imapSyncData.connectInfo.trusted ? .unencryptedForTrustedServer : .forSelf
   17.25 -    }
   17.26 -    private var syncDelegate: AppendMailsSyncDelegate?
   17.27 -
   17.28 -    /** The object ID of the last handled message, so we can modify/delete it on success */
   17.29 -    var lastHandledMessageObjectID: NSManagedObjectID?
   17.30 -
   17.31 -    private let folder: Folder
   17.32 -
   17.33 -    init(parentName: String = #function, folder: Folder, imapSyncData: ImapSyncData,
   17.34 -         errorContainer: ServiceErrorProtocol = ErrorContainer()) {
   17.35 -        self.folder = folder
   17.36 -        super.init(parentName: parentName, errorContainer: errorContainer,
   17.37 -                   imapSyncData: imapSyncData)
   17.38 -    }
   17.39 -
   17.40 -    override public func main() {
   17.41 -        if !checkImapSync() {
   17.42 -            markAsFinished()
   17.43 -            return
   17.44 -        }
   17.45 -        syncDelegate = AppendMailsSyncDelegate(errorHandler: self)
   17.46 -        imapSyncData.sync?.delegate = syncDelegate
   17.47 -
   17.48 -        handleNextMessage()
   17.49 -    }
   17.50 -
   17.51 -    func retrieveNextMessage() -> (PEPMessageDict, PEPIdentity, NSManagedObjectID)? {
   17.52 -        var result: (PEPMessageDict, PEPIdentity, NSManagedObjectID)? = nil
   17.53 -        privateMOC.performAndWait { [weak self] in
   17.54 -            guard let me = self else {
   17.55 -                Logger.backendLogger.lostMySelf()
   17.56 -                return
   17.57 -            }
   17.58 -            guard
   17.59 -                let accountId = imapSyncData.connectInfo.accountObjectID,
   17.60 -                let account = privateMOC.object(with: accountId) as? CdAccount,
   17.61 -                let address = account.identity?.address
   17.62 -                else {
   17.63 -                    Logger.backendLogger.errorAndCrash("Missing data")
   17.64 -                    result = nil
   17.65 -                    return
   17.66 -            }
   17.67 -            let p = CdMessage.PredicateFactory.needImapAppend(inFolderNamed: me.folder.name,
   17.68 -                                                              inAccountWithAddress: address)
   17.69 -            let msg = CdMessage.first(predicate: p, in: me.privateMOC)
   17.70 -            if let m = msg, let cdIdent = m.parent?.account?.identity {
   17.71 -                result = (m.pEpMessageDict(), cdIdent.pEpIdentity(), m.objectID)
   17.72 -            }
   17.73 -        }
   17.74 -        return result
   17.75 -    }
   17.76 -
   17.77 -    func markLastMessageAsFinished() {
   17.78 -        if let msgID = lastHandledMessageObjectID {
   17.79 -            privateMOC.performAndWait { [weak self] in
   17.80 -                guard let me = self else {
   17.81 -                    Logger.backendLogger.lostMySelf()
   17.82 -                    return
   17.83 -                }
   17.84 -                if let obj = me.privateMOC.object(with: msgID) as? CdMessage {
   17.85 -                    me.privateMOC.delete(obj)
   17.86 -                    me.privateMOC.saveAndLogErrors()
   17.87 -                } else {
   17.88 -                    Logger.backendLogger.errorAndCrash("Message disappeared")
   17.89 -                    me.handleError(BackgroundError.GeneralError.invalidParameter(info: #function),
   17.90 -                                   message: "Cannot find message just stored.")
   17.91 -                    return
   17.92 -                }
   17.93 -            }
   17.94 -        }
   17.95 -    }
   17.96 -
   17.97 -    private func appendMessage(pEpMessageDict msg: PEPMessageDict) {
   17.98 -        let pantMail = PEPUtil.pantomime(pEpMessageDict: msg)
   17.99 -        let cwFolder = CWIMAPFolder(name: folder.name)
  17.100 -        if let sync = imapSyncData.sync {
  17.101 -            cwFolder.setStore(sync.imapStore)
  17.102 -        }
  17.103 -        guard let rawData = pantMail.dataValue() else {
  17.104 -            Logger.backendLogger.errorAndCrash("No data")
  17.105 -            markAsFinished()
  17.106 -            return
  17.107 -        }
  17.108 -        let flags = self.folder.folderType.defaultAppendImapFlags()
  17.109 -        cwFolder.appendMessage(fromRawSource: rawData,
  17.110 -                               flags: flags?.pantomimeFlags(),
  17.111 -                               internalDate: nil)
  17.112 -    }
  17.113 -
  17.114 -    private func encrypt(session: PEPSession, pEpMessageDict: PEPMessageDict, forSelf: PEPIdentity? = nil)
  17.115 -        throws -> (PEP_STATUS, NSDictionary?) {
  17.116 -            return try session.encrypt(pEpMessageDict: pEpMessageDict, forSelf: forSelf)
  17.117 -    }
  17.118 -
  17.119 -    fileprivate func handleNextMessage() {
  17.120 -        markLastMessageAsFinished()
  17.121 -        guard !isCancelled else {
  17.122 -            waitForBackgroundTasksToFinish()
  17.123 -            return
  17.124 -        }
  17.125 -        guard let (msg, ident, objID) = retrieveNextMessage() else {
  17.126 -            markAsFinished()
  17.127 -            return
  17.128 -        }
  17.129 -        lastHandledMessageObjectID = objID
  17.130 -
  17.131 -        if folder.shouldNotAppendMessages {
  17.132 -            // We are not supposed to append messages to this forder.
  17.133 -            // We need to handle all messages anyway to make sure markLastMessageAsFinished() is
  17.134 -            // called on them (i.e. they get delted).
  17.135 -            handleNextMessage()
  17.136 -            return
  17.137 -        }
  17.138 -
  17.139 -        if encryptMode == .unencryptedForTrustedServer {
  17.140 -            // Always append unencrypted for trusted server.
  17.141 -            appendMessage(pEpMessageDict: msg)
  17.142 -        } else if encryptMode == .forSelf {
  17.143 -            do {
  17.144 -                let session = PEPSession()
  17.145 -                let (_, encMsg) = try encrypt(session: session, pEpMessageDict: msg, forSelf: ident)
  17.146 -                guard let msgDict = encMsg as? PEPMessageDict else {
  17.147 -                    Logger.backendLogger.errorAndCrash("Error casting")
  17.148 -                    handleError(BackgroundError.GeneralError.illegalState(info: "Eror casting"),
  17.149 -                                message: "Error casting")
  17.150 -                    return
  17.151 -                }
  17.152 -                appendMessage(pEpMessageDict: msgDict)
  17.153 -            } catch let err as NSError {
  17.154 -                handleError(err, message: "Cannot encrypt message")
  17.155 -            }
  17.156 -        }
  17.157 -    }
  17.158 -
  17.159 -    override func markAsFinished() {
  17.160 -        syncDelegate = nil
  17.161 -        super.markAsFinished()
  17.162 -    }
  17.163 -
  17.164 -    static func foldersContainingMarkedForAppend(connectInfo: EmailConnectInfo) -> [Folder] {
  17.165 -        var result = [Folder]()
  17.166 -        let privateMOC = Record.Context.background
  17.167 -        privateMOC.performAndWait {
  17.168 -            guard
  17.169 -                let accountId = connectInfo.accountObjectID,
  17.170 -                let cdAccount = privateMOC.object(with: accountId) as? CdAccount else {
  17.171 -                    Logger.backendLogger.errorAndCrash("No account")
  17.172 -                    return
  17.173 -            }
  17.174 -            let appendMessages = Message.allMessagesMarkedForAppend(inAccount: cdAccount.account())
  17.175 -            let foldersContainingMessagesForAppend = appendMessages.map { $0.parent }
  17.176 -            result = Array(Set(foldersContainingMessagesForAppend))
  17.177 -        }
  17.178 -
  17.179 -        return result
  17.180 -    }
  17.181 -}
  17.182 -
  17.183 -class AppendMailsSyncDelegate: DefaultImapSyncDelegate {
  17.184 -    public override func folderAppendCompleted(_ sync: ImapSync, notification: Notification?) {
  17.185 -        (errorHandler as? AppendMailsOperation)?.handleNextMessage()
  17.186 -    }
  17.187 -
  17.188 -    public override func folderAppendFailed(_ sync: ImapSync, notification: Notification?) {
  17.189 -        (errorHandler as? AppendMailsOperation)?.addIMAPError(ImapSyncError.folderAppendFailed)
  17.190 -        (errorHandler as? AppendMailsOperation)?.markAsFinished()
  17.191 -    }
  17.192 -}
    18.1 --- a/pEpForiOS/Background/BaseOperation.swift	Thu May 09 11:47:04 2019 +0200
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,58 +0,0 @@
    18.4 -//
    18.5 -//  BaseOperation.swift
    18.6 -//  pEpForiOS
    18.7 -//
    18.8 -//  Created by Dirk Zimmermann on 15/04/16.
    18.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   18.10 -//
   18.11 -
   18.12 -import pEpIOSToolbox
   18.13 -
   18.14 -/**
   18.15 - Basic NSOperation that can gather errors.
   18.16 - */
   18.17 -open class BaseOperation: Operation, ServiceErrorProtocol {
   18.18 -    open var comp = "BaseOperation"
   18.19 -
   18.20 -    let errorContainer: ServiceErrorProtocol
   18.21 -
   18.22 -    static let moduleTitleRegex = try! NSRegularExpression(
   18.23 -        pattern: "<pEpForiOS\\.(\\w+):", options: [])
   18.24 -
   18.25 -    open var error: Error? {
   18.26 -        return errorContainer.error
   18.27 -    }
   18.28 -
   18.29 -    open func addError(_ error: Error) {
   18.30 -        errorContainer.addError(error)
   18.31 -    }
   18.32 -
   18.33 -    open func hasErrors() -> Bool {
   18.34 -        return errorContainer.hasErrors()
   18.35 -    }
   18.36 -
   18.37 -    public init(parentName: String = #function,
   18.38 -                errorContainer: ServiceErrorProtocol = ErrorContainer()) {
   18.39 -        self.errorContainer = errorContainer
   18.40 -
   18.41 -        super.init()
   18.42 -
   18.43 -        comp = String(describing: self)
   18.44 -
   18.45 -        if let m = BaseOperation.moduleTitleRegex.firstMatch(
   18.46 -            in: comp, options: [], range: comp.wholeRange()) {
   18.47 -            if m.numberOfRanges > 1 {
   18.48 -                let r = m.range(at: 1)
   18.49 -                let s = comp as NSString
   18.50 -                comp = s.substring(with: r)
   18.51 -            }
   18.52 -        }
   18.53 -
   18.54 -        comp = "\(comp) \(unsafeBitCast(self, to: UnsafeRawPointer.self)) [\(parentName)]"
   18.55 -        self.name = comp
   18.56 -    }
   18.57 -
   18.58 -    func logSelf(functionName: String) {
   18.59 -        Logger.backendLogger.log("%{public}@: %{public}@", comp, self)
   18.60 -    }
   18.61 -}
    19.1 --- a/pEpForiOS/Background/CheckOutgoingMessagesOperation.swift	Thu May 09 11:47:04 2019 +0200
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,53 +0,0 @@
    19.4 -//
    19.5 -//  CheckOutgoingMessagesOperation.swift
    19.6 -//  pEpForiOS
    19.7 -//
    19.8 -//  Created by Dirk Zimmermann on 27.06.17.
    19.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   19.10 -//
   19.11 -
   19.12 -import Foundation
   19.13 -import CoreData
   19.14 -
   19.15 -import MessageModel
   19.16 -
   19.17 -class CheckOutgoingMessagesOperation: ConcurrentBaseOperation {
   19.18 -    var hasMessagesReadyToBeSent = false
   19.19 -    let connectInfo: ConnectInfo
   19.20 -
   19.21 -    public init(parentName: String = #function,
   19.22 -                errorContainer: ServiceErrorProtocol = ErrorContainer(),
   19.23 -                connectInfo: ConnectInfo) {
   19.24 -        self.connectInfo = connectInfo
   19.25 -        super.init(parentName: parentName, errorContainer: errorContainer)
   19.26 -    }
   19.27 -
   19.28 -    override func main() {
   19.29 -        if isCancelled {
   19.30 -            markAsFinished()
   19.31 -            return
   19.32 -        }
   19.33 -        let context = privateMOC
   19.34 -        context.perform {
   19.35 -            self.process(context: context)
   19.36 -        }
   19.37 -    }
   19.38 -
   19.39 -    func process(context: NSManagedObjectContext) {
   19.40 -        guard
   19.41 -            let accountId = connectInfo.accountObjectID,
   19.42 -            let cdAccount = context.object(with: accountId) as? CdAccount else {
   19.43 -                handleError(BackgroundError.CoreDataError.couldNotFindAccount(info: nil))
   19.44 -                return
   19.45 -        }
   19.46 -
   19.47 -        if let _ = EncryptAndSendOperation.retrieveNextMessage(context: context,
   19.48 -                                                               cdAccount: cdAccount) {
   19.49 -            hasMessagesReadyToBeSent = true
   19.50 -        } else {
   19.51 -            hasMessagesReadyToBeSent = false
   19.52 -        }
   19.53 -
   19.54 -        markAsFinished()
   19.55 -    }
   19.56 -}
    20.1 --- a/pEpForiOS/Background/ConcurrentBaseOperation.swift	Thu May 09 11:47:04 2019 +0200
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,159 +0,0 @@
    20.4 -//
    20.5 -//  ConcurrentBaseOperation.swift
    20.6 -//  pEpForiOS
    20.7 -//
    20.8 -//  Created by Dirk Zimmermann on 30/06/16.
    20.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   20.10 -//
   20.11 -
   20.12 -import CoreData
   20.13 -import pEpIOSToolbox
   20.14 -import MessageModel
   20.15 -
   20.16 -/// This is the base for concurrent `NSOperation`s, that is operations that handle asynchronicity
   20.17 -/// themselves, and are typically not finished when `main()` ends. Instead, they spawn their own
   20.18 -/// threads or use other forms of asynchronicity.
   20.19 -public class ConcurrentBaseOperation: BaseOperation {
   20.20 -    /// If you need to spawn child operations (that is, subtasks that should be waited upon),
   20.21 -    /// schedule them on this queue.
   20.22 -    let backgroundQueue: OperationQueue = OperationQueue()
   20.23 -
   20.24 -    var privateMOC: NSManagedObjectContext {
   20.25 -        return Record.Context.background
   20.26 -    }
   20.27 -
   20.28 -    /// Schedule potentially long running tasks triggered by the client on this queue to not
   20.29 -    /// block the client.
   20.30 -    private let internalQueue = DispatchQueue(
   20.31 -        label: "security.pep.ConcurrentBaseOperation", qos: .utility, target: nil)
   20.32 -
   20.33 -    /// State changes must be thread save. Synchronize them using this queue.
   20.34 -    private let stateQueue = DispatchQueue(label: Bundle.main.bundleIdentifier! +
   20.35 -        ".ConcurrentBaseOperation.statequeue")
   20.36 -
   20.37 -    private var _state: OperationState = .ready
   20.38 -
   20.39 -    // MARK: - LIFE CYCLE
   20.40 -
   20.41 -    public override init(parentName: String = #function,
   20.42 -                         errorContainer: ServiceErrorProtocol = ErrorContainer()) {
   20.43 -        backgroundQueue.name = "\(parentName) - background queue of ConcurrentBaseOperation"
   20.44 -        super.init(parentName: parentName, errorContainer: errorContainer)
   20.45 -    }
   20.46 -
   20.47 -    // MARK: - OPERATION
   20.48 -
   20.49 -    public final override func start() {
   20.50 -        if isCancelled {
   20.51 -            markAsFinished()
   20.52 -            return
   20.53 -        }
   20.54 -        state = .executing
   20.55 -
   20.56 -        if hasErrors() {
   20.57 -            cancel()
   20.58 -            return
   20.59 -        }
   20.60 -
   20.61 -        main()
   20.62 -    }
   20.63 -
   20.64 -    public override func cancel() {
   20.65 -        super.cancel()
   20.66 -        reactOnCancel()
   20.67 -    }
   20.68 -
   20.69 -    /// Use this if you didn't schedule any operations on `backgroundQueue` and want
   20.70 -    /// to signal the end of this operation.
   20.71 -    func markAsFinished() {
   20.72 -        if isExecuting {
   20.73 -            state = .finished
   20.74 -        }
   20.75 -    }
   20.76 -
   20.77 -    /// If you scheduled operations on `backgroundQueue`, use this to 'wait' for them to finish and
   20.78 -    /// then signal `finished`. Although this method has 'wait' in the name, it does not block.
   20.79 -    func waitForBackgroundTasksToFinish() {
   20.80 -        internalQueue.async { [weak self] in
   20.81 -            guard let me = self else {
   20.82 -                return
   20.83 -            }
   20.84 -            me.backgroundQueue.waitUntilAllOperationsAreFinished()
   20.85 -            me.markAsFinished()
   20.86 -        }
   20.87 -    }
   20.88 -
   20.89 -    func handleIlligalStateErrorAndFinish(component: String = #function, hint: String? = nil) {
   20.90 -        Log.shared.errorAndCrash(component: #function, errorString: hint ?? "")
   20.91 -        handleError(
   20.92 -            BackgroundError.GeneralError.illegalState(info: component + " - " + (hint ?? "")))
   20.93 -    }
   20.94 -
   20.95 -    func handleError(_ error: Error, message: String? = nil) {
   20.96 -        addError(error)
   20.97 -        if let theMessage = message {
   20.98 -            Logger.backendLogger.error("%{public}@ %{public}@", error.localizedDescription, theMessage)
   20.99 -        } else {
  20.100 -            Logger.backendLogger.error("%{public}@ %{public}@", error.localizedDescription)
  20.101 -        }
  20.102 -        cancel()
  20.103 -    }
  20.104 -
  20.105 -    private func reactOnCancel() {
  20.106 -        func f() {
  20.107 -            backgroundQueue.cancelAllOperations()
  20.108 -            waitForBackgroundTasksToFinish()
  20.109 -        }
  20.110 -        internalQueue.async {
  20.111 -            f()
  20.112 -        }
  20.113 -    }
  20.114 -}
  20.115 -
  20.116 -// MARK: - OPERATION STATE
  20.117 -
  20.118 -extension ConcurrentBaseOperation {
  20.119 -
  20.120 -    @objc private enum OperationState: Int {
  20.121 -        case ready
  20.122 -        case executing
  20.123 -        case finished
  20.124 -    }
  20.125 -
  20.126 -    @objc private dynamic var state: OperationState {
  20.127 -        get {
  20.128 -            return stateQueue.sync {
  20.129 -                _state
  20.130 -            }
  20.131 -        }
  20.132 -        set {
  20.133 -            stateQueue.sync(flags: .barrier) {
  20.134 -                _state = newValue
  20.135 -            }
  20.136 -        }
  20.137 -    }
  20.138 -    
  20.139 -    open override var isReady: Bool {
  20.140 -        return state == .ready && super.isReady
  20.141 -    }
  20.142 -
  20.143 -    public final override var isExecuting: Bool {
  20.144 -        return state == .executing
  20.145 -    }
  20.146 -
  20.147 -    public final override var isFinished: Bool {
  20.148 -        return state == .finished ||
  20.149 -            (state != .executing && state != .finished && isCancelled) // Has been canceled before starting the OP.
  20.150 -    }
  20.151 -
  20.152 -    public final override var isAsynchronous: Bool {
  20.153 -        return true
  20.154 -    }
  20.155 -
  20.156 -    open override class func keyPathsForValuesAffectingValue(forKey key: String) -> Set<String> {
  20.157 -        if ["isReady", "isFinished", "isExecuting"].contains(key) {
  20.158 -            return [#keyPath(state)]
  20.159 -        }
  20.160 -        return super.keyPathsForValuesAffectingValue(forKey: key)
  20.161 -    }
  20.162 -}
    21.1 --- a/pEpForiOS/Background/CreateRequiredFoldersOperation.swift	Thu May 09 11:47:04 2019 +0200
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,176 +0,0 @@
    21.4 -//
    21.5 -//  CreateRequiredFoldersOperation.swift
    21.6 -//  pEpForiOS
    21.7 -//
    21.8 -//  Created by Dirk Zimmermann on 01/03/17.
    21.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   21.10 -//
   21.11 -
   21.12 -import UIKit
   21.13 -import CoreData
   21.14 -import pEpIOSToolbox
   21.15 -import MessageModel
   21.16 -
   21.17 -/**
   21.18 - Checks for needed folders, like "Drafts", and when they don't exist, create them
   21.19 - both locally and remote.
   21.20 - */
   21.21 -public class CreateRequiredFoldersOperation: ImapSyncOperation {
   21.22 -    private struct FolderToCreate {
   21.23 -        var folderName: String
   21.24 -        let folderSeparator: String?
   21.25 -        let folderType: FolderType
   21.26 -        let cdAccount: CdAccount
   21.27 -    }
   21.28 -    private struct CreationAttempt {
   21.29 -        var count = 0
   21.30 -        var folderToCreate: FolderToCreate?
   21.31 -
   21.32 -        mutating func reset() {
   21.33 -            count = 0
   21.34 -            folderToCreate = nil
   21.35 -        }
   21.36 -    }
   21.37 -    private var currentAttempt = CreationAttempt()
   21.38 -    private var foldersToCreate = [FolderToCreate]()
   21.39 -    private var folderSeparator: String?
   21.40 -    private var syncDelegate: CreateRequiredFoldersSyncDelegate?
   21.41 -    
   21.42 -    public var numberOfFoldersCreated = 0
   21.43 -
   21.44 -    public override func main() {
   21.45 -        if !checkImapSync() {
   21.46 -            markAsFinished()
   21.47 -            return
   21.48 -        }
   21.49 -        privateMOC.perform { [weak self] in
   21.50 -            guard let me = self else {
   21.51 -                Logger.backendLogger.lostMySelf()
   21.52 -                return
   21.53 -            }
   21.54 -            me.process()
   21.55 -        }
   21.56 -    }
   21.57 -
   21.58 -    private func process() {
   21.59 -        guard
   21.60 -            let accountId = imapSyncData.connectInfo.accountObjectID,
   21.61 -            let account = privateMOC.object(with: accountId) as? CdAccount else {
   21.62 -                handleError(BackgroundError.CoreDataError.couldNotFindAccount(info: comp))
   21.63 -                return
   21.64 -        }
   21.65 -
   21.66 -        assureLocalFoldersExist(for: account.account())
   21.67 -
   21.68 -        for ft in FolderType.requiredTypes {
   21.69 -            if let cdF = CdFolder.by(folderType: ft, account: account) {
   21.70 -                if folderSeparator == nil {
   21.71 -                    folderSeparator = cdF.folderSeparatorAsString()
   21.72 -                }
   21.73 -            } else {
   21.74 -                let folderName = ft.folderName()
   21.75 -                foldersToCreate.append(
   21.76 -                    FolderToCreate(folderName: folderName, folderSeparator: folderSeparator,
   21.77 -                                   folderType: ft, cdAccount: account))
   21.78 -            }
   21.79 -        }
   21.80 -
   21.81 -        if folderSeparator == nil {
   21.82 -            folderSeparator = CdFolder.folderSeparatorAsString(cdAccount: account)
   21.83 -        }
   21.84 -
   21.85 -        if foldersToCreate.count > 0 {
   21.86 -            privateMOC.saveAndLogErrors()
   21.87 -            syncDelegate = CreateRequiredFoldersSyncDelegate(errorHandler: self)
   21.88 -            imapSyncData.sync?.delegate = syncDelegate
   21.89 -            createNextFolder()
   21.90 -        } else {
   21.91 -            waitForBackgroundTasksToFinish()
   21.92 -        }
   21.93 -    }
   21.94 -
   21.95 -    fileprivate func createNextFolder() {
   21.96 -        if let lastFolder = currentAttempt.folderToCreate {
   21.97 -            privateMOC.performAndWait { [weak self] in
   21.98 -                guard let me = self else {
   21.99 -                    Logger.backendLogger.lostMySelf()
  21.100 -                    return
  21.101 -                }
  21.102 -                me.createLocal(folderToCreate: lastFolder, context: me.privateMOC)
  21.103 -            }
  21.104 -        }
  21.105 -        guard !isCancelled, let folderToCreate = foldersToCreate.first else {
  21.106 -            // We have been cancelled or there is nothing left todo.
  21.107 -            waitForBackgroundTasksToFinish()
  21.108 -            return
  21.109 -        }
  21.110 -        currentAttempt.reset()
  21.111 -        currentAttempt.folderToCreate = folderToCreate
  21.112 -        startFolderCreation(folderToCreate: folderToCreate)
  21.113 -        foldersToCreate.removeFirst()
  21.114 -    }
  21.115 -
  21.116 -    private func startFolderCreation(folderToCreate: FolderToCreate) {
  21.117 -        imapSyncData.sync?.createFolderWithName(folderToCreate.folderName)
  21.118 -    }
  21.119 -
  21.120 -    private func createLocal(folderToCreate: FolderToCreate, context: NSManagedObjectContext) {
  21.121 -        let _ = CdFolder.insertOrUpdate(
  21.122 -            folderName: folderToCreate.folderName, folderSeparator: folderToCreate.folderSeparator,
  21.123 -            folderType: folderToCreate.folderType, account: folderToCreate.cdAccount)
  21.124 -        Record.saveAndWait(context: privateMOC)
  21.125 -
  21.126 -    }
  21.127 -
  21.128 -    fileprivate func createFolderAgain(potentialError: Error) {
  21.129 -        if currentAttempt.count == 0, var folderToCreate = currentAttempt.folderToCreate,
  21.130 -            let fs = folderSeparator {
  21.131 -            folderToCreate.folderName =
  21.132 -            "\(ImapSync.defaultImapInboxName)\(fs)\(folderToCreate.folderName)"
  21.133 -            currentAttempt.folderToCreate = folderToCreate
  21.134 -            currentAttempt.count += 1
  21.135 -            startFolderCreation(folderToCreate: folderToCreate)
  21.136 -        } else {
  21.137 -            currentAttempt.reset()
  21.138 -            addIMAPError(potentialError)
  21.139 -            waitForBackgroundTasksToFinish()
  21.140 -        }
  21.141 -    }
  21.142 -
  21.143 -    private func assureLocalFoldersExist(for account: Account) {
  21.144 -        if let _ = Folder.by(account: account, folderType: .outbox) {
  21.145 -            // Nothing to do. Outbox is currently the only existing local folder type
  21.146 -            return
  21.147 -        }
  21.148 -        let name = FolderType.outbox.folderName()
  21.149 -        let createe = Folder(name: name,
  21.150 -                             parent: nil,
  21.151 -                             account: account,
  21.152 -                             folderType: .outbox)
  21.153 -        createe.save()
  21.154 -    }
  21.155 -
  21.156 -    override func markAsFinished() {
  21.157 -        syncDelegate = nil
  21.158 -        super.markAsFinished()
  21.159 -    }
  21.160 -}
  21.161 -
  21.162 -class CreateRequiredFoldersSyncDelegate: DefaultImapSyncDelegate {
  21.163 -    public override func folderCreateCompleted(_ sync: ImapSync, notification: Notification?) {
  21.164 -        guard let op = errorHandler as? CreateRequiredFoldersOperation else {
  21.165 -            Logger.backendLogger.errorAndCrash("Sorry, wrong number.")
  21.166 -            return
  21.167 -        }
  21.168 -        op.numberOfFoldersCreated += 1
  21.169 -        op.createNextFolder()
  21.170 -    }
  21.171 -
  21.172 -    public override func folderCreateFailed(_ sync: ImapSync, notification: Notification?) {
  21.173 -        guard let op = errorHandler as? CreateRequiredFoldersOperation else {
  21.174 -            Logger.backendLogger.errorAndCrash("Sorry, wrong number.")
  21.175 -            return
  21.176 -        }
  21.177 -        op.createFolderAgain(potentialError: ImapSyncError.illegalState(#function))
  21.178 -    }
  21.179 -}
    22.1 --- a/pEpForiOS/Background/DecryptMessageOperation.swift	Thu May 09 11:47:04 2019 +0200
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,94 +0,0 @@
    22.4 -//
    22.5 -//  DecryptMessageOperation.swift
    22.6 -//  pEp
    22.7 -//
    22.8 -//  Created by Andreas Buff on 11.08.18.
    22.9 -//  Copyright © 2018 p≡p Security S.A. All rights reserved.
   22.10 -//
   22.11 -
   22.12 -import Foundation
   22.13 -import pEpIOSToolbox
   22.14 -
   22.15 -protocol DecryptMessageOperationDelegate: class {
   22.16 -
   22.17 -    /// Called in case a DecryptionResult can be provided.
   22.18 -    ///
   22.19 -    /// - Parameters:
   22.20 -    ///   - sender: reporting decrypt operation
   22.21 -    ///   - didDecryptMessageWithResult: all information we got from the Engine, decrypting
   22.22 -    ///                                  the message.
   22.23 -    func decryptMessageOperation(sender: DecryptMessageOperation,
   22.24 -                                  didDecryptMessageWithResult result:
   22.25 -        DecryptMessageOperation.DecryptionResult)
   22.26 -
   22.27 -    /// Called for any error cases in which no DecryptionResult can be provided.
   22.28 -    ///
   22.29 -    /// - Parameters:
   22.30 -    ///   - sender: reporting decrypt operation
   22.31 -    ///   - error: occured error
   22.32 -    func decryptMessageOperation(sender: DecryptMessageOperation, failed error: Error)
   22.33 -}
   22.34 -
   22.35 -/// Decrypts one message.
   22.36 -class DecryptMessageOperation: Operation {
   22.37 -    struct DecryptionResult {
   22.38 -        /// The original message that might have been modified by the Engine
   22.39 -        let givenMessage: NSDictionary
   22.40 -        /// The decrypted message returned by the engine
   22.41 -        let pEpDecryptedMessage: NSDictionary?
   22.42 -        /// Flags returned by the engine
   22.43 -        let flags: PEP_decrypt_flags
   22.44 -        /// Rating returned by the engine
   22.45 -        let rating: PEP_rating
   22.46 -        /// Keys returned by the Engine
   22.47 -        let keys: NSArray?
   22.48 -    }
   22.49 -
   22.50 -    weak var delegate: DecryptMessageOperationDelegate?
   22.51 -
   22.52 -    let messageToDecrypt: PEPMessageDict
   22.53 -    let flags: PEP_decrypt_flags
   22.54 -
   22.55 -    init(messageToDecrypt: PEPMessageDict, flags: PEP_decrypt_flags,
   22.56 -         delegate: DecryptMessageOperationDelegate) {
   22.57 -        self.messageToDecrypt = messageToDecrypt
   22.58 -        self.flags = flags
   22.59 -        self.delegate = delegate
   22.60 -    }
   22.61 -
   22.62 -    override func main() {
   22.63 -        if isCancelled {
   22.64 -            return
   22.65 -        }
   22.66 -        process()
   22.67 -    }
   22.68 -
   22.69 -    private func process() {
   22.70 -        let inOutMessage = messageToDecrypt.mutableDictionary()
   22.71 -        var inOutFlags = flags
   22.72 -        var keys: NSArray?
   22.73 -        var rating = PEP_rating_undefined
   22.74 -        var pEpDecryptedMessage: NSDictionary? = nil
   22.75 -
   22.76 -        do {
   22.77 -            pEpDecryptedMessage = try PEPSession().decryptMessageDict(inOutMessage,
   22.78 -                                                                      flags: &inOutFlags,
   22.79 -                                                                      rating: &rating,
   22.80 -                                                                      extraKeys: &keys,
   22.81 -                                                                      status: nil)
   22.82 -                as NSDictionary
   22.83 -
   22.84 -            let result = DecryptionResult(givenMessage: inOutMessage,
   22.85 -                                          pEpDecryptedMessage: pEpDecryptedMessage,
   22.86 -                                          flags: inOutFlags,
   22.87 -                                          rating: rating,
   22.88 -                                          keys: keys)
   22.89 -            delegate?.decryptMessageOperation(sender: self, didDecryptMessageWithResult: result)
   22.90 -
   22.91 -        } catch {
   22.92 -            Logger.backendLogger.errorAndCrash("Error decrypting: %{public}@",
   22.93 -                                               error.localizedDescription)
   22.94 -            delegate?.decryptMessageOperation(sender: self, failed: error)
   22.95 -        }
   22.96 -    }
   22.97 -}
    23.1 --- a/pEpForiOS/Background/DecryptMessagesOperation.swift	Thu May 09 11:47:04 2019 +0200
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,317 +0,0 @@
    23.4 -//
    23.5 -//  DecryptMessagesOperation.swift
    23.6 -//  pEpForiOS
    23.7 -//
    23.8 -//  Created by hernani on 13/06/16.
    23.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   23.10 -//
   23.11 -
   23.12 -import MessageModel
   23.13 -import pEpIOSToolbox
   23.14 -import CoreData
   23.15 -
   23.16 -// Only used in Tests. Maybe refactor out.
   23.17 -public protocol DecryptMessagesOperationDelegateProtocol: class {
   23.18 -    /**
   23.19 -     Called whenever a message just got decrypted. Useful for tests.
   23.20 -     */
   23.21 -    func decrypted(originalCdMessage: CdMessage, decryptedMessageDict: NSDictionary?,
   23.22 -                   rating: PEP_rating, keys: [String])
   23.23 -}
   23.24 -
   23.25 -public class DecryptMessagesOperation: ConcurrentBaseOperation {
   23.26 -    public weak var delegate: DecryptMessagesOperationDelegateProtocol?// Only used in Tests. Maybe refactor out.
   23.27 -    private(set) var didMarkMessagesForReUpload = false
   23.28 -
   23.29 -    private var messagesToDecrypt = [CdMessage]()
   23.30 -    private var currentlyProcessedMessage: CdMessage?
   23.31 -    private var ratingBeforeEngine = Int16(PEP_rating_undefined.rawValue)
   23.32 -
   23.33 -    private func setupMessagesToDecrypt() {
   23.34 -        privateMOC.performAndWait {[weak self] in
   23.35 -            guard let me = self else {
   23.36 -                Logger.backendLogger.lostMySelf()
   23.37 -                return
   23.38 -            }
   23.39 -            guard let cdMessages = CdMessage.all(
   23.40 -                predicate: CdMessage.PredicateFactory.unknownToPep(),
   23.41 -                orderedBy: [NSSortDescriptor(key: "received", ascending: true)],
   23.42 -                in: privateMOC) as? [CdMessage] else {
   23.43 -                    me.markAsFinished()
   23.44 -                    return
   23.45 -            }
   23.46 -            messagesToDecrypt = cdMessages
   23.47 -        }
   23.48 -    }
   23.49 -
   23.50 -    public override func main() {
   23.51 -        if isCancelled {
   23.52 -            markAsFinished()
   23.53 -            return
   23.54 -        }
   23.55 -        setupMessagesToDecrypt()
   23.56 -        handleNextMessage()
   23.57 -    }
   23.58 -
   23.59 -    // MARK: - Process
   23.60 -
   23.61 -    private func cleanup() {
   23.62 -        currentlyProcessedMessage = nil
   23.63 -        ratingBeforeEngine = Int16(PEP_rating_undefined.rawValue)
   23.64 -    }
   23.65 -
   23.66 -    private func handleNextMessage() {
   23.67 -        cleanup()
   23.68 -
   23.69 -        if messagesToDecrypt.count == 0 {
   23.70 -            waitForBackgroundTasksToFinish()
   23.71 -            return
   23.72 -        }
   23.73 -
   23.74 -        privateMOC.perform { [weak self] in
   23.75 -            guard let me = self else {
   23.76 -                Logger.backendLogger.lostMySelf()
   23.77 -                return
   23.78 -            }
   23.79 -            if me.isCancelled {
   23.80 -                me.waitForBackgroundTasksToFinish()
   23.81 -                return
   23.82 -            }
   23.83 -            let cdMsg = me.messagesToDecrypt.removeFirst()
   23.84 -            me.currentlyProcessedMessage = cdMsg
   23.85 -            guard let msg = cdMsg.message() else {
   23.86 -                Logger.backendLogger.errorAndCrash("No message")
   23.87 -                me.handleError(
   23.88 -                    BackgroundError.GeneralError.illegalState(info: "No Message for CdMessage"))
   23.89 -                return
   23.90 -            }
   23.91 -            me.ratingBeforeEngine = cdMsg.pEpRating
   23.92 -            var outgoing = false
   23.93 -            if let folderType = cdMsg.parent?.folderType {
   23.94 -                outgoing = folderType.isOutgoing()
   23.95 -            }
   23.96 -            let pepMessage = PEPUtil.pEpDict(cdMessage: cdMsg, outgoing: outgoing)
   23.97 -            let flags = msg.isOnTrustedServer ? PEP_decrypt_flag_none :
   23.98 -            PEP_decrypt_flag_untrusted_server
   23.99 -            let decryptOp = DecryptMessageOperation(messageToDecrypt: pepMessage,
  23.100 -                                                    flags: flags,
  23.101 -                                                    delegate: me)
  23.102 -            me.backgroundQueue.addOperation(decryptOp)
  23.103 -        }
  23.104 -    }
  23.105 -
  23.106 -    // MARK: - Handle Result
  23.107 -
  23.108 -    private func handleDecryptionSuccess(cdMessage: CdMessage,
  23.109 -                                         pEpDecryptedMessage: NSDictionary,
  23.110 -                                         ratingBeforeEngine: Int16,
  23.111 -                                         rating: PEP_rating,
  23.112 -                                         keys: NSArray?) {
  23.113 -        privateMOC.performAndWait {[weak self] in
  23.114 -            guard let me = self else {
  23.115 -                Logger.backendLogger.lostMySelf()
  23.116 -                return
  23.117 -            }
  23.118 -            let theKeys = Array(keys ?? NSArray()) as? [String] ?? []
  23.119 -
  23.120 -            // Only used in Tests. Maybe refactor out.
  23.121 -            me.delegate?.decrypted(originalCdMessage: cdMessage,
  23.122 -                                     decryptedMessageDict: pEpDecryptedMessage,
  23.123 -                                     rating: rating,
  23.124 -                                     keys: theKeys)
  23.125 -
  23.126 -            if rating.shouldUpdateMessageContent() {
  23.127 -                me.updateWholeMessage(pEpDecryptedMessage: pEpDecryptedMessage,
  23.128 -                                   ratingBeforeEngine: ratingBeforeEngine,
  23.129 -                                   rating: rating,
  23.130 -                                   cdMessage: cdMessage,
  23.131 -                                   keys: theKeys)
  23.132 -                findDeleteAndHandleFakeMessage(forFetchedMessage: cdMessage,
  23.133 -                                               pEpDecryptedMessage: pEpDecryptedMessage)
  23.134 -                me.handleReUploadAndNotify(cdMessage: cdMessage, rating: rating)
  23.135 -            } else {
  23.136 -                if rating.rawValue != ratingBeforeEngine {
  23.137 -                    cdMessage.update(rating: rating)
  23.138 -                    saveAndNotify(cdMessage: cdMessage  )
  23.139 -                }
  23.140 -            }
  23.141 -        }
  23.142 -    }
  23.143 -
  23.144 -    /// Finds and deletes the local fake message (if exists) for a given message fetched from
  23.145 -    /// server. It also takes over the imap flags of the fake message. The user might have changed
  23.146 -    /// them (read or flagged the message) meanwhile.
  23.147 -    ///
  23.148 -    /// - Parameters:
  23.149 -    ///   - cdMessage: the message fetched from server
  23.150 -    ///   - pEpDecryptedMessage: decrypted message.
  23.151 -    ///                             We need it as the uuid differs in Mesasge >=2.0
  23.152 -    ///                             (inner message uui vs. outer message)
  23.153 -    private func findDeleteAndHandleFakeMessage(forFetchedMessage cdMessage: CdMessage,
  23.154 -                                                pEpDecryptedMessage: NSDictionary) {
  23.155 -        guard
  23.156 -            let uuid = pEpDecryptedMessage["id"] as? String,
  23.157 -            let parentFolder = cdMessage.parent?.folder()  else {
  23.158 -                Log.shared.errorAndCrash(component: #function, errorString:"Problem")
  23.159 -                return
  23.160 -        }
  23.161 -        let imapFlagsFakeMessage = Message.findAndDeleteFakeMessage(withUuid: uuid,
  23.162 -                                                                    in: parentFolder)
  23.163 -        setFlags(imapFlagsFakeMessage, toCdMessage: cdMessage)
  23.164 -    }
  23.165 -
  23.166 -    /**
  23.167 -     Updates message bodies (after decryption), then calls `updateMessage`.
  23.168 -     */
  23.169 -    private func updateWholeMessage(pEpDecryptedMessage: NSDictionary?,
  23.170 -                                    ratingBeforeEngine: Int16,
  23.171 -                                    rating: PEP_rating,
  23.172 -                                    cdMessage: CdMessage,
  23.173 -                                    keys: [String]) {
  23.174 -        cdMessage.underAttack = rating.isUnderAttack()
  23.175 -        guard let decrypted = pEpDecryptedMessage as? PEPMessageDict else {
  23.176 -
  23.177 -                Logger.backendLogger.errorAndCrash(
  23.178 -                    "Should update message with rating %d, but nil message",
  23.179 -                    rating.rawValue)
  23.180 -                return
  23.181 -        }
  23.182 -        updateMessage(cdMessage: cdMessage, keys: keys, pEpMessageDict: decrypted, rating: rating)
  23.183 -    }
  23.184 -
  23.185 -    private func setFlags(_ flags: Message.ImapFlags?,
  23.186 -                          toCdMessage cdMessage: CdMessage) {
  23.187 -        guard let imapFlags = flags else {
  23.188 -            // That's OK.
  23.189 -            // No fake message (und thus no flags) exists for the currently decrypted msg.
  23.190 -            return
  23.191 -        }
  23.192 -        cdMessage.imap?.localFlags?.flagDraft = imapFlags.draft
  23.193 -        cdMessage.imap?.localFlags?.flagAnswered = imapFlags.answered
  23.194 -        cdMessage.imap?.localFlags?.flagDeleted = imapFlags.deleted
  23.195 -        cdMessage.imap?.localFlags?.flagSeen = imapFlags.seen
  23.196 -    }
  23.197 -
  23.198 -    private func handleReUploadAndNotify(cdMessage: CdMessage, rating: PEP_rating) {
  23.199 -        do {
  23.200 -            let needsReUpload = try handleReUploadIfRequired(cdMessage: cdMessage, rating: rating)
  23.201 -            if needsReUpload {
  23.202 -                didMarkMessagesForReUpload = true
  23.203 -                Record.saveAndWait()
  23.204 -                privateMOC.saveAndLogErrors()
  23.205 -                // Don't notify. Delegate will be notified after the re-uploaded message is fetched.
  23.206 -            } else {
  23.207 -                saveAndNotify(cdMessage: cdMessage)
  23.208 -            }
  23.209 -        } catch {
  23.210 -            handleError(error)
  23.211 -        }
  23.212 -    }
  23.213 -
  23.214 -    private func saveAndNotify(cdMessage: CdMessage) {
  23.215 -        privateMOC.saveAndLogErrors()
  23.216 -        notifyDelegate(messageUpdated: cdMessage)
  23.217 -    }
  23.218 -
  23.219 -    /// Updates a message with the given data.
  23.220 -    ///
  23.221 -    /// - Parameters:
  23.222 -    ///   - cdMessage: message to update
  23.223 -    ///   - keys: keys the message has been signed with
  23.224 -    ///   - pEpMessageDict: decrypted message
  23.225 -    ///   - rating: rating to set
  23.226 -    private func updateMessage(cdMessage: CdMessage,
  23.227 -                               keys: [String],
  23.228 -                               pEpMessageDict: PEPMessageDict,
  23.229 -                               rating: PEP_rating) {
  23.230 -        cdMessage.update(pEpMessageDict: pEpMessageDict, rating: rating)
  23.231 -        cdMessage.updateKeyList(keys: keys)
  23.232 -    }
  23.233 -
  23.234 -    private func notifyDelegate(messageUpdated cdMessage: CdMessage) {
  23.235 -        guard let message = cdMessage.message() else {
  23.236 -            Logger.backendLogger.errorAndCrash("Error converting CDMesage")
  23.237 -            return
  23.238 -        }
  23.239 -        MessageModelConfig.messageFolderDelegate?.didCreate(messageFolder: message)
  23.240 -    }
  23.241 -
  23.242 -    // MARK: - Handle DecryptMessageOperationDelegate Calls
  23.243 -
  23.244 -    private func decryptMessageOperationDidDecryptMessage(result:
  23.245 -        DecryptMessageOperation.DecryptionResult) {
  23.246 -        guard
  23.247 -            let decrypted = result.pEpDecryptedMessage,
  23.248 -            let currentlyProcessedMessage = currentlyProcessedMessage else {
  23.249 -                Logger.backendLogger.errorAndCrash("Invalid state")
  23.250 -                handleError(BackgroundError.GeneralError.illegalState(info:
  23.251 -                    "Error handling decryption result"))
  23.252 -                return
  23.253 -        }
  23.254 -        handleDecryptionSuccess(cdMessage: currentlyProcessedMessage,
  23.255 -                                pEpDecryptedMessage: decrypted,
  23.256 -                                ratingBeforeEngine: ratingBeforeEngine,
  23.257 -                                rating: result.rating,
  23.258 -                                keys: result.keys)
  23.259 -        handleNextMessage()
  23.260 -    }
  23.261 -
  23.262 -    private func decryptMessageOperationDidFail(error: Error) {
  23.263 -        addError(error)
  23.264 -        handleNextMessage()
  23.265 -    }
  23.266 -}
  23.267 -
  23.268 -// MARK: - Re-Upload - Trusted Server
  23.269 -
  23.270 -extension DecryptMessagesOperation {
  23.271 -    private func handleReUploadIfRequired(cdMessage: CdMessage,
  23.272 -                                          rating: PEP_rating) throws -> Bool {
  23.273 -        guard let message = cdMessage.message() else {
  23.274 -            Logger.backendLogger.errorAndCrash("No message")
  23.275 -            throw BackgroundError.GeneralError.illegalState(info: "No Message")
  23.276 -        }
  23.277 -        if !message.isOnTrustedServer ||    // The only currently supported case for re-upload is trusted server.
  23.278 -            message.wasAlreadyUnencrypted { // If the message was not encrypted, there is no reason to re-upload it.
  23.279 -            return false
  23.280 -        }   
  23.281 -        let messageCopyForReupload = Message(message: message)
  23.282 -        setOriginalRatingHeader(rating: rating, toMessage: messageCopyForReupload)
  23.283 -        message.imapMarkDeleted()
  23.284 -
  23.285 -        return true
  23.286 -    }
  23.287 -
  23.288 -    private func setOriginalRatingHeader(rating: PEP_rating, toMessage cdMessage: CdMessage) {
  23.289 -        guard let message = cdMessage.message() else {
  23.290 -            Logger.backendLogger.errorAndCrash("No message")
  23.291 -            handleError(BackgroundError.GeneralError.illegalState(info: "No Message"))
  23.292 -            return
  23.293 -        }
  23.294 -        if message.parent.folderType == .drafts {
  23.295 -            let outgoingRating = message.outgoingMessageRating()
  23.296 -            setOriginalRatingHeader(rating: outgoingRating, toMessage: message)
  23.297 -        } else {
  23.298 -            setOriginalRatingHeader(rating: rating, toMessage: message)
  23.299 -        }
  23.300 -    }
  23.301 -
  23.302 -    private func setOriginalRatingHeader(rating: PEP_rating, toMessage msg: Message) {
  23.303 -        msg.setOriginalRatingHeader(rating: rating)
  23.304 -        msg.save()
  23.305 -    }
  23.306 -}
  23.307 -
  23.308 -// MARK: - DecryptMessageOperationDelegate
  23.309 -
  23.310 -extension DecryptMessagesOperation: DecryptMessageOperationDelegate {
  23.311 -    func decryptMessageOperation(sender: DecryptMessageOperation,
  23.312 -                                 didDecryptMessageWithResult result:
  23.313 -        DecryptMessageOperation.DecryptionResult) {
  23.314 -        decryptMessageOperationDidDecryptMessage(result: result)
  23.315 -    }
  23.316 -
  23.317 -    func decryptMessageOperation(sender: DecryptMessageOperation, failed error: Error) {
  23.318 -        decryptMessageOperationDidFail(error: error)
  23.319 -    }
  23.320 -}
    24.1 --- a/pEpForiOS/Background/DeleteFolderOperation.swift	Thu May 09 11:47:04 2019 +0200
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,85 +0,0 @@
    24.4 -//
    24.5 -//  DeleteFolderOperation.swift
    24.6 -//  pEpForiOS
    24.7 -//
    24.8 -//  Created by Dirk Zimmermann on 19/09/16.
    24.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   24.10 -//
   24.11 -
   24.12 -import CoreData
   24.13 -import pEpIOSToolbox
   24.14 -import MessageModel
   24.15 -
   24.16 -public class DeleteFolderOperation: ImapSyncOperation {
   24.17 -    var folderName: String
   24.18 -    let accountID: NSManagedObjectID
   24.19 -    var account: CdAccount!
   24.20 -    var syncDelegate: DeleteFolderSyncDelegate?
   24.21 -
   24.22 -    init(parentName: String = #function, errorContainer: ServiceErrorProtocol = ErrorContainer(),
   24.23 -                imapSyncData: ImapSyncData, account: CdAccount,
   24.24 -                folderName: String) {
   24.25 -        self.accountID = account.objectID
   24.26 -        self.folderName = folderName
   24.27 -        super.init(parentName: parentName, errorContainer: errorContainer,
   24.28 -                   imapSyncData: imapSyncData)
   24.29 -    }
   24.30 -
   24.31 -    public override func main() {
   24.32 -        if !checkImapSync() {
   24.33 -            markAsFinished()
   24.34 -            return
   24.35 -        }
   24.36 -
   24.37 -        privateMOC.perform() { [weak self] in
   24.38 -            guard let me = self else {
   24.39 -                Logger.backendLogger.lostMySelf()
   24.40 -                return
   24.41 -            }
   24.42 -            me.account = me.privateMOC.object(with: me.accountID) as? CdAccount
   24.43 -            guard me.account != nil else {
   24.44 -                me.addError(BackgroundError.CoreDataError.couldNotFindAccount(info: me.comp))
   24.45 -                me.markAsFinished()
   24.46 -                return
   24.47 -            }
   24.48 -            me.syncDelegate = DeleteFolderSyncDelegate(errorHandler: me)
   24.49 -            me.imapSyncData.sync?.delegate = me.syncDelegate
   24.50 -            me.imapSyncData.sync?.deleteFolderWithName(me.folderName)
   24.51 -        }
   24.52 -    }
   24.53 -
   24.54 -    func deleteLocalFolderAndFinish() {
   24.55 -        privateMOC.perform { [weak self] in
   24.56 -            guard let me = self else {
   24.57 -                Logger.backendLogger.lostMySelf()
   24.58 -                return
   24.59 -            }
   24.60 -            if let folder = CdFolder.by(name: me.folderName, account: me.account) {
   24.61 -                me.privateMOC.delete(folder)
   24.62 -                Record.saveAndWait(context: me.privateMOC)
   24.63 -            }
   24.64 -            me.markAsFinished()
   24.65 -        }
   24.66 -    }
   24.67 -
   24.68 -    func handleBadResponse(sync: ImapSync, response: String?) {
   24.69 -        let msg = response ?? "Bad Response"
   24.70 -        Logger.backendLogger.error("The folder could not be deleted: %{public}@", msg)
   24.71 -        self.markAsFinished()
   24.72 -    }
   24.73 -
   24.74 -    override func markAsFinished() {
   24.75 -        syncDelegate = nil
   24.76 -        super.markAsFinished()
   24.77 -    }
   24.78 -}
   24.79 -
   24.80 -class DeleteFolderSyncDelegate: DefaultImapSyncDelegate {
   24.81 -    public override func folderDeleteCompleted(_ sync: ImapSync, notification: Notification?) {
   24.82 -        (errorHandler as? DeleteFolderOperation)?.deleteLocalFolderAndFinish()
   24.83 -    }
   24.84 -
   24.85 -    public override func badResponse(_ sync: ImapSync, response: String?) {
   24.86 -        (errorHandler as? DeleteFolderOperation)?.handleBadResponse(sync: sync, response: response)
   24.87 -    }
   24.88 -}
    25.1 --- a/pEpForiOS/Background/DeleteFoldersOperation.swift	Thu May 09 11:47:04 2019 +0200
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,90 +0,0 @@
    25.4 -//
    25.5 -//  DeleteFolderOperation.swift
    25.6 -//  pEpForiOS
    25.7 -//
    25.8 -//  Created by Dirk Zimmermann on 19/09/16.
    25.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   25.10 -//
   25.11 -
   25.12 -import CoreData
   25.13 -
   25.14 -import MessageModel
   25.15 -
   25.16 -public class DeleteFoldersOperation: ImapSyncOperation {
   25.17 -    let accountID: NSManagedObjectID
   25.18 -    var account: CdAccount!
   25.19 -    var folderNamesToDelete = [String]()
   25.20 -    var currentFolderName: String?
   25.21 -    var syncDelegate: DeleteFoldersSyncDelegate?
   25.22 -
   25.23 -    init(parentName: String = #function, errorContainer: ServiceErrorProtocol = ErrorContainer(),
   25.24 -                imapSyncData: ImapSyncData, account: CdAccount) {
   25.25 -        self.accountID = account.objectID
   25.26 -        super.init(parentName: parentName, errorContainer: errorContainer,
   25.27 -                   imapSyncData: imapSyncData)
   25.28 -    }
   25.29 -
   25.30 -    public override func main() {
   25.31 -        if !checkImapSync() {
   25.32 -            markAsFinished()
   25.33 -            return
   25.34 -        }
   25.35 -        privateMOC.perform() { [unowned self] in
   25.36 -            self.process()
   25.37 -        }
   25.38 -    }
   25.39 -
   25.40 -    func process() {
   25.41 -        account = privateMOC.object(with: accountID) as? CdAccount
   25.42 -        guard account != nil else {
   25.43 -            addError(BackgroundError.CoreDataError.couldNotFindAccount(info: comp))
   25.44 -            markAsFinished()
   25.45 -            return
   25.46 -        }
   25.47 -
   25.48 -        let p = NSPredicate(format: "shouldDelete = true and account = %@", account)
   25.49 -        if let folders = CdFolder.all(predicate: p) as? [CdFolder] {
   25.50 -            for f in folders {
   25.51 -                if let fn = f.name {
   25.52 -                    folderNamesToDelete.append(fn)
   25.53 -                }
   25.54 -            }
   25.55 -        }
   25.56 -
   25.57 -        if let sync = imapSyncData.sync {
   25.58 -            syncDelegate = DeleteFoldersSyncDelegate(errorHandler: self)
   25.59 -            sync.delegate = syncDelegate
   25.60 -            deleteNextRemoteFolder(sync: sync)
   25.61 -        }
   25.62 -    }
   25.63 -
   25.64 -    func deleteNextRemoteFolder(sync: ImapSync) {
   25.65 -        if let fn = currentFolderName {
   25.66 -            privateMOC.performAndWait() {
   25.67 -                if let folder = CdFolder.by(name: fn, account: self.account) {
   25.68 -                    self.privateMOC.delete(folder)
   25.69 -                }
   25.70 -            }
   25.71 -        }
   25.72 -        if !isCancelled {
   25.73 -            if let fn = folderNamesToDelete.first {
   25.74 -                currentFolderName = fn
   25.75 -                imapSyncData.sync?.deleteFolderWithName(fn)
   25.76 -                folderNamesToDelete.removeFirst()
   25.77 -                return
   25.78 -            }
   25.79 -        }
   25.80 -        markAsFinished()
   25.81 -    }
   25.82 -
   25.83 -    override func markAsFinished() {
   25.84 -        syncDelegate = nil
   25.85 -        super.markAsFinished()
   25.86 -    }
   25.87 -}
   25.88 -
   25.89 -class DeleteFoldersSyncDelegate: DefaultImapSyncDelegate {
   25.90 -    public override func folderDeleteCompleted(_ sync: ImapSync, notification: Notification?) {
   25.91 -        (errorHandler as? DeleteFoldersOperation)?.deleteNextRemoteFolder(sync: sync)
   25.92 -    }
   25.93 -}
    26.1 --- a/pEpForiOS/Background/EncryptAndSendOperation.swift	Thu May 09 11:47:04 2019 +0200
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,302 +0,0 @@
    26.4 -//
    26.5 -//  EncryptAndSendOperation.swift
    26.6 -//  pEpForiOS
    26.7 -//
    26.8 -//  Created by Dirk Zimmermann on 11/01/2017.
    26.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   26.10 -//
   26.11 -
   26.12 -import CoreData
   26.13 -import pEpIOSToolbox
   26.14 -import MessageModel
   26.15 -
   26.16 -/**
   26.17 - Encrypts and SMTPs all suitable messages.
   26.18 - */
   26.19 -public class EncryptAndSendOperation: ConcurrentBaseOperation {
   26.20 -    var smtpSend: SmtpSend!
   26.21 -    var smtpSendData: SmtpSendData
   26.22 -
   26.23 -    /** The object ID of the last sent message, so we can move it on success */
   26.24 -    var lastSentMessageObjectID: NSManagedObjectID?
   26.25 -
   26.26 -    public init(parentName: String = #function, smtpSendData: SmtpSendData,
   26.27 -                errorContainer: ServiceErrorProtocol = ErrorContainer()) {
   26.28 -        self.smtpSendData = smtpSendData
   26.29 -        super.init(parentName: parentName, errorContainer: errorContainer)
   26.30 -    }
   26.31 -
   26.32 -    private func checkSmtpSend() -> Bool {
   26.33 -        smtpSend = smtpSendData.smtp
   26.34 -        if smtpSend == nil {
   26.35 -            addError(BackgroundError.SmtpError.invalidConnection(info: comp))
   26.36 -            markAsFinished()
   26.37 -            return false
   26.38 -        }
   26.39 -        return true
   26.40 -    }
   26.41 -
   26.42 -    override public func main() {
   26.43 -        if !checkSmtpSend() {
   26.44 -            markAsFinished()
   26.45 -            return
   26.46 -        }
   26.47 -        smtpSend.delegate = self
   26.48 -        handleNextMessage()
   26.49 -    }
   26.50 -
   26.51 -    private static func outgoingMails(context: NSManagedObjectContext,
   26.52 -                                     cdAccount: CdAccount) -> [CdMessage] {
   26.53 -        let p = CdMessage.PredicateFactory.outgoingMails(in: cdAccount)
   26.54 -        return CdMessage.all(predicate: p, in: context) as? [CdMessage] ?? []
   26.55 -    }
   26.56 -
   26.57 -    static func outgoingMailsExist(in context: NSManagedObjectContext,
   26.58 -                                   forAccountWith cdAccountObjectId: NSManagedObjectID) -> Bool {
   26.59 -        var outgoingMsgs = [CdMessage]()
   26.60 -        context.performAndWait {
   26.61 -            guard let cdAccount = context.object(with: cdAccountObjectId) as? CdAccount else {
   26.62 -                Logger.backendLogger.errorAndCrash(
   26.63 -                    "No NSManagedObject for NSManagedObjectID")
   26.64 -                outgoingMsgs = []
   26.65 -                return
   26.66 -            }
   26.67 -            outgoingMsgs = outgoingMails(context: context, cdAccount: cdAccount)
   26.68 -        }
   26.69 -        return outgoingMsgs.count > 0
   26.70 -    }
   26.71 -
   26.72 -    public static func retrieveNextMessage(
   26.73 -        context: NSManagedObjectContext,
   26.74 -        cdAccount: CdAccount) -> (PEPMessageDict, Bool, NSManagedObjectID)? {
   26.75 -        var pepMessage: PEPMessageDict?
   26.76 -        var objID: NSManagedObjectID?
   26.77 -        var protected = true
   26.78 -
   26.79 -        let p = CdMessage.PredicateFactory.outgoingMails(in: cdAccount)
   26.80 -        if let m = CdMessage.first(predicate: p) {
   26.81 -            if m.sent == nil {
   26.82 -                m.sent = Date()
   26.83 -                context.saveAndLogErrors()
   26.84 -            }
   26.85 -            pepMessage = m.pEpMessageDict()
   26.86 -            protected = m.pEpProtected
   26.87 -            objID = m.objectID
   26.88 -        }
   26.89 -
   26.90 -        if let o = objID, let p = pepMessage {
   26.91 -            return (p, protected, o)
   26.92 -        }
   26.93 -        return nil
   26.94 -    }
   26.95 -
   26.96 -    func send(pEpMessageDict: PEPMessageDict?) {
   26.97 -        guard var msg = pEpMessageDict else {
   26.98 -            handleError(BackgroundError.GeneralError.invalidParameter(info: comp),
   26.99 -                        message: "Cannot send nil message")
  26.100 -            return
  26.101 -        }
  26.102 -
  26.103 -        msg.removeOriginalRatingHeader()
  26.104 -
  26.105 -        let pantMail = PEPUtil.pantomime(pEpMessageDict: msg)
  26.106 -        smtpSend.smtp.setRecipients(nil)
  26.107 -        smtpSend.smtp.setMessageData(nil)
  26.108 -        smtpSend.smtp.setMessage(pantMail)
  26.109 -        smtpSend.smtp.sendMessage()
  26.110 -    }
  26.111 -
  26.112 -    func moveLastMessageToSentFolder(context: NSManagedObjectContext) {
  26.113 -        guard
  26.114 -            let objID = lastSentMessageObjectID,
  26.115 -            let cdMessage = context.object(with: objID) as? CdMessage,
  26.116 -            let cdAccount = cdMessage.parent?.account,
  26.117 -            let sentFolder = CdFolder.by(folderType: .sent, account: cdAccount),
  26.118 -            let message = cdMessage.message()
  26.119 -            else {
  26.120 -                Logger.backendLogger.errorAndCrash("Problem moving last message")
  26.121 -                return
  26.122 -        }
  26.123 -        let rating = message.outgoingMessageRating().rawValue
  26.124 -        MessageModelConfig.messageFolderDelegate?.didDelete(messageFolder: message)
  26.125 -        cdMessage.parent = sentFolder
  26.126 -        cdMessage.imap?.localFlags?.flagSeen = true
  26.127 -        cdMessage.pEpRating = Int16(rating)
  26.128 -        Record.saveAndWait()
  26.129 -
  26.130 -        guard let refreshedMsg = cdMessage.message() else {
  26.131 -            Log.shared.errorAndCrash(component: #function, errorString: "No msg")
  26.132 -            return
  26.133 -        }
  26.134 -        Message.createCdFakeMessage(for: refreshedMsg)
  26.135 -        Log.info(component: #function,
  26.136 -                 content: "Sent message. messageID: \(String(describing: cdMessage.messageID))")
  26.137 -    }
  26.138 -
  26.139 -    func handleNextMessage() {
  26.140 -        guard !isCancelled else {
  26.141 -            waitForBackgroundTasksToFinish()
  26.142 -            return
  26.143 -        }
  26.144 -        let context = privateMOC
  26.145 -        context.perform { [weak self] in
  26.146 -            self?.handleNextMessageInternal(context: context)
  26.147 -        }
  26.148 -    }
  26.149 -
  26.150 -    private func handleMessageSent() {
  26.151 -        let moc = privateMOC
  26.152 -        moc.perform { [weak self] in
  26.153 -            guard let me = self else {
  26.154 -                Logger.backendLogger.lostMySelf()
  26.155 -                return
  26.156 -            }
  26.157 -            me.moveLastMessageToSentFolder(context: moc)
  26.158 -            me.handleNextMessageInternal(context: moc)
  26.159 -        }
  26.160 -    }
  26.161 -
  26.162 -    func handleNextMessageInternal(context: NSManagedObjectContext) {
  26.163 -        guard
  26.164 -            let accountId = smtpSendData.connectInfo.accountObjectID,
  26.165 -            let cdAccount = context.object(with: accountId) as? CdAccount else {
  26.166 -                handleError(BackgroundError.CoreDataError.couldNotFindAccount(info: nil))
  26.167 -                return
  26.168 -        }
  26.169 -
  26.170 -        lastSentMessageObjectID = nil
  26.171 -        if let (msg, protected, cdMessageObjID) = EncryptAndSendOperation.retrieveNextMessage(
  26.172 -            context: context, cdAccount: cdAccount) {
  26.173 -            lastSentMessageObjectID = cdMessageObjID
  26.174 -            let session = PEPSession()
  26.175 -            do {
  26.176 -                let (_, encryptedMessageToSend) = try session.encrypt(
  26.177 -                    pEpMessageDict: msg, encryptionFormat: protected ? PEP_enc_PEP : PEP_enc_none)
  26.178 -                guard
  26.179 -                    let encrypted = encryptedMessageToSend?.mutableCopy() as? PEPMessageDict else {
  26.180 -                    Log.shared.errorAndCrash(component: #function,
  26.181 -                                             errorString: "Could not encrypt but did not throw.")
  26.182 -                     handleError(BackgroundError.PepError.encryptionError(info:
  26.183 -                        "Could not encrypt but did not throw."))
  26.184 -                    return
  26.185 -                }
  26.186 -                setOriginalRatingHeader(toMessageWithObjId: cdMessageObjID, inContext: context)
  26.187 -                send(pEpMessageDict: encrypted)
  26.188 -            } catch let err as NSError {
  26.189 -                handleError(err)
  26.190 -            }
  26.191 -        } else {
  26.192 -            markAsFinished()
  26.193 -        }
  26.194 -    }
  26.195 -
  26.196 -    private func setOriginalRatingHeader(toMessageWithObjId objId: NSManagedObjectID,
  26.197 -                                         inContext moc: NSManagedObjectContext) {
  26.198 -        guard
  26.199 -            let unencryptedCdMessage = privateMOC.object(with: objId) as? CdMessage,
  26.200 -            let unencryptedMessage = unencryptedCdMessage.message() else {
  26.201 -            Logger.backendLogger.errorAndCrash("No message")
  26.202 -            return
  26.203 -        }
  26.204 -
  26.205 -        let originalRating = unencryptedMessage.outgoingMessageRating()
  26.206 -        unencryptedMessage.setOriginalRatingHeader(rating: originalRating)
  26.207 -        unencryptedMessage.save()
  26.208 -    }
  26.209 -}
  26.210 -
  26.211 -extension EncryptAndSendOperation: SmtpSendDelegate {
  26.212 -    public func badResponse(_ smtp: SmtpSend, response: String?) {
  26.213 -        let error = BackgroundError.SmtpError.badResponse(info: comp)
  26.214 -        handleError(error, message: "badResponse")
  26.215 -    }
  26.216 -
  26.217 -    public func messageSent(_ smtp: SmtpSend, theNotification: Notification?) {
  26.218 -        handleMessageSent()
  26.219 -    }
  26.220 -
  26.221 -    public func messageNotSent(_ smtp: SmtpSend, theNotification: Notification?) {
  26.222 -        let error = BackgroundError.SmtpError.messageNotSent(info: comp)
  26.223 -        handleError(error, message: "messageNotSent")
  26.224 -    }
  26.225 -
  26.226 -    public func transactionInitiationCompleted(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.227 -
  26.228 -    public func transactionInitiationFailed(_ smtp: SmtpSend, theNotification: Notification?) {
  26.229 -        let error = BackgroundError.SmtpError.transactionInitiationFailed(info: comp)
  26.230 -        handleError(error, message: "transactionInitiationFailed")
  26.231 -    }
  26.232 -
  26.233 -    public func recipientIdentificationCompleted(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.234 -
  26.235 -    public func recipientIdentificationFailed(_ smtp: SmtpSend, theNotification: Notification?) {
  26.236 -        let error = BackgroundError.SmtpError.recipientIdentificationFailed(info: comp)
  26.237 -        handleError(error, message: "recipientIdentificationFailed")
  26.238 -    }
  26.239 -
  26.240 -    public func transactionResetCompleted(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.241 -
  26.242 -    public func transactionResetFailed(_ smtp: SmtpSend, theNotification: Notification?) {
  26.243 -        let error = BackgroundError.SmtpError.transactionResetFailed(info: comp)
  26.244 -        handleError(error, message: "transactionResetFailed")
  26.245 -    }
  26.246 -
  26.247 -    public func authenticationCompleted(_ smtp: SmtpSend, theNotification: Notification?) {
  26.248 -        addError(BackgroundError.GeneralError.illegalState(info: #function))
  26.249 -        markAsFinished()
  26.250 -    }
  26.251 -
  26.252 -    public func authenticationFailed(_ smtp: SmtpSend, theNotification: Notification?) {
  26.253 -        let error = BackgroundError.SmtpError.authenticationFailed(info: comp)
  26.254 -        handleError(error, message: "authenticationFailed")
  26.255 -    }
  26.256 -
  26.257 -    public func connectionEstablished(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.258 -
  26.259 -    public func connectionLost(_ smtp: SmtpSend, theNotification: Notification?) {
  26.260 -        let error = BackgroundError.SmtpError.connectionLost(info: comp)
  26.261 -        handleError(error, message: "connectionLost")
  26.262 -    }
  26.263 -
  26.264 -    public func connectionTerminated(_ smtp: SmtpSend, theNotification: Notification?) {
  26.265 -        let error = BackgroundError.SmtpError.connectionTerminated(info: comp)
  26.266 -        handleError(error, message: "connectionTerminated")
  26.267 -    }
  26.268 -
  26.269 -    public func connectionTimedOut(_ smtp: SmtpSend, theNotification: Notification?) {
  26.270 -        let error = BackgroundError.SmtpError.connectionTimedOut(info: comp)
  26.271 -        handleError(error, message: "connectionTimedOut")
  26.272 -    }
  26.273 -
  26.274 -    public func requestCancelled(_ smtp: SmtpSend, theNotification: Notification?) {
  26.275 -        let error = BackgroundError.SmtpError.requestCancelled(info: comp)
  26.276 -        handleError(error, message: "requestCancelled")
  26.277 -    }
  26.278 -
  26.279 -    public func serviceInitialized(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.280 -
  26.281 -    public func serviceReconnected(_ smtp: SmtpSend, theNotification: Notification?) {}
  26.282 -}
  26.283 -
  26.284 -extension Dictionary where Key == String {
  26.285 -    public mutating func removeOriginalRatingHeader() {
  26.286 -        let headersToIgnore = Set(["X-EncStatus".lowercased()])
  26.287 -        let newHeaders = NSMutableArray()
  26.288 -        if let theHeaders = self[kPepOptFields] as? [NSArray] {
  26.289 -            for aHeader in theHeaders {
  26.290 -                if aHeader.count == 2, let headerName = aHeader[0] as? String {
  26.291 -                    if !headersToIgnore.contains(headerName.lowercased()) {
  26.292 -                        newHeaders.add(aHeader)
  26.293 -                    }
  26.294 -                }
  26.295 -            }
  26.296 -            if theHeaders.count != newHeaders.count {
  26.297 -                if let newValue = newHeaders as? Value {
  26.298 -                    self[kPepOptFields] = newValue
  26.299 -                } else {
  26.300 -                    Logger.backendLogger.errorAndCrash("Can't cast to `Value`")
  26.301 -                }
  26.302 -            }
  26.303 -        }
  26.304 -    }
  26.305 -}
    27.1 --- a/pEpForiOS/Background/Error/BackgroundError.swift	Thu May 09 11:47:04 2019 +0200
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,128 +0,0 @@
    27.4 -//
    27.5 -//  BackgroundError.swift
    27.6 -//  pEp
    27.7 -//
    27.8 -//  Created by Andreas Buff on 20.12.17.
    27.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   27.10 -//
   27.11 -
   27.12 -import Foundation
   27.13 -
   27.14 -/// Wraps all errors that might occur in Background/Service layer
   27.15 -struct BackgroundError {
   27.16 -
   27.17 -    public enum GeneralError: Error {
   27.18 -        /// Unexpected state.
   27.19 -        /// Examples are:
   27.20 -        /// An operation that encountered an unexpected state/callback, e.g. a 'message received'
   27.21 -        /// when waiting for a list of folders
   27.22 -        /// or
   27.23 -        /// An operation that needs an open folder, but there was none
   27.24 -        case illegalState(info: String?)
   27.25 -        case invalidParameter(info: String?)
   27.26 -        case operationFailed(info: String?)
   27.27 -
   27.28 -        public func info() -> String? {
   27.29 -            switch self {
   27.30 -            case .illegalState(let info):
   27.31 -                return info
   27.32 -            case .invalidParameter(let info):
   27.33 -                return info
   27.34 -            case .operationFailed(let info):
   27.35 -                return info
   27.36 -            }
   27.37 -        }
   27.38 -    }
   27.39 -
   27.40 -    public enum ImapError: Error {
   27.41 -        case invalidConnection(info: String?)
   27.42 -
   27.43 -        public func info() -> String? {
   27.44 -            switch self {
   27.45 -            case .invalidConnection(let info):
   27.46 -                return info
   27.47 -            }
   27.48 -        }
   27.49 -    }
   27.50 -
   27.51 -    public enum SmtpError: Error {
   27.52 -        case invalidConnection(info: String?)
   27.53 -        case messageNotSent(info: String?)
   27.54 -        case transactionInitiationFailed(info: String?)
   27.55 -        case recipientIdentificationFailed(info: String?)
   27.56 -        case transactionResetFailed(info: String?)
   27.57 -        case authenticationFailed(info: String?)
   27.58 -        case connectionLost(info: String?)
   27.59 -        case connectionTerminated(info: String?)
   27.60 -        case connectionTimedOut(info: String?)
   27.61 -        case requestCancelled(info: String?)
   27.62 -        case badResponse(info: String?)
   27.63 -
   27.64 -        public func info() -> String? {
   27.65 -            switch self {
   27.66 -            case .invalidConnection(let info):
   27.67 -                return info
   27.68 -            case .messageNotSent(let info):
   27.69 -                return info
   27.70 -            case .transactionInitiationFailed(let info):
   27.71 -                return info
   27.72 -            case .recipientIdentificationFailed(let info):
   27.73 -                return info
   27.74 -            case .transactionResetFailed(let info):
   27.75 -                return info
   27.76 -            case .authenticationFailed(let info):
   27.77 -                return info
   27.78 -            case .connectionLost(let info):
   27.79 -                return info
   27.80 -            case .connectionTerminated(let info):
   27.81 -                return info
   27.82 -            case .connectionTimedOut(let info):
   27.83 -                return info
   27.84 -            case .requestCancelled(let info):
   27.85 -                return info
   27.86 -            case .badResponse(let info):
   27.87 -                return info
   27.88 -            }
   27.89 -        }
   27.90 -    }
   27.91 -
   27.92 -    public enum CoreDataError: Error {
   27.93 -        case couldNotInsertOrUpdate(info: String?)
   27.94 -        case couldNotStoreFolder(info: String?)
   27.95 -        case couldNotStoreMessage(info: String?)
   27.96 -        case couldNotFindAccount(info: String?)
   27.97 -        case couldNotFindFolder(info: String?)
   27.98 -        case couldNotFindMessage(info: String?)
   27.99 -        
  27.100 -        public func info() -> String? {
  27.101 -            switch self {
  27.102 -            case .couldNotInsertOrUpdate(let info):
  27.103 -                return info
  27.104 -            case .couldNotStoreFolder(let info):
  27.105 -                return info
  27.106 -            case .couldNotStoreMessage(let info):
  27.107 -                return info
  27.108 -            case .couldNotFindAccount(let info):
  27.109 -                return info
  27.110 -            case .couldNotFindFolder(let info):
  27.111 -                return info
  27.112 -            case .couldNotFindMessage(let info):
  27.113 -                return info
  27.114 -            }
  27.115 -        }
  27.116 -    }
  27.117 -
  27.118 -    /**
  27.119 -     Errors dealing with the pEp engine.
  27.120 -     */
  27.121 -    public enum PepError: Error {
  27.122 -        case encryptionError(info: String?)
  27.123 -
  27.124 -        public func info() -> String? {
  27.125 -            switch self {
  27.126 -            case .encryptionError(let info):
  27.127 -                return info
  27.128 -            }
  27.129 -        }
  27.130 -    }
  27.131 -}
    28.1 --- a/pEpForiOS/Background/Error/ErrorContainer.swift	Thu May 09 11:47:04 2019 +0200
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,26 +0,0 @@
    28.4 -//
    28.5 -//  ErrorContainer.swift
    28.6 -//  pEp
    28.7 -//
    28.8 -//  Created by Andreas Buff on 20.12.17.
    28.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   28.10 -//
   28.11 -
   28.12 -import Foundation
   28.13 -
   28.14 -open class ErrorContainer: ServiceErrorProtocol {
   28.15 -    public var error: Error?
   28.16 -
   28.17 -    public init() {}
   28.18 -
   28.19 -    public func addError(_ error: Error) {
   28.20 -        if self.error == nil {
   28.21 -            self.error = error
   28.22 -        }
   28.23 -    }
   28.24 -
   28.25 -    public func hasErrors() -> Bool {
   28.26 -        return error != nil
   28.27 -    }
   28.28 -}
   28.29 -
    29.1 --- a/pEpForiOS/Background/Error/PantomimeError.swift	Thu May 09 11:47:04 2019 +0200
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,28 +0,0 @@
    29.4 -//
    29.5 -//  PantomimeError.swift
    29.6 -//  pEpForiOS
    29.7 -//
    29.8 -//  Created by Dirk Zimmermann on 24.07.17.
    29.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   29.10 -//
   29.11 -
   29.12 -import Foundation
   29.13 -
   29.14 -public enum PantomimeError: Error {
   29.15 -    /**
   29.16 -     Pantomime called the delegate without notification info
   29.17 -     */
   29.18 -    case missingNotification
   29.19 -
   29.20 -    /**
   29.21 -     Pantomime called the delegate with notification info, but that is
   29.22 -     missing the user info
   29.23 -     */
   29.24 -    case missingUserInfo
   29.25 -
   29.26 -    /**
   29.27 -     Pantomime called the delegate with notification info and user info,
   29.28 -     but it does not contain messages.
   29.29 -     */
   29.30 -    case missingMessages
   29.31 -}
    30.1 --- a/pEpForiOS/Background/Error/ReportingErrorContainer.swift	Thu May 09 11:47:04 2019 +0200
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,29 +0,0 @@
    30.4 -//
    30.5 -//  ReportingErrorContainer.swift
    30.6 -//  pEp
    30.7 -//
    30.8 -//  Created by Andreas Buff on 30.11.17.
    30.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   30.10 -//
   30.11 -
   30.12 -import Foundation
   30.13 -
   30.14 -/// Conform tho this if you want to get informed about errors reported to ReportingErrorContainer.
   30.15 -public protocol ReportingErrorContainerDelegate: class {
   30.16 -    func reportingErrorContainer(_ errorContainer: ReportingErrorContainer, didReceive error: Error)
   30.17 -}
   30.18 -
   30.19 -/// Same as ErrorContainer, but offers delegate that is informed in case of any reported error.
   30.20 -public class ReportingErrorContainer: ErrorContainer {
   30.21 -    weak public var delegate: ReportingErrorContainerDelegate?
   30.22 -
   30.23 -    public init(delegate: ReportingErrorContainerDelegate) {
   30.24 -        self.delegate = delegate
   30.25 -        super.init()
   30.26 -    }
   30.27 -
   30.28 -    override public func addError(_ error: Error) {
   30.29 -        super.addError(error)
   30.30 -        delegate?.reportingErrorContainer(self, didReceive: error)
   30.31 -    }
   30.32 -}
    31.1 --- a/pEpForiOS/Background/Error/ServiceErrorProtocol.swift	Thu May 09 11:47:04 2019 +0200
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,18 +0,0 @@
    31.4 -//
    31.5 -//  ServiceErrorProtocol.swift
    31.6 -//  pEpForiOS
    31.7 -//
    31.8 -//  Created by Dirk Zimmermann on 16/12/16.
    31.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   31.10 -//
   31.11 -
   31.12 -import Foundation
   31.13 -
   31.14 -/**
   31.15 - For exchanging errors between `BaseOperation`s.
   31.16 - */
   31.17 -public protocol ServiceErrorProtocol {
   31.18 -    var error: Error? { get }
   31.19 -    func addError(_ error: Error)
   31.20 -    func hasErrors() -> Bool
   31.21 -}
    32.1 --- a/pEpForiOS/Background/FetchMessagesOperation.swift	Thu May 09 11:47:04 2019 +0200
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,117 +0,0 @@
    32.4 -//
    32.5 -//  FetchMessagesOperation.swift
    32.6 -//  pEpForiOS
    32.7 -//
    32.8 -//  Created by Dirk Zimmermann on 15/04/16.
    32.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   32.10 -//
   32.11 -
   32.12 -import CoreData
   32.13 -
   32.14 -import MessageModel
   32.15 -
   32.16 -/**
   32.17 - Calling this block indicates that a message has been fetched and stored.
   32.18 - */
   32.19 -public typealias MessageFetchedBlock = (_ message: CdMessage) -> ()
   32.20 -
   32.21 -/**
   32.22 - Fetches new messages from the server.
   32.23 - This operation is not intended to be put in a queue (though this should work too).
   32.24 - It runs asynchronously, but mainly driven by the main runloop through the use of NSStream.
   32.25 - Therefore it behaves as a concurrent operation, handling the state itself.
   32.26 - */
   32.27 -public class FetchMessagesOperation: ImapSyncOperation {
   32.28 -    var folderToOpen: String
   32.29 -    let messageFetchedBlock: MessageFetchedBlock?
   32.30 -    var syncDelegate: FetchMessagesSyncDelegate?
   32.31 -
   32.32 -    init(
   32.33 -        parentName: String = #function, errorContainer: ServiceErrorProtocol = ErrorContainer(),
   32.34 -        imapSyncData: ImapSyncData,
   32.35 -        folderName: String = ImapSync.defaultImapInboxName,
   32.36 -        messageFetchedBlock: MessageFetchedBlock? = nil) {
   32.37 -        self.folderToOpen = folderName
   32.38 -        self.messageFetchedBlock = messageFetchedBlock
   32.39 -        super.init(parentName: parentName, errorContainer: errorContainer,
   32.40 -                   imapSyncData: imapSyncData)
   32.41 -    }
   32.42 -
   32.43 -    override public func main() {
   32.44 -        if !checkImapSync() {
   32.45 -            markAsFinished()
   32.46 -            return
   32.47 -        }
   32.48 -        let context = privateMOC
   32.49 -        privateMOC.perform() {
   32.50 -            self.process(context: context)
   32.51 -        }
   32.52 -    }
   32.53 -
   32.54 -    func process(context: NSManagedObjectContext) {
   32.55 -        guard
   32.56 -            let accountId = imapSyncData.connectInfo.accountObjectID,
   32.57 -            let account = context.object(with: accountId) as? CdAccount else {
   32.58 -                addError(BackgroundError.CoreDataError.couldNotFindAccount(info: comp))
   32.59 -                waitForBackgroundTasksToFinish()
   32.60 -                return
   32.61 -        }
   32.62 -        let folderBuilder = ImapFolderBuilder(accountID: accountId,
   32.63 -                                              backgroundQueue: self.backgroundQueue,
   32.64 -                                              name: name,
   32.65 -                                              messageFetchedBlock: messageFetchedBlock)
   32.66 -        // Treat Inbox specially, as it is the only mailbox
   32.67 -        // that is mandatorily case-insensitive.
   32.68 -        if self.folderToOpen.lowercased() == ImapSync.defaultImapInboxName.lowercased() {
   32.69 -            if let folder = CdFolder.first(attributes: ["folderTypeRawValue": FolderType.inbox.rawValue,
   32.70 -                                                        "account": account]) {
   32.71 -                folderToOpen = folder.name!
   32.72 -            }
   32.73 -        }
   32.74 -
   32.75 -        syncDelegate = FetchMessagesSyncDelegate(errorHandler: self)
   32.76 -        self.imapSyncData.sync?.delegate = syncDelegate
   32.77 -        self.imapSyncData.sync?.folderBuilder = folderBuilder
   32.78 -
   32.79 -        if let sync = imapSyncData.sync {
   32.80 -            if !sync.openMailBox(name: self.folderToOpen) {
   32.81 -                fetchMessages(sync)
   32.82 -            }
   32.83 -        }
   32.84 -    }
   32.85 -
   32.86 -    func fetchMessages(_ sync: ImapSync) {
   32.87 -        do {
   32.88 -            try sync.fetchMessages()
   32.89 -        } catch {
   32.90 -            addIMAPError(error)
   32.91 -            waitForBackgroundTasksToFinish()
   32.92 -        }
   32.93 -    }
   32.94 -
   32.95 -    public override func cancel() {
   32.96 -        if let sync = imapSyncData.sync {
   32.97 -            sync.cancel()
   32.98 -        }
   32.99 -        super.cancel()
  32.100 -    }
  32.101 -
  32.102 -    public override func waitForBackgroundTasksToFinish() {
  32.103 -        syncDelegate = nil
  32.104 -        super.waitForBackgroundTasksToFinish()
  32.105 -    }
  32.106 -}
  32.107 -
  32.108 -class FetchMessagesSyncDelegate: DefaultImapSyncDelegate {
  32.109 -    public override func folderFetchCompleted(_ sync: ImapSync, notification: Notification?) {
  32.110 -        (errorHandler as? FetchMessagesOperation)?.waitForBackgroundTasksToFinish()
  32.111 -    }
  32.112 -
  32.113 -    public override func messagePrefetchCompleted(_ sync: ImapSync, notification: Notification?) {
  32.114 -        // do nothing
  32.115 -    }
  32.116 -
  32.117 -    public override func folderOpenCompleted(_ sync: ImapSync, notification: Notification?) {
  32.118 -        (errorHandler as? FetchMessagesOperation)?.fetchMessages(sync)
  32.119 -    }
  32.120 -}
    33.1 --- a/pEpForiOS/Background/FetchNumberOfNewMailsOperation.swift	Thu May 09 11:47:04 2019 +0200
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,172 +0,0 @@
    33.4 -//
    33.5 -//  FetchNumberOfNewMailsOperation.swift
    33.6 -//  pEp
    33.7 -//
    33.8 -//  Created by Andreas Buff on 18.12.17.
    33.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   33.10 -//
   33.11 -
   33.12 -import CoreData
   33.13 -import MessageModel
   33.14 -import pEpIOSToolbox
   33.15 -
   33.16 -/// Fetches UIDs of  new (to us) messages in a given folder and returns its count.
   33.17 -class FetchNumberOfNewMailsOperation: ImapSyncOperation {
   33.18 -    typealias CompletionBlock = (_ numNewMails: Int?) -> ()
   33.19 -
   33.20 -    private var folderToOpen = ImapSync.defaultImapInboxName
   33.21 -    private var syncDelegate: FetchNumberOfNewMailsSyncDelegate?
   33.22 -    private var numNewMailsFetchedBlock: CompletionBlock?
   33.23 -
   33.24 -    init(parentName: String = #function,
   33.25 -         errorContainer: ServiceErrorProtocol = ErrorContainer(),
   33.26 -         imapSyncData: ImapSyncData,
   33.27 -         folderName: String = ImapSync.defaultImapInboxName,
   33.28 -         numNewMailsFetchedBlock: CompletionBlock? = nil) {
   33.29 -        self.folderToOpen = folderName
   33.30 -        self.numNewMailsFetchedBlock = numNewMailsFetchedBlock
   33.31 -        super.init(parentName: parentName, errorContainer: errorContainer,
   33.32 -                   imapSyncData: imapSyncData)
   33.33 -    }
   33.34 -
   33.35 -    // MARK: - Operation
   33.36 -
   33.37 -    override public func main() {
   33.38 -        if !checkImapSync() {
   33.39 -            markAsFinished()
   33.40 -            return
   33.41 -        }
   33.42 -
   33.43 -        privateMOC.perform() { [weak self] in
   33.44 -            guard let me = self else {
   33.45 -                Logger.backendLogger.lostMySelf()
   33.46 -                return
   33.47 -            }
   33.48 -            me.process()
   33.49 -        }
   33.50 -    }
   33.51 -
   33.52 -    public override func cancel() {
   33.53 -        if let sync = imapSyncData.sync {
   33.54 -            sync.cancel()
   33.55 -        }
   33.56 -        super.cancel()
   33.57 -    }
   33.58 -
   33.59 -    // MARK: - ImapSyncOperation
   33.60 -
   33.61 -    public override func waitForBackgroundTasksToFinish() {
   33.62 -        syncDelegate = nil
   33.63 -        super.waitForBackgroundTasksToFinish()
   33.64 -    }
   33.65 -
   33.66 -    // MARK: - Internal
   33.67 -
   33.68 -    private func cdFolder() -> CdFolder? {
   33.69 -        var result: CdFolder?
   33.70 -        privateMOC.performAndWait {
   33.71 -            guard
   33.72 -                let accountId = imapSyncData.connectInfo.accountObjectID,
   33.73 -                let account = privateMOC.object(with: accountId) as? CdAccount else {
   33.74 -                    addError(BackgroundError.CoreDataError.couldNotFindAccount(info: comp))
   33.75 -                    waitForBackgroundTasksToFinish()
   33.76 -                    return
   33.77 -            }
   33.78 -            // Treat Inbox specially, as it is the only mailbox that is mandatorily case-insensitive.
   33.79 -            // Thus we search for
   33.80 -            if self.folderToOpen.lowercased() == ImapSync.defaultImapInboxName.lowercased() {
   33.81 -                if let folder = CdFolder.first(attributes:
   33.82 -                    ["folderTypeRawValue": FolderType.inbox.rawValue,   "account": account]) {
   33.83 -                    result = folder
   33.84 -                    return
   33.85 -                }
   33.86 -            }
   33.87 -            result = CdFolder.first(attributes: ["name": folderToOpen, "account": account])
   33.88 -        }
   33.89 -        return result
   33.90 -    }
   33.91 -
   33.92 -    private func process() {
   33.93 -        guard let accountId = imapSyncData.connectInfo.accountObjectID else {
   33.94 -            handle(error: BackgroundError.GeneralError.illegalState(info: "No CdAccount ID"))
   33.95 -            return
   33.96 -        }
   33.97 -        let folderBuilder = ImapFolderBuilder(accountID: accountId,
   33.98 -                                              backgroundQueue: self.backgroundQueue,
   33.99 -                                              name: name)
  33.100 -        let cdFolderToOpen = cdFolder()
  33.101 -        if  let name = cdFolderToOpen?.name {
  33.102 -            folderToOpen = name
  33.103 -        }
  33.104 -
  33.105 -        syncDelegate = FetchNumberOfNewMailsSyncDelegate(errorHandler: self)
  33.106 -        self.imapSyncData.sync?.delegate = syncDelegate
  33.107 -        self.imapSyncData.sync?.folderBuilder = folderBuilder
  33.108 -
  33.109 -        if let sync = imapSyncData.sync {
  33.110 -            if !sync.openMailBox(name: self.folderToOpen) {
  33.111 -                self.fetchUids(sync)
  33.112 -            }
  33.113 -        } else {
  33.114 -            Logger.backendLogger.errorAndCrash("No sync")
  33.115 -            markAsFinished()
  33.116 -        }
  33.117 -    }
  33.118 -
  33.119 -    fileprivate func fetchUids(_ sync: ImapSync) {
  33.120 -        do {
  33.121 -            try sync.fetchUidsForNewMessages()
  33.122 -        } catch {
  33.123 -            addIMAPError(error)
  33.124 -            waitForBackgroundTasksToFinish()
  33.125 -        }
  33.126 -    }
  33.127 -    
  33.128 -    fileprivate func handleResult(uids: [Int]?) {
  33.129 -        let uids = validateResult(uids: uids)
  33.130 -        numNewMailsFetchedBlock?(uids?.count)
  33.131 -        waitForBackgroundTasksToFinish()
  33.132 -    }
  33.133 -
  33.134 -    /// If no new mails exist, the server returns the UID of the last (also locally) existing mail.
  33.135 -    /// This method handles this case and filters the existing UID.
  33.136 -    ///
  33.137 -    /// - Parameter uids: uids to validate
  33.138 -    /// - Returns:  empty array if uids contains only one, locally existing UID,
  33.139 -    ///             the unmodified uids otherwize
  33.140 -    private func validateResult(uids: [Int]?) ->[Int]? {
  33.141 -        if let safeUids = uids, safeUids.count != 1 {
  33.142 -            // We have to validate only if uids.count == 1
  33.143 -            return uids
  33.144 -        }
  33.145 -        guard let cdFolderToOpen = cdFolder() else {
  33.146 -            Logger.backendLogger.errorAndCrash("No folder")
  33.147 -            return nil
  33.148 -        }
  33.149 -        guard let theOneAndOnlyUid = uids?.first else {
  33.150 -            // There are zero mails on server.
  33.151 -            return nil
  33.152 -        }
  33.153 -        let messageForUidPredicate = NSPredicate(format: "parent=%@ AND uid=%d", cdFolderToOpen,
  33.154 -                                                 theOneAndOnlyUid)
  33.155 -        if let _ = CdMessage.all(predicate: messageForUidPredicate) {
  33.156 -            // A message with the given UID exists, thus the server response means
  33.157 -            // that "there are no new messages"
  33.158 -            return []
  33.159 -        }
  33.160 -
  33.161 -        return uids
  33.162 -    }
  33.163 -}
  33.164 -
  33.165 -class FetchNumberOfNewMailsSyncDelegate: DefaultImapSyncDelegate {
  33.166 -    public override func folderFetchCompleted(_ sync: ImapSync, notification: Notification?) {
  33.167 -        (errorHandler as? FetchNumberOfNewMailsOperation)?.handleResult(uids:
  33.168 -            notification?.userInfo?["Uids"] as? [Int]
  33.169 -        )
  33.170 -    }
  33.171 -
  33.172 -    public override func folderOpenCompleted(_ sync: ImapSync, notification: Notification?) {
  33.173 -        (errorHandler as? FetchNumberOfNewMailsOperation)?.fetchUids(sync)
  33.174 -    }
  33.175 -}
    34.1 --- a/pEpForiOS/Background/FetchOlderImapMessagesOperation.swift	Thu May 09 11:47:04 2019 +0200
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,21 +0,0 @@
    34.4 -//
    34.5 -//  FetchOlderImapMessagesOperation.swift
    34.6 -//  pEpForiOS
    34.7 -//
    34.8 -//  Created by Andreas Buff on 18.09.17.
    34.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   34.10 -//
   34.11 -
   34.12 -import Foundation
   34.13 -
   34.14 -/// Fetches the next bunch of older messages (older than the allready fetched ones).
   34.15 -public class FetchOlderImapMessagesOperation: FetchMessagesOperation {
   34.16 -    override func fetchMessages(_ sync: ImapSync) {
   34.17 -        do {
   34.18 -            try sync.fetchOlderMessages()
   34.19 -        } catch {
   34.20 -            addIMAPError(error)
   34.21 -            waitForBackgroundTasksToFinish()
   34.22 -        }
   34.23 -    }
   34.24 -}
    35.1 --- a/pEpForiOS/Background/FixAttachmentsOperation.swift	Thu May 09 11:47:04 2019 +0200
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,134 +0,0 @@
    35.4 -//
    35.5 -//  FixAttachmentsOperation.swift
    35.6 -//  pEpForiOS
    35.7 -//
    35.8 -//  Created by Dirk Zimmermann on 21/02/2017.
    35.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   35.10 -//
   35.11 -
   35.12 -import UIKit
   35.13 -import CoreData
   35.14 -import Photos
   35.15 -import pEpIOSToolbox
   35.16 -import MessageModel
   35.17 -
   35.18 -/**
   35.19 - When getting an image from the device, we might get no data but a URL to the data.
   35.20 - Use this operation to (down)load attachment content before sending such an image attachment.
   35.21 - */
   35.22 -public class FixAttachmentsOperation: ConcurrentBaseOperation {
   35.23 -    let pInvalidLength = NSPredicate(format: "length = 0 and data != nil")
   35.24 -    let pInvalidData = NSPredicate(format: "data = nil and (fileName != nil or assetUrl != nil)")
   35.25 -
   35.26 -    var openFetchCount = 0
   35.27 -
   35.28 -    override public func main() {
   35.29 -        if isCancelled {
   35.30 -            markAsFinished()
   35.31 -            return
   35.32 -        }
   35.33 -        privateMOC.perform {
   35.34 -            self.fixAttachments(context: self.privateMOC)
   35.35 -        }
   35.36 -    }
   35.37 -
   35.38 -    func fixZeroSizeAttachments(context: NSManagedObjectContext) -> Int {
   35.39 -        var changedAttachmentsCount = 0
   35.40 -
   35.41 -        if let cdAttachments1 = CdAttachment.all(predicate: pInvalidLength, orderedBy: nil,
   35.42 -                                                 in: context)
   35.43 -            as? [CdAttachment] {
   35.44 -            for cdAttach in cdAttachments1 {
   35.45 -                if let theData = cdAttach.data {
   35.46 -                    changedAttachmentsCount += 1
   35.47 -                    cdAttach.length = Int64(theData.count)
   35.48 -                }
   35.49 -            }
   35.50 -        }
   35.51 -
   35.52 -        return changedAttachmentsCount
   35.53 -    }
   35.54 -
   35.55 -    func fixNilDataAttachments(context: NSManagedObjectContext, handler: @escaping (Int) -> ()) {
   35.56 -        guard let cdAttachments2 = CdAttachment.all(predicate: pInvalidData, orderedBy: nil,
   35.57 -                                                    in: context)
   35.58 -            as? [CdAttachment] else {
   35.59 -                handler(0)
   35.60 -                return
   35.61 -        }
   35.62 -        let totalCount = cdAttachments2.count
   35.63 -        if totalCount == 0 {
   35.64 -            handler(0)
   35.65 -        } else {
   35.66 -            openFetchCount = totalCount
   35.67 -            for cdAttach in cdAttachments2 {
   35.68 -                if let urlString = cdAttach.assetUrl ?? cdAttach.fileName {
   35.69 -                    let theURL = URL(string: urlString)
   35.70 -                    FixAttachmentsOperation.retrieveData(fromURL: theURL) { data in
   35.71 -                        context.perform {
   35.72 -                            if let theData = data {
   35.73 -                                cdAttach.data = theData
   35.74 -                                context.saveAndLogErrors()
   35.75 -                            }
   35.76 -                            self.openFetchCount -= 1
   35.77 -                            if self.openFetchCount == 0 {
   35.78 -                                handler(totalCount)
   35.79 -                            }
   35.80 -                        }
   35.81 -                    }
   35.82 -                } else {
   35.83 -                    Logger.backendLogger.errorAndCrash("CdAttachment with invalid URL")
   35.84 -                    openFetchCount -= 1
   35.85 -                }
   35.86 -            }
   35.87 -        }
   35.88 -    }
   35.89 -
   35.90 -    /**
   35.91 -     Might be useful for debugging. Not actively called anymore.
   35.92 -     */
   35.93 -    func checkValidity(context: NSManagedObjectContext) {
   35.94 -        let p = NSCompoundPredicate(orPredicateWithSubpredicates: [pInvalidLength, pInvalidData])
   35.95 -        let cdInvalidAttachments = CdAttachment.all(predicate: p, orderedBy: nil, in: context)
   35.96 -            as? [CdAttachment] ?? []
   35.97 -        if cdInvalidAttachments.count > 0 {
   35.98 -            Logger.backendLogger.error("Still %d invalid attachments",
   35.99 -                                       cdInvalidAttachments.count)
  35.100 -        }
  35.101 -    }
  35.102 -
  35.103 -    func fixAttachments(context: NSManagedObjectContext) {
  35.104 -        fixNilDataAttachments(context: context) { countFixedData in
  35.105 -            context.perform { [weak self] in
  35.106 -                let countFixedSize = self?.fixZeroSizeAttachments(context: context) ?? 0
  35.107 -                if countFixedData + countFixedSize > 0 {
  35.108 -                    context.saveAndLogErrors()
  35.109 -                }
  35.110 -                self?.markAsFinished()
  35.111 -            }
  35.112 -        }
  35.113 -    }
  35.114 -
  35.115 -    public static func retrieveData(fromURL: URL?, block: @escaping ((Data?) -> Void)) {
  35.116 -        if let theURL = fromURL {
  35.117 -            do {
  35.118 -                let data = try Data(contentsOf: theURL)
  35.119 -                block(data)
  35.120 -                return
  35.121 -            } catch let err {
  35.122 -                Logger.backendLogger.error("%@", err.localizedDescription)
  35.123 -            }
  35.124 -            let assets = PHAsset.fetchAssets(withALAssetURLs: [theURL], options: nil)
  35.125 -            if let theAsset = assets.firstObject {
  35.126 -                PHImageManager().requestImageData(for: theAsset, options: nil) {
  35.127 -                    data, string, orientation, options in
  35.128 -                    if let theData = data {
  35.129 -                        block(theData)
  35.130 -                    }
  35.131 -                }
  35.132 -            }
  35.133 -        } else {
  35.134 -            block(nil)
  35.135 -        }
  35.136 -    }
  35.137 -}
    36.1 --- a/pEpForiOS/Background/FolderInfoOperation.swift	Thu May 09 11:47:04 2019 +0200
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,104 +0,0 @@
    36.4 -//
    36.5 -//  FolderInfoOperation.swift
    36.6 -//  pEpForiOS
    36.7 -//
    36.8 -//  Created by Dirk Zimmermann on 22.06.17.
    36.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   36.10 -//
   36.11 -
   36.12 -import Foundation
   36.13 -import CoreData
   36.14 -import pEpIOSToolbox
   36.15 -import MessageModel
   36.16 -
   36.17 -/**
   36.18 - Meta data about a folder that is needed to sync existing messages.
   36.19 - */
   36.20 -protocol FolderUIDInfoProtocol {
   36.21 -    var firstUID: UInt { get }
   36.22 -    var lastUID: UInt { get }
   36.23 -
   36.24 -    var valid: Bool { get }
   36.25 -    var empty: Bool { get }
   36.26 -}
   36.27 -
   36.28 -extension FolderUIDInfoProtocol {
   36.29 -    var valid: Bool {
   36.30 -        return firstUID > 0 && lastUID > 0 && lastUID >= firstUID
   36.31 -    }
   36.32 -
   36.33 -    var empty: Bool {
   36.34 -        let hasElements = Int(lastUID) - Int(firstUID) > 0
   36.35 -        return !hasElements
   36.36 -    }
   36.37 -}
   36.38 -
   36.39 -struct FolderUIDInfo: FolderUIDInfoProtocol {
   36.40 -    var firstUID: UInt = 0
   36.41 -    var lastUID: UInt = 0
   36.42 -}
   36.43 -
   36.44 -/**
   36.45 - Determins the folder's first and last UIDs, as they are right now.
   36.46 - */
   36.47 -class FolderInfoOperation: ConcurrentBaseOperation {
   36.48 -    let accountObjectID: NSManagedObjectID
   36.49 -    let folderName: String
   36.50 -    var folderInfo = FolderUIDInfo()
   36.51 -
   36.52 -    public init?(parentName: String = #function,
   36.53 -                errorContainer: ServiceErrorProtocol = ErrorContainer(),
   36.54 -                connectInfo: ConnectInfo,
   36.55 -                folderName: String) {
   36.56 -        guard let accountId = connectInfo.accountObjectID else {
   36.57 -            Logger.backendLogger.errorAndCrash("No CdAccound ID")
   36.58 -            return nil
   36.59 -        }
   36.60 -        self.accountObjectID = accountId
   36.61 -        self.folderName = folderName
   36.62 -        super.init(parentName: parentName, errorContainer: errorContainer)
   36.63 -    }
   36.64 -
   36.65 -    override func main() {
   36.66 -        if isCancelled {
   36.67 -            markAsFinished()
   36.68 -            return
   36.69 -        }
   36.70 -        let context = privateMOC
   36.71 -        context.perform {
   36.72 -            self.process(context: context)
   36.73 -        }
   36.74 -    }
   36.75 -
   36.76 -    func process(context: NSManagedObjectContext) {
   36.77 -        guard
   36.78 -            let cdAccount = context.object(with: accountObjectID) as? CdAccount else {
   36.79 -                handleError(BackgroundError.CoreDataError.couldNotFindAccount(info: nil))
   36.80 -                return
   36.81 -        }
   36.82 -        var theCdFolder: CdFolder?
   36.83 -        if folderName.lowercased() == ImapSync.defaultImapInboxName.lowercased() {
   36.84 -            theCdFolder = CdFolder.by(folderType: .inbox, account: cdAccount)
   36.85 -        } else {
   36.86 -            theCdFolder = CdFolder.by(name: folderName, account: cdAccount)
   36.87 -        }
   36.88 -        guard
   36.89 -            let cdFolder = theCdFolder else {
   36.90 -                handleError(BackgroundError.CoreDataError.couldNotFindFolder(info: nil))
   36.91 -                return
   36.92 -        }
   36.93 -        folderInfo.firstUID = cdFolder.firstUID()
   36.94 -        folderInfo.lastUID = cdFolder.lastUID()
   36.95 -        markAsFinished()
   36.96 -    }
   36.97 -}
   36.98 -
   36.99 -extension FolderInfoOperation: FolderUIDInfoProtocol {
  36.100 -    var firstUID: UInt {
  36.101 -        return folderInfo.firstUID
  36.102 -    }
  36.103 -
  36.104 -    var lastUID: UInt {
  36.105 -        return folderInfo.lastUID
  36.106 -    }
  36.107 -}
    37.1 --- a/pEpForiOS/Background/ImapFolderBuilder.swift	Thu May 09 11:47:04 2019 +0200
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,47 +0,0 @@
    37.4 -//
    37.5 -//  ImapFolderBuilder.swift
    37.6 -//  pEpForiOS
    37.7 -//
    37.8 -//  Created by Dirk Zimmermann on 23/03/2017.
    37.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   37.10 -//
   37.11 -
   37.12 -import CoreData
   37.13 -import pEpIOSToolbox
   37.14 -import MessageModel
   37.15 -
   37.16 -open class ImapFolderBuilder: NSObject, CWFolderBuilding {
   37.17 -    public var folderNameToIgnore: String?
   37.18 -
   37.19 -    let accountID: NSManagedObjectID
   37.20 -    let guaranteedBackgroundQueue: OperationQueue
   37.21 -    let name: String?
   37.22 -    let messageFetchedBlock: MessageFetchedBlock?
   37.23 -
   37.24 -    open var backgroundQueue: OperationQueue? {
   37.25 -        return guaranteedBackgroundQueue
   37.26 -    }
   37.27 -
   37.28 -    public init(accountID: NSManagedObjectID, backgroundQueue: OperationQueue,
   37.29 -                name: String? = nil, messageFetchedBlock: MessageFetchedBlock? = nil) {
   37.30 -        self.accountID = accountID
   37.31 -        self.guaranteedBackgroundQueue = backgroundQueue
   37.32 -        self.name = name
   37.33 -        self.messageFetchedBlock = messageFetchedBlock
   37.34 -    }
   37.35 -
   37.36 -    open func folder(withName: String) -> CWFolder {
   37.37 -        if folderNameToIgnore != nil && withName == folderNameToIgnore {
   37.38 -            Logger.backendLogger.warn("ignoring folder %{public}@", withName)
   37.39 -            return CWFolder(name: withName)
   37.40 -        } else {
   37.41 -            if let theFolder = PersistentImapFolder(
   37.42 -                name: withName, accountID: accountID, backgroundQueue: guaranteedBackgroundQueue,
   37.43 -                logName: name, messageFetchedBlock: messageFetchedBlock) {
   37.44 -                return theFolder
   37.45 -            } else {
   37.46 -                return CWFolder(name: withName)
   37.47 -            }
   37.48 -        }
   37.49 -    }
   37.50 -}
    38.1 --- a/pEpForiOS/Background/ImapSyncOperation.swift	Thu May 09 11:47:04 2019 +0200
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,52 +0,0 @@
    38.4 -//
    38.5 -//  ImapSyncOperation.swift
    38.6 -//  pEpForiOS
    38.7 -//
    38.8 -//  Created by Dirk Zimmermann on 16/12/16.
    38.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
   38.10 -//
   38.11 -
   38.12 -import MessageModel
   38.13 -import pEpIOSToolbox
   38.14 -
   38.15 -public class ImapSyncOperation: ConcurrentBaseOperation {
   38.16 -    let imapSyncData: ImapSyncData
   38.17 -
   38.18 -    init(parentName: String = #function, errorContainer: ServiceErrorProtocol = ErrorContainer(),
   38.19 -                imapSyncData: ImapSyncData) {
   38.20 -        self.imapSyncData = imapSyncData
   38.21 -        super.init(parentName: parentName, errorContainer: errorContainer)
   38.22 -    }
   38.23 -
   38.24 -    public func checkImapSync() -> Bool {
   38.25 -        if imapSyncData.sync == nil {
   38.26 -            addError(BackgroundError.ImapError.invalidConnection(info: comp))
   38.27 -            markAsFinished()
   38.28 -            return false
   38.29 -        }
   38.30 -        return true
   38.31 -    }
   38.32 -
   38.33 -    public func addIMAPError(_ error: Error) {
   38.34 -        addError(error)
   38.35 -        imapSyncData.sync?.imapState.hasError = true
   38.36 -    }
   38.37 -
   38.38 -    override func markAsFinished() {
   38.39 -        imapSyncData.sync?.delegate = nil
   38.40 -        super.markAsFinished()
   38.41 -    }
   38.42 -
   38.43 -    override public func waitForBackgroundTasksToFinish() {
   38.44 -        imapSyncData.sync?.delegate = nil
   38.45 -        super.waitForBackgroundTasksToFinish()
   38.46 -    }
   38.47 -}
   38.48 -
   38.49 -extension ImapSyncOperation: ImapSyncDelegateErrorHandlerProtocol {
   38.50 -    func handle(error: Error) {
   38.51 -        Logger.backendLogger.error("%{public}@", error.localizedDescription)
   38.52 -        addIMAPError(error)
   38.53 -        markAsFinished()
   38.54 -    }
   38.55 -}
    39.1 --- a/pEpForiOS/Background/MatchUidToMsnOperation.swift	Thu May 09 11:47:04 2019 +0200
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,52 +0,0 @@
    39.4 -//
    39.5 -//  MatchUidToMsnOperation.swift
    39.6 -//  pEpForiOS
    39.7 -//
    39.8 -//  Created by Dirk Zimmermann on 24.07.17.
    39.9 -//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   39.10 -//
   39.11 -
   39.12 -import Foundation
   39.13 -import CoreData
   39.14 -
   39.15 -import MessageModel
   39.16 -
   39.17 -class MatchUidToMsnOperation: ConcurrentBaseOperation {
   39.18 -    let folderID: NSManagedObjectID
   39.19 -    let uid: UInt
   39.20 -    let msn: UInt
   39.21 -
   39.22 -    init(
   39.23 -        parentName: String = #function,
   39.24 -        errorContainer: ServiceErrorProtocol = ErrorContainer(),
   39.25 -        folderID: NSManagedObjectID,
   39.26 -        uid: UInt, msn: UInt) {
   39.27 -        self.folderID = folderID
   39.28 -        self.uid = uid
   39.29 -        self.msn = msn
   39.30 -        super.init(parentName: parentName, errorContainer: errorContainer)
   39.31 -    }
   39.32 -
   39.33 -    override func main() {
   39.34 -        privateMOC.perform {
   39.35 -            self.process(context: self.privateMOC)
   39.36 -        }
   39.37 -    }
   39.38 -
   39.39 -    func process(context: NSManagedObjectContext) {
   39.40 -        guard let cdFolder = context.object(with: folderID) as? CdFolder else {
   39.41 -            handleError(BackgroundError.CoreDataError.couldNotFindFolder(info: nil))
   39.42 -            markAsFinished()
   39.43 -            return
   39.44 -        }
   39.45 -        guard let cdMsg = cdFolder.message(byUID: uid) else {
   39.46 -            // Not being able to find the message by UID is no error.
   39.47 -            // This can happen e.g. on first fetch, when no mail has yet been downloaded.
   39.48 -            markAsFinished()
   39.49 -            return
   39.50 -        }
   39.51 -        cdMsg.imapFields().messageNumber = Int32(msn)
   39.52 -        context.saveAndLogErrors()
   39.53 -        markAsFinished()
   39.54 -    }
   39.55 -}
    40.1 --- a/pEpForiOS/Background/MoveToFolderOperation.swift	Thu May 09 11:47:04 2019 +0200
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,261 +0,0 @@
    40.4 -//
    40.5 -//  MoveToFolderOperation.swift
    40.6 -//  pEp
    40.7 -//
    40.8 -//  Created by Andreas Buff on 10.05.18.
    40.9 -//  Copyright © 2018 p≡p Security S.A. All rights reserved.
   40.10 -//
   40.11 -
   40.12 -import CoreData
   40.13 -import pEpIOSToolbox
   40.14 -import MessageModel
   40.15 -
   40.16 -/// Moves all messages in the given folder to targetFolder if parent != tagetfolder.
   40.17 -class MoveToFolderOperation: ImapSyncOperation {
   40.18 -
   40.19 -    var syncDelegate: MoveToFolderSyncDelegate?
   40.20 -    /// Folder to move messages from
   40.21 -    let folder: Folder
   40.22 -    var lastProcessedMessage: Message?
   40.23 -
   40.24 -    init(parentName: String = #function, imapSyncData: ImapSyncData,
   40.25 -         errorContainer: ServiceErrorProtocol = ErrorContainer(), folder: Folder) {
   40.26 -        self.folder = folder
   40.27 -
   40.28 -        super.init(parentName: parentName, errorContainer: errorContainer,
   40.29 -                   imapSyncData: imapSyncData)
   40.30 -    }
   40.31 -
   40.32 -    override public func main() {
   40.33 -        if !checkImapSync() {
   40.34 -            markAsFinished()
   40.35 -            return
   40.36 -        }
   40.37 -
   40.38 -        syncDelegate = MoveToFolderSyncDelegate(errorHandler: self)
   40.39 -        imapSyncData.sync?.delegate = syncDelegate
   40.40 -
   40.41 -        process()
   40.42 -    }
   40.43 -
   40.44 -    override func markAsFinished() {
   40.45 -        syncDelegate = nil
   40.46 -        super.markAsFinished()
   40.47 -    }
   40.48 -
   40.49 -    private func retrieveNextMessage() -> Message? {
   40.50 -        var result: Message? = nil
   40.51 -        MessageModel.performAndWait { [weak self] in
   40.52 -            guard let me = self else {
   40.53 -                Logger.backendLogger.lostMySelf()
   40.54 -                return
   40.55 -            }
   40.56 -            guard let msg = me.folder.firstMessageThatHasToBeMoved() else {
   40.57 -                return
   40.58 -            }
   40.59 -            result = msg
   40.60 -        }
   40.61 -        return result
   40.62 -    }
   40.63 -
   40.64 -    /// When UID MOVEing a message, the server expunges the message and let us know. So Pantomime
   40.65 -    /// takes care to remove the expunged message. I case we are calling UID MOVE for a message that
   40.66 -    /// does not exist any more (maybe it has been moved by another client already in between), the
   40.67 -    /// server deos not repond with an error but with OK. We have to make sure the message is
   40.68 -    /// removed from our store to avoid endless UID MOVE.
   40.69 -    private func deleteLastMovedMessage() {
   40.70 -        guard let toDelete = lastProcessedMessage else {
   40.71 -            return
   40.72 -        }
   40.73 -        MessageModel.performAndWait {
   40.74 -            toDelete.delete()
   40.75 -        }
   40.76 -        lastProcessedMessage = nil
   40.77 -    }
   40.78 -
   40.79 -    private func deleteLastCopiedMessage() {
   40.80 -        guard let toDelete = lastProcessedMessage else {
   40.81 -            return
   40.82 -        }
   40.83 -        MessageModel.performAndWait {
   40.84 -            toDelete.imapMarkDeleted()
   40.85 -            toDelete.targetFolder = toDelete.parent
   40.86 -            toDelete.save()
   40.87 -        }
   40.88 -        lastProcessedMessage = nil
   40.89 -    }
   40.90 -
   40.91 -    private func process() {
   40.92 -        if let sync = imapSyncData.sync {
   40.93 -            if !sync.openMailBox(name: folder.name) {
   40.94 -                handleNextMessage()
   40.95 -            }
   40.96 -        } else {
   40.97 -            handle(error: BackgroundError.GeneralError.illegalState(info: "No sync"))
   40.98 -        }
   40.99 -    }
  40.100 -
  40.101 -    fileprivate func handleNextMessage() {
  40.102 -        guard !isCancelled, let message = retrieveNextMessage() else {
  40.103 -            waitForBackgroundTasksToFinish()
  40.104 -            return
  40.105 -        }
  40.106 -        MessageModel.perform { [weak self] in
  40.107 -            guard let me = self else {
  40.108 -                Logger.backendLogger.lostMySelf()
  40.109 -                return
  40.110 -            }
  40.111 -            guard !me.isCancelled else {
  40.112 -                me.waitForBackgroundTasksToFinish()
  40.113 -                return
  40.114 -            }
  40.115 -
  40.116 -            if message == me.lastProcessedMessage {
  40.117 -                // When UID MOVEing a message, the server expunges the message and let us know.
  40.118 -                // Pantomime takes care to remove the expunged message in general.
  40.119 -                // BUT:
  40.120 -                // In case we are calling UID MOVE for a message that does not exist any more (maybe
  40.121 -                // it has been moved by another client already in between), the server does not
  40.122 -                // respond with an error but with OK, so the local message still exists.
  40.123 -                // Thus we have to make sure the message is removed from our store to avoid endless
  40.124 -                // UID MOVE -> completed -> nextMessage -> UID MOVE ...
  40.125 -                me.deleteLastMovedMessage()
  40.126 -                me.handleNextMessage()
  40.127 -                return
  40.128 -            }
  40.129 -            if message.parent == message.targetFolder {
  40.130 -                Logger.backendLogger.errorAndCrash("I wounder why we are here then.")
  40.131 -                me.handleNextMessage()
  40.132 -                return
  40.133 -            }
  40.134 -            guard let targetFolderName = message.targetFolder?.name else {
  40.135 -                me.handleIlligalStateErrorAndFinish(hint: "No target folder")
  40.136 -                return
  40.137 -            }
  40.138 -            me.lastProcessedMessage = message
  40.139 -            let imapFolder = CWIMAPFolder(name: me.folder.name)
  40.140 -            if let sync = me.imapSyncData.sync {
  40.141 -                imapFolder.setStore(sync.imapStore)
  40.142 -            }
  40.143 -            guard message.uid > 0 else {
  40.144 -                me.handleIlligalStateErrorAndFinish(hint: "Invalid UID")
  40.145 -                return
  40.146 -            }
  40.147 -            let uid = UInt(message.uid)
  40.148 -            imapFolder.moveMessage(withUid: uid, toFolderNamed: targetFolderName)
  40.149 -        }
  40.150 -    }
  40.151 -
  40.152 -    /// UID MOVE is part of an IMAP extension. Not all servers support it.
  40.153 -    /// In case UID MOVE fails, we mimik its behaviour:
  40.154 -    /// - UID COPY the message to the target folder (is supposed to be supported by all servers)
  40.155 -    /// - mark the original message as /deleted
  40.156 -    fileprivate func handleUidMoveIsUnsupported() {
  40.157 -        guard let toCopy = lastProcessedMessage,
  40.158 -            let targetFolder = toCopy.targetFolder else {
  40.159 -                handleIlligalStateErrorAndFinish(hint:
  40.160 -                    "Why are we even called if there is nothing to do?")
  40.161 -                return
  40.162 -        }
  40.163 -        let uidCopyOp = UIDCopyOperation(imapSyncData: imapSyncData,
  40.164 -                                         errorContainer: errorContainer,
  40.165 -                                         message: toCopy,
  40.166 -                                         targetFolder: targetFolder)
  40.167 -        backgroundQueue.addOperation(uidCopyOp)
  40.168 -    }
  40.169 -
  40.170 -    fileprivate func handleMessageCopyCompleted() {
  40.171 -        if let error = errorContainer.error {
  40.172 -            handleError(error)
  40.173 -            return
  40.174 -        }
  40.175 -        deleteLastCopiedMessage()
  40.176 -        handleNextMessage()
  40.177 -    }
  40.178 -
  40.179 -    static func foldersContainingMarkedForMoveToFolder(connectInfo: EmailConnectInfo) -> [Folder] {
  40.180 -        var result = [Folder]()
  40.181 -        MessageModel.performAndWait {
  40.182 -            guard
  40.183 -                let accountId = connectInfo.accountObjectID,
  40.184 -                let cdAccount = Record.Context.background.object(with: accountId) as? CdAccount else {
  40.185 -                    Logger.backendLogger.errorAndCrash("No account")
  40.186 -                    return
  40.187 -            }
  40.188 -            let account = cdAccount.account()
  40.189 -            let allUidMoveMessages = Message.allMessagesMarkedForMoveToFolder(inAccount: account)
  40.190 -            let foldersContainingMarkedMessages = allUidMoveMessages.map { $0.parent }
  40.191 -            result = Array(Set(foldersContainingMarkedMessages))
  40.192 -        }
  40.193 -        return result
  40.194 -    }
  40.195 -}
  40.196 -
  40.197 -// MARK: - MoveToFolderSyncDelegate
  40.198 -
  40.199 -class MoveToFolderSyncDelegate: DefaultImapSyncDelegate {
  40.200 -    // MARK: Success
  40.201 -
  40.202 -    override func folderOpenCompleted(_ sync: ImapSync, notification: Notification?) {
  40.203 -        guard let handler = errorHandler as? MoveToFolderOperation else {
  40.204 -            Logger.backendLogger.errorAndCrash("No handler")
  40.205 -            return
  40.206 -        }
  40.207 -        handler.handleNextMessage()
  40.208 -    }
  40.209 -
  40.210 -    override func messageUidMoveCompleted(_ sync: ImapSync, notification: Notification?) {
  40.211 -        guard let handler = errorHandler as? MoveToFolderOperation else {
  40.212 -            Logger.backendLogger.errorAndCrash("No handler")
  40.213 -            return
  40.214 -        }
  40.215 -        handler.handleNextMessage()
  40.216 -    }
  40.217 -
  40.218 -    override func messagesCopyCompleted(_ sync: ImapSync, notification: Notification?) {
  40.219 -        guard let handler = errorHandler as? MoveToFolderOperation else {
  40.220 -            Logger.backendLogger.errorAndCrash("No handler")
  40.221 -            return
  40.222 -        }
  40.223 -        handler.handleMessageCopyCompleted()
  40.224 -    }
  40.225 -
  40.226 -    // MARK: Error
  40.227 -
  40.228 -    override func folderOpenFailed(_ sync: ImapSync, notification: Notification?) {