Skip to content

Instantly share code, notes, and snippets.

@bartlomiejn
Last active March 26, 2017 17:52
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 bartlomiejn/08ef56631ec98787eb5ea4139e78c711 to your computer and use it in GitHub Desktop.
Save bartlomiejn/08ef56631ec98787eb5ea4139e78c711 to your computer and use it in GitHub Desktop.
C bridge usage in Swift for swifty-explorations.ghost.io
let object = makeObject(("Value" as NSString).utf8String) // UnsafeMutableRawPointer? type
setNewStoredValue(object, ("New value" as NSString).utf8String)
print(String(cString: getStoredValue(object))) // New value
removeObject(object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment