title: dispatch_group_notify has been replaced by instance method DispatchGroup.notify(qos:flags:queue:execute:)
body: <p>I am trying to migrate my <code>swift2.2</code> codebase to <code>swift3</code>. Beforehand, for <code>GCD</code>, this code used to work for me. But it shows an error of <code>dispatch_group_notify has been replaced by instance method DispatchGroup.notify(qos:flags:queue:execute:)</code> 
  How can I tackle this error? </p>
  
  <pre><code>   dispatch_group_notify(group, dispatch_get_main_queue()) {
          if productsError != nil || citiesError != nil || usersError != nil {
              completionHandler(false)
          } else {
              completionHandler(true)
          }
      }
  </code></pre>
  
  <p>This is the new code I am writing and I am stuck while I am leaving the group.</p>
  
  <pre><code>class APIHandler {
  
  func requestDataFromTheServerWithCompletionhandler(completionHandler: ((Bool) -&gt; Void)) {
  
      let group = DispatchGroup()
      var productsError: NSError?
      var citiesError: NSError?
      var usersError: NSError?
      var categoriesError: NSError?
  
      let manager = SessionManager()
  
      // MARK:- Products
      group.enter()
      let productsParser = ProductsParser()
      let productsURL = URLs.productsURL
  
      manager.requestDataWithCompetionHandler(urlString: productsURL) {( responseData, error) in
          if responseData != nil {
              print("Products Success")
              productsParser.parseAndStoreProductsData(dataToParse: responseData!)
          }
          else {
              print("Products Error")
              productsError = error
          }
          group.leave()
      }
  
      dispatch_group_notify(group, DispatchQueue.main) {
          if productsError != nil || citiesError != nil || usersError != nil {
              completionHandler(false)
          } else {
              completionHandler(true)
          }
        }
      }
  }
  </code></pre>