FunTrip

Simplifies tourist exploration with an interactive map and destination recommendations.


Team of 1

132 Views


FunTrip

OVERVIEW

Hi, in this articles, I would like to share about a recent SwiftUI project of mine, aimed at exploring Apple native location technologies: CoreLocation and MapKit. This personal project was an exciting opportunity for me to dive deeper into Swift-based application development after spending the last few months honing my skills, particularly in team environments. This time, I challenged myself to see what I could achieve independently within a short timeframe of just two weeks.
To get started, I familiarized myself with Xcode, SwiftUI, Lottie Animation, Authentication Service, CloudKit, Firebase, and Unsplash Image API. My goal was to create an app idea that was manageable within the limited timeline, leading to the development of FunTrip.
If you want to understand how the Authentication Service (Sign in with Apple) works, check this articles below :
https://medium.com/@thoriq.aghfi60/creating-sign-in-with-apple-with-swiftui-and-firebase-f2949cbf3433

Pre-Requisites

SwiftUI 5
XCode 15

What is FunTrip?

FunTrip is an innovative travel companion app designed to transform the way tourists discover and explore destination spots using advanced location technology in iPadOS. The app leverages CoreLocation and MapKit for precise navigation and seamless integration of location-based services. Users can enjoy smooth animations with Lottie Animation and secure interactions through robust user authentication, including Sign in with Apple. By utilizing data persistence frameworks like SwiftData and CloudKit, as well as Firebase for real-time data synchronization, FunTrip ensures reliable data management and synchronization.
FunTrip allows tourists to easily find destinations in a city with an interactive map, filtering options, and direct navigation from their current location. It also provides recommendations for nearby destinations and other attractions within the city, enhancing the overall travel experience. The larger screen and multitasking capabilities of iPadOS further enrich the user experience by allowing access to detailed destination information and seamless use alongside other applications.

Third Party Integration

Lottie Animation for Sign-in View: To enhance the visual appeal and user experience during the sign-in process, FunTrip incorporates Lottie Animation. This ensures smooth and engaging animations, making the app more attractive and user-friendly.
Sign in with Apple Authentication Service: For secure and privacy-focused user authentication, FunTrip integrates Sign in with Apple. This feature allows users to log in using their Apple ID, ensuring a seamless and secure authentication process.
CloudKit for Saving Place Mark Favorite Data: FunTrip uses CloudKit to store and manage users’ favorite place marks. This allows users to save and access their favorite destinations across all their iOS devices, ensuring data persistence and synchronization.
Firebase for Integrating with Sign in with Apple: Firebase is used to manage user authentication and session management in conjunction with Sign in with Apple. This ensures robust and reliable authentication, handling backend logic and user sessions efficiently.
Unsplash API to Fetch Detail Place Mark Images: FunTrip integrates with the Unsplash API to fetch high-quality images for detailed place marks. This feature enhances the visual appeal and provides users with rich, relevant imagery for their destinations.

Features Breakdown

Interactive Map
When users select a tourist destination, the map automatically shows pinpoints for those destinations. Additionally, when users filter by city, the map will automatically filter the destinations within that city and the camera position on the map will shift to the selected city. Furthermore, if users filter by category, the map will display pinpoints based on the selected category. This feature makes it easier for users to find their desired tourist destinations and provides a more interactive experience.
Get Directions from your location
The map can provide directions from the users current location to the chosen destination.
Detail Placemark Destination
When a destination pinpoint is selected, users will receive detailed information about the destination, including photos, a description, five nearby recommendations, ratings, city, and estimated entry fees.
Add to Favorites
Users can add tourist destinations to their favorites and view them in the recommendations menu.
Recommendations
The recommendation feature displays favorite tourist destinations, the nearest tourist destinations from the users current location within a 10 km radius, and top-rated destinations in the users city.

Learning Experience & Resources Collection

To understand the possibilities offered by Apple location technologies, I delved into various resources, including official documentation, guides, and previous projects. Despite the challenges in finding comprehensive information on location technologies compared to other Apple frameworks, the necessary features for developing FunTrip were still accessible.
Apple Technology Support Documentation :
- MapKit : https://developer.apple.com/documentation/mapkit
- CoreLocation : https://developer.apple.com/documentation/corelocation
- Sign in With Apple : https://developer.apple.com/sign-in-with-apple/
- Authentication Services : https://developer.apple.com/documentation/authenticationservices
- CloudKit : https://developer.apple.com/icloud/cloudkit/

Project Structure

In developing FunTrip, I adopted the Model-View-ViewModel (MVVM) architectural pattern to ensure a clean and maintainable codebase. Below is an overview of the projects structure:
Models : The Models represent the data structure used in the application. They are simple data holders, often corresponding to data objects retrieved from APIs or databases.
Views : The Views handle the user interface of the application. In SwiftUI, these are typically the SwiftUI Views that describe what the UI should look like and how it should behave. They are stateless and depend on the ViewModels to provide the necessary data.
ViewModels : The ViewModels contain the business logic and manage the state for the Views. They fetch data from the Models or Services and provide it to the Views in a format that the Views can easily display. ViewModels also handle user interactions and update the state accordingly.
Services : The Services handle data fetching and other backend-related or third parties tasks. These include networking, authentication, and database operations. Services are designed to be reusable and stateless.
Utilities : The Utilities include helper functions and extensions that are used throughout the application. These can be anything from date formatters to extensions on standard library types.
Resources : The Resources include static assets like images and JSON data used in the application. These are typically organized into folders within the project.

Mapkit & Core Location

MapKit is an Apple framework designed for integrating interactive maps and location-based services into applications within the Apple ecosystem. It provides tools and APIs for displaying maps, adding annotations, and performing map-related operations. With MapKit, developers can leverage Apple mapping data and services, including directions and search functionalities, along with support for zooming, rotations, and entity tracking.
Core Location, on the other hand, is a framework that provides precise location information on Apple devices by accessing GPS and internet capabilities. It offers detailed latitude, longitude, and altitude data, making it invaluable for features like geofencing, user movement tracking, and location-based content delivery. Core Location also allows for various accuracy levels to balance precision with power consumption.
When combined, MapKit and Core Location enable the creation of powerful location-aware applications within the Apple ecosystem. MapKit handles the visual and interactive map elements, while Core Location provides the underlying location data. This combination facilitates real-time navigation, location-based recommendations, and geolocation-based activities, allowing developers to build engaging and informative travel apps like FunTrip.

Key Takeways

In conclusion, FunTrip represents a culmination of my journey in mastering SwiftUI and Apple’s native location technologies within a condensed timeframe. This project not only allowed me to deepen my understanding of CoreLocation and MapKit but also provided a hands-on experience in integrating various other technologies such as Lottie Animation, Authentication Service, CloudKit, Firebase, and the Unsplash API.
FunTrip stands as an innovative travel companion app designed to enhance the way tourists explore and discover destination spots. By offering features like an interactive map, detailed destination information, real-time directions, and personalized recommendations, FunTrip aims to make travel planning and navigation a seamless and enjoyable experience.
Developing FunTrip challenged me to think creatively and problem-solve effectively within a short period, ultimately broadening my skills and knowledge in iOS development. I am excited to continue building on this foundation and explore even more possibilities in the realm of app development.

Video Demo