← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

git clone https://code.inqk.net/crossmate.git


Crossmate/Models/PuzzleNotificationText+GameEntity.swift (555B)

1import Foundation
2
3extension PuzzleNotificationText {
4    /// Convenience over `title(_:publisher:date:)` for a `GameEntity`. Lives in
5    /// the app target because it reaches into Core Data; the core builders are
6    /// in `Shared` so the notification service extension can use them too.
7    static func title(for entity: GameEntity?) -> String {
8        guard let entity else { return "" }
9        return title(
10            entity.title ?? "",
11            publisher: entity.cachedPublisher,
12            date: entity.cachedPuzzleDate
13        )
14    }
15}