{"id":19680309,"url":"https://github.com/touchlab/badswiftsimulator","last_synced_at":"2025-05-06T19:28:12.184Z","repository":{"id":240810021,"uuid":"801142046","full_name":"touchlab/BadSwiftSimulator","owner":"touchlab","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-23T06:27:56.000Z","size":137,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-06T19:28:09.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/touchlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-15T17:12:48.000Z","updated_at":"2024-12-20T18:04:47.000Z","dependencies_parsed_at":"2024-05-23T07:33:13.334Z","dependency_job_id":null,"html_url":"https://github.com/touchlab/BadSwiftSimulator","commit_stats":null,"previous_names":["touchlab/badswiftsimulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2FBadSwiftSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2FBadSwiftSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2FBadSwiftSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2FBadSwiftSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/touchlab","download_url":"https://codeload.github.com/touchlab/BadSwiftSimulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752244,"owners_count":21798759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:04:41.174Z","updated_at":"2025-05-06T19:28:12.146Z","avatar_url":"https://github.com/touchlab.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bad Swift Simulator\n\n\u003e It's either a bad simulator, or it's simulating bad Swift. Maybe both.\n\nWelcome to the repository for our Codelab,\n_Close the Platform Gap with the \"Bad Swift Simulator\"_.\nThe code in this repository is meant to showcase issues with Kotlin API when used from Swift.\nBut if you're coming from Android,\nyou probably aren't that familiar with Swift.\nSo instead we'll show you in native Kotlin!\n\nThe _Bad Swift Simulator_ explores modern language features,\nthat are present in both Swift and Kotlin,\nbut get lost in translation.\n\nThe features currently showcased are:\n\n- Enums\n- Sealed Interfaces (also applies to sealed classes)\n- Global Functions (also applies to global properties)\n- Suspend Functions\n- Coroutine Flows\n- Default Arguments\n- Function Generics\n\nThere are more oddities that happen when Kotlin is exposed to Swift,\nand we'll cover those in the future.\n\n## Requirements\n\nTo get ready for the Codelab,\ngo through the list below,\nand make sure your computer is set up correctly.\n\n- Latest stable Android Studio, or IntelliJ IDEA (with Android plugin enabled)\n- Fairly latest Android SDK installation\n- Android emulator (AVD), or an Android phone with USB debugging enabled (don't forget to bring a cable)\n- A JVM capable of running Kotlin 1.9.23 and Gradle 8.4 or newer (JVM 11 or 17 is preferred)\n\n_Bad Swift Simulator_ is mostly a regular Android project,\nbut it does contain a Kotlin Multiplatform portion.\nIf you wish to try out that part too,\nmake sure you have Xcode 15.1 or newer installed.\nThen use JetBrains' [kdoctor](https://github.com/Kotlin/kdoctor) to ensure you have a functional KMP installation.\n\nOtherwise, open `settings.gradle.kts` and comment out the last two modules, `:kmp:regular` and `:kmp:skie`. \n\n## Getting Started\n\nTo get started,\nclone this repository on your machine (or download the source zip from GitHub).\n\n```sh\ngit clone https://github.com/touchlab/BadSwiftSimulator\n```\n\nOnce cloned,\nopen the project in your IDE of choice (as long as it's either Android Studio, or IntelliJ IDEA).\nWait for Gradle to complete sync and run the `:app:good` on an emulator.\n\n\u003e [!IMPORTANT]\n\u003e Make sure to run the `:app:good` on an emulator as soon as possible.\n\u003e Although the project is small, it still needs to download Android and KMP dependencies.\n\n\u003e [!TIP]\n\u003e If you wish to try the iOS side as well,\n\u003e open `ios/SDKSample.xcodeproj` in Xcode.\n\u003e Wait for Xcode to complete indexing and then run either `SKIESample` or `KotlinSample` scheme on a simulator.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchlab%2Fbadswiftsimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftouchlab%2Fbadswiftsimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchlab%2Fbadswiftsimulator/lists"}