forked from slackhq/circuit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This does an initial integration of support for iOS in our core artifacts. This is very much intended just to be a toe-hold and not anything meaningful or commitment, but rather a step similar to when we first moved into multiplatform where it can help keep the door open for later work by keeping us honest in our implementation of circuit internals cross-platform friendly now. This does a bunch of that ground work, namely around preparing the `counter` sample for this and making some needed infra changes in the core artifacts to support it. - Switch to using a multiplatform UUID library in backstack. Using the sort of canonical one in the community until Kotlin adds one to the stdlib (https://youtrack.jetbrains.com/issue/KT-31880). - Don't use java reflection in common code - Set up `ios` (which includes `iosX64` and `iosArm64`) and `iosSimulatorArm64` (needed for simulator runs) in projects + `actual` declarations where needed - I don't know what `Screen` will look like in iOS. There's `NSCoder` maybe? Saving for future work. - Promote `ContentWithOverlays` to `commonMain`. - iOS `rememberRetained` is also inert like on JVM. - Started an iOS `Counter` app and dir. This is super basic and uses a KMM circuit presenter + SwiftUI. It does not try to do a full `CircuitContent` or anything related. Most relevant bits are in `ContentView.swift` and `SwiftSupport.kt`. - The multiplatform counter presenter now produces a swift framework for use in the above app. Not sure if we wanna make that sample use compose iOS's UI or try it with swift UI or do both. https://user-images.githubusercontent.com/1361086/235322804-7adbf0a5-57af-4f0d-84a9-5ddee6240d28.mp4
- Loading branch information
Showing
60 changed files
with
1,075 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
backstack/src/iOSMain/kotlin/com/slack/circuit/backstack/BackStackRecordLocalProvider.ios.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.slack.circuit.backstack | ||
|
||
import androidx.compose.runtime.ProvidableCompositionLocal | ||
import androidx.compose.runtime.compositionLocalOf | ||
|
||
internal actual val LocalBackStackRecordLocalProviders: | ||
ProvidableCompositionLocal<List<BackStackRecordLocalProvider<BackStack.Record>>> | ||
get() = compositionLocalOf { emptyList() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.