-
-
Save anka/806bf465dbfbc4b13d96 to your computer and use it in GitHub Desktop.
iOS query biological sex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSError *error; | |
HKBiologicalSexObject *bioSex = [healthStore biologicalSexWithError:&error]; | |
switch (bioSex.biologicalSex) { | |
case HKBiologicalSexNotSet: | |
// undefined | |
break; | |
case HKBiologicalSexFemale: | |
// ... | |
break; | |
case HKBiologicalSexMale: | |
// ... | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment