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:
-
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 theFinanceStore
class. If it returnsfalse
, no further financial data calls should be made. -
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.
-
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.
-
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.