YouVersion PlatformYouVersion Platform
PlatformBiblesDev Docs
CommunityPartnersSupport

YouVersion Platform

Build applications and integrate with the world's most popular Bible platform.

Platform Products

  • Platform Portal
  • Developer Documentation
  • App Management

Resources

  • Support
  • Press inquiries

Legal

  • Privacy Policy
  • Terms of Use

© 2025 YouVersion. All rights reserved.

  • Overview
  • API Reference
  • SDKs
<  Back to Platform
SDK IntroductionSwift SDKKotlin SDK
JavaScript SDK
React SDK
React Native SDK
SDKs

Swift SDK

The Swift SDK provides UI components and API helpers to integrate Bible content into iOS and iPadOS applications with minimal setup.

Installation with Swift Package Manager

Add the SDK as a dependency in Xcode:

  1. Register your app on the YouVersion Platform Portal and obtain an App Key.
  2. In Xcode, open File → Add Package Dependencies…
  3. Enter the repository URL https://github.com/youversion/platform-sdk-swift.git and choose Up to Next Major Version.

CocoaPods

Alternatively, if you use CocoaPods:

Code
pod 'YouVersionPlatform', '~> 1.0'

And then in your terminal run pod install

Configure the SDK

Sign up at platform.youversion.com to get your free App Key.

Call YouVersionPlatform.configure once during application startup to configure it with your App Key. A common pattern is to perform the configuration inside your @main App initializer.

Code
import SwiftUI import YouVersionPlatform @main struct SampleApp: App { init() { YouVersionPlatform.configure(appKey: "YOUR_APP_KEY_HERE") } var body: some Scene { // ... } }

Display Content with BibleCardView

The SDK ships with SwiftUI components, including BibleCardView, which renders a passage given its reference. Provide a BibleReference describing the version, book, and verse range you want to display, and optionally adjust the font size.

Code
import SwiftUI import YouVersionPlatform struct ExampleWidgetView: View { var body: some View { BibleCardView( reference: BibleReference( versionId: 3034, bookUSFM: "2CO", chapter: 1, verseStart: 3, verseEnd: 4 ), fontSize: 18 ) } } #Preview { ExampleWidgetView() }

The widget will fetch and format the passage automatically.

Display Content with BibleTextView

Use BibleTextView when you want inline scripture rendering in your own layouts. Unlike BibleCardView this is "merely" the nicely formatted text of the Bible passage: it doesn't include elements to show the verse reference, doesn't show the Bible version's name or its copyright information - you need to provide those separately. You can pass a single verse, a verse range, or a full chapter reference.

Single verse

Code
import SwiftUI import YouVersionPlatform struct SingleVerseView: View { var body: some View { BibleTextView( BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3, verse: 16) ) } }

Verse range

Code
import SwiftUI import YouVersionPlatform struct VerseRangeView: View { var body: some View { BibleTextView( BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3, verseStart: 16, verseEnd: 20) ) } }

Full chapter

Code
import SwiftUI import YouVersionPlatform struct ChapterView: View { var body: some View { BibleTextView( BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3) ) } }

For longer passages, wrap BibleTextView in a ScrollView.

Embed a Full Reader with BibleReaderView

BibleReaderView provides a complete Bible reading experience that can be embedded in your app.

Code
import SwiftUI import YouVersionPlatform struct ReaderTabView: View { var body: some View { BibleReaderView( appName: "Sample App", signInMessage: "Sign in to see your YouVersion highlights in this Sample App." ) } }

Implement Sign In with SignInWithYouVersionButton

If your app needs authenticated user data, add the sign in button and pass a presentation context.

Code
import AuthenticationServices import SwiftUI import UIKit import YouVersionPlatform class ContextProvider: NSObject, ASWebAuthenticationPresentationContextProviding { func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { guard let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = scene.windows.first else { return ASPresentationAnchor() } return window } } struct SignInView: View { @State private var contextProvider = ContextProvider() var body: some View { SignInWithYouVersionButton { Task { do { let result = try await YouVersionAPI.Users.signIn( permissions: [.profile, .email], contextProvider: contextProvider ) // Use result.accessToken for authenticated API calls. } catch { print(error) } } } } }

The SDK stores the access token locally and persists it across app launches.

Display Verse of the Day

Use VotdView to quickly render the Verse of the Day:

Code
import SwiftUI import YouVersionPlatform struct VotdCardView: View { var body: some View { VotdView() } }

Or fetch Verse of the Day data and render it with your own UI:

Code
let dayOfYear = Calendar.current.ordinality(of: .day, in: .year, for: Date())! let votd = try await YouVersionAPI.VOTD.verseOfTheDay(dayOfYear: dayOfYear) // Use votd.reference with BibleTextView or BibleCardView.

Example code

See the SampleApp project in the Examples folder to see the above code in action!

Last modified on March 26, 2026
SDK IntroductionKotlin SDK
On this page
  • Installation with Swift Package Manager
    • CocoaPods
  • Configure the SDK
  • Display Content with BibleCardView
  • Display Content with BibleTextView
    • Single verse
    • Verse range
    • Full chapter
  • Embed a Full Reader with BibleReaderView
  • Implement Sign In with SignInWithYouVersionButton
  • Display Verse of the Day
  • Example code
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift