I've created widget that opens app on specific view: .widgetUrl(URL(string: "myapp://Dashboard/SpecialView"))
It works alright so i know deep links are working. So after that i created Shortcuts.swift file in my main app and added this:
import AppIntents
import UIKit
@available(iOS 16, *)
struct StartRecordingIntent : AppIntent {
static var title: LocalizedStringResource = "Special"
func perform() async throws -> some IntentResult {
let url = URL(string: "myapp://Dashboard/SpecialView")
DispatchQueue.main.async {
UIApplication.shared.open(url!, options: [:], completionHandler: nil)
}
return .result()
}
}
This intent created shortcut "Special" in shortcut list, and when run, should open exactly the same view as the widget. But all im getting is error:
Failed to open URL myapp://Dashboard/SpecialView: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1
"The request to open "com.myapp" failed."
UserInfo={BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x600000dd7960
{Error Domain=FBSOpenApplicationErrorDomain Code=3
"Application com.myapp is neither visible nor entitled, so may not perform un-trusted user actions."
I don't understand what i'm doing wrong and why can't i open app from shortcut exactly like widget does