Edited.
The question in fact is how to clear the finder detritus that were created by previous versions of the system.
I've tried to clear from terminal, using xattr -lc command ; extended attributes seem to have been clerad, but strill get the same message and build error :
/Users/Me/Library/Developer/Xcode/DerivedData/myApp-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/myApp.app: resource fork, Finder information, or similar detritus not allowed
Are there other attributes to clear ?
I read in doc :
A: This is a security hardening change that was introduced with iOS 10, macOS Sierra, watchOS 3, and tvOS 10.
Code signing no longer allows any file in an app bundle to have an extended attribute containing a resource fork or Finder info.
To see which files are causing this error, run this command in Terminal:
$ xattr -lr <path_to_app_bundle>
replacing
<path_to_app_bundle>
with the path to your actual app bundle.Here's an example of this command in action:
$ xattr -lr Foo.app
/Applications/Foo.app: com.apple.FinderInfo:
00000000 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 |................|
You can also remove all extended attributes from your app bundle with the xattr command:
$ xattr -cr <path_to_app_bundle>
Note that browsing files within a bundle with Finder's Show Package Contents command can cause Finder info to be added to those files.
I performed the $ xattr -cr, without any change : all finder info seems to be cleared, but same codesign error
Question: which is the path to specify ?
- Is it the one in derivedData ? : /Users/ME/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/P\ T.app
- the second one ? /Users/ME/Developpements XCode/P T/StartPT
- the third, with no escape in the file name ? /Users/ME/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/P T.app
- I did also a clean on the project root path as defined in Identity and Type of the project.
here is the codesign error I get:
CodeSign /Users/ME/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/P\ T.app
cd "/Users/ME/Developpements XCode/P T/StartPT"
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "Mac Developer: ME (XXXXXXXXXX)"
/usr/bin/codesign --force --sign ZZZZZZZZZZZZZZZZZZZZZZ --entitlements /Users/me/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Intermediates/P\ T.build/Debug/P\ T.build/P\ T.app.xcent --timestamp=none /Users/ME/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/P\ T.app
/Users/ME/Library/Developer/Xcode/DerivedData/P_T-hknqslligudgdhdhpwvfhpbtcilk/Build/Products/Debug/P T.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1