My code is pretty straight forward. I am not sure what is the issue and I am not able to find a solution.
var suggestions = [INShortcut]()
for component in components
{
if let userActivity = UserActivityGenerator.getUserActivity(component: component)
{
let shortCut = INShortcut.init(userActivity: userActivity)
suggestions.append(shortCut)
}
}
INVoiceShortcutCenter.shared.setShortcutSuggestions(suggestions)
The app crashes in setShortcutSuggestions.
It works fine in iOS 12 with same Xcode 11 Beta.