nuclearace / Socket.IO-Client-Swift

socket.io-client for Swift
Other
361 stars 53 forks source link

SecRandomCopyBytes issue when switching Swift 1.2 #40

Closed mikezucc closed 9 years ago

mikezucc commented 9 years ago

Figured its an obvious fix but it had me baffled until I noticed the error >.< long day lmao

Swift 1.2 uses func SecRandomCopyBytes(rnd: SecRandomRef, count: Int, bytes: UnsafeMutablePointer) -> Int32 rather than func SecRandomCopyBytes(rnd: SecRandomRef, count: UInt, bytes: UnsafeMutablePointer) -> Int32

So just change the UInt(sizeof(UInt32)) to Int(sizeof(UInt32))

nuclearace commented 9 years ago

What

nuclearace commented 9 years ago

Can you explain where you're getting this error? Because I've not seen any warnings or errors

mikezucc commented 9 years ago

there was a distinction between Uint and Int being taken as parameters to this function. thats all

nuclearace commented 9 years ago

It should've be fixed in the latest version a while ago.