Recently, my .NET 7 MAUI project stopped building for both Simulator and physical iOS devices. I encounter 'resource fork, Finder information, or similar detritus not allowed' due to extended attributes. I've looked around on the forums and stack overflow and tried all solutions I found. Attempts with 'xattr -cr', clearing 'obj' and 'bin' folders, and utilizing 'sudo' have not resolved the issue. Notably, this problem doesn't occur in a new project.
I'm using Xcode 15.1, and trying to build to android/ios makes no difference. Besides that there are no special capabilities set for the app.
Below is part of the error:
(Error details with path replaced with /Users/<user>/Documents/.../<business_name>.app for confidentiality)
Build with surface heuristics started at 14:56:17
Use build tool: /usr/local/share/dotnet/sdk/8.0.100/MSBuild.dll
CONSOLE: MSBuild version 17.8.3+195e7f5a3 for .NET
CONSOLE: Build started 07/01/2024 14:56:18.
CONSOLE: Project "/var/folders/<random_path>/TempProj.proj" on node 1 (default targets).
CONSOLE: ControllerTarget:
CONSOLE: Run controller from /Applications/IDE.app/Contents/lib/IDEBackend/Host.dll
0>------- Started building project: <business_name>.ClientLibrary
...
1>------- Started building project: <business_name>.Employee.MobileApp
1>Microsoft.NET.RuntimeIdentifierInference.targets(251,5): Warning NETSDK1201 : For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.
Detected signing identity:
Provisioning Profile: "iOS Team Provisioning Profile: com.<business_app_identifier>" (<random_id>)
Bundle Id: com.<business_app_identifier>
App Id: <app_specific_id>.com.<business_app_identifier>
/usr/bin/mdimport bin/Debug/net7.0-ios/iossimulator-x64/
Tool /usr/bin/codesign execution finished (exit code = 1).
file with invalid attached data: Disallowed xattr com.apple.FinderInfo found on /Users/<user>/Documents/.../<business_name>.app
/Users/<user>/Documents/.../<business_name>.app: resource fork, Finder information, or similar detritus not allowed
1>Xamarin.Shared.targets(2174,3): Error : /usr/bin/codesign exited with code 1:
/Users/<user>/Documents/.../<business_name>.app: resource fork, Finder information, or similar detritus not allowed
1>Xamarin.Shared.targets(2174,3): Error : Failed to codesign '/Users/<user>/Documents/.../<business_name>.app': /Users/<user>/Documents/.../<business_name>.app: resource fork, Finder information, or similar detritus not allowed
/Users/<user>/Library/Android/sdk/build-tools/34.0.0/zipalign -p 4 "obj/Debug/net7.0-android/android/bin/com.<business_name>.app.apk" "bin/Debug/net7.0-android//com.<business_name>.app-Signed.apk"
/Users/<user>/.sdkman/candidates/java/17.0.9-jbr/bin/java -jar /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/33.0.95/tools/apksigner.jar sign --ks "/Users/<user>/Library/Application Support/Xamarin/Mono for Android/debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 31 --max-sdk-version 33 bin/Debug/net7.0-android/com.<business_name>.app-Signed.apk
1>------- Finished building project: <business_name>.MobileApp. Succeeded: False. Errors: 2. Warnings: 34
Build completed in 00:00:31.903
Any insights or resolutions would be greatly appreciated.