{"id":24154850,"url":"https://github.com/rustunit/bevy_ios_safearea","last_synced_at":"2025-03-01T22:27:57.936Z","repository":{"id":272125948,"uuid":"915588048","full_name":"rustunit/bevy_ios_safearea","owner":"rustunit","description":"Bevy plugin to query ios device safe area insets","archived":false,"fork":false,"pushed_at":"2025-01-20T16:12:54.000Z","size":738,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T05:43:12.605Z","etag":null,"topics":["bevy","gamedev","ios","mobile","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bevy_ios_safearea","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustunit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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},"funding":{"github":"rustunit"}},"created_at":"2025-01-12T09:08:12.000Z","updated_at":"2025-01-20T16:12:56.000Z","dependencies_parsed_at":"2025-01-12T11:16:58.029Z","dependency_job_id":"98e478c6-1b6c-4c2a-b6d5-4d29c7a0630a","html_url":"https://github.com/rustunit/bevy_ios_safearea","commit_stats":null,"previous_names":["rustunit/bevy_ios_safearea"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_ios_safearea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_ios_safearea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_ios_safearea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_ios_safearea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustunit","download_url":"https://codeload.github.com/rustunit/bevy_ios_safearea/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241396777,"owners_count":19956406,"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":["bevy","gamedev","ios","mobile","rust"],"created_at":"2025-01-12T12:26:11.320Z","updated_at":"2025-03-01T22:27:57.921Z","avatar_url":"https://github.com/rustunit.png","language":"Rust","funding_links":["https://github.com/sponsors/rustunit"],"categories":["UI"],"sub_categories":[],"readme":"# bevy_ios_safearea\n\n[![Following released Bevy versions](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://bevyengine.org/learn/quick-start/plugin-development/#main-branch-tracking)\n[![crates.io](https://img.shields.io/crates/v/bevy_ios_safearea.svg)](https://crates.io/crates/bevy_ios_safearea)\n[![docs.rs](https://docs.rs/bevy_ios_safearea/badge.svg)](https://docs.rs/bevy_ios_safearea)\n[![discord][sh_discord]][lk_discord]\n\n[sh_discord]: https://img.shields.io/discord/1176858176897953872?label=discord\u0026color=5561E6\n[lk_discord]: https://discord.gg/rQNeEnMhus\n\nBevy plugin to query ios device safe area insets.\n\n![demo](./assets/example.jpg)\n\n## Features\n\n* reads safe area on app start\n* easy access via a resource\n* noop on non-ios platforms (no `cfg`s needed in your app code)\n\n## Instructions\n\n1. Add to XCode: Add SPM (Swift Package Manager) dependency\n2. Add Rust dependency\n3. Setup Plugin\n\n### 1. Add to XCode\n\n* Go to `File` -\u003e `Add Package Dependencies` and paste `https://github.com/rustunit/bevy_ios_safearea.git` into the search bar on the top right:\n    ![xcode](./assets/xcode-spm.png)\n\n### 2. Add Rust dependency\n\n```sh\ncargo add bevy_ios_safearea\n``` \n\nor \n\n```toml\n# always pin to the same exact version you also of the Swift package\nbevy_ios_safearea = { version = \"=0.2.0\" }\n```\n\n### 3. Setup Plugin in Bevy\n\nInitialize Bevy Plugin:\n\n```rust\n// request initialisation right on startup\nuse bevy::prelude::*;\nApp::new()\n    .add_plugins((DefaultPlugins,bevy_ios_safearea::IosSafeAreaPlugin));\n```\n\nAccessing it:\n\n```rust\nuse bevy::prelude::*;\nuse bevy_ios_safearea::IosSafeArea;\n\nfn bevy_system(safe_area: IosSafeArea) {    \n    let safe_area_top = safe_area.top();\n}\n```\n\n## Our Other Crates\n\n- [bevy_debug_log](https://github.com/rustunit/bevy_debug_log)\n- [bevy_device_lang](https://github.com/rustunit/bevy_device_lang)\n- [bevy_web_popups](https://github.com/rustunit/bevy_web_popups)\n- [bevy_libgdx_atlas](https://github.com/rustunit/bevy_libgdx_atlas)\n- [bevy_ios_iap](https://github.com/rustunit/bevy_ios_iap)\n- [bevy_ios_review](https://github.com/rustunit/bevy_ios_review)\n- [bevy_ios_gamecenter](https://github.com/rustunit/bevy_ios_gamecenter)\n- [bevy_ios_alerts](https://github.com/rustunit/bevy_ios_alerts)\n- [bevy_ios_notifications](https://github.com/rustunit/bevy_ios_notifications)\n- [bevy_ios_impact](https://github.com/rustunit/bevy_ios_impact)\n\n## Bevy version support\n\n|bevy|crate|\n|----|---|\n|0.15|0.1,0.2,main|\n\n# License\n\nAll code in this repository is dual-licensed under either:\n\n- MIT License (LICENSE-MIT or \u003chttp://opensource.org/licenses/MIT\u003e)\n- Apache License, Version 2.0 (LICENSE-APACHE or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n\nat your option. This means you can select the license you prefer.\n\n## Your contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustunit%2Fbevy_ios_safearea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustunit%2Fbevy_ios_safearea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustunit%2Fbevy_ios_safearea/lists"}