Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS guides #134

Merged
merged 3 commits into from
Sep 15, 2024
Merged
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
53 changes: 24 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,48 @@ Current revision: M125
## Installation
The library is published to [Maven Central](https://search.maven.org/artifact/com.shepeliev/webrtc-kmp).

Shared module build.gradle.kts
```Kotlin

### Add dependency to your common source set:
```kotlin
commonMain.dependencies {
dependencies {
implementation("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
}
}
```

### Running on iOS
On iOS, the WebRTC SDK is not linked as a transitive dependency, so you need to add it to your iOS project manually.
This can be done using CocoaPods or SPM, depending on your project setup. Here is an example of how to link
the WebRTC SDK using CocoaPods in `build.gradle.kts`:

```kotlin
kotlin {
cocoapods {
version = "1.0.0"
summary = "Shared module"
homepage = "not published"
ios.deploymentTarget = "11.0"
ios.deploymentTarget = "13.0"

pod("WebRTC-SDK") {
version = "125.6422.02"
linkOnly = true
pod("WebRTC-SDK") {
version = "125.6422.04"
moduleName = "WebRTC"
}

podfile = project.file("../iosApp/Podfile")

framework {
baseName = "shared"
export("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
transitiveExport = true
isStatic = true
}

xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
}

android()

ios()
iosSimulatorArm64()

js {
useCommonJs()
browser()
}

sourceSets {
val commonMain by getting {
dependencies {
api("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
}
}

val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
}
iosX64()
iosArm64()
iosSimulatorArm64()
}
```

Expand Down