Skip to content

Instantly share code, notes, and snippets.

@artemnovichkov
Last active April 11, 2018 07:11
Show Gist options
  • Save artemnovichkov/8125f5abc1ba82a300b30b0b9c8b94b3 to your computer and use it in GitHub Desktop.
Save artemnovichkov/8125f5abc1ba82a300b30b0b9c8b94b3 to your computer and use it in GitHub Desktop.
Code example for the article "Swift, Plist and Two Smoking Scripts" https://medium.com/rosberryapps/swift-plist-and-two-smoking-scripts-94bb54cbeded
var keys: [String] = []
for url in swiftFileURLs {
let contents = try String(contentsOf: url, encoding: .utf8)
for (pattern, key) in patterns {
if contents.contains(pattern) {
keys.append(key)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment