Last active
January 24, 2017 21:48
-
-
Save maximveksler/3363115092f9eea72aae81a5238b02e6 to your computer and use it in GitHub Desktop.
Using #ifdef Xcode to detect debug builds in Swift
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
func _hackon_FacebookGET(_ stdin: FileHandle) -> Data { | |
#if Xcode | |
return "{\"httpMethod\":\"GET\", \"queryStringParameters\":{\"hub.mode\":\"subscribe\",\"hub.challenge\":\"56922036\",\"hub.verify_token\":\"Swift time is the best time\"},\"body\":null,\"isBase64Encoded\":false}".data(using: .utf8)! | |
#else | |
return stdin.readDataToEndOfFile() | |
#endif | |
} | |
let input = try Jay().jsonFromData(_hackon_FacebookGET(FileHandle.standardInput)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment