Skip to content

⛓ Learning chained async result based operations in Swift by creating a random GIF app.

Notifications You must be signed in to change notification settings

vctxr/swift-async-operation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chained Async Operation ⛓

Swift implementation of the Operation class with added asynchronous behavior and chainable input/output using Swift's Result type. This app demonstrates how we can easily chain the result of asynchronous operation by fetching random GIFs. I built this app inspired by Antoine van der Lee's video about operations in Swift (link to his YouTube video)

Note: The implementation of these operations are based on my personal take and modifications on the topic 🌈. Oh and this app also fetches GIF from the Giphy API which requires an API key 🔑 which I kept secret, so please use your own API key instead WKWK.

⚡️ Demo

🤝 Chained Operations

  1. Fetch random word from here
  2. Search for matching GIF from Giphy API for the random word
  3. Download the GIF from the URL

🚀 Highlights

  • Chained asynchronous result based operations
  • Cancellable operations
  • No third-party dependencies/libraries
  • MVVM

About

⛓ Learning chained async result based operations in Swift by creating a random GIF app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages