Git Product home page Git Product logo

google / jacquardsdkios Goto Github PK

View Code? Open in Web Editor NEW
16.0 9.0 5.0 8.68 MB

Jacquard™ by Google weaves new digital experiences into the things you love, wear, and use every day to give you the power to do more and be more. Jacquard SDK is a way to connect Jacquard interactions within your apps. Create an app and bring it to life with gestures, lights and haptics through the Jacquard SDK.

Home Page: https://google.github.io/JacquardSDKiOS

License: Apache License 2.0

Swift 98.96% Ruby 0.16% Python 0.50% Shell 0.38%

jacquardsdkios's Introduction

Jacquard iOS SDK

Jacquard™ by Google weaves new digital experiences into the things you love, wear, and use every day to give you the power to do more and be more. Jacquard SDK is a way to connect Jacquard interactions within your apps. Create an app and bring it to life with swipes and taps through the Jacquard SDK.

What do I need to get started?

The iOS Jacquard SDK supports iOS versions 13 and greater.

You will need the Jacquard Tag with a supported Jacquard product (all come with one tag). Currently supported products are:

  • Levi's Trucker Jacket
  • Samsonite Konnect-i backpack
  • Saint Laurent Cit-e Backpack

You can find links to purchase these products on the Google Jacquard website.

If you have just opened a new retail Jacquard product, your tag probably needs a firmware update (and perhaps charging). Review the steps in the Updating Firmware page.

Join the Jacquard community!

Join the Jacquard iOS SDK discussion on GitHub.

Learn more about Google Jaquard and sign up for Jacquard updates at the Jacquard by Google website.

Sample App

To run the example project, clone the repo, and run pod install from the Example directory first. For more detailed instructions, see the full documentation at https://google.github.io/JacquardSDKiOS

Documentation & Tutorial

Full documentation including a tutorial is available at https://google.github.io/JacquardSDKiOS

Android SDK

There is an Android equivalent to this SDK available at https://github.com/google/JacquardSDKAndroid

Integrate JacquardSDK into your Xcode project

CocoaPods

JacquardSDK can be integrated into your code using CocoaPods dependency management. This early release version has not yet been added to the CocoaPods directory, the best way to integrate it is using a git url. Simply add the following line to your Podfile:

pod 'JacquardSDK'

Swift Package Manager - with Xcode project

If you are using the Swift Package Manager with an Xcode project file, for xcode 13, navigate to your project settings, where you will see a new menu called Package Dependencies. Click the + button to add JacquardSDK package.

Enter the repository URL https://github.com/google/JacquardSDKiOS.git.

As soon as you enter the URL, xcode will find the JacquardSDKiOS package, for the dependancy rule, use the default values : "Up to Next Major Version" and again click Add Package.

Check the JacquardSDK Library and click Add Package.

Xcode will now download all the relevant files and integrate them into your project.

Swift Package Manager - with Package.swift

If you are using the Swift Package Manager with a Package.swift file, you need to add a dependency to your and import the JacquardSDK library into the desired targets.

dependencies: [
    .package(name: "JacquardSDK", url: "https://github.com/google/JacquardSDKiOS.git", from: "0.2.0"),
],
targets: [
    .target(name: "MyTarget", dependencies: ["JacquardSDK"]),
]

Copyright

Copyright 2021 Google LLC

License

JacquardSDK is licensed under the Apache License, Version 2.0. See the LICENSE file for more info.

jacquardsdkios's People

Contributors

spencerg42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jacquardsdkios's Issues

JacquardManagerImplementation() causes a runtime exception

Relying on both default arguments to init() compiles but results in a runtime exception.

This is due to Objective-C classes (erroneously?) generating the following in the swiftinterface:

@objc override dynamic public init()

This is also noted here: https://github.com/bielikb/xcframeworks#testing--troubleshooting

This should be able to be resolved by manually implementing init(). Worst case we can remove one (or both) of the default arguments.

Duplicate connection issue when connecting in SwiftUI View

I'm trying to create custom Jacquard app based on examples in this repository. I've to adapt code lifecycle a bit to make it to work with SiwftUI.

Expectation

Function called to connect to the tag. Then monitor connection status before continue to the next view

Actual result

During .connect() SDK encounter JacquardSDK.TagConnectionError.internalError exception before hit .catch handler

Repository of the project can be found here

tag connect request
F8EBF235-DDE2-BAC5-E979-AE7CC1BFE210
nil
2022-08-05 23:49:58.415359+0700 Jacquard RTC[2345:545375] [UIFocus] _TtGC7SwiftUI14_UIHostingViewVS_7AnyView_ implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.
[ERROR] No transition found for (bluetoothConnected, didConnect(<JacquardSDK.PeripheralImplementation: 0x282988940>))
[ERROR] No transition found for (disconnected, didDiscoverServices([<CBService: 0x283c20e40, isPrimary = YES, UUID = D2F2BF0D-D165-445C-B0E1-2D6B642EC57B>, <CBService: 0x283c20e80, isPrimary = YES, UUID = Battery>]))
[INFO] State machine is already terminal, ignoring event: didConnect(<JacquardSDK.PeripheralImplementation: 0x2829d4220>)
[ERROR] No transition found for (error(JacquardSDK.TagConnectionError.internalError), didConnect(<JacquardSDK.PeripheralImplementation: 0x2829d4220>))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.