使用APPIntent 的AppShortcutsProvider方式,最多只能添加10个AppShortcut,超过10个,代码编译就会报错
struct MeditationShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: StartMeditationIntent(),
phrases: [
"Start a (.applicationName)",
"Begin (.applicationName)",
"Meditate with (.applicationName)",
"Start a (.$session) session with (.applicationName)",
"Begin a (.$session) session with (.applicationName)",
"Meditate on (.$session) with (.applicationName)"
]
)
}
}
如何能做到像特斯拉APP一样
Post
Replies
Boosts
Views
Activity
在执行完 INIntent 或者AppIntent的Shortcuts后,刷新 WidgetKit桌面小组件
手表快捷指令,执行报错
Cannot send with an inactive account
iOS 17.6.1 WatchOS 10.6.1
WatchAPP安装完毕之后,未登录,可以进入执行,提示 “未登录”
WatchAPP登录后,提示 “Apple Watch无法运行快捷指令,与App通信出现问题”
how to register more than 10 shortcuts
AppIntents/PerformActionExecutorTask.swift:298: Fatal error: perform() returned types not declared in method signature
Did not declare ReturnsValue but provided one
func perform() async throws -> some IntentResult&ReturnsValue {
let msg = await JDSiriKitShortCutsManager.handleShortCut(type: type ?? .flashLid)
// let dialog = IntentDialog.responseSuccess(msg: msg)
// return .result(value: msg, dialog: dialog, view: JDSirikitShortCutView(msg: msg))
return .result(value: msg)
}
WatchOS accessoryInline类型的表盘组件不展示自定义的png图片
如何自定义开发表盘模版,不是表盘组件,比如设置背景图片,调整各个表盘组件的位置
手表系统: 10.2
表现:从手机Watch App上看,表盘组件部分都显示关闭;从手表上看,表盘组件不展示
iPhone 16.0 16.0.2 系统上运行小组件出现问题, 其他系统没有问题
SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.jiduauto.iphone.jdcomiphoneWidget' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600002bbd7a0 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.jiduauto.iphone.jdcomiphoneWidget' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600002bbd7a0 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}., NSUnderlyingError=0x600002bbd5f0 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600002bbd7a0 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}}}
Domain: DTXMessage
Code: 1
User Info: {
DVTErrorCreationDateKey = "2024-02-19 08:02:14 +0000";
}
System Information
macOS Version 13.5.2 (Build 22G91)
Xcode 15.0 (22265) (Build 15A240d)
Timestamp: 2024-02-19T16:02:14+08:00
device: iPhone 13 Pro max;
system version: 16.0 16.0.2 ;
no custom widget in Widget Center;
I have paired two iWatch,the app in the second one can not have a reachable session with iPhone app
Xcode 15
iPhone 13 pro 17.1.2
iWatch S9 10.1
iWatch S9 10.1.1
How to develop Complications for Watch 8.0 and earlier in Xcode 15
iPhone 13pro 17.1.2
iWatch Series 9 10.1
iWatch Series 7 10.0
I have restarted and rematched my iPhone and iWatch