title: FAILED prompting authorization request to Heathkit
body: <p>We are facing an issue in HealthKit permission dialog. it works in IOS 13 but it is not prompt in IOS 14.6. Please help me.</p>
  <p>Below is the code</p>
  <pre><code> func requestHealthKitAuthorization() {
      let healthStore = HKHealthStore()
      let workoutType = HKObjectType.workoutType()
      let heartRateType = HKObjectType.quantityType(forIdentifier: .heartRate)
      let heartRateType1 = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned)
      let heartRateType2 = HKObjectType.quantityType(forIdentifier: .stepCount)
      let heartRateType3 = HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning)
      
      //reading
      let readingTypes = Set([heartRateType!,heartRateType1!,heartRateType2!,heartRateType3!, workoutType])
      //writing
      let writingTypes = Set([heartRateType!,heartRateType1!,heartRateType2!,heartRateType3!, workoutType])
      //auth request
      healthStore.requestAuthorization(toShare: writingTypes, read: readingTypes) { (success, error) -&gt; Void in
          
          if error != nil {
              print(&quot;error \(String(describing: error?.localizedDescription))&quot;)
          } else if success {
              print(&quot;success&quot;)
              //                    self.startButton.setEnabled(true)
          } else if !success {
              print(&quot;fail&quot;)
              
              //                    self.startButton.setEnabled(false)
          }
      }
  }
  </code></pre>