~repos /only-bible-app

#kotlin#android#ios

git clone https://pyrossh.dev/repos/only-bible-app.git

The only bible app you will ever need. No ads. No in-app purchases. No distractions.



file:

composeApp/src/iosMain/kotlin/dev/pyrossh/onlyBible/Platform.ios.kt



package dev.pyrossh.onlyBible
import androidx.compose.runtime.Composable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.platform.LocalWindowInfo
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import platform.UIKit.UIActivityViewController
import platform.UIKit.UIApplication
import platform.UIKit.UIScreen
//import platform.AVKit.Audio
actual fun getPlatform() = Platform.IOS
@OptIn(ExperimentalComposeUiApi::class)
@Composable
actual fun getScreenWidth(): Dp = LocalWindowInfo.current.containerSize.width.pxToPoint().dp
@OptIn(ExperimentalComposeUiApi::class)
@Composable
actual fun getScreenHeight(): Dp = LocalWindowInfo.current.containerSize.height.pxToPoint().dp
fun Int.pxToPoint(): Double = this.toDouble() / UIScreen.mainScreen.scale
@OptIn(ExperimentalComposeUiApi::class)
@Composable
actual fun playClickSound() {
// AudioServicesPlayAlertSound(SystemSoundID(1322))
}
actual object ShareKit {
actual fun shareText(text: String) {
val currentViewController = UIApplication.sharedApplication().keyWindow?.rootViewController
val activityViewController = UIActivityViewController(listOf(text), null)
currentViewController?.presentViewController(
viewControllerToPresent = activityViewController,
animated = true,
completion = null
)
}
}
@Composable
actual fun onThemeChange(themeType: ThemeType) {
}
actual object SpeechService {
actual fun init(onStarted: () -> Unit, onEnded: () -> Unit) {
}
actual fun dispose(onStarted: () -> Unit, onEnded: () -> Unit) {
}
actual fun startTextToSpeech(voiceName: String, text: String) {
}
actual fun stopTextToSpeech() {
}
}