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

Xcode报错求助:grpc.framework缺失Bundle可执行文件

问题描述

我是编程与Xcode新手,若问题有疏漏还请谅解。我使用Swift和SwiftUI开发的iOS应用此前在模拟器与真机上均能正常构建运行,但今早突然出现报错,且我并未刻意修改项目。我已尝试自行搜索解决方案但无果,查看了应用目标的Build Phases,我通过Xcode包依赖管理器手动添加了Firebase(随之安装了gRPC等依赖),重新添加Firebase也未解决问题。目前应用在模拟器可正常运行,但真机无法安装,报错详情如下:

Domain: IXUserPresentableErrorDomain
Code: 1
Recovery Suggestion: PlettApp.app/Frameworks/grpc.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "PlettApp.app/Frameworks/grpc.framework/grpc".
User Info: {
    DVTErrorCreationDateKey = "2025-01-03 09:50:30 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    NSURL = "file:///Users/gavinbiesheuvel/Library/Developer/Xcode/DerivedData/PlettApp-bffxbuoklgogpwfdqsgwjvaafnxh/Build/Products/Debug-iphoneos/PlettApp.app";
}
--
Unable to Install “PlettApp”
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Please try again later.
Recovery Suggestion: PlettApp.app/Frameworks/grpc.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "PlettApp.app/Frameworks/grpc.framework/grpc".
--
PlettApp.app/Frameworks/grpc.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "PlettApp.app/Frameworks/grpc.framework/grpc".
Domain: MIInstallerErrorDomain
Code: 71
User Info: {
    FunctionName = "-[MIExecutableBundle executableExistsWithError:]";
    SourceFileLine = 1580;
}
--
lstat of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.yvTa87/extracted/PlettApp.app/Frameworks/grpc.framework/grpc failed: No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
User Info: {
    FunctionName = "-[MIFileManager itemExistsAtURL:error:]";
    SourceFileLine = 1345;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_identifier" = "00008130-001C659C3061401C";
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone16,1";
    "device_osBuild" = "18.2 (22C151)";
    "device_platform" = "com.apple.platform.iphoneos";
    "device_thinningType" = "iPhone16,1";
    "dvt_coredevice_version" = "397.28";
    "dvt_coresimulator_version" = "993.7";
    "dvt_mobiledevice_version" = "1759.60.7";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 3155;
    "operation_errorCode" = 1;
    "operation_errorDomain" = IXUserPresentableErrorDomain;
    "operation_errorWorker" = IDEInstallCoreDeviceWorker;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 1;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "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" = "iphoneos18.2";
    "sdk_osVersion" = "18.2";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 15.2 (Build 24C101)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2025-01-03T11:50:30+02:00
解决方案
  • 清理Derived Data:打开Xcode,点击顶部菜单Xcode > Settings > Locations,找到Derived Data的路径,打开文件夹后删除对应项目的文件夹,重启Xcode
  • 检查Build Settings配置:选中应用目标,进入Build Settings,搜索Framework Search Paths,确保grpc.framework的路径正确,无冗余或错误路径;再搜索Other Linker Flags,确认包含-ObjC或-all_load(如果需要)
  • 验证依赖完整性:在Xcode左侧导航栏的Package Dependencies中,右键Firebase依赖选择Update Package,或删除后重新添加,确保gRPC等子依赖完整下载
  • 检查Embed Frameworks设置:进入应用目标的Build Phases,找到Embed Frameworks,确认grpc.framework在列表中,且Embed选项设置为Embed & Sign
  • 重启设备与Xcode:关闭Xcode,重启iPhone,再重新打开项目尝试构建安装
  • 确认版本兼容性:检查Xcode 16.2与iOS 18.2的适配情况,若存在版本兼容问题,可尝试降级Xcode或升级iOS到对应兼容版本

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.15 05:54:56