Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

⏳ TimeScape — A SwiftUI Travel Map App

An elegant map-based location discovery app built with SwiftUI and modern MapCameraPosition API. Users can explore various places, view detailed previews, and transition smoothly across map regions — all within a beautiful SwiftUI interface powered by MVVM.


🚀 Features

  • Dynamic map rendering using MapCameraPosition
  • Tap-to-reveal location preview cards
  • Detailed sheet view for each location
  • “Next” button to cycle through locations with animation
  • Automatic region adjustment when switching location
  • MVVM pattern with @Published bindings
  • Fully tested with Swift Testing framework (Swift 6.1.2)

🧪 Test Coverage

The project is covered with unit tests using the new Testing framework:

  • LocationTests.swift:
    • Validates that the id property is generated by concatenating name and cityName
    • Confirms that two Location instances with the same id are considered equal (even if other fields different)
    • Ensures inequality for Location instances with different id values
  • LocationsViewModelTests.swift:
    • Initializes with first location
    • Toggles location list visibility
    • Updates mapCameraPosition when location changes
    • Transitions to next location
    • Wraps to first location after reaching the end

🛠️ Built With

Technology Description
Swift 6.1.2 Language version
SwiftUI Declarative UI framework
MVVM Clean separation of concerns
Swift Testing Native testing framework for Swift
MapKit For map rendering and camera control

📱 Screenshots

Map View Location Detail
Map View Location Detail

✅ Running Tests

To run unit tests:

  • Open TimeScape in Xcode
  • Press ⌘U or go to Product > Test

All tests are located in LocationTests.swift and LocationsViewModelTests.swift.


📄 License

This project is open-sourced under the MIT License. See the LICENSE file for details.