Adds altstore://install?url=[link] deep link to install remote .ipa’s

This commit is contained in:
Riley Testut
2020-05-17 23:44:36 -07:00
parent 39b60a07d9
commit 05dc365dff
2 changed files with 221 additions and 70 deletions

View File

@@ -172,6 +172,16 @@ private extension AppDelegate
return true
case "install":
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
guard let downloadURLString = queryItems["url"], let downloadURL = URL(string: downloadURLString) else { return false }
DispatchQueue.main.async {
NotificationCenter.default.post(name: AppDelegate.importAppDeepLinkNotification, object: nil, userInfo: [AppDelegate.importAppDeepLinkURLKey: downloadURL])
}
return true
default: return false
}
}