samkhawase/LooLocator
소개
A simple iOS app that fetches the crowd-sourced data from OpenStreetMaps, and shows toilets within walking distance.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalLooLocator
Find Amenities (like toilets) near you! The simple iOS fetches the crowd-sourced data from OpenStreetMap, and shows toilets within walking distance. User can then use AppleMaps to find walking directions to the amenity.
Design Rationale
The following series of bite-sized posts explain the design rationale behind creating the app:
- Part 1: Introduction - Writing a modular, and testable iOS App in Swift using MVVM pattern
- Part 2: Defining the Data Model
- Part 3: The Location provider
- Part 4: Defining the networking layer
- Part 5: The ViewModel
- Part 6: The Final App - Putting it all together
Getting Started
Here are the steps to get started with the project on your local machine:
- Clone the git repositiory
- Run
carthage update --platform iOS --cache-builds --no-use-binariesto fetch the dependencies. - If running on the simulator, you can edit the scheme and set the simulated location in Xcode. (E.g. Hongkong)
- Run the project via Xcode.
Prerequisites
What things you need to install the software and how to install them
Running the tests
The app uses BDD style tests using Quick and Nimble. There are unit tests written to test the LocationManager, APIClient (with Network mocks), and ViewModel behaviors. To run the test, enter the command on the command line.
xcodebuild -scheme 'LooLocator' \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 6s,OS=latest' \
test | xcpretty
The output will be similar to
Test Suite LooLocatorTests.xctest started
ApiClientTests
✓ Amenity_Request_tests__should_fetch_amenities (0.027 seconds)
LocationProviderTests
✓ Given_a_LocationProvider__When_it_s_started_with_LocationManager__then_starts_location_updates (1.547 seconds)
✓ Given_a_LocationProvider__When_it_s_started_with_LocationManager__then_provides_current_location (0.001 seconds)
MapViewModelTests
✓ Given_a_MapViewModel__get_current_location (0.002 seconds)
✓ Given_a_MapViewModel__should_get_all_amenities_in_range (0.004 seconds)
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- This project is inspired by the MapKit article from RayWenderlich
- The Overpass Turbo API
관련 프로젝트 살펴보기
불러오는 중…