Note
[flüf]. Noun. Definition: A pet with fluffy, cloudlike fur; the fur of an exceptionally fluffy pet
- Tools:
- Xcode 14.3 with latest iOS SDK
- Clone repository:
# over https:
git clone https://github.com/PatrykKaczmarek/Floofs.git
# or over SSH:
git clone [email protected]:PatrykKaczmarek/Floofs.git
- Go to
{SRCROOT}/Floofs/App/
and duplicateAppConfig.sample.plist
. Change its name toAppConfig.plist
. Open it and use appropriate config values. Alternatively pasteAppConfig.plist
receivedby the author.
Important
AppConfig.plist
is added to .gitignore
so you won't accidentally push it to the repository.
Tip
You can obtain your own CatsAPIKey
by signing up on the main site and getting one emailed to you for free.
- Open
Floofs.xcodeproj
file and build the project.
- Respect Swift API Design Guidelines
- The code must be readable and self-explanatory - full variable names, meaningful methods, etc.
- Don't leave any commented-out code.
- Separation of Concerns: API part has been divided into 3 parts: generic
APILayer
that is being used byDogsAPI
andCatsAPI
packages. It strongly separates API services' logic and, at the same time, removes a lot of repetitions. Additionally, it allows usingopen
andpublic
access control modifiers to distinguish interface visibility even more. - Extendability: using a generic-first approach,
Cat
andDog
models conform toPet
protocol, so the app can display type-erased models leveraging the same UI components. So maybe the user will see more floofs in the future? Who knows... - Repetitions Reduction: leveraging caching mechanism, the app can remember and restore data without the neccessity of retrieving them from the API again:
- Model Caching -
Cat
andDog
models are unique across the app. It means, when they change, old models are replaced by new models so the newly fetched data is stored for later usage. - Image Caching -
Kingfisher
framework takes care of memory and disk caches to reduce network usage.
- Model Caching -
- Data Transfer Reduction: - the app uses pagination to obtain cats' images in chunks, to fetch only data that will be visible to the user. Unfortunately
DogsAPI
does not support pagination. - Reliably Performant and Responsive: multithreading allows to keep the app responsive and performant even when scrolling fast through the images gallery.
- Launch Prerequisites Validation: the app during launch time, checks whether the project has been setup according to this README. If
AppConfig
is missing, then displays the appropriate error message by redirecting the user toAppLaunchFailureScene
.
- Search: find your Floof faster 🏎️
- Favorite images: mark images you like the most ⭐️
- Home Screen Widget: display Floofs on your Springboard 📱
- Dark mode support: see better your Floofs in dim light situations, particularly at night 🌙
- Error handling: be informed when something goes wrong 5️⃣0️⃣0️⃣
- Zoom view: magnify the image 🔎 and share it
- Increase test coverage: never be surprised by 🐛🐛🐛
- SwiftUI support: see Floofs app written in the brand new, shiny UI framework ✨
- Documentation: read well documented interfaces 📕📗📘
- Security: improve security by changing a way how
AppConfig.plist
is stored 🔐