{"id":28506174,"url":"https://github.com/sosweetham/tauri-plugin-torch","last_synced_at":"2026-03-10T15:32:00.705Z","repository":{"id":291367277,"uuid":"977340613","full_name":"sosweetham/tauri-plugin-torch","owner":"sosweetham","description":"A plugin that enables for the use of device torch on android and ios. ","archived":false,"fork":false,"pushed_at":"2025-05-26T08:27:40.000Z","size":1047,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T21:51:42.721Z","etag":null,"topics":["android","ios","kotlin","svelte","swift","tauri","tauri-plugin","typescript"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sosweetham.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-04T01:11:56.000Z","updated_at":"2025-09-19T16:33:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf6f126b-5637-4968-9e19-f0a628b45949","html_url":"https://github.com/sosweetham/tauri-plugin-torch","commit_stats":null,"previous_names":["sosweetham/tauri-plugin-torch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sosweetham/tauri-plugin-torch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosweetham%2Ftauri-plugin-torch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosweetham%2Ftauri-plugin-torch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosweetham%2Ftauri-plugin-torch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosweetham%2Ftauri-plugin-torch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sosweetham","download_url":"https://codeload.github.com/sosweetham/tauri-plugin-torch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sosweetham%2Ftauri-plugin-torch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30340117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:03:31.997Z","status":"ssl_error","status_checked_at":"2026-03-10T15:01:30.431Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","ios","kotlin","svelte","swift","tauri","tauri-plugin","typescript"],"created_at":"2025-06-08T20:00:48.338Z","updated_at":"2026-03-10T15:32:00.696Z","avatar_url":"https://github.com/sosweetham.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tauri Plugin Torch\n\nThis project is a Tauri plugin which allows for flash control on iOS and Android devices with a consistent API.\n\n| Platform | Supported |\n| -------- | --------- |\n| Linux    | x         |\n| Windows  | x         |\n| macOS    | x         |\n| Android  | ✓         |\n| iOS      | ✓         |\n\n## API\n\n### Available Commands\n\n```ts\nimport { ping, toggle, check } from \"@sosweetham/tauri-plugin-torch-api\";\nasync function toggleTorch() {\n    const isTorchOn = await check();\n    if (isTorchOn) {\n        await toggle(false);\n        updateResponse(\"Torch is off\");\n    } else {\n        await toggle(true);\n        updateResponse(\"Torch is on\");\n    }\n}\n\nasync function onTorch() {\n    toggle(true).then(updateResponse).catch(updateResponse);\n}\n\nasync function offTorch() {\n    toggle(false).then(updateResponse).catch(updateResponse);\n}\n```\n\n### Default Permission\n\nThis permission set configures which\ntorch features are by default exposed.\n\n#### Granted Permissions\n\nIt allows access to all torch commands.\n\n#### This default permission set includes the following:\n\n-   `allow-toggle`\n-   `allow-check`\n\n### Permission Table\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003eIdentifier\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\n`torch:allow-check`\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nEnable the check command.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\n`torch:deny-check`\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nDisable the check command.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\n`torch:allow-toggle`\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nEnable the toggle command.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\n`torch:deny-toggle`\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nDisable the toggle command.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Contribution\n\n## Notes\n\n1. Ping command is boilerplate code, ignore it, I kept it in the reference, might remove later.\n2. Permission tomls had to be added manually to `./permissions/autogenerated/commands`, contrary to what the tauri documentation says.\n3. Be sure to deploy the app using `pnpm tauri [android|ios] dev` to get the best experience. The IDEs are not aware of the Tauri build process and will not work as expected.\n4. Do it beforehand development because otherwise tauri packages will not be generated for the swift and kotlin code.\n\n### Development Troubleshooting\n\n-   Be sure to open the `android` and `ios` folders in their respective IDEs (Android Studio and XCode) to get the best development experience.\n-   Do not deploy the app using the buttons provided in the IDEs, use the Tauri CLI instead. The IDEs are not aware of the Tauri build process and will not work as expected.\n-   You must build the plugin and guest-js before deploying the app using `cargo build` and `pnpm build` respectively.\n-   The tauri imports may give import errors in the IDEs if you dont use the plugin and deploy the app first.\n\n## Looking for\n\n-   Automated Testing Suite - Implementation for testing suite of the plugin would be highly appreciated\n-   Documentation - Doc comments are lackluster rn for a library project\n\n## Physical Testing\n\nI have tested the plugin on a Pixel 8 Pro (Android 15) and iPhone 13 (iOS 18) and it works as expected. The implementations are really generic and should work on all devices. If you have a device that is not working, please open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsosweetham%2Ftauri-plugin-torch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsosweetham%2Ftauri-plugin-torch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsosweetham%2Ftauri-plugin-torch/lists"}