Wednesday, April 3, 2019 [Tweets] [Favorites]

Xcode Custom Search Scopes

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.

[…]

But most of the time when searching for localized strings I’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’m searching for a localized string I just get back the base localization files.

[…]

Last but not least, when your working on a given feature it’s usual to have a set of modified files you’re working on. Sometimes you’ll want to search for something on only this set of related files.

Update (2019-10-31): Erica Sadun:

Now, interestingly enough, this list fails to offer “does not contain” but that’s fairly easy to work around. Since Xcode supports regex matching, you can easily replicate “does not contain” with an appropriate regex.

You can also do a regular contains match and put it inside a None of the following conditions are met group.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment