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:
- Register your app on the YouVersion Platform Portal and obtain an App Key.
- In Xcode, open File → Add Package Dependencies…
- Enter the repository URL
https://github.com/youversion/platform-sdk-swift.gitand choose Up to Next Major Version.
CocoaPods
Alternatively, if you use CocoaPods:
Code
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
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
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
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
By default, the version picker offers Bible versions in every available language. To limit
the picker to specific languages, pass permittedLanguageTags during configuration.
Code
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
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
Verse range
Code
Full chapter
Code
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
To open the reader to a specific passage, pass a BibleReference:
Code
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
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
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
SignInWithYouVersionView
The SDK also exposes a reusable sign-in prompt view that you can present in your own sheet or navigation flow.
Code
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
Or fetch Verse of the Day data and render it with your own UI:
Code
Example code
See the SampleApp project in the Examples folder to see the above code in action!