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 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
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.
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
Implement Sign In with SignInWithYouVersionButton
If your app needs authenticated user data, add the sign in button and pass a presentation context.
Code
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!