{"id":16482055,"url":"https://github.com/bod/mpplibraryapolloandroid2","last_synced_at":"2026-05-10T12:04:52.305Z","repository":{"id":138161643,"uuid":"451438607","full_name":"BoD/MppLibraryApolloAndroid2","owner":"BoD","description":"A minimalist sample of a Kotlin Multiplatform Library using Apollo Android 2","archived":false,"fork":false,"pushed_at":"2022-01-24T11:34:26.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T10:38:40.561Z","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/BoD.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":"2022-01-24T11:34:01.000Z","updated_at":"2022-01-24T11:34:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"28419c1e-0b66-4044-82ef-169b7eb03d0a","html_url":"https://github.com/BoD/MppLibraryApolloAndroid2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FMppLibraryApolloAndroid2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FMppLibraryApolloAndroid2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FMppLibraryApolloAndroid2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FMppLibraryApolloAndroid2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoD","download_url":"https://codeload.github.com/BoD/MppLibraryApolloAndroid2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241198944,"owners_count":19926554,"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-10-11T13:09:29.234Z","updated_at":"2026-05-10T12:04:52.219Z","avatar_url":"https://github.com/BoD.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Multiplatform Library With Apollo Android 2 Sample\n\nThis is a minimalist sample of a Kotlin Multiplatform Library using [Apollo Android 2](https://www.apollographql.com/docs/kotlin/v2).\n\nIt contains 2 modules:\n\n- `utils`\n  - Defines a `Platform` class with `expect`/`actual` for iOS and Android\n  - Contains GraphQL schema (for https://apollo-fullstack-tutorial.herokuapp.com/) + one operation\n- `mympplibrary`\n  - Defines a `MyMppLibrary` class, with one function using `Platform` and one function making a GraphQL \n  call using the generated code from `utils`\n\nTo use:\n- `./gradlew assemble`\n- Have an XCode project\n- Drag and drop `mympplibrary/build/fat-framework/debug/MyMppLibrary.framework` from the Finder to the XCode project\n  in the `Frameworks` folder of your project in the left pane\n- In the `yourproject.xcodeproj` of your app, in `Frameworks, Libraries and Embedded Content`, for \n  `MyMppLibrary.framework`, choose `Embed without Signing`\n\nHere's an example of a minimalist Swift app using the library:\n\n```swift\n// MySuperAppApp.swift\n\nimport SwiftUI\n\nimport MyMppLibrary\n\n@main\nstruct MySuperAppApp: App {\n    init() {\n        useMyMppLibrary()\n    }\n    \n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n\nfunc useMyMppLibrary()  {\n    setbuf(__stdoutp, nil)\n    \n    let library = MyMppLibrary()\n    library.printPlatform()\n    library.executeSampleQuery { result, _ in\n        print(result)\n    }\n}\n```\n\nTo make things easier, an XCode project is available in the `XCode` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fmpplibraryapolloandroid2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbod%2Fmpplibraryapolloandroid2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fmpplibraryapolloandroid2/lists"}