~repos /only-bible-app
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.Composableimport androidx.compose.ui.ExperimentalComposeUiApiimport androidx.compose.ui.platform.LocalWindowInfoimport androidx.compose.ui.unit.Dpimport androidx.compose.ui.unit.dpimport platform.UIKit.UIActivityViewControllerimport platform.UIKit.UIApplicationimport platform.UIKit.UIScreen
//import platform.AVKit.Audio
actual fun getPlatform() = Platform.IOS
@OptIn(ExperimentalComposeUiApi::class)@Composableactual fun getScreenWidth(): Dp = LocalWindowInfo.current.containerSize.width.pxToPoint().dp
@OptIn(ExperimentalComposeUiApi::class)@Composableactual fun getScreenHeight(): Dp = LocalWindowInfo.current.containerSize.height.pxToPoint().dp
fun Int.pxToPoint(): Double = this.toDouble() / UIScreen.mainScreen.scale
@OptIn(ExperimentalComposeUiApi::class)@Composableactual 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 ) }}
@Composableactual 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() { }}