Coder Social home page Coder Social logo

efprefix / swift_qrcodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apollozhu/swift_qrcodejs

0.0 0.0 0.0 235 KB

QRCodeSwift: cross-platform/watchOS QRCode generator in Swift (without CIFilter)

Home Page: https://apollozhu.github.io/swift_qrcodejs/

License: MIT License

Shell 1.06% Ruby 1.45% Objective-C 1.76% Swift 95.73%

swift_qrcodejs's Introduction

QRCodeSwift (swift_qrcodejs)

Latest Release MIT License Swift 5.0+ Compatible with All Platforms

Documentation Code Coverage CocoaPods Compatible Swift Package Manager Compatible Carthage Compatible

Cross-platform QRCode generator written in pure Swift, aiming to solve the awkward situation that there's no CIFilter for QRCode generation on Apple Watches.

Installation

Swift Package Manager
with Xcode

More details in the Official Guide, but in general:

  1. Select in the menu bar of Xcode: File > Swift Packages > Add Package Dependency
  2. Enter https://github.com/ApolloZhu/swift_qrcodejs.git
  3. Next, specify the version resolving rule as "Up to Next Major"
  4. Finish with choosing QRCodeSwift library and add it to your app target.
with Package.swift
dependencies: [
    .package(url: "https://github.com/ApolloZhu/swift_qrcodejs.git", from: "2.3.0"),
]

... then add QRCodeSwift module/target from package swift_qrcodejs as your dependency.

CocoaPods
pod 'swift_qrcodejs', '~> 2.3.0'
Carthage

I assume you know what you are doing (because I don't), but you probably need something like this:

github "ApolloZhu/swift_qrcodejs" ~> 2.3.0

Note that Carthage doesn't work with Xcode 12 (but here's a workaround).

Manually

Add all the .swift files from the Sources folder into your project.

Usage

import QRCodeSwift

guard let qrCode = try? QRCode("Hello World!") else {
    fatalError("Failed to generate QRCode")
}
print(qrCode.toString(filledWith: "##", patchedWith: "  "))

For more, checkout the documentation.

Example Projects

License

MIT License. Modified based on qrcodejs. See LICENSE and each individual file header for more information.

swift_qrcodejs's People

Contributors

apollozhu avatar chrisballinger avatar eyrefree avatar fossabot avatar joaodforce avatar

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.