Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile for Swift3 & iOS 10.2 target #1

Open
jaimeyu opened this issue Feb 10, 2017 · 1 comment
Open

Does not compile for Swift3 & iOS 10.2 target #1

jaimeyu opened this issue Feb 10, 2017 · 1 comment

Comments

@jaimeyu
Copy link

jaimeyu commented Feb 10, 2017

After running the migration tool at start up to bring it up to Swift3, I hit this compilation error on line:
let enableBytes = Data(bytes: UnsafePointer(&enableValue), count: sizeof(UInt8))

Error: ZeroToBLE-Part2-Swift-master/BLETemperatureReaderSwift/BLETemperatureReaderSwift/TemperatureViewController.swift:482:43: Ambiguous use of 'init'

@jaimeyu
Copy link
Author

jaimeyu commented Feb 10, 2017

Perhaps a fix for Swift 3 is:

        let enableValue:UInt8 = 1
        let enableBytes = Data(bytes: [enableValue])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant