Last active
April 11, 2018 07:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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