🧙 Welcome Traveler!
GiphyLookup uses Swift Package Manager to manage build dependencies and Mint 🌱 to install and run Swift Lint and Swift Format.
Note Mint is optional and not required to build and run the application.
Launch GiphyLookup.xcodeproj
and run the GiphyLookupApplication
scheme on a simulator or iOS device.
🚨 Usually I would create a separate
Secrets.xcconfig
that's added to.gitignore
to store secrets w/o exposing them to the internet. For this assignmentapi_key
is included in the source. My ⚽ was to reduce any additional steps needed to build and run the project.
Application is separated in two schemes:
- GiphyLookup
- GiphyLookupApplication
This way, bigness logic stays platform agnostic, modular and fast to build and test. On every pull-request, both modules will be built and tested.
Unfortunately, the data from backend APIs isn’t always perfect. By default JSONDecoder
will discard the whole collection when one of the elements are corrupted. To improve on this, application uses generic LossyArray<T>
wrapper.
Some custom data types are introduced in order to remove assumptions about behaviour.
public struct SearchQuery {
let value: String
public init?(_ string: String?) {
guard let string, !string.isEmpty else {
return nil
}
value = string
}
}
For example SearchQuery
is used instead of plain String
.
We can’t always see our own blind spots, and it’s a gift to have them pointed out by another perspective.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
- Xcode 14.1 (14B47b)
Powered By GIPHY