📄️ Getting started
The Fundamentals section of this documentation provides a tour of the most important aspects of the ROOK SDK. It covers everything you need to know to integrate us into your application.
📄️ Grant Permissions
ROOK SDK requires that the user explicitly grant permissions to access and extract data from Apple Health.
📄️ Update User ID
Before any data synchronization, we need to set or configure a user to identify the data and know who owns the information. We recommend configuring this after your login using the updateUser function of UserManager as shown below.
📄️ Configure Background
Setting background functions allows us to send new information as we get notified, helping to resend that information to you through your webhook previously configured in the ROOK Portal.
📄️ Manual Sync
If you want to sync data every time a user opens the app, RookConnectConfigurationManager provides a function called enableSync(). Each time the app transitions from the background to the foreground, ROOK SDK will check the last sync time. If there is new data to update or pending data from previous days, it will upload this information.
📄️ Steps
This feature retrieves the step count for the current day. Use an instance of the RookEventsManager class, which includes the getTodayStepCount function to obtain the current step count.
📄️ Extra: Known exceptions
rook-sdk returns custom exceptions wrapped in a Result object in each function when an issue is encountered. Below