在测试 iOS 18.4 的默认翻译功能时遇到问题 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
diedat17
V2EX    Apple

在测试 iOS 18.4 的默认翻功能时遇到问题

  •  
  •   diedat17 194 天前 1181 次点击
    这是一个创建于 194 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题描述

    我在 Xcode 测试 iOS 18.4 新出的 Translation Provider ,按照 官方文档 添加了 entitlement 、access key 、app extension ,并创建了一个简单的 UI 。
    但是启动 App 时出现报错。我是刚接触 iOS 开发没多久,麻烦大家帮忙看看是不是哪里配置有问题。

    疑问点

    1. 日志中 Invalid placeholder attributesFailed to create promise 具体指什么?

    2. 是不是 entitlement 或者 Info.plist 的某些配置有问题?

    3. 这种问题一般该怎么排查?

    希望有经验的朋友帮忙看看,非常感谢!

    Translation Provider

    错误日志

    Simulator device failed to install the application. Domain: IXErrorDomain Code: 2 Failure Reason: Invalid placeholder attributes. User Info: { DVTErrorCreatiOnDateKey= "2025-04-02 04:04:12 +0000"; FunctiOnName= "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:isFromSerializedPlaceholder:error:]"; IDERunOperatiOnFailingWorker= IDELaunchiPhoneSimulatorLauncher; SimCallingSelector = "installApplication:withOptions:error:"; SourceFileLine = 981; } -- Failed to create app extension placeholder for /Users/eddiepeng/Library/Developer/Xcode/DerivedData/ExtensionTest-dceeplqjptdufuaucwddasmwjwxd/Build/Products/Debug-iphonesimulator/ExtensionTest.app/PlugIns/TranslationExtensionTest.appex Domain: IXErrorDomain Code: 2 Failure Reason: Failed to create promise. User Info: { FunctiOnName= "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:isFromSerializedPlaceholder:error:]"; SourceFileLine = 981; } -- Failed to set placeholder attributes top.delta17.ExtensionTest.TranslationExtensionTest Domain: IXErrorDomain Code: 2 Failure Reason: Failed to create promise. User Info: { FunctiOnName= "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:isFromSerializedPlaceholder:error:]"; SourceFileLine = 818; } -- extensionDictionary must be set in placeholder attributes for an app extension placeholder Domain: IXErrorDomain Code: 17 Failure Reason: Invalid placeholder attributes. User Info: { FunctiOnName= "-[IXPlaceholder setPlaceholderAttributes:error:]"; SourceFileLine = 1999; } -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "FE4AA28E-B010-423E-9D5E-FFF66953A896"; "device_model" = "iPhone17,2"; "device_osBuild" = "18.4 (22E238)"; "device_platform" = "com.apple.platform.iphonesimulator"; "device_thinningType" = "iPhone17,2"; "dvt_coredevice_version" = "443.19"; "dvt_coresimulator_version" = "1010.10"; "dvt_mobiledevice_version" = "1784.102.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 38; "operation_errorCode" = 2; "operation_errorDomain" = IXErrorDomain; "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphonesimulator"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator18.4"; "sdk_osVersion" = "18.4"; "sdk_variant" = iphonesimulator; } -- System Information macOS Version 15.3.2 (Build 24D81) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-04-02T12:04:12+08:00 
    目前尚无回复
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     983 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 18:53 PVG 02:53 LAX 11:53 JFK 14:53
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86