You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

NSExtensionPrincipalClass引发iOS应用验证与安装冲突问题求助

App Intents Extension 提交与安装的冲突问题

我正在开发一款为Shortcuts应用提供动作集合的iOS应用(类似Sindre Sorhus的Actions应用)。

验证/提交阶段错误

在验证或分发构建归档/版本时,验证失败并出现以下错误:

Validation failed
Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found in extension Info.plist for iOS App.app/PlugIns/iOS App Intents.appex. (ID: c4b0b508-eb81-4570-92c8-448c1c2624ca)
Validation failed
Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found in extension Info.plist for iOS App.app/Watch/watchOS App.app/PlugIns/watchOS App Intents.appex. (ID: 04cb75a2-f3eb-4a5d-b338-df05858fdc13)

添加字段后的安装错误

在每个Info.plist中添加键值对NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).ShortcutsAppIntentsExtension后,验证/提交错误得以解决。但该字段的存在导致调试和发布版本安装失败,出现以下错误:

Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    DVTErrorCreationDateKey = "2026-04-03 12:37:35 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
    NSURL = "file:///Users/ben/Library/Developer/Xcode/DerivedData/shortcuts-dndxewxojvxhezevubvqulsskvso/Build/Products/Release-iphoneos/iOS%20App.app";
}
--
Unable to Install “<app name>”
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Please try again later.
Recovery Suggestion: Appex bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.3EZRvF/extracted/iOS App.app/PlugIns/iOS App Intents.appex with id com.mythofechelon.shortcuts.appintents defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.appintents-extension
--
Appex bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.3EZRvF/extracted/iOS App.app/PlugIns/iOS App Intents.appex with id com.mythofechelon.shortcuts.appintents defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.appintents-extension
Domain: MIInstallerErrorDomain
Code: 152
User Info: {
    FunctionName = "-[MIPluginKitBundle _validateNSExtensionWithOverlaidDictionary:error:]";
    LegacyErrorString = AppexBundleContainsClassOrStoryboard;
    SourceFileLine = 350;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_identifier" = "00008150-000975991E08401C";
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone18,1";
    "device_osBuild" = "26.4 (23E246)";
    "device_osBuild_monotonic" = 2304024600;
    "device_os_variant" = 1;
    "device_platform" = "com.apple.platform.iphoneos";
    "device_platform_family" = 2;
    "device_reality" = 1;
    "device_thinningType" = "iPhone18,1";
    "device_transport" = 0;
    "launchSession_schemeCommand" = Run;
    "launchSession_schemeCommand_enum" = 1;
    "launchSession_targetArch" = arm64;
    "launchSession_targetArch_enum" = 6;
    "operation_duration_ms" = 3374;
    "operation_errorCode" = 152;
    "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.IXUserPresentableErrorDomain.1.MIInstallerErrorDomain";
    "operation_errorWorker" = IDEInstallCoreDeviceWorker;
    "operation_errorReportable" = 1;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_consoleMode" = 1;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MTE_enable" = 0;
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_mtc_enable" = 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_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" = 99;
    "param_launcher_substyle" = 0;
    "param_lldbVersion_component_idx_1" = 0;
    "param_lldbVersion_monotonic" = 170302360103;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos26.2";
    "sdk_osVersion" = "26.2";
    "sdk_platformID" = 2;
    "sdk_variant" = iphoneos;
    "sdk_version_monotonic" = 2302005700;
}
--

System Information

macOS Version 26.1 (Build 25B78)
Xcode 26.3 (24587) (Build 17C529)
Timestamp: 2026-04-03T13:37:35+01:00

这似乎是一个两难的情况,希望有人能提供解决建议。


内容的提问来源于stack exchange,提问作者mythofechelon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.01 13:17:35