mordant icon indicating copy to clipboard operation
mordant copied to clipboard

Add support for iOS, watchOS and tvOS

Open conradev opened this issue 9 months ago • 1 comments

This adds support for all known Apple platforms

I was upgrading my iOS/macOS/Android app to Kotlin 1.9.10 in the process of replacing my usage of kotlinx-cli with clikt, I realized that it doesn't have support for iOS. I added support to clikt, and it depends on mordant and thus here I am 😄

This approach works well for kotlin-logging, which I use for logging in my app.

I use command line arguments on iOS to configure the binary for integration testing:

Screenshot 2023-09-09 at 7 35 27 PM

conradev avatar Sep 10 '23 03:09 conradev

Thanks for the PR, and thanks for the use case example; I would have wondered how a CLI could be used on an iphone.

Let add these targets to the github actions tests for the macos runner (or at least all of the targets that can be run from ios).

Do ios, watchos, and tvos have identical syscalls to macos? Otherwise we'll need to write new versions of MppImpl.kt for those targets.

ajalt avatar Sep 10 '23 17:09 ajalt

In case it's easy, while you are at it, would you mind setting things up for Android as well?

Use case

In my company here there are people that are running clikt inside their test flavor of Android app, which they use to validate things in some e2e tests they run.

Because of this, we're currently stuck on clikt pre 4.0 and I'd love to bump to the latest. Once I get some time I plan on trying to get the code for it into Mordant (and maybe clikt if necessary).

hick209 avatar Mar 25 '24 13:03 hick209

I've created an issue about this #165 with more details

hick209 avatar Mar 25 '24 14:03 hick209

I added iOS in #168, watchOS and tvOS are blocked by https://github.com/JetBrains/markdown/pull/159

ajalt avatar May 05 '24 21:05 ajalt