{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments/31666640","id":31666640,"diff_hunk":"@@ -28,11 +24,13 @@\n  */\n #define FBSnapshotVerifyViewWithOptions(view__, identifier__, suffixes__) \\\n { \\\n+NSString *envReferenceImageDirectory = [NSProcessInfo processInfo].environment[@\"FB_REFERENCE_IMAGE_DIR\"]; \\","path":"FBSnapshotTestCase/FBSnapshotTestCase.h","position":15,"original_position":15,"commit_id":"d5ac2348ecf8a73c98f58a7ccd4620b5b016de0b","original_commit_id":"d5ac2348ecf8a73c98f58a7ccd4620b5b016de0b","user":{"login":"pietbrauer","id":759730,"avatar_url":"https://avatars.githubusercontent.com/u/759730?v=3","gravatar_id":"","url":"https://api.github.com/users/pietbrauer","html_url":"https://github.com/pietbrauer","followers_url":"https://api.github.com/users/pietbrauer/followers","following_url":"https://api.github.com/users/pietbrauer/following{/other_user}","gists_url":"https://api.github.com/users/pietbrauer/gists{/gist_id}","starred_url":"https://api.github.com/users/pietbrauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pietbrauer/subscriptions","organizations_url":"https://api.github.com/users/pietbrauer/orgs","repos_url":"https://api.github.com/users/pietbrauer/repos","events_url":"https://api.github.com/users/pietbrauer/events{/privacy}","received_events_url":"https://api.github.com/users/pietbrauer/received_events","type":"User","site_admin":false},"body":"Yeah, I tried that out. The problem is that is is defined in the Application target. For my understanding this is too late. I get the following output when using `-D FB_REFERENCE_IMAGE_DIR=\"\\\"$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages\\\"\"` the output directory is\r\n\r\n* __Objective-C__: `/Users/piet.brauer/Documents/Projekte/iOS/ios-snapshot-test-case/FBSnapshotTestCaseDemo/FBSnapshotTestCaseDemoTests/ReferenceImages_64`\r\n* __Swift__: `/Users/piet.brauer/Documents/Projekte/iOS/ios-snapshot-test-case/FBSnapshotTestCaseDemo/Pods/PodsTests/ReferenceImages_64`\r\n\r\nI pushed to another branch for you to try it out: https://github.com/xing/ios-snapshot-test-case/tree/swift_old_macro","created_at":"2015-06-03T20:32:57Z","updated_at":"2015-06-03T20:32:57Z","html_url":"https://github.com/facebook/ios-snapshot-test-case/pull/87#discussion_r31666640","pull_request_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments/31666640"},"html":{"href":"https://github.com/facebook/ios-snapshot-test-case/pull/87#discussion_r31666640"},"pull_request":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87","id":36805100,"html_url":"https://github.com/facebook/ios-snapshot-test-case/pull/87","diff_url":"https://github.com/facebook/ios-snapshot-test-case/pull/87.diff","patch_url":"https://github.com/facebook/ios-snapshot-test-case/pull/87.patch","issue_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/87","number":87,"state":"open","locked":false,"title":"[WIP] Add Swift support","user":{"login":"pietbrauer","id":759730,"avatar_url":"https://avatars.githubusercontent.com/u/759730?v=3","gravatar_id":"","url":"https://api.github.com/users/pietbrauer","html_url":"https://github.com/pietbrauer","followers_url":"https://api.github.com/users/pietbrauer/followers","following_url":"https://api.github.com/users/pietbrauer/following{/other_user}","gists_url":"https://api.github.com/users/pietbrauer/gists{/gist_id}","starred_url":"https://api.github.com/users/pietbrauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pietbrauer/subscriptions","organizations_url":"https://api.github.com/users/pietbrauer/orgs","repos_url":"https://api.github.com/users/pietbrauer/repos","events_url":"https://api.github.com/users/pietbrauer/events{/privacy}","received_events_url":"https://api.github.com/users/pietbrauer/received_events","type":"User","site_admin":false},"body":"Add `FBSnapshotTestVerifyView:indentifier:` and `FBSnapshotTestVerifyLayer:identifier` as macros don't work that well in Swift one has to workaround and use methods instead.\r\nCurrent limitation is that the failure description is not displayed inline when a test fails. One has to look into the console.\r\n\r\nBut maybe @modocache has an answer to that?","created_at":"2015-06-03T07:29:45Z","updated_at":"2015-06-03T20:32:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"828f7be9071a8f3396f1008b79107cd9c33a1deb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87/commits","review_comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87/comments","review_comment_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/87/comments","statuses_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/d5ac2348ecf8a73c98f58a7ccd4620b5b016de0b","head":{"label":"xing:swift","ref":"swift","sha":"d5ac2348ecf8a73c98f58a7ccd4620b5b016de0b","user":{"login":"xing","id":27901,"avatar_url":"https://avatars.githubusercontent.com/u/27901?v=3","gravatar_id":"","url":"https://api.github.com/users/xing","html_url":"https://github.com/xing","followers_url":"https://api.github.com/users/xing/followers","following_url":"https://api.github.com/users/xing/following{/other_user}","gists_url":"https://api.github.com/users/xing/gists{/gist_id}","starred_url":"https://api.github.com/users/xing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xing/subscriptions","organizations_url":"https://api.github.com/users/xing/orgs","repos_url":"https://api.github.com/users/xing/repos","events_url":"https://api.github.com/users/xing/events{/privacy}","received_events_url":"https://api.github.com/users/xing/received_events","type":"Organization","site_admin":false},"repo":{"id":36787180,"name":"ios-snapshot-test-case","full_name":"xing/ios-snapshot-test-case","owner":{"login":"xing","id":27901,"avatar_url":"https://avatars.githubusercontent.com/u/27901?v=3","gravatar_id":"","url":"https://api.github.com/users/xing","html_url":"https://github.com/xing","followers_url":"https://api.github.com/users/xing/followers","following_url":"https://api.github.com/users/xing/following{/other_user}","gists_url":"https://api.github.com/users/xing/gists{/gist_id}","starred_url":"https://api.github.com/users/xing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xing/subscriptions","organizations_url":"https://api.github.com/users/xing/orgs","repos_url":"https://api.github.com/users/xing/repos","events_url":"https://api.github.com/users/xing/events{/privacy}","received_events_url":"https://api.github.com/users/xing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xing/ios-snapshot-test-case","description":"Snapshot view unit tests for iOS","fork":true,"url":"https://api.github.com/repos/xing/ios-snapshot-test-case","forks_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/forks","keys_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/teams","hooks_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/hooks","issue_events_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/issues/events{/number}","events_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/events","assignees_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/assignees{/user}","branches_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/branches{/branch}","tags_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/tags","blobs_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/git/refs{/sha}","trees_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/statuses/{sha}","languages_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/languages","stargazers_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/stargazers","contributors_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/contributors","subscribers_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/subscribers","subscription_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/subscription","commits_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/commits{/sha}","git_commits_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/git/commits{/sha}","comments_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/comments{/number}","issue_comment_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/issues/comments{/number}","contents_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/contents/{+path}","compare_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/merges","archive_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/downloads","issues_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/issues{/number}","pulls_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/pulls{/number}","milestones_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/milestones{/number}","notifications_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/labels{/name}","releases_url":"https://api.github.com/repos/xing/ios-snapshot-test-case/releases{/id}","created_at":"2015-06-03T07:28:11Z","updated_at":"2015-06-03T07:28:12Z","pushed_at":"2015-06-03T20:31:44Z","git_url":"git://github.com/xing/ios-snapshot-test-case.git","ssh_url":"git@github.com:xing/ios-snapshot-test-case.git","clone_url":"https://github.com/xing/ios-snapshot-test-case.git","svn_url":"https://github.com/xing/ios-snapshot-test-case","homepage":null,"size":960,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"4f6fd332e7911023e513c4e9cfc5430c7950d339","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":13236289,"name":"ios-snapshot-test-case","full_name":"facebook/ios-snapshot-test-case","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/ios-snapshot-test-case","description":"Snapshot view unit tests for iOS","fork":false,"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case","forks_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/forks","keys_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/teams","hooks_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/hooks","issue_events_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/events","assignees_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/tags","blobs_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/languages","stargazers_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/stargazers","contributors_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/contributors","subscribers_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/subscribers","subscription_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/subscription","commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/merges","archive_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/downloads","issues_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/labels{/name}","releases_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/releases{/id}","created_at":"2013-10-01T06:15:56Z","updated_at":"2015-06-03T09:43:33Z","pushed_at":"2015-06-03T16:12:13Z","git_url":"git://github.com/facebook/ios-snapshot-test-case.git","ssh_url":"git@github.com:facebook/ios-snapshot-test-case.git","clone_url":"https://github.com/facebook/ios-snapshot-test-case.git","svn_url":"https://github.com/facebook/ios-snapshot-test-case","homepage":null,"size":960,"stargazers_count":1298,"watchers_count":1298,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":6,"forks":98,"open_issues":6,"watchers":1298,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87"},"html":{"href":"https://github.com/facebook/ios-snapshot-test-case/pull/87"},"issue":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/87"},"comments":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/d5ac2348ecf8a73c98f58a7ccd4620b5b016de0b"}}}}