Asim Iftikhar Abbasi
Asim Iftikhar Abbasi

Reputation: 617

How will be get unique identifiers of activities from Health app in iOS app?

I am getting data from HealthKit but i want to get unique ids of all activities that coming from HealthKit to send that id to the server and save that activity against that particular id. Is there a unique id for these?

Upvotes: 1

Views: 1125

Answers (2)

Daniel Gallego
Daniel Gallego

Reputation: 3

From an object of HKWorkout, you can get an ID like this:

workout.uuid.uuidString

Upvotes: 0

Allan
Allan

Reputation: 7353

The uuid property of HKObject uniquely identifies each object in HealthKit.

Upvotes: 2

Related Questions