{"id":18389363,"url":"https://github.com/rightpoint/airqualitydashboard-ios","last_synced_at":"2025-07-03T02:03:00.649Z","repository":{"id":143418184,"uuid":"133732975","full_name":"Rightpoint/AirQualityDashboard-iOS","owner":"Rightpoint","description":"Air quality dashboard for our BLE AQI device","archived":false,"fork":false,"pushed_at":"2018-06-21T23:37:25.000Z","size":109402,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-04-12T08:45:23.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Rightpoint.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":"2018-05-16T23:21:37.000Z","updated_at":"2018-07-17T11:56:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"c43b4a43-d895-40e3-93f8-1aef326c3e6b","html_url":"https://github.com/Rightpoint/AirQualityDashboard-iOS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rightpoint/AirQualityDashboard-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAirQualityDashboard-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAirQualityDashboard-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAirQualityDashboard-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAirQualityDashboard-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/AirQualityDashboard-iOS/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAirQualityDashboard-iOS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245241,"owners_count":23436510,"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-06T01:42:46.796Z","updated_at":"2025-07-03T02:02:55.625Z","avatar_url":"https://github.com/Rightpoint.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AirQualityDashboard\n\n[![Develop](https://img.shields.io/badge/Hockey-Develop-green.svg)][develop-hockey]\n[![Sprint](https://img.shields.io/badge/Hockey-Sprint-green.svg)][sprint-hockey]\n[![CircleCI](https://circleci.com/gh/Raizlabs/raizlabs-ios/tree/develop.svg?style=shield\u0026circle-token=ZZCIRCLE_PROJECT_STATUS_KEYZZ)][circle-ci] [![codecov](https://codecov.io/gh/Raizlabs/raizlabs-ios/branch/master/graph/badge.svg)](https://codecov.io/gh/Raizlabs/raizlabs-ios)\n\n## Development Process\nAll stories and bugs are tracked in [JIRA][]. Development occurs on branches that are tested with the `test` fastlane task once a PR is created. The PR is reviewed and then merged into the `develop` branch. This triggers the `develop` fastlane task which distributes a build to the [develop][develop-hockey] hockey app for testing and PO approval. At the end of a sprint, a `sprint-X` tag is manually created which triggers the `sprint` fastlane task which distributes a build to the [sprint][sprint-hockey] hockey app.\n\n[circle-ci]: https://circleci.com/gh/Raizlabs/AirQualityDashboard-ios\n[JIRA]: https://raizlabs.atlassian.net/secure/RapidBoard.jspa?projectKey=Specify the JIRA projectKey\n[sprint-hockey]: https://rink.hockeyapp.net/apps/ZZHOCKEY_SPRINT_IDZZ\n[develop-hockey]: https://rink.hockeyapp.net/apps/ZZHOCKEY_DEVELOP_IDZZ\n\nTo get started, see [Contributing](#contributing)\n\n## Setup\n\n### React Native\n\n```\n$ brew install yarn\n$ yarn global add react-native-cli\n$ cd app/React\n# For debugging\n$ react-native start\n# To make a static bundle for deploying on device\n$ react-native bundle --entry-file index.js --platform ios --dev false --bundle-output main.jsbundle --assets-dest assets\n```\n\n#### Codecov\n\nYou can use [Codecov](https://codecov.io) automatically as long as the repository's owner is a paid Codecov member (assuming this is a private repo).\n\n#### Danger\n\nTo [set up Danger](http://danger.systems/guides/getting_started.html) on CircleCI you'll need to add a `DANGER_GITHUB_API_TOKEN` to the CI test environment. There are two bots already available for Raizlabs: for open source projects use our \"OSS\" bot, and for closed source projects use the \"Private\" bot. You'll find these tokens in our shared credential storage if you search for \"GitHub Bot\".\n\nSimilarly, you'll also need to set up the `CIRCLE_API_TOKEN` for build artifacts like screenshots and code coverage reports to show up in Danger.\n\n* Find the entry \"CircleCI API Tokens\" in our shared credential storage. \n* Grab the \"Open Source\" token for open source projects, and the \"Private Repos\" token for closed source projects.\n* Add the appropriate token as `CIRCLE_API_TOKEN` to the CircleCI build environment for this repo.\n\n## Architecture\n\n\n### Implementation Guidance\n\n- Coordinators should:\n  - Manage view controller transitions\n- View Controllers should:\n  - Delegate 'final' actions to a Coordinator\n  - **Not** access the navigation controller or present view controllers\n  - Model ViewState (ie: Value type view model)\n  - Target Actions and UI Delegates should modify the controller state or delegate.\n    - UI Should be configured in one one method when the state is changed.\n  - Contain minimal layout functionality\n- Views should:\n  - Define constants only if re-used\n  - Specify colors via UIAppearance\n  - Prefer attributed strings for text configuration\n  - Adapt to changes in text size\n  - Not use constructor-injected values\n  - Confirm there no ambiguous constraints in View Debugger before commit\n  - Use Dynamic Type to exercise text wrapping\n  - Collection View and Table View cells should be avoided in favor of a generic wrapper cell\n- ViewModels should:\n  - Use value semantics\n  - Can be called an `Item` or `State` as needed\n  - Use extensions to integration View integration\n- Services Should\n  - Expose contract via Protocol\n  - Define domain specific logic\n    - Validation\n    - Entity Graph Management\n    - Invoke server actions\n    - Identifier management, uniquing and encapsulation\n  - Encapsulate networking and persistence details\n    - Transparently refresh OAuth tokens\n    - Return persisted cache and refresh local store\n    - Do not expose NSManagedObjectContext\n    - Expose identifiers as opaque objects\n\nTo view dependencies, view the [Podfile](app/Podfile).\n\n## Contributing\n\n### Setup\n```bash\ngit clone git@github.com:Raizlabs/AirQualityDashboard-ios.git\ncd AirQualityDashboard-ios\nbundle install\ncd app\nbundle exec fastlane test\n```\n\n### Dependencies\nWhen adding a dependency is necessary it should be managed using Cocoapods. After running `bundle exec pod install` the built version should be committed to the repository to keep\n\n### Branching\n\nBoth branches `develop` and `master` are protected and should only be modified by filing a pull request. `develop` represents the latest accepted changes and `master` should represent the latest **shippable** source.\n\nDevelopment should take place on a development branch cut from the existing `develop` branch. Before merging all development branches should be rebased off of `develop`. _Please_ do not merge `develop` upstream.\n\nDevelopment branches should follow the convention:\n`{bugfix | feature}/{developer initials}-{JIRA_ID}`\n\nRelease branches should be tagged and cut from `master` as:\n`release-0.0.0`\n\n### Testing\n\nAll non-trivial code should be tested. Contributors are encouraged to use [TDD](https://en.wikipedia.org/wiki/Test-driven_development) where applicable.\n\nAll development branches must pass CI before merging. Save yourself some trouble and run `bundle exec fastlane test` before filing a pull request.\n\n### Synx\nTo keep the Application structure orderly, organize code logically into groups using Xcode and run [synx](https://github.com/venmo/synx) (`bundle exec fastlane synx`) before commiting.\n\n## Additional Notes\n\n#### xcov\n\n[xcov](https://github.com/nakiostudio/xcov) generates nicely formatted HTML code coverage reports, and is triggered with every `fastlane test`. The results are located in the `app/build/xcov` folder, just open `index.html`. When run on CircleCI they stored as build artifacts.\n\n`xcov` also works with Danger to provide code coverage feedback on every pull request. You can also trigger it manually. The `include_targets` filtering is to exclude external stuff like CocoaPods, but for some reason thinks the target product name for `debug-AirQualityDashboard` is `develop-AirQualityDashboard.app`. \n\nYou should add other internal frameworks to `include_targets` inside the `Dangerfile` and `Fastfile` as development progresses.\n\n```bash\n# Manually\n\n# fastlane will run xcov for you\n$ bundle exec fastlane test\n\n# when run manually, you must first build via `fastlane test` to generate Xcode's internal code coverage reports\n$ bundle exec xcov -w app/AirQualityDashboard.xcworkspace/ -s debug-AirQualityDashboard --include_targets \"develop-AirQualityDashboard.app, Services.framework\" -o app/build/xcov\n```\n\n```ruby\n# Fastfile\n  xcov(\n    workspace: \"AirQualityDashboard.xcworkspace\",\n    scheme: \"debug-AirQualityDashboard\",\n    output_directory: \"#{ENV['RZ_TEST_REPORTS']}/xcov\",\n     # For some reason coverage is on the \"develop-\" app target instead of \"debug-\"\n    include_targets: \"develop-AirQualityDashboard.app, Services.framework\",\n  )\n```\n\n```ruby\n# Dangerfile\nxcov.report(\n  workspace: \"#{src_root}/AirQualityDashboard.xcworkspace\",\n  scheme: \"debug-AirQualityDashboard\",\n  output_directory: \"#{ENV['RZ_TEST_REPORTS']}/xcov\",\n   # For some reason coverage is on the \"develop-\" app target instead of \"debug-\"\n  include_targets: \"develop-AirQualityDashboard.app, Services.framework\",\n  ignore_file_path: \"#{src_root}/fastlane/.xcovignore\"\n) \n```\n\n#### Slather\n\n[Slather](https://github.com/SlatherOrg/slather) is an alternative to `xcov` and is capable of generating more comprensive HTML reports (located in `app/build/slather`), as well as uploading to a number of code coverage services like Codecov and  Coveralls. It is also integrated into `fastlane test` but you can run it manually.\n\nThere is a similar issue to `xcov` where the scheme for the app target cannot be found, so right now only `Services` is included.\n\n```bash\n# Using fastlane\n$ bundle exec fastlane test\n\n# Manually run and open HTML report\n$ bundle exec slather coverage --show --html --scheme Services --workspace app/AirQualityDashboard.xcworkspace/ --output-directory app/build/slather app/AirQualityDashboard.xcodeproj/\n```\n\n```ruby\n# Fastfile\n\nslather(\n\tproj: \"AirQualityDashboard.xcodeproj\",\n\tworkspace: \"AirQualityDashboard.xcworkspace\",\n\t# Only the Services scheme seems to work. It cannot find our app target schemes. \n\tscheme: \"Services\",\n\toutput_directory: \"#{ENV['RZ_TEST_REPORTS']}/slather\",\n\thtml: \"true\",\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fairqualitydashboard-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Fairqualitydashboard-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fairqualitydashboard-ios/lists"}