Skip to main content

iOS SDK Reference

This documentation will guide you to implement the Withings SDK for iOS.

Sample code

Get the SDK sample app here: https://github.com/withings-sdk/withings-sdk-ios

Minimum requirements

  • iOS 13+
  • Xcode 11+
  • Swift 4+

Installation

Swift package installation

Add the Swift package to your project:

From the Xcode left panel, select your project > Swift Packages tab > Select the + icon Set the repository URL: https://github.com/withings-sdk/withings-sdk-ios.git. Press Next > Set the version > Next > Finish

You're all set !

Manual installation

Add the .xcframework to your project:

Select your target > General tab > Framework, Libraries, and Embedded Content > Add the framework here
Select Embed & Sign option for the Embed value.

Usage

import Withings

Integration

Instantiate a WithingsWebView with your webservice authentication URLRequest and notification callback. Now you can add this view to the UIViewController of your choice.

tip

Don't forget to pop or dismiss the UIViewController if needed on the notification callback (cf. notifications).

tip

If you want to present the webview modally, you should set the viewcontroller modalPresentationStyle property to ".fullScreen". Otherwise, gestures in the webview might interfere with the UIViewController which could dismiss the UIViewController and unintentionally interrupt the user experience."

Background sync

The SDK allows to synchronize Withings devices's data with Withings cloud in background (see WithingsSyncManager).

Interfaces

Changelogs

Help

Login required

Please log in to your Developer Dashboard in order to file a request.

OK