Reputation: 67
I try to write on Objective-C the Swift codes written on this tutorial.
I almost written all of it to Objective-C except for this part:
let tokenChars = UnsafePointer<CChar>(deviceToken.bytes)
My question is how can I write that part from Swift to Objective-C?
Upvotes: 0
Views: 716
Reputation:
Remember that Objective-C is a superset of C so you can look here to find out the answer:
C Syntax | Swift Syntax ------------------+---------------------------- char, signed char | CChar const Type * | UnsafePointer<Type>
So a Swift UnsafePointer<CChar>
is a Objective-C const char *
Upvotes: 1