-[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] always return YES
| Originator: | DaNmarner | ||
| Number: | rdar://18252433 | Date Originated: | 9/5/2014 |
| Status: | Duplicate of 17802934 | Resolved: | 9/9/2014 |
| Product: | HealthKit | Product Version: | Xcode 6 beta 7 |
| Classification: | Reproducible: | YES |
Summary: In Xcode 6 beta 7 (build 6A280n) The completion block of -[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] returns 'YES'/'true' as the value of first argument when user press the 'cancel' button in the HealthKit prompt. This is in contradiction with the documentation included in the header file for this method. Also, it was working correctly with previous Xcode 6 beta releases. Steps to Reproduce: 1. create an app that calls -[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] in normal fashion. 2. when the prompt for authorization shows up, tap 'Cancel' 3. You'll notice that the completion block receives 'YES' as it's first argument. Expected Results: When the healthkit authorization shows up and a user press 'cancel', -[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] should return 'NO' as the value of the first argument in its completion block. Actual Results: 'YES' is being returned. Version: Xcode 6 beta 7 (build 6A280n), iOS beta 5 Notes: Configuration: iPhone 5s, iOS Simulator Version 8.0 (550)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!