Skip to content

Commit 03cf0f9

Browse files
authored
Merge branch 'main' into YPE-1180-rn-android-create-ci-test-to-verify-build
2 parents e3ae69d + ca5e59b commit 03cf0f9

29 files changed

Lines changed: 8273 additions & 9022 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
44

5+
## 0.10.0 (2026-02-27)
6+
7+
* feat: implement Bible reader view for Android (#39) ([681b51b](https://github.com/youversion/platform-sdk-reactnative/commit/681b51b)), closes [#39](https://github.com/youversion/platform-sdk-reactnative/issues/39)
8+
* YPE-1178 Add IOS CI build test (#34) ([3ae7dad](https://github.com/youversion/platform-sdk-reactnative/commit/3ae7dad)), closes [#34](https://github.com/youversion/platform-sdk-reactnative/issues/34)
9+
510
## <small>0.9.1 (2026-02-03)</small>
611

712
* fix: ios builds (#38) ([54805de](https://github.com/youversion/platform-sdk-reactnative/commit/54805de)), closes [#38](https://github.com/youversion/platform-sdk-reactnative/issues/38)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This project uses the underlying YouVersion SDKs for [Swift](https://github.com/
2727
Because support for Jetpack Compose and SwiftUI is a recent development in the React Native ecosystem, this SDK requires recent versions of iOS, Expo, and React Native to work.
2828

2929
> The minimum supported version of iOS is 17.
30-
> The minimum supported version of Expo is SDK 54.
30+
> The minimum supported version of Expo is SDK 55.
3131
3232
**Using bare React Native?**
3333
Follow these instructions to [set up Expo modules in a bare React Native project](https://docs.expo.dev/bare/installing-expo-modules/) before installing this package.

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
apply plugin: 'com.android.library'
1111

1212
group = 'com.youversion.reactnativesdk'
13-
version = '0.9.1'
13+
version = '0.10.0'
1414

1515
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
1616
apply from: expoModulesCorePlugin
@@ -45,7 +45,7 @@ android {
4545
namespace "com.youversion.reactnativesdk"
4646
defaultConfig {
4747
versionCode 1
48-
versionName "0.9.1"
48+
versionName "0.10.0"
4949
}
5050
buildFeatures {
5151
compose true
Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,66 @@
11
package com.youversion.reactnativesdk.views
22

33
import android.content.Context
4-
import androidx.compose.foundation.layout.Box
5-
import androidx.compose.foundation.layout.fillMaxSize
6-
import androidx.compose.foundation.layout.padding
7-
import androidx.compose.material3.Text
84
import androidx.compose.runtime.Composable
95
import androidx.compose.runtime.MutableState
106
import androidx.compose.runtime.mutableStateOf
11-
import androidx.compose.ui.Alignment
127
import androidx.compose.ui.Modifier
13-
import androidx.compose.ui.graphics.Color
14-
import androidx.compose.ui.unit.dp
8+
import com.youversion.platform.core.bibles.domain.BibleReference
9+
import com.youversion.platform.reader.BibleReader
1510
import expo.modules.kotlin.AppContext
1611
import expo.modules.kotlin.views.ComposeProps
1712
import expo.modules.kotlin.views.ExpoComposeView
1813

14+
const val DEFAULT_BEREAN_STANDARD_BIBLE_VERSION = 3034
15+
1916
data class BibleReaderViewProps(
20-
// Bible reference
2117
val versionId: MutableState<Int?> = mutableStateOf(null),
2218
val bookUSFM: MutableState<String?> = mutableStateOf(null),
2319
val chapter: MutableState<Int?> = mutableStateOf(null),
2420
val verse: MutableState<Int?> = mutableStateOf(null),
2521
val verseStart: MutableState<Int?> = mutableStateOf(null),
2622
val verseEnd: MutableState<Int?> = mutableStateOf(null),
27-
2823
val appName: MutableState<String?> = mutableStateOf(null),
2924
val signInMessage: MutableState<String?> = mutableStateOf(null),
30-
val hasReference: MutableState<Boolean?> = mutableStateOf(false),
25+
val hasReference: MutableState<Boolean?> = mutableStateOf(null)
3126
) : ComposeProps
3227

3328
class YVPBibleReaderView(context: Context, appContext: AppContext) :
3429
ExpoComposeView<BibleReaderViewProps>(context, appContext, withHostingView = true) {
35-
3630
override val props = BibleReaderViewProps()
3731

3832
@Composable
3933
override fun Content(modifier: Modifier) {
40-
// TODO: Replace with actual BibleReaderView composable when Kotlin SDK is ready
41-
Box(
42-
modifier = modifier
43-
.fillMaxSize()
44-
.padding(16.dp),
45-
contentAlignment = Alignment.Center
46-
) {
47-
Text(
48-
text = "BibleReaderView placeholder\n" +
49-
"App: ${props.appName.value}\n" +
50-
"Reference: ${props.bookUSFM.value} ${props.chapter.value}",
51-
color = Color.Gray
34+
BibleReader(
35+
appName = props.appName.value ?: "",
36+
appSignInMessage = props.signInMessage.value ?: "",
37+
bibleReference = bibleReference(),
38+
)
39+
}
40+
41+
fun bibleReference(): BibleReference? {
42+
val start = props.verseStart.value
43+
val end = props.verseEnd.value
44+
45+
if (start != null && end != null) {
46+
return BibleReference(
47+
versionId = props.versionId.value ?: DEFAULT_BEREAN_STANDARD_BIBLE_VERSION,
48+
bookUSFM = props.bookUSFM.value ?: "JHN",
49+
chapter = props.chapter.value ?: 1,
50+
verseStart = start,
51+
verseEnd = end
5252
)
5353
}
54+
55+
if (props.hasReference.value == true) {
56+
return BibleReference(
57+
versionId = props.versionId.value ?: DEFAULT_BEREAN_STANDARD_BIBLE_VERSION,
58+
bookUSFM = props.bookUSFM.value ?: "JHN",
59+
chapter = props.chapter.value ?: 1,
60+
verse = props.verse.value
61+
)
62+
}
63+
64+
return null
5465
}
5566
}

android/src/main/java/com/youversion/reactnativesdk/views/YVPVotdView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import expo.modules.kotlin.views.ComposeProps
1717
import expo.modules.kotlin.views.ExpoComposeView
1818

1919
data class VotdViewProps(
20-
val bibleVersionId: MutableState<Int?> = mutableStateOf(111),
20+
val bibleVersionId: MutableState<Int?> = mutableStateOf(3034),
2121
val colorScheme: MutableState<String?> = mutableStateOf(null),
2222
) : ComposeProps
2323

example/app.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"orientation": "portrait",
77
"icon": "./assets/icon.png",
88
"userInterfaceStyle": "light",
9-
"newArchEnabled": true,
109
"splash": {
1110
"image": "./assets/splash-icon.png",
1211
"resizeMode": "contain",
@@ -21,7 +20,6 @@
2120
"foregroundImage": "./assets/adaptive-icon.png",
2221
"backgroundColor": "#ffffff"
2322
},
24-
"edgeToEdgeEnabled": true,
2523
"predictiveBackGestureEnabled": false,
2624
"package": "com.youversion.reactnativesdk.example"
2725
},

0 commit comments

Comments
 (0)