HealthKit.AuthorizationStatusForType
------------------------------------

Queries authentication status for a type.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [HealthKit](component_HealthKit.md) | [8.2](newinversion82.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "HealthKit.AuthorizationStatusForType"; Type ) 

**MBS**( **"HealthKit.AuthorizationStatusForType";** /\* Queries authentication status for a type. \*/  
**$Type**) /\* The type to check.e.g. "BiologicalSex" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | The type to check. | "BiologicalSex" |

### Result

Returns value or error.

### Description

Queries authentication status for a type.  
Returns the application's authorization status for the given object type.  
Value is NotDetermined, SharingDenied or SharingAuthorized.  
  
Use [HealthKit.RequestAuthorizationToShareTypes](HealthKitRequestAuthorizationToShareTypes.md) to request authentication.  
Please enable HealthKit for the app entitlements for Xcode, add HealthKit framework and set NSHealthShareUsageDescription descriptor for info.plist.  
### Examples

Check status:

 Set Variable \[ $r ; Value: MBS ( "HealthKit.AuthorizationStatusForType"; "BiologicalSex" ) \]   
Show Custom Dialog \[ "Status" ; $r \]  
### See also

- [HealthKit.RequestAuthorizationToShareTypes](HealthKitRequestAuthorizationToShareTypes.md)

### Blog Entries

- [macOS Privacy and FileMaker](https://www.mbsplugins.de/archive/2020-08-11/macOS_Privacy_and_FileMaker/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 25th April 2018 , last changed 9th August 2018

  
[Hash.SHA512.HMAC](HashSHA512HMAC.md) - [HealthKit.BiologicalSex](HealthKitBiologicalSex.md)

[HTML Version](HealthKitAuthorizationStatusForType.shtml)