{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2695","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2695/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2695/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2695/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/2695","id":46177635,"number":2695,"title":"'Failed to import bridging header' when executing test target","user":{"login":"azubala","id":2588925,"avatar_url":"https://avatars.githubusercontent.com/u/2588925?v=3","gravatar_id":"","url":"https://api.github.com/users/azubala","html_url":"https://github.com/azubala","followers_url":"https://api.github.com/users/azubala/followers","following_url":"https://api.github.com/users/azubala/following{/other_user}","gists_url":"https://api.github.com/users/azubala/gists{/gist_id}","starred_url":"https://api.github.com/users/azubala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azubala/subscriptions","organizations_url":"https://api.github.com/users/azubala/orgs","repos_url":"https://api.github.com/users/azubala/repos","events_url":"https://api.github.com/users/azubala/events{/privacy}","received_events_url":"https://api.github.com/users/azubala/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/labels/d1:easy","name":"d1:easy","color":"00B952"},{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/labels/s2:confirmed","name":"s2:confirmed","color":"E2A72C"},{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/labels/t2:defect","name":"t2:defect","color":"6902E1"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2014-10-18T14:56:07Z","updated_at":"2015-12-24T03:07:25Z","closed_at":"2015-08-29T20:28:19Z","body":"🌈\r\n\r\nWhen swift project uses ObjC pods via the bridging header the main target can be compiled and run without any issues. When tests are executed on the same project it fails with an error:\r\n```\r\n[...]/Foo/Foo/Foo-Bridging-Header.h:9:9: error: 'AFNetworking/AFNetworking.h' file not found\r\n#import <AFNetworking/AFNetworking.h>\r\n        ^\r\n[...]/Foo/FooTests/FooTests.swift:13:8: error: failed to import bridging header '[...]/Foo/Foo/Foo-Bridging-Header.h'\r\nimport Foo\r\n```\r\nPlease find the demo project [here](https://dl.dropboxusercontent.com/u/2847317/ext/Foo.zip).\r\n\r\nPlease also note that the project's module has to be imported in order to reference production classes from tests.\r\n\r\nContrary, when using bridging header for ObjC classes checked in the project, I can execute tests without any issues."},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/167033446","html_url":"https://github.com/CocoaPods/CocoaPods/issues/2695#issuecomment-167033446","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2695","id":167033446,"user":{"login":"kylerobson","id":986415,"avatar_url":"https://avatars.githubusercontent.com/u/986415?v=3","gravatar_id":"","url":"https://api.github.com/users/kylerobson","html_url":"https://github.com/kylerobson","followers_url":"https://api.github.com/users/kylerobson/followers","following_url":"https://api.github.com/users/kylerobson/following{/other_user}","gists_url":"https://api.github.com/users/kylerobson/gists{/gist_id}","starred_url":"https://api.github.com/users/kylerobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylerobson/subscriptions","organizations_url":"https://api.github.com/users/kylerobson/orgs","repos_url":"https://api.github.com/users/kylerobson/repos","events_url":"https://api.github.com/users/kylerobson/events{/privacy}","received_events_url":"https://api.github.com/users/kylerobson/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T03:07:25Z","updated_at":"2015-12-24T03:07:25Z","body":"I still had this issue where I put empty \"target 'FooTests' do end\" sections for UI/unit tests. I solved it by adding a pod to each of those targets. Not ideal, so I assume cocoapods needs some work to handle it. Once I added a pod, I had a different xcconfig for each target, and I think that's the crucial part to avoid duplicate symbols while also avoiding the \"unable to import bridging header\" error."}}