Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/SampleApp/WidgetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct WidgetView: View {
var body: some View {
BibleWidgetView(
reference: BibleReference(
versionId: 111, bookUSFM: "2CO", chapter: 1, verseStart: 3, verseEnd: 4
versionId: 3034, bookUSFM: "2CO", chapter: 1, verseStart: 3, verseEnd: 4
),
fontSize: 18
)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ import YouVersionPlatform
struct DemoView: View {
var body: some View {
BibleTextView(
BibleReference(versionId: 111, bookUSFM: "JHN", chapter: 3, verse: 16)
BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3, verse: 16)
)
}
}
Expand All @@ -112,7 +112,7 @@ import YouVersionPlatform
struct DemoView: View {
var body: some View {
BibleTextView(
BibleReference(versionId: 111, bookUSFM: "JHN", chapter: 3, verseStart: 16, verseEnd: 20)
BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3, verseStart: 16, verseEnd: 20)
)
}
}
Expand All @@ -125,7 +125,7 @@ import YouVersionPlatform
struct DemoView: View {
var body: some View {
BibleTextView(
BibleReference(versionId: 111, bookUSFM: "JHN", chapter: 3)
BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 3)
)
}
}
Expand Down
20 changes: 8 additions & 12 deletions Sources/YouVersionPlatformCore/Bible/BibleVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,18 @@ public struct BibleVersion: Codable, Sendable, Hashable, Equatable {

public static var preview: BibleVersion {
// Create a minimal BibleVersion for preview purposes
let promotionalContent = """
King James Version (KJV)

The King James Version (KJV) of the holy Bible was first printed in 1611, but the main edition used today is the 1769 version. The King James Version (KJV) is also known as the Authorized (or Authorised) Version (AV) because it was authorized to be read in churches. For over 300 years it was the main English translation used in the English speaking world, and is much admired and respected. About 400 words and phrases coined or popularised by the King James Version are part the English language today.
"""
let promotionalContent = "This is minimal preview data for the Berean Standard Bible"
return BibleVersion(
id: 1,
abbreviation: "KJV",
id: 3034,
abbreviation: "BSB",
promotionalContent: promotionalContent,
copyright: nil,
languageTag: "en",
localizedAbbreviation: "KJV",
localizedTitle: "King James Version",
readerFooter: "Text is from the King James Version",
readerFooterUrl: "https://www.biblesociety.org.uk",
title: "King James Version",
localizedAbbreviation: "BSB",
localizedTitle: "Berean Standard Bible",
readerFooter: "Text is from the Berean Standard Bible",
readerFooterUrl: "https://berean.bible",
title: "Berean Standard Bible",
organizationId: "1234-abcd-4321-fedc-0123456789ab",
bookCodes: nil,
books: nil,
Expand Down
2 changes: 1 addition & 1 deletion Sources/YouVersionPlatformReader/BibleReaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public struct BibleReaderView: View {

#Preview {
BibleReaderView(
reference: BibleReference(versionId: 206, bookUSFM: "PSA", chapter: 117),
reference: BibleReference(versionId: 3034, bookUSFM: "PSA", chapter: 117),
appName: "BibleReaderViewPreview",
signInMessage: "This paragraph needs to explain why the user should sign in."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ extension BibleReaderViewModel {

public static var preview: BibleReaderViewModel {
// Create a minimal BibleReaderViewModel for preview purposes
let vm = BibleReaderViewModel(reference: BibleReference(versionId: 1, bookUSFM: "GEN", chapter: 1))
let vm = BibleReaderViewModel(reference: BibleReference(versionId: 3034, bookUSFM: "GEN", chapter: 1))

let previewVersion = BibleVersion.preview
vm.version = previewVersion
vm.myVersions = [previewVersion]
vm.selectedVersion = previewVersion

let footnoteReference = BibleReference(versionId: 111, bookUSFM: "JHN", chapter: 21, verse: 1)
let footnoteReference = BibleReference(versionId: 3034, bookUSFM: "JHN", chapter: 21, verse: 1)
vm.footnotesToDisplay = [
BibleFootnote(text: BibleAttributedString("Footnote text goes here."), reference: footnoteReference),
BibleFootnote(text: BibleAttributedString("Second Footnote text goes here. This time the footnote is fairly long."), reference: footnoteReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class BibleReaderViewModel {
} else {
// no specified or saved version, so, pick a downloaded one, else a safe default.
let downloads = VersionDownloadCache.downloadedVersions
let versionId = reference?.versionId ?? downloads.first ?? savedIds.first ?? 206
let versionId = reference?.versionId ?? downloads.first ?? savedIds.first ?? 3034
self.reference = BibleReference(versionId: versionId, bookUSFM: "JHN", chapter: 1)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public extension BibleVersion {
}
return book.title ?? book.fullTitle
}
// Example: "https://www.bible.com/bible/111/1SA.3.10.NIV"
// Example: "https://www.bible.com/bible/3034/1SA.3.10.BSB"
func shareUrl(reference: BibleReference) -> URL? {
let prefix = "https://www.bible.com/bible/\(id)/"
let book = reference.bookUSFM
Expand Down
4 changes: 2 additions & 2 deletions Sources/YouVersionPlatformUI/Views/VotdView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct VotdView: View {

@State private var bibleVersionId: Int

public init(bibleVersionId: Int = 111) {
public init(bibleVersionId: Int = 3034) {
self.bibleVersionId = bibleVersionId
}

Expand Down Expand Up @@ -102,5 +102,5 @@ public struct VotdView: View {
}

#Preview {
VotdView(bibleVersionId: 206)
VotdView(bibleVersionId: 3034)
}
6 changes: 3 additions & 3 deletions Tests/YouVersionPlatformCoreTests/LanguagesAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Testing
variants: ["US", "GB"],
countries: ["US", "GB", "CA"],
textDirection: "ltr",
defaultBibleId: 111
defaultBibleId: 3034
),
LanguageOverview(
id: "es",
Expand Down Expand Up @@ -55,7 +55,7 @@ import Testing
#expect(languages.count == 2)
#expect(languages[0].id == "en")
#expect(languages[0].language == "English")
#expect(languages[0].defaultBibleId == 111)
#expect(languages[0].defaultBibleId == 3034)
#expect(languages[1].id == "es")
#expect(languages[1].language == "Spanish")
#expect(languages[1].defaultBibleId == 128)
Expand All @@ -80,7 +80,7 @@ import Testing
variants: ["US"],
countries: ["US"],
textDirection: "ltr",
defaultBibleId: 111
defaultBibleId: 3034
)
]

Expand Down