{"id":16682806,"url":"https://github.com/johnno1962/injectionlite","last_synced_at":"2025-09-29T05:31:42.521Z","repository":{"id":146646076,"uuid":"606369301","full_name":"johnno1962/InjectionLite","owner":"johnno1962","description":"Swift package re-write of InjectionIII app","archived":false,"fork":false,"pushed_at":"2024-11-20T17:25:03.000Z","size":136,"stargazers_count":39,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-10T19:02:53.700Z","etag":null,"topics":["application","development","hot","rapid","reloading"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnno1962.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-25T09:25:07.000Z","updated_at":"2024-11-21T03:28:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd526768-75e2-47d6-9362-d1d1ce561806","html_url":"https://github.com/johnno1962/InjectionLite","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnno1962%2FInjectionLite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnno1962%2FInjectionLite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnno1962%2FInjectionLite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnno1962%2FInjectionLite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnno1962","download_url":"https://codeload.github.com/johnno1962/InjectionLite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234594214,"owners_count":18857420,"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":["application","development","hot","rapid","reloading"],"created_at":"2024-10-12T14:08:36.030Z","updated_at":"2025-09-29T05:31:42.505Z","avatar_url":"https://github.com/johnno1962.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InjectionLite\n\nA cut down, standalone, Swift Package \"reference\" version of\nthe [InjectionIII](https://github.com/johnno1962/InjectionIII)\napplication for use in the simulator or un-sandboxed macOS.\nSince Xcode 16.3, Xcode no longer logs compilation commands \nby default so the build setting EMIT_FRONTEND_COMMAND_LINES\nwith a value of YES is required in your project.\n\nAdd this package to your project and add \"Other Linker Flags\" \n-Xlinker -interposable (on separate lines) to the `Debug` build \nsettings of all targets of your project. \n\n![Icon](https://github.com/johnno1962/InjectionIII/blob/main/interposable.png)\n\nWhen you launch your app and save a source file (somewhere in \nyour home directory), this package attempts to find how to \nrecompile the file from the most recent build log, creates \na dynamic library and loads it, then \"swizzles\" the new function \nimplementations into the app without having to restart it.\n\nIt should be functionally equivalent to using the InjectionIII.app\nin the simulator but it's rather new and there may be problems \nto iron out. If you encounter one, please file an issue. Consult \nthe [InjectionIII](https://github.com/johnno1962/InjectionIII)\nREADME for more details on how it can be used to inject an iOS \napp or SwiftUI interfaces and how it works its magic.\n\nFor the sake of simplicity, this version of injection is\nmissing the \"Unhiding\" functionality from InjectionIII\nsometimes required to be able to inject Swift code \nthat uses default function arguments.\n\n## Bazel Support\n\nThis version includes enhanced Bazel build system support with automatic target discovery and optimized compilation queries. When InjectionLite detects a Bazel workspace (via `MODULE.bazel` or `WORKSPACE` files), it automatically:\n\n1. **Auto-discovers iOS application targets** from your Bazel build graph, prioritizing targets closer to the workspace root\n2. **Generates optimized aquery commands** that only query dependencies of your app targets, reducing overhead\n3. **Handles Bazel-specific placeholders** like `__BAZEL_XCODE_SDKROOT__` and `__BAZEL_XCODE_DEVELOPER_DIR__`\n4. **Processes output-file-map configurations** for better compatibility with Bazel's compilation strategy\n5. **Automatically overrides whole-module-optimization** settings that interfere with hot reloading\n\nThe system uses a two-tier approach: first attempting optimized queries using discovered app targets, then falling back to legacy broad queries if needed. This ensures compatibility while providing performance benefits for typical iOS development workflows.\n\nBazel integration requires either `bazel` or `/opt/homebrew/bin/bazelisk` to be available in your system PATH.\n\n### ⚠️ rules_xcodeproj Limitation\n\n**Important**: Currently, Bazel queries and commands cannot be executed from within the rules_xcodeproj-generated Xcode project environment. This means:\n\n- If you run your app from Xcode using a rules_xcodeproj-generated project and modify a file, **hot reloading will not work** because the app runs through a different execution route that doesn't provide access to Bazel tooling\n- **Workaround**: Run your app directly from the terminal using `bazel run` instead of launching from Xcode to enable hot reloading functionality\n- This limitation only affects rules_xcodeproj workflows - standard Bazel development workflows are fully supported\n\nWe're working on addressing this limitation in future releases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnno1962%2Finjectionlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnno1962%2Finjectionlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnno1962%2Finjectionlite/lists"}