Replace the legacy SiriKit Add Feed intent with an App Intent so it appears in Shortcuts again. Fixes #5248.

This commit is contained in:
Brent Simmons committed 2026-08-02 10:59:19 -07:00
1 parent 4127e64154
commit b5b8d5de5a
11 files changed
+148 -750

No files matched your search

-126
View File
@@ -1,126 +0,0 @@
//
// AddWebFeedIntentHandler.swift
// NetNewsWire
//
// Created by Maurice Parker on 10/18/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Intents
public enum AddWebFeedIntentHandlerError: LocalizedError, Sendable {
case communicationFailure
public var errorDescription: String? {
switch self {
case .communicationFailure:
return NSLocalizedString("Unable to communicate with NetNewsWire.", comment: "Communication failure")
}
}
}
public class AddWebFeedIntentHandler: NSObject, AddWebFeedIntentHandling {
override init() {
super.init()
}
public func resolveUrl(for intent: AddWebFeedIntent) async -> AddWebFeedUrlResolutionResult {
guard let url = intent.url else {
return .unsupported(forReason: .required)
}
return .success(with: url)
}
public func provideAccountNameOptions(for intent: AddWebFeedIntent) async throws -> [String] {
guard let extensionContainers = await ExtensionContainersFile.read() else {
throw AddWebFeedIntentHandlerError.communicationFailure
}
let accountNames = extensionContainers.accounts.map { $0.name }
return accountNames
}
public func resolveAccountName(for intent: AddWebFeedIntent) async -> AddWebFeedAccountNameResolutionResult {
guard let accountName = intent.accountName else {
return .notRequired()
}
guard let extensionContainers = await ExtensionContainersFile.read() else {
return .unsupported(forReason: .communication)
}
if extensionContainers.findAccount(forName: accountName) == nil {
return .unsupported(forReason: .invalid)
}
return .success(with: accountName)
}
public func provideFolderNameOptions(for intent: AddWebFeedIntent) async throws -> [String] {
guard let extensionContainers = await ExtensionContainersFile.read() else {
throw AddWebFeedIntentHandlerError.communicationFailure
}
guard let accountName = intent.accountName, let account = extensionContainers.findAccount(forName: accountName) else {
return [String]()
}
let folderNames = account.folders.map { $0.name }
return folderNames
}
public func resolveFolderName(for intent: AddWebFeedIntent) async -> AddWebFeedFolderNameResolutionResult {
guard let accountName = intent.accountName, let folderName = intent.folderName else {
return .notRequired()
}
guard let extensionContainers = await ExtensionContainersFile.read() else {
return .unsupported(forReason: .communication)
}
guard let account = extensionContainers.findAccount(forName: accountName) else {
return .unsupported(forReason: .invalid)
}
let folder = account.findFolder(forName: folderName)
if folder == nil {
return .unsupported(forReason: .invalid)
}
return .success(with: folderName)
}
public func handle(intent: AddWebFeedIntent) async -> AddWebFeedIntentResponse {
guard let url = intent.url, let extensionContainers = await ExtensionContainersFile.read() else {
return AddWebFeedIntentResponse(code: .failure, userActivity: nil)
}
let account: ExtensionAccount? = {
if let accountName = intent.accountName {
return extensionContainers.findAccount(forName: accountName)
} else {
return extensionContainers.accounts.first
}
}()
guard let validAccount = account else {
return AddWebFeedIntentResponse(code: .failure, userActivity: nil)
}
let container: ExtensionContainer? = {
if let folderName = intent.folderName {
return validAccount.findFolder(forName: folderName)
} else {
return validAccount
}
}()
guard let validContainer = container, let containerID = validContainer.containerID else {
return AddWebFeedIntentResponse(code: .failure, userActivity: nil)
}
let request = ExtensionFeedAddRequest(name: nil, feedURL: url, destinationContainerID: containerID)
ExtensionFeedAddRequestFile.save(request)
return AddWebFeedIntentResponse(code: .success, userActivity: nil)
}
}
-314
View File
@@ -1,314 +0,0 @@
<?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>INEnums</key>
<array/>
<key>INIntentDefinitionModelVersion</key>
<string>1.1</string>
<key>INIntentDefinitionNamespace</key>
<string>U6u7RF</string>
<key>INIntentDefinitionSystemVersion</key>
<string>19D76</string>
<key>INIntentDefinitionToolsBuildVersion</key>
<string>11B53</string>
<key>INIntentDefinitionToolsVersion</key>
<string>11.2.1</string>
<key>INIntents</key>
<array>
<dict>
<key>INIntentCategory</key>
<string>create</string>
<key>INIntentConfigurable</key>
<true/>
<key>INIntentDescription</key>
<string>Add a web feed</string>
<key>INIntentDescriptionID</key>
<string>IuAbef</string>
<key>INIntentIneligibleForSuggestions</key>
<true/>
<key>INIntentInput</key>
<string>url</string>
<key>INIntentKeyParameter</key>
<string>url</string>
<key>INIntentLastParameterTag</key>
<integer>4</integer>
<key>INIntentManagedParameterCombinations</key>
<dict>
<key>url,accountName</key>
<dict>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Add ${url} to ${accountName}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>kaKsEY</string>
<key>INIntentParameterCombinationUpdatesLinked</key>
<true/>
</dict>
<key>url,accountName,folderName</key>
<dict>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Add ${url} to ${folderName} in ${accountName}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>dkSFD2</string>
<key>INIntentParameterCombinationUpdatesLinked</key>
<true/>
</dict>
</dict>
<key>INIntentName</key>
<string>AddWebFeed</string>
<key>INIntentParameters</key>
<array>
<dict>
<key>INIntentParameterDisplayName</key>
<string>URL</string>
<key>INIntentParameterDisplayNameID</key>
<string>BCHr23</string>
<key>INIntentParameterDisplayPriority</key>
<integer>1</integer>
<key>INIntentParameterName</key>
<string>url</string>
<key>INIntentParameterPromptDialogs</key>
<array>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogFormatString</key>
<string>What is the ${url} you would like add?</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>jLLidQ</string>
<key>INIntentParameterPromptDialogType</key>
<string>Primary</string>
</dict>
</array>
<key>INIntentParameterSupportsResolution</key>
<true/>
<key>INIntentParameterTag</key>
<integer>2</integer>
<key>INIntentParameterType</key>
<string>URL</string>
<key>INIntentParameterUnsupportedReasons</key>
<array>
<dict>
<key>INIntentParameterUnsupportedReasonCode</key>
<string>required</string>
<key>INIntentParameterUnsupportedReasonCustom</key>
<true/>
<key>INIntentParameterUnsupportedReasonFormatString</key>
<string>You must supply a URL.</string>
<key>INIntentParameterUnsupportedReasonFormatStringID</key>
<string>4xjRes</string>
</dict>
</array>
</dict>
<dict>
<key>INIntentParameterCustomDisambiguation</key>
<true/>
<key>INIntentParameterDisplayName</key>
<string>Account Name</string>
<key>INIntentParameterDisplayNameID</key>
<string>CSrgUY</string>
<key>INIntentParameterDisplayPriority</key>
<integer>2</integer>
<key>INIntentParameterMetadata</key>
<dict>
<key>INIntentParameterMetadataCapitalization</key>
<string>Sentences</string>
</dict>
<key>INIntentParameterName</key>
<string>accountName</string>
<key>INIntentParameterPromptDialogs</key>
<array>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogType</key>
<string>Primary</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogFormatString</key>
<string>There are ${count} options matching ‘${accountName}’.</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>IbqUVS</string>
<key>INIntentParameterPromptDialogType</key>
<string>DisambiguationIntroduction</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogFormatString</key>
<string>Which one?</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>fWs3li</string>
<key>INIntentParameterPromptDialogType</key>
<string>DisambiguationSelection</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogFormatString</key>
<string>Just to confirm, you wanted ‘${accountName}’?</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>HHiZUh</string>
<key>INIntentParameterPromptDialogType</key>
<string>Confirmation</string>
</dict>
</array>
<key>INIntentParameterSupportsDynamicEnumeration</key>
<true/>
<key>INIntentParameterSupportsResolution</key>
<true/>
<key>INIntentParameterTag</key>
<integer>3</integer>
<key>INIntentParameterType</key>
<string>String</string>
<key>INIntentParameterUnsupportedReasons</key>
<array>
<dict>
<key>INIntentParameterUnsupportedReasonCode</key>
<string>invalid</string>
<key>INIntentParameterUnsupportedReasonCustom</key>
<true/>
<key>INIntentParameterUnsupportedReasonFormatString</key>
<string>A valid Account Name is required.</string>
<key>INIntentParameterUnsupportedReasonFormatStringID</key>
<string>JGkCuS</string>
</dict>
<dict>
<key>INIntentParameterUnsupportedReasonCode</key>
<string>communication</string>
<key>INIntentParameterUnsupportedReasonCustom</key>
<true/>
<key>INIntentParameterUnsupportedReasonFormatString</key>
<string>Unable to communicate with NetNewsWire.</string>
<key>INIntentParameterUnsupportedReasonFormatStringID</key>
<string>uSfloN</string>
</dict>
</array>
</dict>
<dict>
<key>INIntentParameterCustomDisambiguation</key>
<true/>
<key>INIntentParameterDisplayName</key>
<string>Folder Name</string>
<key>INIntentParameterDisplayNameID</key>
<string>zXhMPF</string>
<key>INIntentParameterDisplayPriority</key>
<integer>3</integer>
<key>INIntentParameterMetadata</key>
<dict>
<key>INIntentParameterMetadataCapitalization</key>
<string>Sentences</string>
</dict>
<key>INIntentParameterName</key>
<string>folderName</string>
<key>INIntentParameterPromptDialogs</key>
<array>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogType</key>
<string>Primary</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogFormatString</key>
<string>There are ${count} options matching ‘${folderName}’.</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>5CYbGL</string>
<key>INIntentParameterPromptDialogType</key>
<string>DisambiguationIntroduction</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogFormatString</key>
<string>Which one?</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>gEzXaM</string>
<key>INIntentParameterPromptDialogType</key>
<string>DisambiguationSelection</string>
</dict>
<dict>
<key>INIntentParameterPromptDialogCustom</key>
<true/>
<key>INIntentParameterPromptDialogFormatString</key>
<string>Just to confirm, you wanted ‘${folderName}’?</string>
<key>INIntentParameterPromptDialogFormatStringID</key>
<string>k5GTo0</string>
<key>INIntentParameterPromptDialogType</key>
<string>Confirmation</string>
</dict>
</array>
<key>INIntentParameterRelationship</key>
<dict>
<key>INIntentParameterRelationshipParentName</key>
<string>accountName</string>
<key>INIntentParameterRelationshipPredicateName</key>
<string>HasAnyValue</string>
</dict>
<key>INIntentParameterSupportsDynamicEnumeration</key>
<true/>
<key>INIntentParameterSupportsResolution</key>
<true/>
<key>INIntentParameterTag</key>
<integer>4</integer>
<key>INIntentParameterType</key>
<string>String</string>
<key>INIntentParameterUnsupportedReasons</key>
<array>
<dict>
<key>INIntentParameterUnsupportedReasonCode</key>
<string>invalid</string>
<key>INIntentParameterUnsupportedReasonCustom</key>
<true/>
<key>INIntentParameterUnsupportedReasonFormatString</key>
<string>A valid Folder Name is required.</string>
<key>INIntentParameterUnsupportedReasonFormatStringID</key>
<string>ef5kBt</string>
</dict>
<dict>
<key>INIntentParameterUnsupportedReasonCode</key>
<string>communication</string>
<key>INIntentParameterUnsupportedReasonCustom</key>
<true/>
<key>INIntentParameterUnsupportedReasonFormatString</key>
<string>Unable to communicate with NetNewsWire.</string>
<key>INIntentParameterUnsupportedReasonFormatStringID</key>
<string>ExjqcE</string>
</dict>
</array>
</dict>
</array>
<key>INIntentResponse</key>
<dict>
<key>INIntentResponseCodes</key>
<array>
<dict>
<key>INIntentResponseCodeName</key>
<string>success</string>
<key>INIntentResponseCodeSuccess</key>
<true/>
</dict>
<dict>
<key>INIntentResponseCodeName</key>
<string>failure</string>
</dict>
</array>
</dict>
<key>INIntentTitle</key>
<string>Add Web Feed</string>
<key>INIntentTitleID</key>
<string>oV681v</string>
<key>INIntentType</key>
<string>Custom</string>
<key>INIntentVerb</key>
<string>Add</string>
</dict>
</array>
<key>INTypes</key>
<array/>
</dict>
</plist>
-30
View File
@@ -1,30 +0,0 @@
"4xjRes" = "You must supply a URL.";
"8Dh9Yy" = "No feed was found at the specified URL.";
"BCHr23" = "URL";
"CSrgUY" = "Account Name";
"HHiZUh" = "Just to confirm, you wanted ‘${accountName}’?";
"IbqUVS" = "There are ${count} options matching ‘${accountName}’.";
"IuAbef" = "Add a feed";
"JGkCuS" = "An account name is required.";
"UGGPkp" = "You are already subscribed to this feed in this account.";
"dkSFD2" = "Add${url}to ${accountName}";
"drQfaI" = "No feed was found at the specified URL.";
"fWs3li" = "Which one?";
"jLLidQ" = "What is the ${url}you would like add?";
"oV681v" = "Add Feed";
"srME8b" = "You are already subscribed to this feed in this account.";
+2 -191
View File
@@ -12,14 +12,10 @@
179C39EA26F76B0500D4E741 /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = 179C39E926F76B0500D4E741 /* Zip */; };
179D280B26F6F93D003B2E0A /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = 179D280A26F6F93D003B2E0A /* Zip */; };
27692BB9F5D9450894A7EDA4 /* ErrorLog in Frameworks */ = {isa = PBXBuildFile; productRef = C1939AC39272487C923003B8 /* ErrorLog */; };
27B86EEB25A53AAB00264340 /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 51BC2F4A24D343A500E90810 /* Account */; };
4679674625E599C100844E8D /* Articles in Frameworks */ = {isa = PBXBuildFile; productRef = 4679674525E599C100844E8D /* Articles */; };
4679674725E599C100844E8D /* Articles in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 4679674525E599C100844E8D /* Articles */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
510C416924E5CDE3008226FD /* NetNewsWire Share Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
511B148924E5DBDD00C919BD /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 511B148824E5DBDD00C919BD /* Account */; };
5131463E235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 51314637235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
513146B3235A81A400387FDC /* AddWebFeedIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513146B1235A81A400387FDC /* AddWebFeedIntentHandler.swift */; };
51314705235C41FC00387FDC /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 51314707235C41FC00387FDC /* Intents.intentdefinition */; };
513277442590FBB60064F1E7 /* Account in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 514C16CD24D2E63F009A3AFA /* Account */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
5132775E2590FC640064F1E7 /* Articles in Frameworks */ = {isa = PBXBuildFile; productRef = 5132775D2590FC640064F1E7 /* Articles */; };
5132775F2590FC640064F1E7 /* Articles in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 5132775D2590FC640064F1E7 /* Articles */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
@@ -63,7 +59,6 @@
848E84D52DB749670023F3BA /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 848E84D42DB749670023F3BA /* RSCore */; };
848E84D62DB749670023F3BA /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 848E84D42DB749670023F3BA /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
848E84D82DB749720023F3BA /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 848E84D72DB749720023F3BA /* RSCore */; };
848E84DB2DB749860023F3BA /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 848E84DA2DB749860023F3BA /* RSCore */; };
848E84DF2DB749A40023F3BA /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 848E84DE2DB749A40023F3BA /* RSCore */; };
849182CC2FD32B1B005C3020 /* Appanoose.nnwtheme in Resources */ = {isa = PBXBuildFile; fileRef = 849182BB2FD32B1B005C3010 /* Appanoose.nnwtheme */; };
849182CC2FD32B1B005C3021 /* Biblioteca.nnwtheme in Resources */ = {isa = PBXBuildFile; fileRef = 849182BB2FD32B1B005C3011 /* Biblioteca.nnwtheme */; };
@@ -86,7 +81,6 @@
84EE3F152DB8A0A0009D3A8D /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 84EE3F142DB8A0A0009D3A8D /* RSTree */; };
84EE3F162DB8A0A0009D3A8D /* RSTree in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 84EE3F142DB8A0A0009D3A8D /* RSTree */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
84EE3F182DB8A0AC009D3A8D /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 84EE3F172DB8A0AC009D3A8D /* RSTree */; };
84EE3F1B2DB8A0B6009D3A8D /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 84EE3F1A2DB8A0B6009D3A8D /* RSTree */; };
84EE43482DB8A441009D3A8D /* RSDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 84EE43472DB8A441009D3A8D /* RSDatabase */; };
84EE43492DB8A441009D3A8D /* RSDatabase in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 84EE43472DB8A441009D3A8D /* RSDatabase */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
84EE434B2DB8A44C009D3A8D /* RSDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 84EE434A2DB8A44C009D3A8D /* RSDatabase */; };
@@ -124,13 +118,6 @@
remoteGlobalIDString = 510C415B24E5CDE3008226FD;
remoteInfo = ShareExtension;
};
5131463C235A7BBE00387FDC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 51314636235A7BBE00387FDC;
remoteInfo = "NetNewsWire iOS Intents Extension";
};
5138E94224D3404300AFF0FE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */;
@@ -194,16 +181,6 @@
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
5102AE7724D17FB50050839C /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
513277512590FC000064F1E7 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -222,7 +199,6 @@
files = (
513C5CF0232571C2003D4054 /* NetNewsWire iOS Share Extension.appex in Embed Foundation Extensions */,
176814002564BB2D00D98635 /* NetNewsWire iOS Widget Extension.appex in Embed Foundation Extensions */,
5131463E235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
@@ -311,10 +287,6 @@
/* Begin PBXFileReference section */
176813F32564BB2C00D98635 /* NetNewsWire iOS Widget Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire iOS Widget Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire Share Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
51314637235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire iOS Intents Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
513146B1235A81A400387FDC /* AddWebFeedIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedIntentHandler.swift; sourceTree = "<group>"; };
51314706235C41FC00387FDC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/Intents.intentdefinition; sourceTree = "<group>"; };
51314714235C420900387FDC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Intents.strings; sourceTree = "<group>"; };
513C5CE6232571C2003D4054 /* NetNewsWire iOS Share Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "NetNewsWire iOS Share Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
518B2ED22351B3DD00400001 /* NetNewsWire-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "NetNewsWire-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6581C73320CED60000F4AD34 /* Subscribe to Feed.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Subscribe to Feed.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -407,8 +379,6 @@
84A6D03F2D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
IntentsExtension/Info.plist,
IntentsExtension/IntentHandler.swift,
Resources/Info.plist,
ShareExtension/Info.plist,
ShareExtension/ShareFolderPickerAccountCell.xib,
@@ -432,13 +402,6 @@
);
target = 513C5CE5232571C2003D4054 /* NetNewsWire iOS Share Extension */;
};
84A6D0412D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
IntentsExtension/IntentHandler.swift,
);
target = 51314636235A7BBE00387FDC /* NetNewsWire iOS Intents Extension */;
};
84D35E0A2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
@@ -480,16 +443,6 @@
);
target = 513C5CE5232571C2003D4054 /* NetNewsWire iOS Share Extension */;
};
84D35E0D2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
ShareExtension/ExtensionContainers.swift,
ShareExtension/ExtensionContainersFile.swift,
ShareExtension/ExtensionFeedAddRequest.swift,
ShareExtension/ExtensionFeedAddRequestFile.swift,
);
target = 51314636235A7BBE00387FDC /* NetNewsWire iOS Intents Extension */;
};
84D35E0E2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
@@ -548,9 +501,9 @@
8448F1F62D1E36BF0048BA50 /* Widget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (8448F2052D1E36BF0048BA50 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Widget; sourceTree = "<group>"; };
84719F0E2DB9C52B00EEF332 /* Tests */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84719F272DB9C52B00EEF332 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Tests; sourceTree = "<group>"; };
84719F372DB9C60400EEF332 /* xcconfig */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84719F392DB9C60500EEF332 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (common, ); path = xcconfig; sourceTree = "<group>"; };
84A6CFB52D1B4EC500F23315 /* iOS */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84A6D03F2D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84A6D0402D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84A6D0412D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = iOS; sourceTree = "<group>"; };
84A6CFB52D1B4EC500F23315 /* iOS */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84A6D03F2D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84A6D0402D1B4EC500F23315 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = iOS; sourceTree = "<group>"; };
84CB35042DB9B5E2002AC251 /* Modules */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Modules; sourceTree = "<group>"; };
84D35D422DB9F32D004AA60E /* Shared */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84D35E0A2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0B2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0C2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0D2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0E2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0F2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Shared; sourceTree = "<group>"; };
84D35D422DB9F32D004AA60E /* Shared */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84D35E0A2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0B2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0C2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0E2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84D35E0F2DB9F32D004AA60E /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Shared; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
@@ -571,16 +524,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
51314634235A7BBE00387FDC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
27B86EEB25A53AAB00264340 /* Account in Frameworks */,
848E84DB2DB749860023F3BA /* RSCore in Frameworks */,
84EE3F1B2DB8A0B6009D3A8D /* RSTree in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
513C5CE3232571C2003D4054 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -666,15 +609,6 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
513145F9235A55A700387FDC /* Intents */ = {
isa = PBXGroup;
children = (
51314707235C41FC00387FDC /* Intents.intentdefinition */,
513146B1235A81A400387FDC /* AddWebFeedIntentHandler.swift */,
);
path = Intents;
sourceTree = "<group>";
};
84023C9D2FC7E3B800284625 /* Recovered References */ = {
isa = PBXGroup;
children = (
@@ -711,7 +645,6 @@
840A1F092E41337800CFCCFC /* Technotes */,
842E249F2DB9F9B800FF7DD8 /* Mac */,
84A6CFB52D1B4EC500F23315 /* iOS */,
513145F9235A55A700387FDC /* Intents */,
8448F1F62D1E36BF0048BA50 /* Widget */,
84D35D422DB9F32D004AA60E /* Shared */,
849182072FD32B1B005C3150 /* Themes */,
@@ -733,7 +666,6 @@
6581C73320CED60000F4AD34 /* Subscribe to Feed.appex */,
513C5CE6232571C2003D4054 /* NetNewsWire iOS Share Extension.appex */,
518B2ED22351B3DD00400001 /* NetNewsWire-iOSTests.xctest */,
51314637235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex */,
510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */,
176813F32564BB2C00D98635 /* NetNewsWire iOS Widget Extension.appex */,
);
@@ -790,30 +722,6 @@
productReference = 510C415C24E5CDE3008226FD /* NetNewsWire Share Extension.appex */;
productType = "com.apple.product-type.app-extension";
};
51314636235A7BBE00387FDC /* NetNewsWire iOS Intents Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5131463F235A7BBE00387FDC /* Build configuration list for PBXNativeTarget "NetNewsWire iOS Intents Extension" */;
buildPhases = (
51314633235A7BBE00387FDC /* Sources */,
51314634235A7BBE00387FDC /* Frameworks */,
51314635235A7BBE00387FDC /* Resources */,
5102AE7724D17FB50050839C /* Embed Frameworks */,
513F328A2593EFCE0003048F /* Delete Unnecessary Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "NetNewsWire iOS Intents Extension";
packageProductDependencies = (
51BC2F4A24D343A500E90810 /* Account */,
848E84DA2DB749860023F3BA /* RSCore */,
84EE3F1A2DB8A0B6009D3A8D /* RSTree */,
);
productName = "NetNewsWire iOS Intents Extension";
productReference = 51314637235A7BBE00387FDC /* NetNewsWire iOS Intents Extension.appex */;
productType = "com.apple.product-type.app-extension";
};
513C5CE5232571C2003D4054 /* NetNewsWire iOS Share Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 513C5CFC232571C2003D4054 /* Build configuration list for PBXNativeTarget "NetNewsWire iOS Share Extension" */;
@@ -889,7 +797,6 @@
);
dependencies = (
5138E94324D3404300AFF0FE /* PBXTargetDependency */,
5131463D235A7BBE00387FDC /* PBXTargetDependency */,
176813FF2564BB2D00D98635 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
@@ -1012,12 +919,6 @@
510C415B24E5CDE3008226FD = {
CreatedOnToolsVersion = 12.0;
};
51314636235A7BBE00387FDC = {
CreatedOnToolsVersion = 11.2;
DevelopmentTeam = SHJK2V3AJG;
LastSwiftMigration = 1120;
ProvisioningStyle = Automatic;
};
513C5CE5232571C2003D4054 = {
CreatedOnToolsVersion = 11.0;
DevelopmentTeam = SHJK2V3AJG;
@@ -1087,7 +988,6 @@
840D617B2029031C009BC708 /* NetNewsWire-iOS */,
6581C73220CED60000F4AD34 /* Subscribe to Feed */,
513C5CE5232571C2003D4054 /* NetNewsWire iOS Share Extension */,
51314636235A7BBE00387FDC /* NetNewsWire iOS Intents Extension */,
176813F22564BB2C00D98635 /* NetNewsWire iOS Widget Extension */,
518B2ED12351B3DD00400001 /* NetNewsWire-iOSTests */,
510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */,
@@ -1110,13 +1010,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
51314635235A7BBE00387FDC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
513C5CE4232571C2003D4054 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1178,25 +1071,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
513F328A2593EFCE0003048F /* Delete Unnecessary Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Delete Unnecessary Frameworks";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"${CONFIGURATION}\" = \"Release\" ]; then\n# Delete the framework that Xcode should have never included\n# https://forums.swift.org/t/is-this-an-xcode-bug-or-somehow-related-to-spm/33987\nrm -rf \"${TARGET_BUILD_DIR}/NetNewsWire iOS Intents Extension.appex/Frameworks\"\nfi\n";
};
513F328B2593F03F0003048F /* Delete Unnecessary Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -1343,15 +1217,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
51314633235A7BBE00387FDC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
513146B3235A81A400387FDC /* AddWebFeedIntentHandler.swift in Sources */,
51314705235C41FC00387FDC /* Intents.intentdefinition in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
513C5CE2232571C2003D4054 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1408,11 +1273,6 @@
target = 510C415B24E5CDE3008226FD /* NetNewsWire Share Extension */;
targetProxy = 510C416724E5CDE3008226FD /* PBXContainerItemProxy */;
};
5131463D235A7BBE00387FDC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 51314636235A7BBE00387FDC /* NetNewsWire iOS Intents Extension */;
targetProxy = 5131463C235A7BBE00387FDC /* PBXContainerItemProxy */;
};
5138E94324D3404300AFF0FE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 513C5CE5232571C2003D4054 /* NetNewsWire iOS Share Extension */;
@@ -1435,18 +1295,6 @@
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
51314707235C41FC00387FDC /* Intents.intentdefinition */ = {
isa = PBXVariantGroup;
children = (
51314706235C41FC00387FDC /* Base */,
51314714235C420900387FDC /* en */,
);
name = Intents.intentdefinition;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
176814022564BB2D00D98635 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -1480,22 +1328,6 @@
};
name = Release;
};
51314640235A7BBE00387FDC /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = 84719F372DB9C60400EEF332 /* xcconfig */;
baseConfigurationReferenceRelativePath = NetNewsWire_iOSintentextension_target.xcconfig;
buildSettings = {
};
name = Debug;
};
51314642235A7BBE00387FDC /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = 84719F372DB9C60400EEF332 /* xcconfig */;
baseConfigurationReferenceRelativePath = NetNewsWire_iOSintentextension_target.xcconfig;
buildSettings = {
};
name = Release;
};
513C5CF2232571C2003D4054 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReferenceAnchor = 84719F372DB9C60400EEF332 /* xcconfig */;
@@ -1629,15 +1461,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5131463F235A7BBE00387FDC /* Build configuration list for PBXNativeTarget "NetNewsWire iOS Intents Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
51314640235A7BBE00387FDC /* Debug */,
51314642235A7BBE00387FDC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
513C5CFC232571C2003D4054 /* Build configuration list for PBXNativeTarget "NetNewsWire iOS Share Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -1799,10 +1622,6 @@
isa = XCSwiftPackageProductDependency;
productName = Account;
};
51BC2F4A24D343A500E90810 /* Account */ = {
isa = XCSwiftPackageProductDependency;
productName = Account;
};
51C4CFF524D37DD500AF9874 /* Secrets */ = {
isa = XCSwiftPackageProductDependency;
productName = Secrets;
@@ -1851,10 +1670,6 @@
isa = XCSwiftPackageProductDependency;
productName = RSCore;
};
848E84DA2DB749860023F3BA /* RSCore */ = {
isa = XCSwiftPackageProductDependency;
productName = RSCore;
};
848E84DE2DB749A40023F3BA /* RSCore */ = {
isa = XCSwiftPackageProductDependency;
productName = RSCore;
@@ -1871,10 +1686,6 @@
isa = XCSwiftPackageProductDependency;
productName = RSTree;
};
84EE3F1A2DB8A0B6009D3A8D /* RSTree */ = {
isa = XCSwiftPackageProductDependency;
productName = RSTree;
};
84EE43472DB8A441009D3A8D /* RSDatabase */ = {
isa = XCSwiftPackageProductDependency;
productName = RSDatabase;
+122
View File
@@ -0,0 +1,122 @@
//
// AddFeedAppIntent.swift
// NetNewsWire-iOS
//
// Modern App Intents replacement for the legacy SiriKit "Add Feed" intent.
// <https://github.com/Ranchero-Software/NetNewsWire/issues/5248>
//
import Foundation
import AppIntents
struct AddFeedAppIntent: AppIntent {
static let title: LocalizedStringResource = "Add Feed"
static let description = IntentDescription("Adds a feed to NetNewsWire.")
// Runs in the background: like the Share Extension, this only enqueues a request into the
// app group; the main app turns it into an actual feed the next time it processes the queue.
static let openAppWhenRun = false
@Parameter(title: "URL")
var url: URL
@Parameter(title: "Account", optionsProvider: AccountNameOptionsProvider())
var accountName: String?
@Parameter(title: "Folder", optionsProvider: FolderNameOptionsProvider())
var folderName: String?
static var parameterSummary: some ParameterSummary {
Summary("Add \(\.$url) to \(\.$accountName)") {
\.$folderName
}
}
func perform() async throws -> some IntentResult & ProvidesDialog {
guard let extensionContainers = await ExtensionContainersFile.read() else {
throw AddFeedAppIntentError.noAccounts
}
let account: ExtensionAccount?
if let accountName {
account = extensionContainers.findAccount(forName: accountName)
} else {
account = extensionContainers.accounts.first
}
guard let account else {
throw AddFeedAppIntentError.noAccounts
}
// Resolve the destination container: the named folder if it exists in this account;
// otherwise the account itself — but substitute its first folder when the account
// disallows feeds at the root (mirrors AddFeedDefaultContainer.substituteContainerIfNeeded).
// Not hard-failing on an unknown folder name also covers cross-account name mismatches.
let container: ExtensionContainer
if let folderName, let folder = account.findFolder(forName: folderName) {
container = folder
} else if account.disallowFeedInRootFolder, let firstFolder = account.folders.first {
container = firstFolder
} else {
container = account
}
guard let containerID = container.containerID else {
throw AddFeedAppIntentError.noContainer
}
let request = ExtensionFeedAddRequest(name: nil, feedURL: url, destinationContainerID: containerID)
ExtensionFeedAddRequestFile.save(request)
// Neutral wording: the feed is queued here and actually created when the app next runs.
return .result(dialog: "Adding \(url.absoluteString) to NetNewsWire.")
}
}
enum AddFeedAppIntentError: Error, CustomLocalizedStringResourceConvertible {
case noAccounts
case noContainer
var localizedStringResource: LocalizedStringResource {
switch self {
case .noAccounts:
return "There are no accounts to add the feed to."
case .noContainer:
return "Couldn’t find a place to add the feed."
}
}
}
struct AccountNameOptionsProvider: DynamicOptionsProvider {
func results() async throws -> [String] {
guard let extensionContainers = await ExtensionContainersFile.read() else {
return []
}
return extensionContainers.accounts.map { $0.name }
}
}
struct FolderNameOptionsProvider: DynamicOptionsProvider {
// Scope folder options to the account the user picked (falls back to all accounts' folders
// when no account is chosen yet).
@IntentParameterDependency<AddFeedAppIntent>(\.$accountName)
var addFeedIntent
func results() async throws -> [String] {
guard let extensionContainers = await ExtensionContainersFile.read() else {
return []
}
let accounts: [ExtensionAccount]
if let accountName = addFeedIntent?.accountName, let account = extensionContainers.findAccount(forName: accountName) {
accounts = [account]
} else {
accounts = extensionContainers.accounts
}
// Dedupe: folder names can repeat across accounts when unscoped.
var seen = Set<String>()
return accounts.flatMap { $0.folders.map { $0.name } }.filter { seen.insert($0).inserted }
}
}
@@ -0,0 +1,24 @@
//
// NetNewsWireAppShortcuts.swift
// NetNewsWire-iOS
//
// Makes App Intents available in the Shortcuts app / Spotlight / Siri with no user setup.
// <https://github.com/Ranchero-Software/NetNewsWire/issues/5248>
//
import AppIntents
struct NetNewsWireAppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: AddFeedAppIntent(),
phrases: [
"Add a feed to \(.applicationName)",
"Add feed in \(.applicationName)"
],
shortTitle: "Add Feed",
systemImageName: "plus"
)
}
}
-48
View File
@@ -1,48 +0,0 @@
<?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>OrganizationIdentifier</key>
<string>$(ORGANIZATION_IDENTIFIER)</string>
<key>AppGroup</key>
<string>$(APP_GROUP_ID)</string>
<key>AppIdentifierPrefix</key>
<string>$(AppIdentifierPrefix)</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>NetNewsWire iOS Intents Extension</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>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IntentsRestrictedWhileLocked</key>
<array/>
<key>IntentsRestrictedWhileProtectedDataUnavailable</key>
<array/>
<key>IntentsSupported</key>
<array>
<string>AddWebFeedIntent</string>
</array>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.intents-service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).IntentHandler</string>
</dict>
</dict>
</plist>
-22
View File
@@ -1,22 +0,0 @@
//
// IntentHandler.swift
// NetNewsWire iOS Intents Extension
//
// Created by Maurice Parker on 10/18/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Intents
final class IntentHandler: INExtension {
override func handler(for intent: INIntent) -> Any {
switch intent {
case is AddWebFeedIntent:
return AddWebFeedIntentHandler()
default:
fatalError("Unhandled intent type: \(intent)")
}
}
}
@@ -1,14 +0,0 @@
<?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>$(APP_GROUP_ID)</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS$(BUNDLE_ID_SUFFIX)</string>
</array>
</dict>
</plist>
-1
View File
@@ -70,7 +70,6 @@
<string>Grant permission to save images from the article.</string>
<key>NSUserActivityTypes</key>
<array>
<string>AddWebFeedIntent</string>
<string>NextUnread</string>
<string>ReadArticle</string>
<string>Restoration</string>
@@ -1,4 +0,0 @@
#include "./common/NetNewsWire_iOSextension_common.xcconfig"
CODE_SIGN_ENTITLEMENTS = iOS/IntentsExtension/NetNewsWire_iOS_IntentsExtension.entitlements
INFOPLIST_FILE = iOS/IntentsExtension/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = $(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS$(BUNDLE_ID_SUFFIX).IntentsExtension