ios - unsupported resource found (something not a directory, file or symlink) - xcode 7.2
Asked Answered
E

1

6

unsupported resource found (something not a directory, file or symlink) Command /usr/bin/codesign failed with exit code 1

It's like duplicate but not duplicate. Please have a look.

Complete error log :

/usr/bin/codesign --force --sign 491E340B5E328D23372C090BB9ED8E9E2D610AE1 --entitlements /Users/aCompanyname/Library/Developer/Xcode/DerivedData/aAppName-cstkxztmaerbnbcjdfhqxaugmcbi/Build/Intermediates/ArchiveIntermediates/aAppName/IntermediateBuildFilesPath/aAapName.build/Release-iphoneos/aAapName.build/aAapName.app.xcent --timestamp=none /Users/aCompanyname/Library/Developer/Xcode/DerivedData/aAapName-cstkxztmaerbnbcjdfhqxaugmcbi/Build/Intermediates/ArchiveIntermediates/aAapName/InstallationBuildProductsLocation/Applications/aAapName.app

/Users/aCompanyname/Library/Developer/Xcode/DerivedData/aAapName-cstkxztmaerbnbcjdfhqxaugmcbi/Build/Intermediates/ArchiveIntermediates/aAapName/InstallationBuildProductsLocation/Applications/aAapName.app:

unsupported resource found (something not a directory, file or symlink) Command /usr/bin/codesign failed with exit code 1

It happens sudden when generating build. after spend some time on different forums i have checked all the things in Keychain access and developer account and also in xcode for code signing. Everything is looks good. cant find actual problem.

Please share solution or any idea if anyone have. Thank you.

Extraterritoriality answered 19/5, 2016 at 6:52 Comment(2)
I'm only guessing, but the error message seems to be saying that there's something it doesn't know how to deal with inside the app. If you visit the .app in Finder and use "Show Package Contents" does anything in there seem wrong?Riyadh
Thanks @Phillip looked into it. its fine with all the frameworks and assetsExtraterritoriality
G
17

I encountered this error when I had a named pipe lurking somewhere inside my app bundle. As the error states, it is not a directory, file or symlink. It's also a real pain to find as it's hidden to finder, so you need to use ls -la in a terminal to find it - you can tell an entry is a named pipe if it starts with a "p" (e.g., prw-------@).

One app I know that leaves named pipes lying around is the Realm Browser. This generates some .realm.note named pipes. If you happen to use a realm file inside your app bundle (e.g., a read only or pre-set up database), make sure you delete it, gitignore *.realm.note and be careful of them whenever you use the Realm browser!

Obviously, it would be more helpful if the error left on codesign could give you the location of the offending named pipe, and I've filed a radar for this: rdar://28666836

Glenine answered 7/10, 2016 at 7:53 Comment(5)
For me, the .realm.note file was buried inside the xctest bundle, and injected into the app bundle when running tests. Thanks!! This file is dangerous as hell..Kenzie
I got this also, when performing Unit Tests before UI tests. We have unit tests that have realm databases bundled in them, and the realm dbs are opened during the tests. As a quick workaround for now we're just running the UI Tests before we run the unit tests.Merilee
how can I avoid this? I always have to delete the DerivedData-directory - I'm also using a default.realm in my unit test bundleDerte
I too was tired of deleting the Derived Data folder after each run. Instead I've added a run script to the faulty project (an internal framework in my case): rm -rf $CODESIGNING_FOLDER_PATH/realmFile.realm.note rm -rf $CODESIGNING_FOLDER_PATH/realmFile.realm.lock rm -rf $CODESIGNING_FOLDER_PATH/realmFile.realm.managementIncommunicable
We saw the same issue when loading realm snapshots in unit tests. The solution was not to load realm snapshots at their path in the test bundle but to first move them to the path where the default realm file lies - overwriting the default realm file with the snapshot to load. That way realm will clean up after itself. TLDR: Replace the file located at Realm.Configuration.defaultConfiguration.fileURL with the realm file that you want to load and it should work.Holily

© 2022 - 2024 — McMap. All rights reserved.