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

© 2026 YouVersion. All rights reserved.

  • Overview
  • API Reference
  • SDKs
  • Changelog
<  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 YouVersionPlatformConfiguration.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() { YouVersionPlatformConfiguration.configure( appKey: "YOUR_APP_KEY_HERE", appName: "Your App Name", isSignInEnabled: true, signInPromptMessage: "Sign in to see your YouVersion highlights." ) } var body: some Scene { // ... } }

appName is shown in sign-in UI. signInPromptMessage customizes the built-in sign-in prompt used by BibleReaderView flows. Set isSignInEnabled to false to suppress SDK-provided sign-in UI.

The simpler YouVersionPlatform.configure(appKey:) API still exists for app-key-only setup, but use YouVersionPlatformConfiguration.configure(...) for BibleReaderView and sign-in use cases.

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.

Let users switch versions with the version picker

Pass showVersionPicker: true to render a version-picking button in the card's header. Tapping it opens a sheet where the user can pick a different Bible version, and the card re-renders the passage in the selected version automatically.

Code
BibleCardView( reference: BibleReference( versionId: 3034, bookUSFM: "2CO", chapter: 1, verseStart: 3, verseEnd: 4 ), fontSize: 18, showVersionPicker: true )

Provide an optional onVersionChange closure if you want to react to the user's selection — for example, to persist their preferred version so it can be used as the default the next time the card is shown.

Code
BibleCardView( reference: BibleReference( versionId: 3034, bookUSFM: "JHN", chapter: 3, verseStart: 16, verseEnd: 16 ), showVersionPicker: true, onVersionChange: { version in // Persist version.id, refresh other UI, etc. } )

By default, the version picker offers Bible versions in every available language. To limit the picker to specific languages, pass permittedLanguageTags during configuration.

Code
YouVersionPlatformConfiguration.configure( appKey: "YOUR_APP_KEY_HERE", permittedLanguageTags: ["en"] )

Language tags follow BCP 47, such as "en" for English or "es" for Spanish. When the filtered list only contains versions in one language, the language button in the version picker is hidden automatically.

You can also limit the picker to specific Bible versions with permittedVersionIds:

Code
YouVersionPlatformConfiguration.configure( appKey: "YOUR_APP_KEY_HERE", permittedVersionIds: [111, 3034] )

Version IDs are YouVersion Bible version IDs. permittedVersionIds can be combined with permittedLanguageTags by providing both parameters in the call to .configure(); in that case a Bible version would need to match both filters to be shown.

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() } }

To open the reader to a specific passage, pass a BibleReference:

Code
BibleReaderView( reference: BibleReference(versionId: 3034, bookUSFM: "PSA", chapter: 23) )

Sign-in configuration belongs in YouVersionPlatformConfiguration.configure(...), not in the BibleReaderView initializer.

Disabling Sign-In

By default, tapping a highlight color on an unauthenticated verse selection prompts the user to sign in with YouVersion. To suppress SDK-provided sign-in UI, configure the SDK with isSignInEnabled: false:

Code
YouVersionPlatformConfiguration.configure( appKey: "YOUR_APP_KEY_HERE", isSignInEnabled: false )

When sign-in is disabled, the SDK suppresses UI such as the highlight sign-in prompt, the header menu sign-in option, and the version-download auth check. Highlight controls are hidden from the verse actions drawer; copy and share remain available.

Built-in Sign-In via BibleReaderView

When isSignInEnabled is true, BibleReaderView handles built-in sign-in automatically using the globally configured appName and signInPromptMessage.

Code
YouVersionPlatformConfiguration.configure( appKey: "YOUR_APP_KEY_HERE", appName: "Your App Name", signInPromptMessage: "Sign in to see your YouVersion highlights." )

Implement Sign In

If your app needs authenticated user data or a custom sign-in flow outside the BibleReaderView, you can use SignInWithYouVersionButton, SignInWithYouVersionView, or call YouVersionAPI.Users.signIn(...) directly.

SignInWithYouVersionButton

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) } } } } }

SignInWithYouVersionView

The SDK also exposes a reusable sign-in prompt view that you can present in your own sheet or navigation flow.

Code
SignInWithYouVersionView( onSignIn: { /* trigger your sign-in logic */ }, onDismiss: { /* dismiss the sheet */ } )

SignInWithYouVersionView reads appName and signInPromptMessage from YouVersionPlatformConfiguration and accepts optional colors for theming.

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 May 15, 2026
SDK IntroductionKotlin SDK
On this page
  • Installation with Swift Package Manager
    • CocoaPods
  • Configure the SDK
  • Display Content with BibleCardView
    • Let users switch versions with the version picker
  • Display Content with BibleTextView
    • Single verse
    • Verse range
    • Full chapter
  • Embed a Full Reader with BibleReaderView
    • Disabling Sign-In
    • Built-in Sign-In via BibleReaderView
  • Implement Sign In
    • SignInWithYouVersionButton
    • SignInWithYouVersionView
  • Display Verse of the Day
  • Example code
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift
Swift