Initial widget work

• Latest data is saved out to JSON at various points.
• Technote on widget usage.
• Widget target added.
This commit is contained in:
Stuart Breckenridge
2020-07-10 23:10:12 +08:00
parent 94f956b41f
commit a45ba35b24
11 changed files with 632 additions and 11 deletions

View File

@@ -0,0 +1,28 @@
//
// WidgetData.swift
// NetNewsWire
//
// Created by Stuart Breckenridge on 10/7/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import Foundation
struct WidgetData: Codable {
let currentUnreadCount: Int
let currentTodayCount: Int
let latestArticles: [LatestArticle]
let lastUpdateTime: Date
}
struct LatestArticle: Codable {
let feedTitle: String
let articleTitle: String?
let articleSummary: String?
let feedIcon: Data? // Base64 encoded image data
let pubDate: String
}