HOW TO USE FINANCE API

Generated on 9/7/2024

1 search

To use the FinanceKit API, you need to follow a few key steps:

  1. Determine Data Availability: First, check if the device supports FinanceKit and if any financial data is restricted. You can do this by importing FinanceKit and using the isDataAvailable method on the FinanceStore class. If it returns false, no further financial data calls should be made.

  2. Access Financial Data: Once data availability is confirmed, you can access financial data using the FinanceKit transaction picker. This allows users to select transactions they want to share with your app. The transactions are ordered chronologically by default, but you can filter them using free text or suggested tokens.

  3. Query APIs: For full access to financial data, use the query APIs. These are asynchronous and require user consent. They allow for long-running access or snapshots of data. The APIs accept predicates, sort descriptors, limit, and offset parameters.

  4. User Consent: Ensure that user consent is obtained before accessing any financial data. Users can grant or deny access, and they can modify these permissions later in the financial data settings.

For a detailed walkthrough, you can refer to the Meet FinanceKit session starting at 05:03.