Post

Replies

Boosts

Views

Activity

Reply to iOS Automation could not run because an internal error occurred
我也遇到的类似的问题,iOS16设备运行快捷方式弹出同样的错误弹窗,经排查,发现只有Xcode15.3或15.4编译运行的会有问题,其他Xcode版本正常,不过我对代码进行了以下修改后就正常了,猜测是系统的bug,希望官方能回复,具体改动如下: 原代码: @available(iOS 16, *) struct ZBShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: ZBSearchIntent(), phrases: [ "打开(.applicationName)搜索页面", "进入(.applicationName)搜索页面", "打开(.applicationName)搜索", "进入(.applicationName)搜索" ], @@ -210,11 +217,12 @@ struct ZBShortcuts: AppShortcutsProvider { "打开(.applicationName)完赛赛程", "查看(.applicationName)赛程", "打开(.applicationName)赛程", ], shortTitle: "完赛赛程", systemImageName: "rectangle.on.rectangle" ) } static let shortcutTileColor: ShortcutTileColor = .lightBlue } 改动后的代码: struct ZBShortcuts: AppShortcutsProvider { @available(iOS 16.0, *) static var appShortcuts: [AppShortcut] { AppShortcut( intent: ZBSearchIntent(), phrases: [ "打开(.applicationName)搜索页面", "进入(.applicationName)搜索页面", "打开(.applicationName)搜索", "进入(.applicationName)搜索" ], @@ -210,11 +217,12 @@ struct ZBShortcuts: AppShortcutsProvider { "打开(.applicationName)完赛赛程", "查看(.applicationName)赛程", "打开(.applicationName)赛程", ], shortTitle: "完赛赛程", systemImageName: "rectangle.on.rectangle" ) } @available(iOS 16.0, *) static let shortcutTileColor: ShortcutTileColor = .lightBlue } 就是调整了 ”@available(iOS 16, *)” 的声明位置就正常了
2w
Reply to iOS Automation could not run because an internal error occurred
I also encountered a similar problem, the same error popup appeared in the running shortcut of iOS16 devices. After investigation, it was found that only Xcode15.3 or 15.4 had problems when compiled and run, while other Xcode versions were normal, but after I made the following modifications to the code, I guess it was a bug in the system, I hope the official reply can be made. Specific changes are as follows: Original code: @available(iOS 16, *) struct ZBShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: ZBSearchIntent(), phrases: [ "Open (.applicationName) search page ", "Go to (.applicationName) search page ", "Open (.applicationName) search ", "Enter (.applicationName) search" ]. @@-210,11 +217,12 @@struct ZBShortcuts: AppShortcutsProvider { "Open (.applicationName) finish schedule ", "View (.applicationName) schedule ", "Open (.applicationName) schedule ", ]. shortTitle: "Complete Schedule ", systemImageName: "rectangle.on.rectangle" ) } static let shortcutTileColor: ShortcutTileColor = .lightBlue } The modified code: struct ZBShortcuts: AppShortcutsProvider { @available(iOS 16.0, *) static var appShortcuts: [AppShortcut] { AppShortcut( intent: ZBSearchIntent(), phrases: [ "Open (.applicationName) search page ", "Go to (.applicationName) search page ", "Open (.applicationName) search ", "Enter (.applicationName) search" ]. @@-210,11 +217,12 @@struct ZBShortcuts: AppShortcutsProvider { "Open (.applicationName) finish schedule ", "View (.applicationName) schedule ", "Open (.applicationName) schedule ", ]. shortTitle: "Complete Schedule ", systemImageName: "rectangle.on.rectangle" ) } @available(iOS 16.0, *) static let shortcutTileColor: ShortcutTileColor = .lightBlue } Just adjust the location of the "@available(iOS 16, *)" statement
2w