# Usage

# Pinch

# Available consents

# Granting consents

# Revoking consents

Revoking a consent requires an active network connection. The revoke method accepts an optional closure which returns if the given consents were successfully revoked.

# Requesting bluetooth permission

A convenience method to trigger bluetooth permission dialog is provided:

# Retrieve granted consents

# Set IDFA/ADID

IDFA/ADID can be passed to PinchSDK by calling:

# Start SDK

An overloaded method accepts a list of providers to use for collection data.

Note

The SDK will remember that it has been started, and subsequent calls to is unneccessary. If user clears or deletes app data, start has to be called again.

# Stop SDK

An overloaded method accepts a list of providers to disable for collecting data. If all previously granted providers are removed, SDK will be stopped.

# Retrieve SDK status

You can check if the SDK is started by calling:

# Send demographic profile

You can send your users demographic profile to the Pinch Platform by calling:

# Send custom data

You can send custom data to the Pinch Platform by calling:

# Send metadata

Note

This method performs a PUT request, replacing any previous values sent with the same type.

You can send metadata to the Pinch Platform by calling:

# Push tokens

MessagingId is the ID used by the Pinch Platform for sending notifications to the device (eg. FCM registration id). This can be done by calling:

# Retrieve privacy terms URL

The URL for privacy terms can be retrieved by calling:

# Retrieve privacy dashboard URL

The URL for the privacy dashboard, which contains all collected data for given consent, can be retrieved by calling:

# Deleted collected PII & data

You can delete all PII and collected data about a user by calling this method. It requires an active internet connection and accepts an optional closure to verify if the request was successfully sent.

# Pinch Messaging Center

# Retrieve messages

Note

All fields in PinchMessage except created, expiry and opened is nullable.

# Pinch Motion Tracking

# Start tracking motion

Minimum SDK version: 1.1.11

Add the following key and value to your applications Info.plist:

<key>NSMotionUsageDescription</key>
<string>Text to show in system dialog during permission request</string>
1
2

Pinch will automatically track motion if the user has given permission for motion.
Motion data will be collected alongside location updates, which requires the location provider to be enabled.
Pinch provides a utility method to trigger the system permission dialog for motion: