iOS library for integrating WeFitter and HealthKit into your app


Import WeFitterLib.xcframework into your project via General > Framework, Libraries, and Embedded Content


  • Before calling other functions make sure canConnectToHealthData returns true. For instance, HealthKit data is not available on an iPad.
  • In your ViewController, call configure in the viewDidLoad function with a WeFitterConfig object. configure should be called every time your app starts.
    • The token parameter is required which should be a valid WeFitter API profile bearer token. You receive this when the WeFitter profile was created using the WeFitter API.
    • The url parameter is optional and defaults to Only provide an url if you want your own backend to acts as a proxy that forwards calls to WeFitter API. The url should be without v1.3/ingest/ as the library will append WeFitter API version itself.
    • The startDate is optional. By default data of the past 20 days will be uploaded.
    • The enabledDataTypes is optional and is used to control which permissions are shown to the user. By default all datatypes will be requested.
  • After configure has succeeded you are able to call connect and disconnect. To see the current status you can call currentStatus. Only one profile can be connected at a time.

Example projects

Two example projects have been included, one in Swift, one in Objective-C. The SDK code itself is written in Swift.


Where you need the SDKs functionality, use import WeFitterLib and all relevant method calls are available. Note that there or some methods/properties/types with an @objc annotation. Use them only if needed. For instance, use the Status pure Swift enum, and not the _Status enum that is a simplified enum. The underscore (_) as starting character is an indication that the method should only be used from Objective-C, and there is a proper Swift equivalent.


To use the SDK, use #import <WeFitterLib/WeFitterLib-Swift.h>. All available methods/properties/types are visible in this header file.

You are subscribed!

You will soon receive our newsletter!
WeFitter team.