{"id":24861,"date":"2019-04-03T14:30:58","date_gmt":"2019-04-03T18:30:58","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=24861"},"modified":"2019-10-31T15:19:25","modified_gmt":"2019-10-31T19:19:25","slug":"xcode-custom-search-scopes","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/04\/03\/xcode-custom-search-scopes\/","title":{"rendered":"Xcode Custom Search Scopes"},"content":{"rendered":"<p><a href=\"https:\/\/pfandrade.me\/blog\/xcode-search-scopes\/\">Paulo Andrade<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pfandrade.me\/blog\/xcode-search-scopes\/\">\n<p>In my case, my source code comes down to Objective-C, C, and Swift files. So I just create a code that search for any file with the .m, .h, .c and .swift extensions.<\/p>\n<p>[&#8230;]<\/p>\n<p>But most of the time when searching for localized strings I&rsquo;m just interested in the Base localization. I never touch the translated files inside Xcode, these are synced with my translation service. So by using this scope, whenever I&rsquo;m searching for a localized string I just get back the base localization files.<\/p>\n<p>[&#8230;]<\/p>\n<p>Last but not least, when your working on a given feature it&rsquo;s usual to have a set of modified files you&rsquo;re working on. Sometimes you&rsquo;ll want to search for something on only this set of related files.<\/p>\n<\/blockquote>\n\n<p id=\"xcode-custom-search-scopes-update-2019-10-31\">Update (2019-10-31): <a href=\"https:\/\/ericasadun.com\/2019\/10\/27\/fun-with-xcode-search-domains-excluding-match-text\/\">Erica Sadun<\/a>:<\/p>\n<blockquote cite=\"https:\/\/ericasadun.com\/2019\/10\/27\/fun-with-xcode-search-domains-excluding-match-text\/\">\n<p>Now, interestingly enough, this list fails to offer &ldquo;does not contain&rdquo; but that&rsquo;s fairly easy to work around. Since Xcode supports regex matching, you can easily replicate &ldquo;does not contain&rdquo; with an appropriate regex.<\/p>\n<\/blockquote>\n<p>You can also do a regular <strong>contains<\/strong> match and put it inside a <strong>None of the following conditions are met<\/strong> group.<\/p>","protected":false},"excerpt":{"rendered":"<p>Paulo Andrade: In my case, my source code comes down to Objective-C, C, and Swift files. So I just create a code that search for any file with the .m, .h, .c and .swift extensions. [&#8230;] But most of the time when searching for localized strings I&rsquo;m just interested in the Base localization. I never [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-04-03T18:31:00Z","apple_news_api_id":"6e57db09-5460-48fc-a1dc-96cd25122a17","apple_news_api_modified_at":"2019-10-31T19:19:30Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AblfbCVRgSPyh3JbNJRIqFw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[309,30,1609,71,376,226],"class_list":["post-24861","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-localization","tag-mac","tag-macos-10-14","tag-programming","tag-versioncontrol","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=24861"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24861\/revisions"}],"predecessor-version":[{"id":27109,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24861\/revisions\/27109"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=24861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=24861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=24861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}