Xcode 8 Beta error launching simulator

I have been having a problem with Xcode 8 beta where it won't launch my project on the simulator. It gives a code sign error 1 and has the following text in the error screen: "resource fork, finder information, or similar detritus not allowed". I have not added anything since I transitioned to the Beta and it worked fine on the previous release of XCode. Any thoughts on what to do to fix this?


My project is using Swift 2.3, not Swift 3. I have a dedicated development profile for the app that appears to be fine (the "signing" fields for my target list the profile as "enabled" so I assume that means it checks out). Not sure how to resolve this.


Any help greatly appreciated.

Accepted Answer

I fixed this issue by removing the resource info on some photoshop created png files that I manually copy into my application bundle.

You can use "ls -al@ file_names" to see the extra finder and resource info.

You can use "xattr -c file_names" to remove this info.

Answers

I cannot offer a solution, but I am seeing the same problem when signing a macOS Framework. The target codesigns perfectly with Xcode 7 on the same system. I have so far been unable to understand exactly what "detritus" code signing is complaining about.

Check your build target byt running:

ls -alF@

... in the build output folder. I think this might have something to do with the com.apple.FinderInfo which seems to be attached to my build products - but I can't delete using:

xattr -c

Thanks for the tip, that command shows that no extraneous FinderInfo is associated with the object code. The only file in the framework directory that does have FInderInfo is .DS_Store:

-rw-r--r--@ 1 gds wheel 6148 Jun 15 15:37 .DS_Store

com.apple.FinderInfo 32


Could that be what’s tripping codesign? Seems odd...


Contrary to the original poster, my project is entirely Objective-C for OS X. Other frameworks in the same project are being codesigned fine.

I tried your suggestion and I also got the following result in the Intermediate build folder:


-rw-r--r--@ 1 Ben staff 6148 Jun 15 20:11 .DS_Store

com.apple.FinderInfo 32


So, any thoughts on how to resolve this if this is the culprit?

I fixed this issue by removing the resource info on some photoshop created png files that I manually copy into my application bundle.

You can use "ls -al@ file_names" to see the extra finder and resource info.

You can use "xattr -c file_names" to remove this info.

Same here! A PNG file in the bundle happened to have a few bytes of Finder Info associated with it. Calling xattr -d com.apple.FinderInfo (IIRC) on that file fixed the problem.

Thank you. That worked. Found a random .png in art.scnassets that had a hidden Resource Fork on it. Once I got rid of that resource fork it compiled.

For me it was because my project folder was within a folder that synced to iCloud, moving it outside this folder into one that isn't synced and deleting the derived data folder fixed the issue.

This helped a lot. Same thing for me. XCode 8 beta 4 suddenly started complaining about this. Here is how I resolved it in details.


The error was


/Users/timevision/Library/Developer/Xcode/DerivedData/MyApp-fwnvtcqqgyeoaqbsvmfeuzvjiqdg/Build/Products/Debug-iphoneos/MyApp.app: resource fork, Finder information, or similar detritus not allowed



So basically do the following


cd "/Users/timevision/Library/Developer/Xcode/DerivedData/MyApp-fwnvtcqqgyeoaqbsvmfeuzvjiqdg/Build/Products/Debug-iphoneos/MyApp.app"

ls -al@ *


This will display any file that has extended attributes set. Look for any file that has @ at the end of the attributes. Mine was,


-rw-r--r--@ 1 timevision staff 9014 Aug 6 22:12 AppIcon20x20@3x.png

com.apple.FinderInfo 32

com.apple.metadata:_kMDItemUserTags 42


Then I remembered adding this bloody new AppIcon in photoshop recently. Going back to my "Images.xcassets/AppIcon.appiconset" path I saw the file indeed has the extended attributes set.


Then I used "xattr -c *" cmd to clear all extended attributes for the icon files, and recompiled. Now XCode no longer complains, codesign works and runs fine now. Hope this helps.

Thank you so much, I've just spent hours trying to figure out what was causing this error and your post solved it. Thank you.

The easy way (which will do all png files) I used:


find . -name "*.png" -exec xattr -c {} \;

Thank you so much . This helps me alot .

Thankyou for the steps, took me a few attempts to get into the path but once I did, and went into \Resources\ I could remove the extra info as you demonstrate. Now compiles again. Cheers

This helps a lot ! Xcode 8 seems to have so many problems. I wonder if it went through UAT.

Thank you very much...after being "sick" for a while, this solved my problem with error codesign...


But I do not understand why suddenly this appears...I mean in Xcode7 the project with working correctly, but not in Xcode8... is this a bug in the new version?