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

Initial iOS support #583

Merged
merged 37 commits into from
May 8, 2023
Merged

Initial iOS support #583

merged 37 commits into from
May 8, 2023

Conversation

ZacSweers
Copy link
Collaborator

@ZacSweers ZacSweers commented Apr 20, 2023

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.
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-04-29.at.13.50.12.mp4

@ZacSweers
Copy link
Collaborator Author

Currently stuck on JetBrains/compose-multiplatform#3088 with the iOS Counter app sample, but everything else looks like it's working. Wanna clean up some of the repetitive bits

@ZacSweers ZacSweers marked this pull request as ready for review April 23, 2023 16:51
@ZacSweers ZacSweers changed the title Initial iOS testing Initial iOS support Apr 29, 2023
@ZacSweers
Copy link
Collaborator Author

Once #615 is in, then we don't need to maintain the separate Dispatchers.IO expect/actual since that version of coroutines introduces it 👍. Not worried about waiting for that PR though due to the androidx test bug

@ZacSweers ZacSweers added this pull request to the merge queue May 8, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 8, 2023
@ZacSweers ZacSweers enabled auto-merge May 8, 2023 18:46
@ZacSweers ZacSweers added this pull request to the merge queue May 8, 2023
Merged via the queue into main with commit 0fafc40 May 8, 2023
1 check passed
@ZacSweers ZacSweers deleted the z/iOS branch May 8, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants