Widget Bundle
• Adds small smartfeed summary widget. • Adds medium widgets for today, unread, and starred.
@ -31,6 +31,26 @@
|
|||||||
173A642C2547BE9600267F6E /* AccountType+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 173A64162547BE0900267F6E /* AccountType+Helpers.swift */; };
|
173A642C2547BE9600267F6E /* AccountType+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 173A64162547BE0900267F6E /* AccountType+Helpers.swift */; };
|
||||||
175942AA24AD533200585066 /* RefreshInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */; };
|
175942AA24AD533200585066 /* RefreshInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */; };
|
||||||
175942AB24AD533200585066 /* RefreshInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */; };
|
175942AB24AD533200585066 /* RefreshInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */; };
|
||||||
|
176813D02564BA5900D98635 /* WidgetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813B62564B9F800D98635 /* WidgetData.swift */; };
|
||||||
|
176813D12564BA5900D98635 /* WidgetDataDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813C92564BA5400D98635 /* WidgetDataDecoder.swift */; };
|
||||||
|
176813D22564BA5900D98635 /* WidgetDataEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813BD2564BA2800D98635 /* WidgetDataEncoder.swift */; };
|
||||||
|
176813E92564BAE200D98635 /* WidgetDeepLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813D82564BA8700D98635 /* WidgetDeepLinks.swift */; };
|
||||||
|
176813F52564BB2C00D98635 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 176813F42564BB2C00D98635 /* WidgetKit.framework */; };
|
||||||
|
176813F72564BB2C00D98635 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 176813F62564BB2C00D98635 /* SwiftUI.framework */; };
|
||||||
|
176813FC2564BB2D00D98635 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 176813FB2564BB2D00D98635 /* Assets.xcassets */; };
|
||||||
|
176814002564BB2D00D98635 /* NetNewsWire Widget Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 176813F32564BB2C00D98635 /* NetNewsWire Widget Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
|
1768140B2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */; };
|
||||||
|
176814132564BC8A00D98635 /* WidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176814122564BC8A00D98635 /* WidgetBundle.swift */; };
|
||||||
|
1768142D2564BCA800D98635 /* TimelineProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1768142C2564BCA800D98635 /* TimelineProvider.swift */; };
|
||||||
|
176814362564BCC000D98635 /* UnreadWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176814352564BCC000D98635 /* UnreadWidget.swift */; };
|
||||||
|
1768143E2564BCC800D98635 /* TodayWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1768143D2564BCC800D98635 /* TodayWidget.swift */; };
|
||||||
|
176814462564BCD200D98635 /* StarredWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176814452564BCD200D98635 /* StarredWidget.swift */; };
|
||||||
|
1768144E2564BCE000D98635 /* SmartFeedSummaryWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1768144D2564BCE000D98635 /* SmartFeedSummaryWidget.swift */; };
|
||||||
|
176814572564BD0600D98635 /* ArticleItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176814562564BD0600D98635 /* ArticleItemView.swift */; };
|
||||||
|
1768145E2564BD7B00D98635 /* WidgetDataDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813C92564BA5400D98635 /* WidgetDataDecoder.swift */; };
|
||||||
|
176814652564BD7F00D98635 /* WidgetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813B62564B9F800D98635 /* WidgetData.swift */; };
|
||||||
|
1768146C2564BD8100D98635 /* WidgetDeepLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176813D82564BA8700D98635 /* WidgetDeepLinks.swift */; };
|
||||||
|
1768147B2564BE5400D98635 /* widget-sample.json in Resources */ = {isa = PBXBuildFile; fileRef = 1768147A2564BE5400D98635 /* widget-sample.json */; };
|
||||||
1769E32224BC5925000E1E8E /* AccountsPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32124BC5925000E1E8E /* AccountsPreferencesModel.swift */; };
|
1769E32224BC5925000E1E8E /* AccountsPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32124BC5925000E1E8E /* AccountsPreferencesModel.swift */; };
|
||||||
1769E32524BC5A65000E1E8E /* AddAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32424BC5A65000E1E8E /* AddAccountView.swift */; };
|
1769E32524BC5A65000E1E8E /* AddAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32424BC5A65000E1E8E /* AddAccountView.swift */; };
|
||||||
1769E32724BC5B6C000E1E8E /* AddAccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32624BC5B6C000E1E8E /* AddAccountModel.swift */; };
|
1769E32724BC5B6C000E1E8E /* AddAccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1769E32624BC5B6C000E1E8E /* AddAccountModel.swift */; };
|
||||||
@ -1079,6 +1099,13 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
176813FE2564BB2D00D98635 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 176813F22564BB2C00D98635;
|
||||||
|
remoteInfo = "NetNewsWire WidgetExtension";
|
||||||
|
};
|
||||||
510C416724E5CDE3008226FD /* PBXContainerItemProxy */ = {
|
510C416724E5CDE3008226FD /* PBXContainerItemProxy */ = {
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */;
|
containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */;
|
||||||
@ -1307,6 +1334,7 @@
|
|||||||
dstSubfolderSpec = 13;
|
dstSubfolderSpec = 13;
|
||||||
files = (
|
files = (
|
||||||
513C5CF0232571C2003D4054 /* NetNewsWire iOS Share Extension.appex in Embed App Extensions */,
|
513C5CF0232571C2003D4054 /* NetNewsWire iOS Share Extension.appex in Embed App Extensions */,
|
||||||
|
176814002564BB2D00D98635 /* NetNewsWire Widget Extension.appex in Embed App Extensions */,
|
||||||
5131463E235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex in Embed App Extensions */,
|
5131463E235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex in Embed App Extensions */,
|
||||||
);
|
);
|
||||||
name = "Embed App Extensions";
|
name = "Embed App Extensions";
|
||||||
@ -1458,6 +1486,25 @@
|
|||||||
1729529624AA1CD000D65E66 /* MacPreferencePanes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MacPreferencePanes.swift; sourceTree = "<group>"; };
|
1729529624AA1CD000D65E66 /* MacPreferencePanes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MacPreferencePanes.swift; sourceTree = "<group>"; };
|
||||||
1729529A24AA1FD200D65E66 /* MacSearchField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacSearchField.swift; sourceTree = "<group>"; };
|
1729529A24AA1FD200D65E66 /* MacSearchField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacSearchField.swift; sourceTree = "<group>"; };
|
||||||
173A64162547BE0900267F6E /* AccountType+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccountType+Helpers.swift"; sourceTree = "<group>"; };
|
173A64162547BE0900267F6E /* AccountType+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccountType+Helpers.swift"; sourceTree = "<group>"; };
|
||||||
|
176813B62564B9F800D98635 /* WidgetData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetData.swift; sourceTree = "<group>"; };
|
||||||
|
176813BD2564BA2800D98635 /* WidgetDataEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetDataEncoder.swift; sourceTree = "<group>"; };
|
||||||
|
176813C92564BA5400D98635 /* WidgetDataDecoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetDataDecoder.swift; sourceTree = "<group>"; };
|
||||||
|
176813D82564BA8700D98635 /* WidgetDeepLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetDeepLinks.swift; sourceTree = "<group>"; };
|
||||||
|
176813F32564BB2C00D98635 /* NetNewsWire Widget Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire Widget Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
176813F42564BB2C00D98635 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
||||||
|
176813F62564BB2C00D98635 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
|
||||||
|
176813FB2564BB2D00D98635 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
176813FD2564BB2D00D98635 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOSwidgetextension_target.xcconfig; sourceTree = "<group>"; };
|
||||||
|
176814122564BC8A00D98635 /* WidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetBundle.swift; sourceTree = "<group>"; };
|
||||||
|
1768142C2564BCA800D98635 /* TimelineProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProvider.swift; sourceTree = "<group>"; };
|
||||||
|
176814352564BCC000D98635 /* UnreadWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnreadWidget.swift; sourceTree = "<group>"; };
|
||||||
|
1768143D2564BCC800D98635 /* TodayWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayWidget.swift; sourceTree = "<group>"; };
|
||||||
|
176814452564BCD200D98635 /* StarredWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StarredWidget.swift; sourceTree = "<group>"; };
|
||||||
|
1768144D2564BCE000D98635 /* SmartFeedSummaryWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartFeedSummaryWidget.swift; sourceTree = "<group>"; };
|
||||||
|
176814562564BD0600D98635 /* ArticleItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleItemView.swift; sourceTree = "<group>"; };
|
||||||
|
1768147A2564BE5400D98635 /* widget-sample.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "widget-sample.json"; sourceTree = "<group>"; };
|
||||||
|
176814822564C02A00D98635 /* NetNewsWire_iOS_WidgetExtension.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = NetNewsWire_iOS_WidgetExtension.entitlements; sourceTree = "<group>"; };
|
||||||
1769E32124BC5925000E1E8E /* AccountsPreferencesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsPreferencesModel.swift; sourceTree = "<group>"; };
|
1769E32124BC5925000E1E8E /* AccountsPreferencesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsPreferencesModel.swift; sourceTree = "<group>"; };
|
||||||
1769E32424BC5A65000E1E8E /* AddAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountView.swift; sourceTree = "<group>"; };
|
1769E32424BC5A65000E1E8E /* AddAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountView.swift; sourceTree = "<group>"; };
|
||||||
1769E32624BC5B6C000E1E8E /* AddAccountModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountModel.swift; sourceTree = "<group>"; };
|
1769E32624BC5B6C000E1E8E /* AddAccountModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountModel.swift; sourceTree = "<group>"; };
|
||||||
@ -2021,6 +2068,15 @@
|
|||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
176813F02564BB2C00D98635 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
176813F72564BB2C00D98635 /* SwiftUI.framework in Frameworks */,
|
||||||
|
176813F52564BB2C00D98635 /* WidgetKit.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
510C415924E5CDE3008226FD /* Frameworks */ = {
|
510C415924E5CDE3008226FD /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -2196,6 +2252,59 @@
|
|||||||
path = "Preference Panes";
|
path = "Preference Panes";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
176813A22564B9D100D98635 /* Widget */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
176813B62564B9F800D98635 /* WidgetData.swift */,
|
||||||
|
176813C92564BA5400D98635 /* WidgetDataDecoder.swift */,
|
||||||
|
176813BD2564BA2800D98635 /* WidgetDataEncoder.swift */,
|
||||||
|
176813D82564BA8700D98635 /* WidgetDeepLinks.swift */,
|
||||||
|
);
|
||||||
|
path = Widget;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
176813F82564BB2C00D98635 /* Widget */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
176814822564C02A00D98635 /* NetNewsWire_iOS_WidgetExtension.entitlements */,
|
||||||
|
176814122564BC8A00D98635 /* WidgetBundle.swift */,
|
||||||
|
1768142C2564BCA800D98635 /* TimelineProvider.swift */,
|
||||||
|
176814342564BCB500D98635 /* Widget Views */,
|
||||||
|
176814552564BCED00D98635 /* Shared Views */,
|
||||||
|
176814792564BE3C00D98635 /* Resources */,
|
||||||
|
176813FB2564BB2D00D98635 /* Assets.xcassets */,
|
||||||
|
176813FD2564BB2D00D98635 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = Widget;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
176814342564BCB500D98635 /* Widget Views */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
176814352564BCC000D98635 /* UnreadWidget.swift */,
|
||||||
|
1768143D2564BCC800D98635 /* TodayWidget.swift */,
|
||||||
|
176814452564BCD200D98635 /* StarredWidget.swift */,
|
||||||
|
1768144D2564BCE000D98635 /* SmartFeedSummaryWidget.swift */,
|
||||||
|
);
|
||||||
|
path = "Widget Views";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
176814552564BCED00D98635 /* Shared Views */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
176814562564BD0600D98635 /* ArticleItemView.swift */,
|
||||||
|
);
|
||||||
|
path = "Shared Views";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
176814792564BE3C00D98635 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
1768147A2564BE5400D98635 /* widget-sample.json */,
|
||||||
|
);
|
||||||
|
path = Resources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
1769E2FD24BC589E000E1E8E /* General */ = {
|
1769E2FD24BC589E000E1E8E /* General */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -2848,6 +2957,8 @@
|
|||||||
51E4DAEC2425F6940091EB5B /* CloudKit.framework */,
|
51E4DAEC2425F6940091EB5B /* CloudKit.framework */,
|
||||||
51E4989624A8065700B667CB /* CloudKit.framework */,
|
51E4989624A8065700B667CB /* CloudKit.framework */,
|
||||||
51C452B32265141B00C03939 /* WebKit.framework */,
|
51C452B32265141B00C03939 /* WebKit.framework */,
|
||||||
|
176813F42564BB2C00D98635 /* WidgetKit.framework */,
|
||||||
|
176813F62564BB2C00D98635 /* SwiftUI.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -3199,6 +3310,7 @@
|
|||||||
84C9FC6522629B3900D921D6 /* Mac */,
|
84C9FC6522629B3900D921D6 /* Mac */,
|
||||||
84C9FC922262A0E600D921D6 /* iOS */,
|
84C9FC922262A0E600D921D6 /* iOS */,
|
||||||
51C0519224A77E3500194D5E /* Multiplatform */,
|
51C0519224A77E3500194D5E /* Multiplatform */,
|
||||||
|
176813F82564BB2C00D98635 /* Widget */,
|
||||||
84C9FC6822629C9A00D921D6 /* Shared */,
|
84C9FC6822629C9A00D921D6 /* Shared */,
|
||||||
84C9FCA52262A1E600D921D6 /* Tests */,
|
84C9FCA52262A1E600D921D6 /* Tests */,
|
||||||
D5907CDA2002F084005947E5 /* xcconfig */,
|
D5907CDA2002F084005947E5 /* xcconfig */,
|
||||||
@ -3228,6 +3340,7 @@
|
|||||||
51C0513D24A77DF800194D5E /* NetNewsWire.app */,
|
51C0513D24A77DF800194D5E /* NetNewsWire.app */,
|
||||||
51C0514424A77DF800194D5E /* NetNewsWire.app */,
|
51C0514424A77DF800194D5E /* NetNewsWire.app */,
|
||||||
510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */,
|
510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */,
|
||||||
|
176813F32564BB2C00D98635 /* NetNewsWire Widget Extension.appex */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -3303,6 +3416,7 @@
|
|||||||
849A97561ED9EB0D007D329B /* Extensions */,
|
849A97561ED9EB0D007D329B /* Extensions */,
|
||||||
510C43F5243D0325009F70C3 /* ExtensionPoints */,
|
510C43F5243D0325009F70C3 /* ExtensionPoints */,
|
||||||
511D43CE231FA51100FB1562 /* Resources */,
|
511D43CE231FA51100FB1562 /* Resources */,
|
||||||
|
176813A22564B9D100D98635 /* Widget */,
|
||||||
173A64162547BE0900267F6E /* AccountType+Helpers.swift */,
|
173A64162547BE0900267F6E /* AccountType+Helpers.swift */,
|
||||||
);
|
);
|
||||||
path = Shared;
|
path = Shared;
|
||||||
@ -3534,6 +3648,7 @@
|
|||||||
51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */,
|
51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */,
|
||||||
51314617235A797400387FDC /* NetNewsWire_iOSintentextension_target.xcconfig */,
|
51314617235A797400387FDC /* NetNewsWire_iOSintentextension_target.xcconfig */,
|
||||||
515D4FCE2325B3D000EE1167 /* NetNewsWire_iOSshareextension_target.xcconfig */,
|
515D4FCE2325B3D000EE1167 /* NetNewsWire_iOSshareextension_target.xcconfig */,
|
||||||
|
1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */,
|
||||||
518B2EE92351B4C200400001 /* NetNewsWire_iOSTests_target.xcconfig */,
|
518B2EE92351B4C200400001 /* NetNewsWire_iOSTests_target.xcconfig */,
|
||||||
65ED40F2235DF5E00081F399 /* NetNewsWire_macapp_target_macappstore.xcconfig */,
|
65ED40F2235DF5E00081F399 /* NetNewsWire_macapp_target_macappstore.xcconfig */,
|
||||||
D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */,
|
D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */,
|
||||||
@ -3571,6 +3686,23 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
|
176813F22564BB2C00D98635 /* NetNewsWire Widget Extension */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 176814012564BB2D00D98635 /* Build configuration list for PBXNativeTarget "NetNewsWire Widget Extension" */;
|
||||||
|
buildPhases = (
|
||||||
|
176813EF2564BB2C00D98635 /* Sources */,
|
||||||
|
176813F02564BB2C00D98635 /* Frameworks */,
|
||||||
|
176813F12564BB2C00D98635 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "NetNewsWire Widget Extension";
|
||||||
|
productName = "NetNewsWire WidgetExtension";
|
||||||
|
productReference = 176813F32564BB2C00D98635 /* NetNewsWire Widget Extension.appex */;
|
||||||
|
productType = "com.apple.product-type.app-extension";
|
||||||
|
};
|
||||||
510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */ = {
|
510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 510C417A24E5CDE3008226FD /* Build configuration list for PBXNativeTarget "NetNewsWire Share Extension" */;
|
buildConfigurationList = 510C417A24E5CDE3008226FD /* Build configuration list for PBXNativeTarget "NetNewsWire Share Extension" */;
|
||||||
@ -3777,6 +3909,7 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
5138E94324D3404300AFF0FE /* PBXTargetDependency */,
|
5138E94324D3404300AFF0FE /* PBXTargetDependency */,
|
||||||
5131463D235A7BBE00387FDC /* PBXTargetDependency */,
|
5131463D235A7BBE00387FDC /* PBXTargetDependency */,
|
||||||
|
176813FF2564BB2D00D98635 /* PBXTargetDependency */,
|
||||||
);
|
);
|
||||||
name = "NetNewsWire-iOS";
|
name = "NetNewsWire-iOS";
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
@ -3856,10 +3989,13 @@
|
|||||||
849C64581ED37A5D003D8FC0 /* Project object */ = {
|
849C64581ED37A5D003D8FC0 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 1200;
|
LastSwiftUpdateCheck = 1220;
|
||||||
LastUpgradeCheck = 0930;
|
LastUpgradeCheck = 0930;
|
||||||
ORGANIZATIONNAME = "Ranchero Software";
|
ORGANIZATIONNAME = "Ranchero Software";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
|
176813F22564BB2C00D98635 = {
|
||||||
|
CreatedOnToolsVersion = 12.2;
|
||||||
|
};
|
||||||
510C415B24E5CDE3008226FD = {
|
510C415B24E5CDE3008226FD = {
|
||||||
CreatedOnToolsVersion = 12.0;
|
CreatedOnToolsVersion = 12.0;
|
||||||
};
|
};
|
||||||
@ -3969,6 +4105,7 @@
|
|||||||
51C0513C24A77DF800194D5E /* Multiplatform iOS */,
|
51C0513C24A77DF800194D5E /* Multiplatform iOS */,
|
||||||
51C0514324A77DF800194D5E /* Multiplatform macOS */,
|
51C0514324A77DF800194D5E /* Multiplatform macOS */,
|
||||||
510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */,
|
510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */,
|
||||||
|
176813F22564BB2C00D98635 /* NetNewsWire Widget Extension */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@ -4089,6 +4226,15 @@
|
|||||||
/* End PBXReferenceProxy section */
|
/* End PBXReferenceProxy section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
176813F12564BB2C00D98635 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
176813FC2564BB2D00D98635 /* Assets.xcassets in Resources */,
|
||||||
|
1768147B2564BE5400D98635 /* widget-sample.json in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
510C415A24E5CDE3008226FD /* Resources */ = {
|
510C415A24E5CDE3008226FD /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -4246,6 +4392,7 @@
|
|||||||
516A093723609A3600EAE89B /* SettingsComboTableViewCell.xib in Resources */,
|
516A093723609A3600EAE89B /* SettingsComboTableViewCell.xib in Resources */,
|
||||||
51F85BF32272531500C787DC /* Dedication.rtf in Resources */,
|
51F85BF32272531500C787DC /* Dedication.rtf in Resources */,
|
||||||
516A09422361248000EAE89B /* Inspector.storyboard in Resources */,
|
516A09422361248000EAE89B /* Inspector.storyboard in Resources */,
|
||||||
|
1768140B2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig in Resources */,
|
||||||
5103A9B424216A4200410853 /* blank.html in Resources */,
|
5103A9B424216A4200410853 /* blank.html in Resources */,
|
||||||
84C9FCA42262A1B800D921D6 /* LaunchScreenPhone.storyboard in Resources */,
|
84C9FCA42262A1B800D921D6 /* LaunchScreenPhone.storyboard in Resources */,
|
||||||
51F85BEB22724CB600C787DC /* About.rtf in Resources */,
|
51F85BEB22724CB600C787DC /* About.rtf in Resources */,
|
||||||
@ -4328,7 +4475,7 @@
|
|||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
515D50802326D02600EE1167 /* Run Script: Verify No Build Settings */ = {
|
515D50802326D02600EE1167 /* Run Script: Verify No Build Settings */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 12;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
@ -4429,6 +4576,23 @@
|
|||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
176813EF2564BB2C00D98635 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
176814362564BCC000D98635 /* UnreadWidget.swift in Sources */,
|
||||||
|
1768146C2564BD8100D98635 /* WidgetDeepLinks.swift in Sources */,
|
||||||
|
1768143E2564BCC800D98635 /* TodayWidget.swift in Sources */,
|
||||||
|
1768142D2564BCA800D98635 /* TimelineProvider.swift in Sources */,
|
||||||
|
176814652564BD7F00D98635 /* WidgetData.swift in Sources */,
|
||||||
|
1768145E2564BD7B00D98635 /* WidgetDataDecoder.swift in Sources */,
|
||||||
|
176814132564BC8A00D98635 /* WidgetBundle.swift in Sources */,
|
||||||
|
176814462564BCD200D98635 /* StarredWidget.swift in Sources */,
|
||||||
|
176814572564BD0600D98635 /* ArticleItemView.swift in Sources */,
|
||||||
|
1768144E2564BCE000D98635 /* SmartFeedSummaryWidget.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
510C415824E5CDE3008226FD /* Sources */ = {
|
510C415824E5CDE3008226FD /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -5017,10 +5181,13 @@
|
|||||||
51C452A522650A2D00C03939 /* SmallIconProvider.swift in Sources */,
|
51C452A522650A2D00C03939 /* SmallIconProvider.swift in Sources */,
|
||||||
51AB8AB323B7F4C6008F147D /* WebViewController.swift in Sources */,
|
51AB8AB323B7F4C6008F147D /* WebViewController.swift in Sources */,
|
||||||
516A09392360A2AE00EAE89B /* SettingsComboTableViewCell.swift in Sources */,
|
516A09392360A2AE00EAE89B /* SettingsComboTableViewCell.swift in Sources */,
|
||||||
|
176813D22564BA5900D98635 /* WidgetDataEncoder.swift in Sources */,
|
||||||
3B3A32A5238B820900314204 /* FeedWranglerAccountViewController.swift in Sources */,
|
3B3A32A5238B820900314204 /* FeedWranglerAccountViewController.swift in Sources */,
|
||||||
51D5948722668EFA00DFC836 /* MarkStatusCommand.swift in Sources */,
|
51D5948722668EFA00DFC836 /* MarkStatusCommand.swift in Sources */,
|
||||||
51A1699C235E10D700EB091F /* AddAccountViewController.swift in Sources */,
|
51A1699C235E10D700EB091F /* AddAccountViewController.swift in Sources */,
|
||||||
51A16999235E10D700EB091F /* LocalAccountViewController.swift in Sources */,
|
51A16999235E10D700EB091F /* LocalAccountViewController.swift in Sources */,
|
||||||
|
176813D12564BA5900D98635 /* WidgetDataDecoder.swift in Sources */,
|
||||||
|
176813D02564BA5900D98635 /* WidgetData.swift in Sources */,
|
||||||
510289CD24519A1D00426DDF /* SelectComboTableViewCell.swift in Sources */,
|
510289CD24519A1D00426DDF /* SelectComboTableViewCell.swift in Sources */,
|
||||||
514B7C8323205EFB00BAC947 /* RootSplitViewController.swift in Sources */,
|
514B7C8323205EFB00BAC947 /* RootSplitViewController.swift in Sources */,
|
||||||
51FA73A52332BE110090D516 /* ArticleExtractor.swift in Sources */,
|
51FA73A52332BE110090D516 /* ArticleExtractor.swift in Sources */,
|
||||||
@ -5049,6 +5216,7 @@
|
|||||||
51C452A022650A1900C03939 /* WebFeedIconDownloader.swift in Sources */,
|
51C452A022650A1900C03939 /* WebFeedIconDownloader.swift in Sources */,
|
||||||
51C4529E22650A1900C03939 /* ImageDownloader.swift in Sources */,
|
51C4529E22650A1900C03939 /* ImageDownloader.swift in Sources */,
|
||||||
51A66685238075AE00CB272D /* AddWebFeedDefaultContainer.swift in Sources */,
|
51A66685238075AE00CB272D /* AddWebFeedDefaultContainer.swift in Sources */,
|
||||||
|
176813E92564BAE200D98635 /* WidgetDeepLinks.swift in Sources */,
|
||||||
512392C424E3451400F11704 /* TwitterSelectTypeTableViewController.swift in Sources */,
|
512392C424E3451400F11704 /* TwitterSelectTypeTableViewController.swift in Sources */,
|
||||||
51B5C87723F22B8200032075 /* ExtensionContainers.swift in Sources */,
|
51B5C87723F22B8200032075 /* ExtensionContainers.swift in Sources */,
|
||||||
51C45292226509C800C03939 /* TodayFeedDelegate.swift in Sources */,
|
51C45292226509C800C03939 /* TodayFeedDelegate.swift in Sources */,
|
||||||
@ -5365,6 +5533,11 @@
|
|||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXTargetDependency section */
|
/* Begin PBXTargetDependency section */
|
||||||
|
176813FF2564BB2D00D98635 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 176813F22564BB2C00D98635 /* NetNewsWire Widget Extension */;
|
||||||
|
targetProxy = 176813FE2564BB2D00D98635 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
510C416824E5CDE3008226FD /* PBXTargetDependency */ = {
|
510C416824E5CDE3008226FD /* PBXTargetDependency */ = {
|
||||||
isa = PBXTargetDependency;
|
isa = PBXTargetDependency;
|
||||||
target = 510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */;
|
target = 510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */;
|
||||||
@ -5552,6 +5725,152 @@
|
|||||||
/* End PBXVariantGroup section */
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
|
176814022564BB2D00D98635 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = Widget/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@executable_path/../../Frameworks",
|
||||||
|
);
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "com.stuartbreckenridge.opensource.NetNewsWire.iOS.NetNewsWire-Widget";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
176814032564BB2D00D98635 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = Widget/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@executable_path/../../Frameworks",
|
||||||
|
);
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "com.stuartbreckenridge.opensource.NetNewsWire.iOS.NetNewsWire-Widget";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
510C416A24E5CDE3008226FD /* Debug */ = {
|
510C416A24E5CDE3008226FD /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 510C418724E5D2E3008226FD /* NetNewsWire_shareextension_target.xcconfig */;
|
baseConfigurationReference = 510C418724E5D2E3008226FD /* NetNewsWire_shareextension_target.xcconfig */;
|
||||||
@ -5686,6 +6005,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */;
|
baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -5693,6 +6013,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */;
|
baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -5741,6 +6062,15 @@
|
|||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
|
176814012564BB2D00D98635 /* Build configuration list for PBXNativeTarget "NetNewsWire Widget Extension" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
176814022564BB2D00D98635 /* Debug */,
|
||||||
|
176814032564BB2D00D98635 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
510C417A24E5CDE3008226FD /* Build configuration list for PBXNativeTarget "NetNewsWire Share Extension" */ = {
|
510C417A24E5CDE3008226FD /* Build configuration list for PBXNativeTarget "NetNewsWire Share Extension" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
|
32
Shared/Widget/WidgetData.swift
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// WidgetData.swift
|
||||||
|
// NetNewsWire
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct WidgetData: Codable {
|
||||||
|
|
||||||
|
let currentUnreadCount: Int
|
||||||
|
let currentTodayCount: Int
|
||||||
|
let currentStarredCount: Int
|
||||||
|
let unreadArticles: [LatestArticle]
|
||||||
|
let starredArticles: [LatestArticle]
|
||||||
|
let todayArticles: [LatestArticle]
|
||||||
|
let lastUpdateTime: Date
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
struct LatestArticle: Codable, Identifiable {
|
||||||
|
|
||||||
|
var id: String
|
||||||
|
let feedTitle: String
|
||||||
|
let articleTitle: String?
|
||||||
|
let articleSummary: String?
|
||||||
|
let feedIcon: Data? // Base64 encoded image data
|
||||||
|
let pubDate: String
|
||||||
|
|
||||||
|
}
|
36
Shared/Widget/WidgetDataDecoder.swift
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// WidgetDataDecoder.swift
|
||||||
|
// NetNewsWire
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct WidgetDataDecoder {
|
||||||
|
|
||||||
|
static func decodeWidgetData() throws -> WidgetData {
|
||||||
|
let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String
|
||||||
|
let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
|
||||||
|
let dataURL = containerURL?.appendingPathComponent("widget-data.json")
|
||||||
|
if FileManager.default.fileExists(atPath: dataURL!.path) {
|
||||||
|
let decodedWidgetData = try JSONDecoder().decode(WidgetData.self, from: Data(contentsOf: dataURL!))
|
||||||
|
return decodedWidgetData
|
||||||
|
} else {
|
||||||
|
return WidgetData(currentUnreadCount: 0, currentTodayCount: 0, currentStarredCount: 0, unreadArticles: [], starredArticles: [], todayArticles: [], lastUpdateTime: Date())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static func sampleData() -> WidgetData {
|
||||||
|
let pathToSample = Bundle.main.url(forResource: "widget-sample", withExtension: "json")
|
||||||
|
do {
|
||||||
|
let data = try Data(contentsOf: pathToSample!)
|
||||||
|
let decoded = try JSONDecoder().decode(WidgetData.self, from: data)
|
||||||
|
return decoded
|
||||||
|
} catch {
|
||||||
|
return WidgetData(currentUnreadCount: 0, currentTodayCount: 0, currentStarredCount: 0, unreadArticles: [], starredArticles: [], todayArticles: [], lastUpdateTime: Date())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
95
Shared/Widget/WidgetDataEncoder.swift
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
//
|
||||||
|
// WidgetDataEncoder.swift
|
||||||
|
// NetNewsWire
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import WidgetKit
|
||||||
|
import os.log
|
||||||
|
import UIKit
|
||||||
|
import RSCore
|
||||||
|
import Articles
|
||||||
|
|
||||||
|
@available(iOS 14, *)
|
||||||
|
struct WidgetDataEncoder {
|
||||||
|
|
||||||
|
static let taskIdentifier = "com.ranchero.NetNewsWire.WidgetEncode"
|
||||||
|
|
||||||
|
static func encodeWidgetData() {
|
||||||
|
os_log(.info, "Starting widget data encoding")
|
||||||
|
let task = UIApplication.shared.beginBackgroundTask(withName: taskIdentifier, expirationHandler: nil)
|
||||||
|
do {
|
||||||
|
// Unread Articles
|
||||||
|
let unreadArticles = try SmartFeedsController.shared.unreadFeed.fetchArticles().sorted(by: { $0.datePublished! > $1.datePublished! })
|
||||||
|
var unread = [LatestArticle]()
|
||||||
|
for article in unreadArticles {
|
||||||
|
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||||
|
feedTitle: article.sortableName,
|
||||||
|
articleTitle: article.title?.isEmpty ?? true ? article.summary : ArticleStringFormatter.truncatedTitle(article),
|
||||||
|
articleSummary: article.summary,
|
||||||
|
feedIcon: article.iconImage()?.image.dataRepresentation(),
|
||||||
|
pubDate: article.datePublished!.description)
|
||||||
|
unread.append(latestArticle)
|
||||||
|
if unread.count == 3 { break }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Starred Articles
|
||||||
|
let starredArticles = try SmartFeedsController.shared.starredFeed.fetchArticles().sorted(by: { $0.datePublished! > $1.datePublished! })
|
||||||
|
var starred = [LatestArticle]()
|
||||||
|
for article in starredArticles {
|
||||||
|
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||||
|
feedTitle: article.sortableName,
|
||||||
|
articleTitle: article.title?.isEmpty ?? true ? article.summary : ArticleStringFormatter.truncatedTitle(article),
|
||||||
|
articleSummary: article.summary,
|
||||||
|
feedIcon: article.iconImage()?.image.dataRepresentation(),
|
||||||
|
pubDate: article.datePublished!.description)
|
||||||
|
starred.append(latestArticle)
|
||||||
|
if starred.count == 3 { break }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Today Articles
|
||||||
|
let todayArticles = try SmartFeedsController.shared.todayFeed.fetchArticles().sorted(by: { $0.datePublished! > $1.datePublished! })
|
||||||
|
var today = [LatestArticle]()
|
||||||
|
for article in todayArticles {
|
||||||
|
let latestArticle = LatestArticle(id: article.sortableArticleID,
|
||||||
|
feedTitle: article.sortableName,
|
||||||
|
articleTitle: article.title?.isEmpty ?? true ? article.summary : ArticleStringFormatter.truncatedTitle(article),
|
||||||
|
articleSummary: article.summary,
|
||||||
|
feedIcon: article.iconImage()?.image.dataRepresentation(),
|
||||||
|
pubDate: article.datePublished!.description)
|
||||||
|
today.append(latestArticle)
|
||||||
|
if today.count == 3 { break }
|
||||||
|
}
|
||||||
|
|
||||||
|
let latestData = WidgetData(currentUnreadCount: SmartFeedsController.shared.unreadFeed.unreadCount,
|
||||||
|
currentTodayCount: try! SmartFeedsController.shared.todayFeed.fetchArticles().count,
|
||||||
|
currentStarredCount: try! SmartFeedsController.shared.starredFeed.fetchArticles().count,
|
||||||
|
unreadArticles: unread,
|
||||||
|
starredArticles: starred,
|
||||||
|
todayArticles:today,
|
||||||
|
lastUpdateTime: Date())
|
||||||
|
|
||||||
|
let encodedData = try JSONEncoder().encode(latestData)
|
||||||
|
let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String
|
||||||
|
let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
|
||||||
|
let dataURL = containerURL?.appendingPathComponent("widget-data.json")
|
||||||
|
if FileManager.default.fileExists(atPath: dataURL!.path) {
|
||||||
|
try FileManager.default.removeItem(at: dataURL!)
|
||||||
|
}
|
||||||
|
try encodedData.write(to: dataURL!)
|
||||||
|
|
||||||
|
WidgetCenter.shared.reloadAllTimelines()
|
||||||
|
os_log(.info, "Finished encoding widget data")
|
||||||
|
UIApplication.shared.endBackgroundTask(task)
|
||||||
|
} catch {
|
||||||
|
os_log(.error, "%@", error.localizedDescription)
|
||||||
|
UIApplication.shared.endBackgroundTask(task)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
46
Shared/Widget/WidgetDeepLinks.swift
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
//
|
||||||
|
// WidgetDeepLinks.swift
|
||||||
|
// NetNewsWire
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
enum WidgetDeepLink {
|
||||||
|
|
||||||
|
case unread
|
||||||
|
case unreadArticle(id: String)
|
||||||
|
case today
|
||||||
|
case todayArticle(id: String)
|
||||||
|
case starred
|
||||||
|
case starredArticle(id: String)
|
||||||
|
case icon
|
||||||
|
|
||||||
|
var url: URL {
|
||||||
|
switch self {
|
||||||
|
case .unread:
|
||||||
|
return URL(string: "nnw://showunread")!
|
||||||
|
case .unreadArticle(let articleID):
|
||||||
|
var url = URLComponents(url: WidgetDeepLink.unread.url, resolvingAgainstBaseURL: false)!
|
||||||
|
url.queryItems = [URLQueryItem(name: "id", value: articleID)]
|
||||||
|
return url.url!
|
||||||
|
case .today:
|
||||||
|
return URL(string: "nnw://showtoday")!
|
||||||
|
case .todayArticle(let articleID):
|
||||||
|
var url = URLComponents(url: WidgetDeepLink.today.url, resolvingAgainstBaseURL: false)!
|
||||||
|
url.queryItems = [URLQueryItem(name: "id", value: articleID)]
|
||||||
|
return url.url!
|
||||||
|
case .starred:
|
||||||
|
return URL(string: "nnw://showstarred")!
|
||||||
|
case .starredArticle(let articleID):
|
||||||
|
var url = URLComponents(url: WidgetDeepLink.starred.url, resolvingAgainstBaseURL: false)!
|
||||||
|
url.queryItems = [URLQueryItem(name: "id", value: articleID)]
|
||||||
|
return url.url!
|
||||||
|
case .icon:
|
||||||
|
return URL(string: "nnw://icon")!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
Widget/Assets.xcassets/AccentColor.colorset/Contents.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.933",
|
||||||
|
"green" : "0.416",
|
||||||
|
"red" : "0.031"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.945",
|
||||||
|
"green" : "0.502",
|
||||||
|
"red" : "0.176"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
116
Widget/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "icon-41.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "20x20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-60.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "3x",
|
||||||
|
"size" : "20x20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-58.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "29x29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-87.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "3x",
|
||||||
|
"size" : "29x29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-80.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "40x40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-121.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "3x",
|
||||||
|
"size" : "40x40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-120.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "60x60"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-180.png",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"scale" : "3x",
|
||||||
|
"size" : "60x60"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-20.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "20x20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-42.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "20x20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-29.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "29x29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-59.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "29x29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-40.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "40x40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-81.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "40x40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-76.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "76x76"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-152.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "76x76"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-167.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "83.5x83.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "icon-1024.png",
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-1024.png
Normal file
After Width: | Height: | Size: 689 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-120.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-121.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-152.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-167.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-180.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-20.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-29.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-40.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-41.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-42.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-58.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-59.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-60.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-76.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-80.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-81.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
Widget/Assets.xcassets/AppIcon.appiconset/icon-87.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
6
Widget/Assets.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
12
Widget/Assets.xcassets/CornerIcon.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "icon-1024.png",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Widget/Assets.xcassets/CornerIcon.imageset/icon-1024.png
vendored
Normal file
After Width: | Height: | Size: 689 KiB |
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "1.000",
|
||||||
|
"green" : "1.000",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.130",
|
||||||
|
"green" : "0.130",
|
||||||
|
"red" : "0.130"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
37
Widget/Info.plist
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>NetNewsWire Widget</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>NSExtension</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSExtensionPointIdentifier</key>
|
||||||
|
<string>com.apple.widgetkit-extension</string>
|
||||||
|
</dict>
|
||||||
|
<key>OrganizationIdentifier</key>
|
||||||
|
<string>$(ORGANIZATION_IDENTIFIER)</string>
|
||||||
|
<key>DeveloperEntitlements</key>
|
||||||
|
<string>$(DEVELOPER_ENTITLEMENTS)</string>
|
||||||
|
<key>AppGroup</key>
|
||||||
|
<string>group.$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS</string>
|
||||||
|
<key>AppIdentifierPrefix</key>
|
||||||
|
<string>$(AppIdentifierPrefix)</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
14
Widget/NetNewsWire_iOS_WidgetExtension.entitlements
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.application-groups</key>
|
||||||
|
<array>
|
||||||
|
<string>group.$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS</string>
|
||||||
|
</array>
|
||||||
|
<key>keychain-access-groups</key>
|
||||||
|
<array>
|
||||||
|
<string>$(AppIdentifierPrefix)$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
9
Widget/Resources/widget-sample.json
Normal file
68
Widget/Shared Views/ArticleItemView.swift
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
//
|
||||||
|
// ArticleItemView.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ArticleItemView: View {
|
||||||
|
|
||||||
|
var article: LatestArticle
|
||||||
|
var deepLink: URL
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
Link(destination: deepLink, label: {
|
||||||
|
HStack(alignment: .top, spacing: nil, content: {
|
||||||
|
// Feed Icon
|
||||||
|
Image(uiImage: thumbnail(article.feedIcon))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20, alignment: .top)
|
||||||
|
.cornerRadius(4)
|
||||||
|
|
||||||
|
// Title and Feed Name
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Text(article.articleTitle ?? "Untitled")
|
||||||
|
.font(.caption)
|
||||||
|
.bold()
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
|
||||||
|
HStack {
|
||||||
|
Text(article.feedTitle)
|
||||||
|
.font(.caption)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
Spacer()
|
||||||
|
Text(pubDate(article.pubDate))
|
||||||
|
.font(.caption)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func thumbnail(_ data: Data?) -> UIImage {
|
||||||
|
if data == nil {
|
||||||
|
return UIImage(systemName: "globe")!
|
||||||
|
} else {
|
||||||
|
return UIImage(data: data!)!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func pubDate(_ dateString: String) -> String {
|
||||||
|
let dateFormatter = DateFormatter()
|
||||||
|
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss Z"
|
||||||
|
let date = dateFormatter.date(from: dateString)
|
||||||
|
|
||||||
|
let displayFormatter = DateFormatter()
|
||||||
|
displayFormatter.dateStyle = .medium
|
||||||
|
displayFormatter.timeStyle = .none
|
||||||
|
|
||||||
|
return displayFormatter.string(from: date!)
|
||||||
|
}
|
||||||
|
}
|
66
Widget/TimelineProvider.swift
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
//
|
||||||
|
// TimelineProvider.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct Provider: TimelineProvider {
|
||||||
|
|
||||||
|
func placeholder(in context: Context) -> WidgetTimelineEntry {
|
||||||
|
WidgetTimelineEntry(date: Date(), widgetData: WidgetDataDecoder.sampleData())
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSnapshot(in context: Context, completion: @escaping (WidgetTimelineEntry) -> Void) {
|
||||||
|
if context.isPreview {
|
||||||
|
let entry = WidgetTimelineEntry(date: Date(),
|
||||||
|
widgetData: WidgetDataDecoder.sampleData())
|
||||||
|
completion(entry)
|
||||||
|
} else {
|
||||||
|
do {
|
||||||
|
let widgetData = try WidgetDataDecoder.decodeWidgetData()
|
||||||
|
let entry = WidgetTimelineEntry(date: Date(), widgetData: widgetData)
|
||||||
|
completion(entry)
|
||||||
|
} catch {
|
||||||
|
let entry = WidgetTimelineEntry(date: Date(),
|
||||||
|
widgetData: WidgetData(currentUnreadCount: 41, currentTodayCount: 40, currentStarredCount: 12, unreadArticles: [], starredArticles: [], todayArticles: [], lastUpdateTime: Date()) )
|
||||||
|
completion(entry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getTimeline(in context: Context, completion: @escaping (Timeline<WidgetTimelineEntry>) -> Void) {
|
||||||
|
// Create current timeline entry for now.
|
||||||
|
let date = Date()
|
||||||
|
var entry: WidgetTimelineEntry
|
||||||
|
|
||||||
|
do {
|
||||||
|
let widgetData = try WidgetDataDecoder.decodeWidgetData()
|
||||||
|
entry = WidgetTimelineEntry(date: date, widgetData: widgetData)
|
||||||
|
} catch {
|
||||||
|
entry = WidgetTimelineEntry(date: date, widgetData: WidgetData(currentUnreadCount: 0, currentTodayCount: 0, currentStarredCount: 0, unreadArticles: [], starredArticles: [], todayArticles: [], lastUpdateTime: Date()))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure next update in 1 hour.
|
||||||
|
let nextUpdateDate = Calendar.current.date(byAdding: .hour, value: 1, to: date)!
|
||||||
|
|
||||||
|
let timeline = Timeline(
|
||||||
|
entries:[entry],
|
||||||
|
policy: .after(nextUpdateDate))
|
||||||
|
|
||||||
|
completion(timeline)
|
||||||
|
}
|
||||||
|
|
||||||
|
public typealias Entry = WidgetTimelineEntry
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
struct WidgetTimelineEntry: TimelineEntry {
|
||||||
|
public let date: Date
|
||||||
|
public let widgetData: WidgetData
|
||||||
|
}
|
||||||
|
|
102
Widget/Widget Views/SmartFeedSummaryWidget.swift
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
//
|
||||||
|
// SmartFeedSummaryWidget.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
|
||||||
|
struct SmartFeedSummaryWidgetView: View {
|
||||||
|
|
||||||
|
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||||
|
|
||||||
|
var entry: Provider.Entry
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
switch family {
|
||||||
|
case .systemSmall:
|
||||||
|
smallWidget
|
||||||
|
case .systemMedium:
|
||||||
|
smallWidget
|
||||||
|
case .systemLarge:
|
||||||
|
smallWidget
|
||||||
|
@unknown default:
|
||||||
|
smallWidget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
var smallWidget: some View {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Link(destination: WidgetDeepLink.today.url, label: {
|
||||||
|
HStack {
|
||||||
|
todayImage
|
||||||
|
Text(formattedCount(entry.widgetData.currentTodayCount) + " Today").font(.caption)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Link(destination: WidgetDeepLink.unread.url, label: {
|
||||||
|
HStack {
|
||||||
|
unreadImage
|
||||||
|
Text(formattedCount(entry.widgetData.currentUnreadCount) + " Unread").font(.caption)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Link(destination: WidgetDeepLink.starred.url, label: {
|
||||||
|
HStack {
|
||||||
|
starredImage
|
||||||
|
Text(formattedCount(entry.widgetData.currentStarredCount) + " Starred").font(.caption)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Text("Smartfeeds").bold().textCase(.uppercase).font(.caption2)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
}.padding()
|
||||||
|
}
|
||||||
|
|
||||||
|
func formattedCount(_ count: Int) -> String {
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
return formatter.string(from: NSNumber(value: count))!
|
||||||
|
}
|
||||||
|
|
||||||
|
var unreadImage: some View {
|
||||||
|
Image(systemName: "largecircle.fill.circle")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
}
|
||||||
|
|
||||||
|
var nnwImage: some View {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var starredImage: some View {
|
||||||
|
Image(systemName: "star.fill")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
|
.foregroundColor(.yellow)
|
||||||
|
}
|
||||||
|
|
||||||
|
var todayImage: some View {
|
||||||
|
Image(systemName: "sun.max.fill")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
|
.foregroundColor(.orange)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
140
Widget/Widget Views/StarredWidget.swift
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
//
|
||||||
|
// StarredWidget.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct StarredWidgetView : View {
|
||||||
|
|
||||||
|
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||||
|
|
||||||
|
var entry: Provider.Entry
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
switch family {
|
||||||
|
case .systemSmall:
|
||||||
|
mediumWidget
|
||||||
|
case .systemMedium:
|
||||||
|
mediumWidget
|
||||||
|
case .systemLarge:
|
||||||
|
mediumWidget
|
||||||
|
@unknown default:
|
||||||
|
mediumWidget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
var mediumWidget: some View {
|
||||||
|
if entry.widgetData.starredArticles.count == 0 {
|
||||||
|
inboxZero
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
HStack(alignment: .top, spacing: 8) {
|
||||||
|
VStack {
|
||||||
|
starredImage
|
||||||
|
Spacer()
|
||||||
|
nnwImage
|
||||||
|
}
|
||||||
|
VStack(alignment:.leading, spacing: 4) {
|
||||||
|
ForEach(0..<maxCount(), content: { i in
|
||||||
|
ArticleItemView(article: entry.widgetData.starredArticles[i],
|
||||||
|
deepLink: WidgetDeepLink.starredArticle(id: entry.widgetData.starredArticles[i].id).url)
|
||||||
|
})
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
unreadCountText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.widgetURL(WidgetDeepLink.starred.url)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var starredImage: some View {
|
||||||
|
Image(systemName: "star.fill")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
.foregroundColor(.yellow)
|
||||||
|
}
|
||||||
|
|
||||||
|
var nnwImage: some View {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var unreadCountText: some View {
|
||||||
|
if entry.widgetData.currentStarredCount > 3 {
|
||||||
|
let count = entry.widgetData.currentStarredCount - 3
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: count))
|
||||||
|
var str = ""
|
||||||
|
if count == 1 {
|
||||||
|
str = "+ \(formattedCount!) more starred article..."
|
||||||
|
} else {
|
||||||
|
str = "+ \(formattedCount!) more starred articles..."
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
} else {
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: entry.widgetData.currentStarredCount))
|
||||||
|
var str = ""
|
||||||
|
if entry.widgetData.currentStarredCount == 1 {
|
||||||
|
str = "\(formattedCount!) starred article"
|
||||||
|
} else {
|
||||||
|
str = "\(formattedCount!) starred articles"
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func maxCount() -> Int {
|
||||||
|
return entry.widgetData.starredArticles.count > 3 ? 3 : entry.widgetData.starredArticles.count
|
||||||
|
}
|
||||||
|
|
||||||
|
var inboxZero: some View {
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
Text("#StarredZero")
|
||||||
|
.italic()
|
||||||
|
.font(Font.system(.subheadline, design: .serif))
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.padding(.bottom, 4)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 15, height: 15, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
|
||||||
|
Text("You've not starred any artices.")
|
||||||
|
.font(.caption2)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
}.padding(.bottom, 8)
|
||||||
|
}.padding()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
140
Widget/Widget Views/TodayWidget.swift
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
//
|
||||||
|
// TodayWidget.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct TodayWidgetView : View {
|
||||||
|
|
||||||
|
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||||
|
|
||||||
|
var entry: Provider.Entry
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
switch family {
|
||||||
|
case .systemSmall:
|
||||||
|
mediumWidget
|
||||||
|
case .systemMedium:
|
||||||
|
mediumWidget
|
||||||
|
case .systemLarge:
|
||||||
|
mediumWidget
|
||||||
|
@unknown default:
|
||||||
|
mediumWidget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
var mediumWidget: some View {
|
||||||
|
if entry.widgetData.todayArticles.count == 0 {
|
||||||
|
inboxZero
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
HStack(alignment: .top, spacing: 8) {
|
||||||
|
VStack {
|
||||||
|
todayImage
|
||||||
|
Spacer()
|
||||||
|
nnwImage
|
||||||
|
}
|
||||||
|
VStack(alignment:.leading, spacing: 4) {
|
||||||
|
ForEach(0..<maxCount(), content: { i in
|
||||||
|
ArticleItemView(article: entry.widgetData.todayArticles[i],
|
||||||
|
deepLink: WidgetDeepLink.todayArticle(id: entry.widgetData.todayArticles[i].id).url)
|
||||||
|
})
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
unreadCountText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.widgetURL(WidgetDeepLink.today.url)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var todayImage: some View {
|
||||||
|
Image(systemName: "sun.max.fill")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
.foregroundColor(.orange)
|
||||||
|
}
|
||||||
|
|
||||||
|
var nnwImage: some View {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var unreadCountText: some View {
|
||||||
|
if entry.widgetData.currentTodayCount > 3 {
|
||||||
|
let count = entry.widgetData.currentTodayCount - 3
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: count))
|
||||||
|
var str = ""
|
||||||
|
if count == 1 {
|
||||||
|
str = "+ \(formattedCount!) more recent article..."
|
||||||
|
} else {
|
||||||
|
str = "+ \(formattedCount!) more recent articles..."
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
} else {
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: entry.widgetData.currentTodayCount))
|
||||||
|
var str = ""
|
||||||
|
if entry.widgetData.currentTodayCount == 1 {
|
||||||
|
str = "\(formattedCount!) recent article"
|
||||||
|
} else {
|
||||||
|
str = "\(formattedCount!) recent articles"
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func maxCount() -> Int {
|
||||||
|
return entry.widgetData.todayArticles.count > 3 ? 3 : entry.widgetData.todayArticles.count
|
||||||
|
}
|
||||||
|
|
||||||
|
var inboxZero: some View {
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
Text("#TodayZero")
|
||||||
|
.italic()
|
||||||
|
.font(Font.system(.subheadline, design: .serif))
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.padding(.bottom, 4)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 15, height: 15, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
|
||||||
|
Text("There're no recent articles to read.")
|
||||||
|
.font(.caption2)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
}.padding(.bottom, 8)
|
||||||
|
}.padding()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
141
Widget/Widget Views/UnreadWidget.swift
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
//
|
||||||
|
// UnreadWidget.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/20.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct UnreadWidgetView : View {
|
||||||
|
|
||||||
|
@Environment(\.widgetFamily) var family: WidgetFamily
|
||||||
|
|
||||||
|
var entry: Provider.Entry
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
switch family {
|
||||||
|
case .systemSmall:
|
||||||
|
mediumWidget
|
||||||
|
case .systemMedium:
|
||||||
|
mediumWidget
|
||||||
|
case .systemLarge:
|
||||||
|
mediumWidget
|
||||||
|
@unknown default:
|
||||||
|
mediumWidget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
var mediumWidget: some View {
|
||||||
|
if entry.widgetData.unreadArticles.count == 0 {
|
||||||
|
inboxZero
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
HStack(alignment: .top, spacing: 8) {
|
||||||
|
VStack {
|
||||||
|
unreadImage
|
||||||
|
Spacer()
|
||||||
|
nnwImage
|
||||||
|
}
|
||||||
|
VStack(alignment:.leading, spacing: 4) {
|
||||||
|
ForEach(0..<maxCount(), content: { i in
|
||||||
|
ArticleItemView(article: entry.widgetData.unreadArticles[i],
|
||||||
|
deepLink: WidgetDeepLink.unreadArticle(id: entry.widgetData.unreadArticles[i].id).url)
|
||||||
|
})
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
unreadCountText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.widgetURL(URL(string: "nnw-widget://showunread")!)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var unreadImage: some View {
|
||||||
|
Image(systemName: "largecircle.fill.circle")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
}
|
||||||
|
|
||||||
|
var nnwImage: some View {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 25, height: 25, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var unreadCountText: some View {
|
||||||
|
if entry.widgetData.currentUnreadCount > 3 {
|
||||||
|
let count = entry.widgetData.currentUnreadCount - 3
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: count))
|
||||||
|
var str = ""
|
||||||
|
if count == 1 {
|
||||||
|
str = "+ \(formattedCount!) more unread article..."
|
||||||
|
} else {
|
||||||
|
str = "+ \(formattedCount!) more unread articles..."
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
} else {
|
||||||
|
let formatter = NumberFormatter()
|
||||||
|
formatter.locale = Locale.current
|
||||||
|
formatter.numberStyle = .decimal
|
||||||
|
let formattedCount = formatter.string(from: NSNumber(value: entry.widgetData.currentUnreadCount))
|
||||||
|
var str = ""
|
||||||
|
if entry.widgetData.currentUnreadCount == 1 {
|
||||||
|
str = "\(formattedCount!) unread article"
|
||||||
|
} else {
|
||||||
|
str = "\(formattedCount!) unread articles"
|
||||||
|
}
|
||||||
|
return Text(str)
|
||||||
|
.font(.caption2)
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(.accentColor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func maxCount() -> Int {
|
||||||
|
return entry.widgetData.unreadArticles.count > 3 ? 3 : entry.widgetData.unreadArticles.count
|
||||||
|
}
|
||||||
|
|
||||||
|
var inboxZero: some View {
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
Text("#UnreadZero")
|
||||||
|
.italic()
|
||||||
|
.font(Font.system(.subheadline, design: .serif))
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.padding(.bottom, 4)
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
HStack {
|
||||||
|
Image("CornerIcon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 15, height: 15, alignment: .center)
|
||||||
|
.cornerRadius(4)
|
||||||
|
|
||||||
|
Text("There's nothing to read right now.")
|
||||||
|
.font(.caption2)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
}.padding(.bottom, 8)
|
||||||
|
}.padding()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
97
Widget/WidgetBundle.swift
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
//
|
||||||
|
// WidgetBundle.swift
|
||||||
|
// NetNewsWire Widget Extension
|
||||||
|
//
|
||||||
|
// Created by Stuart Breckenridge on 18/11/2020.
|
||||||
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import WidgetKit
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
// MARK: - Supported Widgets
|
||||||
|
|
||||||
|
struct UnreadWidget: Widget {
|
||||||
|
let kind: String = "com.ranchero.NetNewsWire.UnreadWidget"
|
||||||
|
|
||||||
|
var body: some WidgetConfiguration {
|
||||||
|
|
||||||
|
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||||
|
UnreadWidgetView(entry: entry)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.background(Color("WidgetBackground"))
|
||||||
|
|
||||||
|
})
|
||||||
|
.configurationDisplayName("Your Unread Articles")
|
||||||
|
.description("A sneak peak at what's left unread.")
|
||||||
|
.supportedFamilies([.systemMedium])
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct TodayWidget: Widget {
|
||||||
|
let kind: String = "com.ranchero.NetNewsWire.TodayWidget"
|
||||||
|
|
||||||
|
var body: some WidgetConfiguration {
|
||||||
|
|
||||||
|
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||||
|
TodayWidgetView(entry: entry)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.background(Color("WidgetBackground"))
|
||||||
|
|
||||||
|
})
|
||||||
|
.configurationDisplayName("Your Today Articles")
|
||||||
|
.description("A sneak peak at recently published articles.")
|
||||||
|
.supportedFamilies([.systemMedium])
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct StarredWidget: Widget {
|
||||||
|
let kind: String = "com.ranchero.NetNewsWire.StarredWidget"
|
||||||
|
|
||||||
|
var body: some WidgetConfiguration {
|
||||||
|
|
||||||
|
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||||
|
StarredWidgetView(entry: entry)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.background(Color("WidgetBackground"))
|
||||||
|
|
||||||
|
})
|
||||||
|
.configurationDisplayName("Your Starred Articles")
|
||||||
|
.description("A sneak peak at your starred articles.")
|
||||||
|
.supportedFamilies([.systemMedium])
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SmartFeedSummaryWidget: Widget {
|
||||||
|
let kind: String = "com.ranchero.NetNewsWire.SmartFeedSummaryWidget"
|
||||||
|
|
||||||
|
var body: some WidgetConfiguration {
|
||||||
|
|
||||||
|
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||||
|
SmartFeedSummaryWidgetView(entry: entry)
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.background(Color("WidgetBackground"))
|
||||||
|
|
||||||
|
})
|
||||||
|
.configurationDisplayName("Your Smart Feed Summary")
|
||||||
|
.description("A count of your smart feeds.")
|
||||||
|
.supportedFamilies([.systemSmall])
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MARK: - WidgetBundle
|
||||||
|
@main
|
||||||
|
struct NetNewsWireWidgets: WidgetBundle {
|
||||||
|
@WidgetBundleBuilder
|
||||||
|
var body: some Widget {
|
||||||
|
SmartFeedSummaryWidget()
|
||||||
|
UnreadWidget()
|
||||||
|
TodayWidget()
|
||||||
|
StarredWidget()
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ import Account
|
|||||||
import BackgroundTasks
|
import BackgroundTasks
|
||||||
import os.log
|
import os.log
|
||||||
import Secrets
|
import Secrets
|
||||||
|
import WidgetKit
|
||||||
|
|
||||||
var appDelegate: AppDelegate!
|
var appDelegate: AppDelegate!
|
||||||
|
|
||||||
@ -114,6 +115,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|||||||
syncTimer!.update()
|
syncTimer!.update()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if #available(iOS 14, *) {
|
||||||
|
WidgetDataEncoder.encodeWidgetData()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -384,6 +390,9 @@ private extension AppDelegate {
|
|||||||
}
|
}
|
||||||
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log) { [unowned self] in
|
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log) { [unowned self] in
|
||||||
if !AccountManager.shared.isSuspended {
|
if !AccountManager.shared.isSuspended {
|
||||||
|
if #available(iOS 14, *) {
|
||||||
|
WidgetDataEncoder.encodeWidgetData()
|
||||||
|
}
|
||||||
self.suspendApplication()
|
self.suspendApplication()
|
||||||
os_log("Account refresh operation completed.", log: self.log, type: .info)
|
os_log("Account refresh operation completed.", log: self.log, type: .info)
|
||||||
task.setTaskCompleted(success: true)
|
task.setTaskCompleted(success: true)
|
||||||
|
@ -59,6 +59,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sceneDidEnterBackground(_ scene: UIScene) {
|
func sceneDidEnterBackground(_ scene: UIScene) {
|
||||||
|
if #available(iOS 14, *) {
|
||||||
|
WidgetDataEncoder.encodeWidgetData()
|
||||||
|
}
|
||||||
ArticleStringFormatter.emptyCaches()
|
ArticleStringFormatter.emptyCaches()
|
||||||
appDelegate.prepareAccountsForBackground()
|
appDelegate.prepareAccountsForBackground()
|
||||||
}
|
}
|
||||||
@ -89,6 +92,96 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
coordinator.cleanUp(conditional: conditional)
|
coordinator.cleanUp(conditional: conditional)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle Opening of URLs
|
||||||
|
|
||||||
|
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
for context in URLContexts {
|
||||||
|
// Show Unread View or Article
|
||||||
|
if context.url.absoluteString.contains(WidgetDeepLink.unread.url.absoluteString) {
|
||||||
|
guard let comps = URLComponents(string: context.url.absoluteString ) else { return }
|
||||||
|
let id = comps.queryItems?.first(where: { $0.name == "id" })?.value
|
||||||
|
if id != nil {
|
||||||
|
if AccountManager.shared.isSuspended {
|
||||||
|
AccountManager.shared.resumeAll()
|
||||||
|
}
|
||||||
|
let articles = try! AccountManager.shared.fetchArticles(.unread)
|
||||||
|
let article = articles.filter({ $0.articleID == id }).first
|
||||||
|
|
||||||
|
if article != nil {
|
||||||
|
self.coordinator.selectAllUnreadFeed()
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
||||||
|
self.coordinator.selectArticle(article!, animations: [.navigation, .scroll])
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectAllUnreadFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectAllUnreadFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show Today View or Article
|
||||||
|
if context.url.absoluteString.contains(WidgetDeepLink.today.url.absoluteString) {
|
||||||
|
guard let comps = URLComponents(string: context.url.absoluteString ) else { return }
|
||||||
|
let id = comps.queryItems?.first(where: { $0.name == "id" })?.value
|
||||||
|
if id != nil {
|
||||||
|
if AccountManager.shared.isSuspended {
|
||||||
|
AccountManager.shared.resumeAll()
|
||||||
|
}
|
||||||
|
let articles = try! AccountManager.shared.fetchArticles(.today)
|
||||||
|
let article = articles.filter({ $0.articleID == id }).first
|
||||||
|
|
||||||
|
if article != nil {
|
||||||
|
self.coordinator.selectTodayFeed()
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
||||||
|
self.coordinator.selectArticle(article!, animations: [.navigation, .scroll])
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectTodayFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectTodayFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show Starred View or Article
|
||||||
|
if context.url.absoluteString.contains(WidgetDeepLink.starred.url.absoluteString) {
|
||||||
|
guard let comps = URLComponents(string: context.url.absoluteString ) else { return }
|
||||||
|
let id = comps.queryItems?.first(where: { $0.name == "id" })?.value
|
||||||
|
if id != nil {
|
||||||
|
if AccountManager.shared.isSuspended {
|
||||||
|
AccountManager.shared.resumeAll()
|
||||||
|
}
|
||||||
|
let articles = try! AccountManager.shared.fetchArticles(.starred)
|
||||||
|
let article = articles.filter({ $0.articleID == id }).first
|
||||||
|
|
||||||
|
if article != nil {
|
||||||
|
self.coordinator.selectStarredFeed()
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
||||||
|
self.coordinator.selectArticle(article!, animations: [.navigation, .scroll])
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectStarredFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
self.coordinator.selectStarredFeed()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension SceneDelegate {
|
private extension SceneDelegate {
|
||||||
|
41
xcconfig/NetNewsWire_iOSwidgetextension_target.xcconfig
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
CODE_SIGN_IDENTITY= iPhone Developer
|
||||||
|
DEVELOPMENT_TEAM = M8L2WTLA8W
|
||||||
|
CODE_SIGN_STYLE = Automatic
|
||||||
|
ORGANIZATION_IDENTIFIER = com.ranchero
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER =
|
||||||
|
|
||||||
|
// developers can locally override the Xcode settings for code signing
|
||||||
|
// by creating a DeveloperSettings.xcconfig file locally at the appropriate path
|
||||||
|
// This allows a pristine project to have code signing set up with the appropriate
|
||||||
|
// developer ID and certificates, and for dev to be able to have local settings
|
||||||
|
// without needing to check in anything into source control
|
||||||
|
//
|
||||||
|
// As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and
|
||||||
|
// give it the contents
|
||||||
|
//
|
||||||
|
// CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer
|
||||||
|
// CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
|
||||||
|
// CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer
|
||||||
|
// DEVELOPMENT_TEAM = <Your Team ID>
|
||||||
|
// BUNDLE_ROOT = <Your Domain Name Reversed>
|
||||||
|
// CODE_SIGN_STYLE = Automatic
|
||||||
|
// PROVISIONING_PROFILE_SPECIFIER =
|
||||||
|
//
|
||||||
|
// And you should be able to build without code signing errors and without modifying
|
||||||
|
// the NetNewsWire Xcode project.
|
||||||
|
//
|
||||||
|
// Example: if your NetNewsWire Xcode project file is at
|
||||||
|
// /Users/Shared/git/NetNewsWire/NetNewsWire.xcodeproj
|
||||||
|
// create your DeveloperSettings.xcconfig file at
|
||||||
|
// /Users/Shared/git/SharedXcodeSettings/DeveloperSettings.xcconfig
|
||||||
|
//
|
||||||
|
|
||||||
|
#include? "../../SharedXcodeSettings/ProjectSettings.xcconfig"
|
||||||
|
#include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig"
|
||||||
|
#include "./common/NetNewsWire_ios_target_common.xcconfig"
|
||||||
|
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../../Frameworks
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Widget/NetNewsWire_iOS_WidgetExtension.entitlements
|
||||||
|
INFOPLIST_FILE = Widget/Info.plist
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = $(ORGANIZATION_IDENTIFIER).NetNewsWire-Widget
|
||||||
|
PRODUCT_NAME = $(TARGET_NAME)
|