SkillAgentSearch skills...

Auction

A sample project to show how to use Realm in a Clean Swift architecture. It also shows how to display different models in only one scene in a DRY manner, another twist to the VIP cycle, and how to use custom table view cells to deal with complex display logic

Install / Use

/learn @Clean-Swift/Auction
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Auction

A sample project to show how to use Realm in a Clean Swift architecture. It also shows how to display different models in only one scene in a DRY manner, another twist to the VIP cycle, and how to use custom table view cells to deal with complex display logic.

You need to have a local Realm server running on localhost on port 9080 per Realm's documentation. Just make sure you have the correct username and password in AuthenticationWorker.swift. However, you can simply use the default Realm by changing line 72 of RealmWorker.swift from realm = try! Realm(configuration: configuration) to realm = try! Realm().

A few highlights about this sample project:

  • Same scene displays:
    • Different models (Item and User)
    • Same models, different filters (Buyer and Seller)
  • One request, multiple responses, one view model (Table scene)
  • Complex table view cells (ItemCell, BuyerCell, and SellerCell)
  • Move Realm code out of view controllers and into interactors
  • Encapsulate Realm API calls in RealmWorker

Related Skills

View on GitHub
GitHub Stars21
CategoryDevelopment
Updated2y ago
Forks4

Languages

Swift

Security Score

75/100

Audited on Mar 13, 2024

No findings