Has anyone attempted to build a metawear app using mostly SwiftUI?

I am asking because I am encountering some weirdly unexplainable issues with my app and saw the word "SwiftUI" is not mentioned once on this forum. Please let me know if you think I will run into any difficulties! I can't imagine any, but it doesn't hurt to check.


  • But swiftUI is just a UI library. It has nothing to do with our sensors and APIs. I don't know why it would be mentioned in the forum at all.

  • edited January 2022


    We're building a Swift SDK using Combine. It's less verbose, ditches Bolts, and requires no unsafe Swift.

    We're wrapping up a tutorial series with SwiftUI demo apps. Given your SwiftUI work, I'd love to hear your reaction to the current draft. Reading is a bit smoother in Xcode's doc browser, but the HTML version is fine. To use Xcode, double click a DocC archive here or clone the SDK package and press Control Shift CMD D to build the docs.

    For flavor, here’s a snippet logging a variant selection of sensors.

    downloadPipeline = metawear
        .sink(receiveCompletion: { [weak self] in
            self?.displayError(ifFound: $0)
        }, receiveValue: { [weak self] in

    Here’s a snippet that flashes the LEDs in purple or blue when pressing or releasing the MetaWear button.

    macroSub = metawear?
        .command(.macroStartRecording(runOnStartup: true))
        .recordEvents(for: .buttonUp, { recording in
        .recordEvents(for: .buttonDown, { recording in
        .sink(receiveCompletion: { _ in }, receiveValue: { _ in })
Sign In or Register to comment.