{"id":15170550,"url":"https://github.com/messeb/ios-hiker","last_synced_at":"2026-01-24T02:37:48.315Z","repository":{"id":255413246,"uuid":"847448780","full_name":"messeb/ios-hiker","owner":"messeb","description":"iOS App that tracks the location and loads related images.","archived":false,"fork":false,"pushed_at":"2024-08-29T18:15:55.000Z","size":123,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T01:57:51.810Z","etag":null,"topics":["ios","komoot","location","location-tracker","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/messeb.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":"2024-08-25T21:07:54.000Z","updated_at":"2025-02-26T09:49:02.000Z","dependencies_parsed_at":"2024-08-29T21:46:17.604Z","dependency_job_id":null,"html_url":"https://github.com/messeb/ios-hiker","commit_stats":null,"previous_names":["messeb/ios-hiker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Fios-hiker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Fios-hiker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Fios-hiker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Fios-hiker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messeb","download_url":"https://codeload.github.com/messeb/ios-hiker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092836,"owners_count":22013294,"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":["ios","komoot","location","location-tracker","swift","swiftui"],"created_at":"2024-09-27T08:04:00.335Z","updated_at":"2026-01-24T02:37:43.286Z","avatar_url":"https://github.com/messeb.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS Hiker App\n\nAn application that tracks the hiker's position in the background and creates a photo stream based on those locations.\n\n| **Empty Hike Tour**                      | **Request Location**                     | **Decline Permission**                   | **Loading Image for Location**      |\n|------------------------------------------|------------------------------------------|------------------------------------------|-------------------------------------------|\n| \u003cimg src=\"./images/001.png\" width=195 /\u003e | \u003cimg src=\"./images/002.png\" width=195 /\u003e | \u003cimg src=\"./images/003.png\" width=195 /\u003e | \u003cimg src=\"./images/004.png\" width=195 /\u003e  |\n\n\n## App Logic Flow Idea\n\n```mermaid\nflowchart TD\n    A1[Start Tracking Hiker Position] --\u003e A2[Track Hiker Position Continuously]\n    A2 --\u003e A3{Is App in Foreground?}\n    \n    A3 -- Yes --\u003e B2[Load Saved Positions from Store]\n    B2 --\u003e B3[Fetch Images for Each Position]\n    B3 --\u003e B4[Display Images in UI]\n    \n    B4 --\u003e D1[Track and Save Position in Foreground]\n    D1 --\u003e B2\n\n    A3 -- No --\u003e C1[Track and Save Position in Background]\n    C1 --\u003e A2\n```\n\n- **Continuous Tracking**: The app tracks the user's location continuously, whether it is in the foreground or background.\n- **Separation of Concerns**: Location tracking is independent of image fetching.\n- **Foreground-Only Image Loading**: Images are only fetched and displayed when the app is in the foreground.\n\n\n## Implementation Details\n\n- **Flickr API**: The app utilizes the [flickr.photos.search](https://www.flickr.com/services/api/flickr.photos.search.html) endpoint for fetching images based on location. Although this endpoint may return the same photos for different locations, I chose to avoid to use another endpoint to focus on location tracking, general photo loading, and displaying the photo stream.\n- **Testing in Xcode**: Therefore it's recommended to test location changes and the image loading behavior over the Xcode \"Simulate Location\" feature.\n\n\n## Learnings / Challenges\n\n- **Unreliable Data Sources**: Managing unreliable data sources, such as user positions, is a challenge best addressed with robust automated test cases (see Open Points).\n- **User Permissions**: Handling user permissions accurately is crucial to ensure the app reflects the current status to the user correctly.\n- **State Management**: Technical state management within the app is essential to consistently display the correct state to the user.\n- **Data Caching**: Caching external data is necessary to support fast re-rendering of the layout. \n\n\n## Open Points\n\n- **Global Loading State**: A coordinated approach to loading API data and images needs to be implemented. This includes limiting parallel requests and centralizing error handling from the server.\n- **Testing**: Automated tests are currently missing. However, the use of protocols should facilitate the creation of abstracted tests for each sub-component.\n- **Error Handling**: Proper interception of incorrect image loading has yet to be implemented.\n- **Permission Handling**: The app needs to handle permission changes dynamically while the user is on a hike.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Fios-hiker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmesseb%2Fios-hiker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Fios-hiker/lists"}