Skip to content

Commit e7ca969

Browse files
authored
update: onboarding improvements (JetBrains#3233)
1 parent 9de6765 commit e7ca969

12 files changed

+40
-21
lines changed
Loading
Loading
Loading
Loading
Binary file not shown.

docs/topics/multiplatform-mobile/multiplatform-mobile-create-first-app.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Here you will learn how to create and run your first Kotlin Multiplatform Mobile
1717
1. In Android Studio, select **File | New | New Project**.
1818
2. Select **Kotlin Multiplatform App** in the list of project templates, and click **Next**.
1919

20-
![Mobile Multiplatform project template](multiplatform-mobile-project-wizard-1.png)
20+
![Mobile Multiplatform project template](multiplatform-mobile-project-wizard-1.png){width=700}
2121

2222
3. Specify a name for your first application, and click **Next**.
2323

24-
![Mobile Multiplatform project - general settings](multiplatform-mobile-project-wizard-2.png)
24+
![Mobile Multiplatform project - general settings](multiplatform-mobile-project-wizard-2.png){width=700}
2525

2626
4. In the **iOS framework distribution** list, select the **Regular framework** option.
2727

28-
![Mobile Multiplatform project - additional settings](multiplatform-mobile-project-wizard-3.png)
28+
![Mobile Multiplatform project - additional settings](multiplatform-mobile-project-wizard-3.png){width=700}
2929

3030
> We recommend using the regular framework for your first project, as this option doesn't require third-party tools and
3131
> has less installation issues.
@@ -118,18 +118,21 @@ If you want to run your application on a simulated device, you can add a new run
118118
![New run configuration for iOS application](ios-new-configuration.png)
119119

120120
3. Name your configuration.
121+
4. Select the **Xcode project file**. For that, navigate to your project, for example **KotlinMultiplatformSandbox**,
122+
open the`iosApp` folder and select the `.xcodeproj` file.
121123

122-
4. Select a simulated device in the **Execution target** list, and then click **OK**.
124+
5. In the **Execution target** list, select a simulated device and click **OK**.
123125

124126
![New run configuration with iOS simulator](ios-new-simulator.png)
125127

126-
5. Click **Run** to run your application on the new simulated device.
128+
6. Click **Run** to run your application on the new simulated device.
127129

128130
#### Run on a real iOS device {initial-collapse-state="collapsed"}
129131

130-
1. [Connect a real iPhone device to Xcode](https://developer.apple.com/documentation/xcode/running_your_app_in_the_simulator_or_on_a_device).
131-
2. [Create a run configuration](#run-on-a-new-ios-simulated-device) by selecting iPhone in the **Execution target** list.
132-
3. Click **Run** to run your application on the iPhone device.
132+
1. Connect a real iPhone device to Xcode.
133+
2. Make sure to code sign your app. For more information, see the [official Apple documentation](https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device/).
134+
3. [Create a run configuration](#run-on-a-new-ios-simulated-device) by selecting iPhone in the **Execution target** list.
135+
4. Click **Run** to run your application on the iPhone device.
133136

134137
> If your build fails, follow the workaround described in [this issue](https://youtrack.jetbrains.com/issue/KT-40907).
135138
>
@@ -165,8 +168,10 @@ the Kotlin standard library function for reversing text that works on all platfo
165168

166169
## Next step
167170

168-
[Learn about dependencies and add a third-party library to your project](multiplatform-mobile-dependencies.md)
169-
to expand its functionality.
171+
In the next part of the tutorial, you'll learn about dependencies and add a third-party library to expand
172+
the functionality of your project.
173+
174+
**[Proceed to the next part](multiplatform-mobile-dependencies.md)**
170175

171176
### See also
172177

docs/topics/multiplatform-mobile/multiplatform-mobile-dependencies.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ the number of days from today until the new year using the `date-time` date arit
7777

7878
fun greeting(): String {
7979
return "Guess what it is! > ${platform.name.reversed()}!" +
80-
"\nThere are only ${daysUntilNewYear()} days left until New Year! 🎅🏼 "
80+
"\nThere are only ${daysUntilNewYear()} days left until New Year! 🎆"
8181
}
8282
}
8383
```
@@ -88,7 +88,9 @@ the number of days from today until the new year using the `date-time` date arit
8888

8989
## Next step
9090

91-
[Add more dependencies and more complex logic to your project](multiplatform-mobile-upgrade-app.md).
91+
In the next part of the tutorial, you'll add more dependencies and more complex logic to your project.
92+
93+
**[Proceed to the next part](multiplatform-mobile-upgrade-app.md)**
9294
9395
### See also
9496

docs/topics/multiplatform-mobile/multiplatform-mobile-getting-started.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Kotlin Multiplatform Mobile (KMM) is an SDK designed to simplify the development
1616
You can share common code between iOS and Android apps and write platform-specific code only where it's necessary.
1717
Common use cases for Kotlin Multiplatform Mobile include implementing a native UI or working with platform-specific APIs.
1818

19-
> You can also watch this [introductory video](https://www.youtube.com/watch?v=GcqFhoUuNNI) with a general explanation of
19+
> You can also watch this [introductory video](https://www.youtube.com/watch?v=mdN6P6RI__k) with a general explanation of
2020
> what Kotlin Multiplatform Mobile is and how to use it in your projects.
2121
>
2222
{type="tip"}
@@ -35,7 +35,9 @@ Get to know Kotlin Multiplatform Mobile and create a mobile app that works on bo
3535

3636
## Next step
3737

38-
Start by [setting up an environment](multiplatform-mobile-setup.md) for Kotlin Multiplatform Mobile development.
38+
Start by setting up an environment for Kotlin Multiplatform Mobile development.
39+
40+
**[Proceed to the next part](multiplatform-mobile-setup.md)**
3941

4042
### See also
4143

docs/topics/multiplatform-mobile/multiplatform-mobile-setup.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ To make sure everything works as expected, install and run the KDoctor tool:
135135
136136
## Next step
137137
138-
Once the setup is complete, you can start [creating your first cross-platform mobile application](multiplatform-mobile-create-first-app.md).
138+
In the next part of the tutorial, you'll create your first cross-platform mobile application.
139+
140+
**[Proceed to the next part](multiplatform-mobile-create-first-app.md)**
139141

140142
## Get help
141143

docs/topics/multiplatform-mobile/multiplatform-mobile-upgrade-app.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ data class RocketLaunch (
151151
import kotlinx.serialization.json.Json
152152

153153
class Greeting {
154+
private val platform: Platform = getPlatform()
155+
154156
private val httpClient = HttpClient {
155157
install(ContentNegotiation) {
156158
json(Json {
@@ -182,7 +184,7 @@ data class RocketLaunch (
182184
httpClient.get("https://api.spacexdata.com/v4/launches").body()
183185
val lastSuccessLaunch = rockets.last { it.launchSuccess == true }
184186
return "Guess what it is! > ${platform.name.reversed()}!" +
185-
"\nThere are only ${daysUntilNewYear()} left until New Year! 🎅🏼 " +
187+
"\nThere are only ${daysUntilNewYear()} left until New Year! 🎆" +
186188
"\nThe last successful launch was ${lastSuccessLaunch.launchDateUTC} 🚀"
187189
}
188190
}
@@ -274,8 +276,12 @@ the shared module, which contains all the business logic.
274276
The module is already connected to the iOS project — the Android Studio plugin wizard did all the configuration. The module
275277
is already imported and used in `ContentView.swift` with `import shared`.
276278

279+
> If you see an error saying that the shared module is unresolved, run the app.
280+
>
281+
{type="tip"}
282+
277283
1. Launch your Xcode app and select **Open a project or file**.
278-
2. Navigate to your project, for example KotlinMultiplatformSandbox, and select the `iosApp` folder. Click **Open**.
284+
2. Navigate to your project, for example **KotlinMultiplatformSandbox**, and select the `iosApp` folder. Click **Open**.
279285
3. In `iosApp/iosApp.swift`, update the entry point for your app:
280286

281287
```swift
@@ -315,8 +321,8 @@ is already imported and used in `ContentView.swift` with `import shared`.
315321
```
316322

317323
* `ViewModel` is declared as an extension to `ContentView`, as they are closely connected.
318-
* The [Combine framework](https://developer.apple.com/documentation/combine) connects the view model (ContentView.ViewModel)
319-
with the view (ContentView).
324+
* The [Combine framework](https://developer.apple.com/documentation/combine) connects the view model (`ContentView.ViewModel`)
325+
with the view (`ContentView`).
320326
* `ContentView.ViewModel` is declared as an `ObservableObject`.
321327
* The `@Published` wrapper is used for the `text` property.
322328
* The `@ObservedObject` property wrapper is used to subscribe to the view model.
@@ -349,7 +355,7 @@ is already imported and used in `ContentView.swift` with `import shared`.
349355
* The `greeting()` function was marked with the `@Throws(Exception::class)` annotation. So any exceptions that are
350356
instances of the `Exception` class or its subclass will be propagated as `NSError`, so you can handle them in the `completionHandler`.
351357
* When calling Kotlin `suspend` functions from Swift, completion handlers might be called on threads other than main,
352-
see the [iOS intergation](native-ios-integration.md#completion-handlers) in the Kotlin/Native memory manager.
358+
see the [iOS integration](native-ios-integration.md#completion-handlers) in the Kotlin/Native memory manager.
353359
That's why `DispatchQueue.main.async` is used to update `text` property.
354360
355361
6. Re-run both **androidApp** and **iosApp** configurations from Android Studio to make sure your app's logic is synced:
@@ -358,7 +364,9 @@ is already imported and used in `ContentView.swift` with `import shared`.
358364

359365
## Next step
360366

361-
Now it's time to [wrap up your project](multiplatform-mobile-wrap-up.md) and see what's next.
367+
In the final part of the tutorial, you'll wrap up your project and see what steps to take next.
368+
369+
**[Proceed to the next part](multiplatform-mobile-wrap-up.md)**
362370
363371
### See also
364372

0 commit comments

Comments
 (0)