$npx -y skills add dpearson2699/swift-ios-skills --skill financekitAccess eligible Wallet financial data using FinanceKit and FinanceKitUI. Use when querying transactions or balances, reading Apple Card, Apple Cash, Savings, or U.K. connected-account data, requesting financial-data authorization, using TransactionPicker, enabling iOS 26 backgrou
| 1 | # FinanceKit |
| 2 | |
| 3 | Access eligible financial data from Apple Wallet, including U.S. Apple Card, Apple Cash, Savings, and U.K. connected-account data. FinanceKit provides on-device access to accounts, balances, and transactions with user-controlled authorization. Targets Swift 6.3 / current Apple platforms; query APIs are available from iOS/iPadOS 17.4, `TransactionPicker` from iOS/iPadOS 18, and background delivery from iOS/iPadOS 26. |
| 4 | |
| 5 | Keep FinanceKit guidance focused on financial-data access, Wallet order storage/querying, TransactionPicker, and background delivery. Route Apple Pay checkout to PassKit, widget UI/timeline work to WidgetKit, and Wallet order-tracking email or Apple Business Connect optimization outside this skill. |
| 6 | |
| 7 | ## Contents |
| 8 | |
| 9 | - [Setup and Entitlements](#setup-and-entitlements) |
| 10 | - [Data Availability](#data-availability) |
| 11 | - [Authorization](#authorization) |
| 12 | - [Querying Accounts](#querying-accounts) |
| 13 | - [Account Balances](#account-balances) |
| 14 | - [Querying Transactions](#querying-transactions) |
| 15 | - [Long-Running Queries and History](#long-running-queries-and-history) |
| 16 | - [Transaction Picker](#transaction-picker) |
| 17 | - [Wallet Orders](#wallet-orders) |
| 18 | - [Background Delivery](#background-delivery) |
| 19 | - [Common Mistakes](#common-mistakes) |
| 20 | - [Review Checklist](#review-checklist) |
| 21 | - [References](#references) |
| 22 | |
| 23 | ## Setup and Entitlements |
| 24 | |
| 25 | ### Requirements |
| 26 | |
| 27 | 1. **Managed entitlement** -- request `com.apple.developer.financekit` from Apple via the [FinanceKit entitlement request form](https://developer.apple.com/contact/request/financekit/). This is a managed capability; Apple reviews each application. |
| 28 | 2. **Organization-level Apple Developer account** (individual accounts are not eligible). |
| 29 | 3. **Account Holder role** required to request the entitlement. |
| 30 | 4. **Eligible App Store app** -- the app must be in the Finance category, distributed through the App Store for iPhone in the United States or United Kingdom, and provide financial-management tools such as net-worth, spending, or budgeting features. |
| 31 | 5. **Per-bundle-ID approval** -- Apple assigns the entitlement to the approved bundle ID; do not assume it applies to sibling apps or extensions automatically. |
| 32 | 6. If the app offers financial products directly or through a regulated institution, it must allow customers to connect those accounts to Apple Wallet and share the data with FinanceKit. |
| 33 | |
| 34 | ### Project Configuration |
| 35 | |
| 36 | 1. Add the FinanceKit entitlement through Xcode managed capabilities after Apple approves the request. |
| 37 | 2. Add `NSFinancialDataUsageDescription` to Info.plist -- this string is shown to the user during the authorization prompt. |
| 38 | 3. For iOS 26 background delivery, add the FinanceKit entitlement to both the app and extension targets, then use App Groups for shared storage. |
| 39 | |
| 40 | ```xml |
| 41 | <key>NSFinancialDataUsageDescription</key> |
| 42 | <string>This app uses your financial data to track spending and provide budgeting insights.</string> |
| 43 | ``` |
| 44 | |
| 45 | ## Data Availability |
| 46 | |
| 47 | U.S. FinanceKit financial data requires iOS/iPadOS 17.4+ and currently covers eligible Apple Card, Apple Cash, and Savings data; Apple Card Family participants and Apple Cash Family children are excluded. U.K. support requires iOS/iPadOS 18.4+ and uses open banking for supported institutions. Orders APIs are available separately from financial-data query APIs. |
| 48 | |
| 49 | Check whether the device supports FinanceKit before making any API calls. This value is constant across launches and iOS versions. |
| 50 | |
| 51 | ```swift |
| 52 | import FinanceKit |
| 53 | |
| 54 | guard FinanceStore.isDataAvailable(.financialData) else { |
| 55 | // FinanceKit not available -- do not call any other financial data APIs. |
| 56 | // The framework terminates the app if called when unavailable. |
| 57 | return |
| 58 | } |
| 59 | ``` |
| 60 | |
| 61 | For Wallet orders: |
| 62 | |
| 63 | ```swift |
| 64 | guard FinanceStore.isDataAvailable(.orders) else { return } |
| 65 | ``` |
| 66 | |
| 67 | Data availability returning `true` does not guarantee data exists on the device. Data access can also become temporarily restricted (e.g., Wallet unavailable, MDM restrictions). Restricted access throws `FinanceError.dataRestricted` rather than terminating. |
| 68 | |
| 69 | ## Authorization |
| 70 | |
| 71 | Request authorization to access user-selected financial accounts. The system presents an account picker where the user chooses which accounts to share and the earliest transaction date to expose. |
| 72 | |
| 73 | ```swift |
| 74 | let store = FinanceStore.shared |
| 75 | |
| 76 | let status = try await store.requestAuthorization() |
| 77 | switch status { |
| 78 | case .authorized: break // Proceed with queries |
| 79 | case .denied: break // User declined |
| 80 | case .notDetermined: break // No meaningful choice made |
| 81 | @unknown default: break |
| 82 | } |
| 83 | ``` |
| 84 | |
| 85 | ### Checking Current Status |
| 86 | |
| 87 | Query current authorization without prompting: |
| 88 | |
| 89 | ```s |