Supports refreshing apps with Siri on iOS 14

This commit is contained in:
Riley Testut
2020-09-08 12:29:44 -07:00
parent 3d9417c071
commit 0256079738
10 changed files with 669 additions and 321 deletions

View File

@@ -0,0 +1,23 @@
//
// INInteraction+AltStore.swift
// AltStore
//
// Created by Riley Testut on 9/4/20.
// Copyright © 2020 Riley Testut. All rights reserved.
//
import Intents
// Requires iOS 14 in-app intent handling.
@available(iOS 14, *)
extension INInteraction
{
static func refreshAllApps() -> INInteraction
{
let refreshAllIntent = RefreshAllIntent()
refreshAllIntent.suggestedInvocationPhrase = NSString.deferredLocalizedIntentsString(with: "Refresh my apps") as String
let interaction = INInteraction(intent: refreshAllIntent, response: nil)
return interaction
}
}