Unable to debug MAUI app on iPhone device

Mattywarr 0 Reputation points
2023-12-14T10:30:05.35+00:00

I am having issue debugging a MAUI app on my iPhone physical device.

The code runs and deploys fine on Simulator, however I get this error.

file with invalid attached data: Disallowed xattr com.apple.FinderInfo found on /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app: resource fork, Finder information, or similar detritus not allowed

I have done a lot of research in setting xcattr but none of the commands seem to work.

I get this issue when trying to deploy to the phone through Visual Studio 2022 (17.8.3) as well as Visual Studio Mac 17.6.7, and also Visual Studio Code with the C# and Maui extensions installed.

Full logs below. Anyone able to shed any light?

 Executing task: dotnet build -t:Build -p:Configuration=Debug -f net8.0-ios -r ios-arm64 -p:CustomAfterMicrosoftCSharpTargets="/Users/matthewwarr/.vscode/extensions/ms-dotnettools.dotnet-maui-0.6.54-darwin-x64/dist/resources/Custom.After.Microsoft.CSharp.targets" -p:MauiVSCodeBuildOutputFile=/var/folders/4w/v3kls4555054lhd1lf7xlftm0000gn/T/dotnet-maui/maui-vsc-b8bc33ff-c9cd-4c47-8557-affa02147dcb.json /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj 

MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  Detected signing identity:
          
    Code Signing Key: "Apple Development: Created via API (J24PJGDN53)" (71FEE428486C6D4BE68D38D17558BB6CF14EF568)
    Provisioning Profile: "VS: com.rackemapp.mobileapp Development" (709a66c7-a114-47c6-9ee6-e155a411d422)
    Bundle Id: com.rackemapp.mobileapp
    App Id: VV625DUX6E.com.rackemapp.mobileapp
  RackEmAppMobile -> /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Tool /usr/bin/codesign execution finished (exit code = 1).
          
  file with invalid attached data: Disallowed xattr com.apple.FinderInfo found on /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app
  
  /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app: resource fork, Finder information, or similar detritus not allowed
  
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2256,3): error : /usr/bin/codesign exited with code 1: [/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2256,3): error : /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app: resource fork, Finder information, or similar detritus not allowed [/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2256,3): error : Failed to codesign '/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app': /Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/bin/Debug/net8.0-ios/ios-arm64/RackEmAppMobile.app: resource fork, Finder information, or similar detritus not allowed [/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2256,3): error :  [/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2256,3): error :          [/Users/matthewwarr/Documents/GitHub/RackEmApp_Mobile/RackEmAppMobile/RackEmAppMobile.csproj::TargetFramework=net8.0-ios]

Build FAILED.
Developer technologies .NET .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.