View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vídeos

Abrir menu Fechar menu
  • Coleções
  • Todos os vídeos
  • Sobre

Mais vídeos

  • Sobre
  • Código
  • Meet FinanceKit

    Learn how FinanceKit lets your financial management apps seamlessly and securely share on-device data from Apple Cash, Apple Card, and more, with user consent and control. Find out how to request one-time and ongoing access to accounts, transactions, and balances — and how to build great experiences for iOS and iPadOS.

    Capítulos

    • 0:00 - Introduction
    • 1:48 - Overview of data types
    • 5:03 - Access financial data
    • 21:56 - Best practices

    Recursos

    • FinanceKit
    • Forum: App & System Services
      • Vídeo HD
      • Vídeo SD
  • Buscar neste vídeo...
    • 5:38 - Check if financial data is available

      // Check if financial data is available
      
      import FinanceKit
      
      let available = FinanceStore.isDataAvailable(
          .financialData
      )
      
      guard available else {
          // No meaningful action can be performed
          return
      }
    • 8:08 - Present the transaction picker

      // Present the transaction picker
      
      import SwiftUI
      import FinanceKit
      import FinanceKitUI
      
      struct TransactionSelector: View {
        @State private var selectedItems: [FinanceKit.Transaction] = []
      
        var body: some View {
          if FinanceStore.isDataAvailable(.financialData) {
            TransactionPicker(selection: $selectedItems) {
              Text("Show Transaction Picker")
            }
          }
      }
    • 12:16 - Requesting authorization for financial data

      // Requesting authorization for financial data
      
      import FinanceKit
      
      let store = FinanceStore.shared
      
      guard store.isDataAvailable(for: .financialData) else {
          // No meaningful action can be performed
          return
      }
      
      let authStatus = await store.requestAuthorization()
      
      guard authStatus == .authorized else {
          // User did not grant access to financial data, stop here
          return
      }
    • 15:24 - Simple query to retrieve all Apple accounts

      // Simple query to retrieve all Apple accounts
      
      let store = FinanceStore.shared
      
      let sortDescriptor = SortDescriptor(\Account.displayName)
      
      let predicate = #Predicate<Account> { account in
         account.institutionName == "Apple"
      }
      
      let query = AccountQuery(
         sortDescriptors: [sortDescriptor],
         predicate: predicate
      )
      
      let accounts : [Account] = try await store.accounts(query: query)
    • 18:12 - Get latest 7 available balances for account

      // Get latest 7 available balances for account
      
      func getBalances(account: Account) async throws -> [AccountBalance] {
      
          let sortDescriptor = SortDescriptor(\AccountBalance.asOfDate, order: .reverse)
      
          let predicate = #Predicate<AccountBalance> { balance in
              balance.available != nil &&
              balance.accountId == account.id
          }
      
          let query = AccountBalanceQuery(
              sortDescriptors: [sortDescriptor],
              predicate: predicate,
              limit: 7
          )
          return try await store.accountBalances(query: query).reversed()
      }
    • 20:27 - Retrieve all the transaction history for an account

      // Retrieve all the transaction history for an account
      
      import FinanceKit
      
      let store = FinanceStore.shared
      let account: Account = ...
      
      let transactionSequence = store.transactionHistory(
          forAccountID: account.id
      )
      
      for try await change in transactionSequence {
          processChanges(change.inserted, change.updated, change.deleted)
      }
    • 21:04 - Use the history token to resume queries

      // Use the history token to resume queries
      
      import FinanceKit
      
      let store = FinanceStore.shared
      let account: Account = ...
      let currentToken = loadToken()
      
      let transactionSequence = store.transactionHistory(
          forAccountID: account.id,
          since: currentToken
      )
      
      for try await change in transactionSequence {
          processChanges(change.inserted, change.updated, change.deleted)
          persist(token: change.newToken)
      }
    • 21:41 - Non monitoring resumable queries

      import FinanceKit
      
      let store = FinanceStore.shared
      let account: Account = ...
      let currentToken = loadToken()
      
      let transactionSequence = store.transactionHistory(
          forAccountID: account.id,
          since: currentToken,
          isMonitoring: false
      )
      
      for try await change in transactionSequence {
          processChanges(change.inserted, change.updated, change.deleted)
          persist(token: change.newToken)
      }

Developer Footer

  • Vídeos
  • WWDC24
  • Meet FinanceKit
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines