Skip to content

Instantly share code, notes, and snippets.

@artemnovichkov
Last active April 11, 2018 07:11
Show Gist options
  • Save artemnovichkov/395b31e7b1d971fe5048b929300f3ea1 to your computer and use it in GitHub Desktop.
Save artemnovichkov/395b31e7b1d971fe5048b929300f3ea1 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
guard let productSettings = NSDictionary(contentsOfFile: productSettingsPath) else {
exit(1)
}
for key in keys {
guard let value = productSettings[key] as? String else {
// Missing key
exit(1)
}
if value.isEmpty {
// Empty description
exit(1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment