firstfloorsoftware / flutter_sodium

Flutter bindings for libsodium
BSD 3-Clause "New" or "Revised" License
102 stars 46 forks source link

Update to swift 5 & fix all warnings in code! #16

Closed rmtmckenzie closed 5 years ago

rmtmckenzie commented 5 years ago

This was a big of a large undertaking but I was annoyed by the 350+ warnings showing up every time I did an iOS build in XCode.

This has updated the code to be more in line with how things should be done in Swift 5 as far as I know (I'm not an expert though). I'm slightly concerned about the int8Array extension to FlutterStandardTypedData as it does bind the memory to int8 - it's possible that could be done better by copying the data to an int8 array properly, but I thought this would probably be quicker. But if you were to then say try rebinding the data to a different type it could cause problems. So if that's a concern for you as well let me know and I'll look into a better way of doing it (or you could suggest something if you have a better idea!).