Skip to content

Instantly share code, notes, and snippets.

@fitsyu
Created July 6, 2019 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitsyu/a4e73655da42fa06d5b06c19805490a0 to your computer and use it in GitHub Desktop.
Save fitsyu/a4e73655da42fa06d5b06c19805490a0 to your computer and use it in GitHub Desktop.
Quickly generate Google Promises code

INTEGRATE WITH XCODE

  1. Paste the code
  2. Highlight It
  3. Right click to open the context menu
  4. Select Create Code Snippet
  5. Set the platform to iOS and the language to Swift
  6. Set the scope to Function or Method

HOW TO USE

  1. Get in the source code editor
  2. CTRL+SHIFT+L to open the snippet list
  3. Select this snippet
let promise = Promise<<#T#>> { fulfill, reject in
}
return promise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment