                   let matchURLComponents = URLComponents(url: matchURL, resolvingAgainstBaseURL: false),
                   matchURLComponents.scheme == "mailto"
             else { return nil }
-            
             return matchURLComponents.path
         }
     }
 }
 
-private extension DispatchQueue {
-    static func background(delay: Double = 0.0, background: (()->Void)? = nil, completion: (() -> Void)? = nil) {
-        DispatchQueue.global(qos: .background).async {
-            background?()
-            if let completion = completion {
-                DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
-                    completion()
-                })
-            }
-        }
-    }
-}
-
 private extension Bundle {
-    
     static var name: String? {
         if let display = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String {
             return display


    private func selectPreferedEmail(for contact: CNContact, fromView: UIView?, completion: ((CNContact) -> Void)?) {
        let mails = contact.emailAddresses

        guard mails.count > 1 else {
            if let email = mails.first?.value {
                contact.userSelectedEmail = email as String


private extension String {
    var isEmail: Bool {
        emailAddresses().count == 1
    }
    
    func emailAddresses() -> [String] {
