"Trying to install the app on the phone through Xcode, an error occurs: Showing All Messages Failed to install the app on the device."

I connected my iPhone 15 Pro Max (version 18.0) to my computer and used Command + R to install the app on my phone. It builds successfully, showing 'build succeeded,' but then it prompts that it cannot install on the phone.

Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/"; }

Failed to create directory at path /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.installcoordinationd/Library/InstallCoordination/PromiseStaging/456E7153-5355-49CE-8CAC-4DADC7819C14/extract/Welfare100.app/Frameworks/Alamofire.framework /Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/AutoInch.framework /Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/Cache.framework /Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/CocoaLumberjack.framework /Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/EasyNavigation.framework /Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks: File name too long Domain: NSPOSIXErrorDomain Code: 63 Failure Reason: File name too long User Info: { NSFilePath = "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.installcoordinationd/Library/InstallCoordination/PromiseStaging/456E7153-5355-49CE-8CAC-4DADC7819C14/extract/Welfare100.app/Frameworks/Alamofire.framework \n/Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/AutoInch.framework \n/Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/Cache.framework \n/Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/CocoaLumberjack.framework \n/Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks/EasyNavigation.framework \n/Users/hcb/Library/Developer/Xcode/DerivedData/Welfare100-ewddcwrlgqblraekkkrodhkyjuob/Build/Products/Debug-iphoneos/Welfare100.app/Frameworks"; SZExtractorFunctionNameErrorKey = "-[StreamingUnzipper _supplyBytes:length:withReply:]"; SZExtractorSourceFileLineErrorKey = 899; }

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_isCoreDevice" = 1; "device_model" = "iPhone16,2"; "device_osBuild" = "18.0 (22A3354)"; "device_platform" = "com.apple.platform.iphoneos"; "dvt_coredevice_version" = "355.7.6"; "dvt_mobiledevice_version" = "1643.120.2"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 3361; "operation_errorCode" = 63; "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.NSPOSIXErrorDomain"; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "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.iphoneos"; "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_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_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 8192; "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" = "iphoneos17.2"; "sdk_osVersion" = "17.2"; "sdk_variant" = iphoneos; }

"Trying to install the app on the phone through Xcode, an error occurs: Showing All Messages Failed to install the app on the device."
 
 
Q