{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3646","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3646/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3646/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3646/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/3646","id":84784246,"number":3646,"title":"Pod frameworks are only codesigned if codesigning is required","user":{"login":"nschum","id":81999,"avatar_url":"https://avatars.githubusercontent.com/u/81999?v=3","gravatar_id":"","url":"https://api.github.com/users/nschum","html_url":"https://github.com/nschum","followers_url":"https://api.github.com/users/nschum/followers","following_url":"https://api.github.com/users/nschum/following{/other_user}","gists_url":"https://api.github.com/users/nschum/gists{/gist_id}","starred_url":"https://api.github.com/users/nschum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nschum/subscriptions","organizations_url":"https://api.github.com/users/nschum/orgs","repos_url":"https://api.github.com/users/nschum/repos","events_url":"https://api.github.com/users/nschum/events{/privacy}","received_events_url":"https://api.github.com/users/nschum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-03T21:44:04Z","updated_at":"2015-06-04T09:29:29Z","closed_at":null,"body":"After switching to `use_frameworks!`, my Mac app failed to run with the following error:\r\n\r\n    /Users/nik/Library/Developer/Xcode/DerivedData/App-hjgvbxcrkfmoglbubiknvpwqfcvj/Build/Products/Debug/App.app: code object is not signed at all\r\n    In subcomponent: /Users/nik/Library/Developer/Xcode/DerivedData/App-hjgvbxcrkfmoglbubiknvpwqfcvj/Build/Products/Debug/App.app/Contents/Frameworks/MASPreferences.framework\r\n    Command /usr/bin/codesign failed with exit code 1\r\n\r\nThe framework is unsigned because the `Pods-App-frameworks.sh` script only codesignes it if `CODE_SIGNING_REQUIRED` is set (which I believe is only the case on iOS).\r\n\r\n    Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh:\r\n    if [ \"${CODE_SIGNING_REQUIRED}\" == \"YES\" ]; then\r\n        code_sign \"${destination}/$1\"\r\n    fi\r\n\r\nI think instead it should always sign if the target is being signed, e.g. like this:\r\n\r\n    if [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" ]; then\r\n        code_sign \"${destination}/$1\"\r\n    fi\r\n"},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/108806154","html_url":"https://github.com/CocoaPods/CocoaPods/issues/3646#issuecomment-108806154","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3646","id":108806154,"user":{"login":"mrackwitz","id":1389011,"avatar_url":"https://avatars.githubusercontent.com/u/1389011?v=3","gravatar_id":"","url":"https://api.github.com/users/mrackwitz","html_url":"https://github.com/mrackwitz","followers_url":"https://api.github.com/users/mrackwitz/followers","following_url":"https://api.github.com/users/mrackwitz/following{/other_user}","gists_url":"https://api.github.com/users/mrackwitz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrackwitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrackwitz/subscriptions","organizations_url":"https://api.github.com/users/mrackwitz/orgs","repos_url":"https://api.github.com/users/mrackwitz/repos","events_url":"https://api.github.com/users/mrackwitz/events{/privacy}","received_events_url":"https://api.github.com/users/mrackwitz/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T09:29:29Z","updated_at":"2015-06-04T09:29:29Z","body":"Thanks for pointing out Nikolaj!\r\n\r\nAs `CODE_SIGNING_REQUIRED` is used to disable codesigning and as both build settings aren't officially documented anywhere, as far as I can tell, I would like to keep the first in conjunction in the condition as shown below.\r\n\r\n```bash\r\nif [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" && \"${CODE_SIGNING_REQUIRED}\" != \"NO\" ]; then\r\n    code_sign \"${destination}/$1\"\r\nfi\r\n```\r\n\r\nOtherwise Xcode could still expand `CODE_SIGN_IDENTITY` if it isn't explicitly cleared, e.g. by passing in only `CODE_SIGNING_REQUIRED=NO` via the command line.\r\n\r\nDoes that make any sense to you? Beside a PR, any source, which gives info when those build settings are supposed to be set, would be also more than welcome."}}