Giter Site home page Giter Site logo

Swift 4 about barcodescanner HOT 10 CLOSED

hyperoslo avatar hyperoslo commented on May 19, 2024
Swift 4

from barcodescanner.

Comments (10)

 avatar commented on May 19, 2024 2

@DavidLari I don't mind fixing what I've done to support iOS 9. I was operating under the assumption that anyone needing a barcode scanner would have abandoned old versions of iOS long ago. I'll make the change to support iOS 9.0 and higher before I submit my PR.

@Patchivic I've already fixed those two errors and figured out why data is no longer read from the camera metadata.

from barcodescanner.

 avatar commented on May 19, 2024 2

Is everyone ok with iOS 9.3 as the Deployment Target?
That version will support:

  • iPhone 4S and greater
  • iPod Touch 5th Gen and greater
  • iPad 2 and greater

Supporting iOS 8 adds no additional devices.
Supporting iOS 7 adds iPhone 4 and iPod 4. But Xcode 9 can't go back that far anyway.
See https://en.wikipedia.org/wiki/List_of_iOS_devices

Supporting iOS 10.3 Drops the following devices from the above list.

  • iPhone 4S
  • iPod 5th Gen
  • iPad 3rd Gen
    Everything else can run iOS 10.3

Does anyone need those three devices?

from barcodescanner.

skofgar avatar skofgar commented on May 19, 2024 1

By supporting iOS 9 you have 98% of all iOS devices, so I think choosing iOS 9.x is good.

https://developer.apple.com/support/app-store/

from barcodescanner.

 avatar commented on May 19, 2024 1

#64

from barcodescanner.

vadymmarkov avatar vadymmarkov commented on May 19, 2024

Sounds great @chadcummings We would love to see your PR 😉

from barcodescanner.

MohdElBasyouni avatar MohdElBasyouni commented on May 19, 2024

I have made the changes using the Xcode converter itself. But I do have 2 errors for below 2 lines in BarcodeScannerController.swift

  1. guard metadataObjects != nil && !metadataObjects.isEmpty else { return }
    Error : Comparing non-optional value of type '[AVMetadataObject]' to nil always returns true

  2. code = code.substring(from: index)
    Error : 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator.

But the scanner is no longer reading the data :) :)

from barcodescanner.

DavidLari avatar DavidLari commented on May 19, 2024

I hope it's not going to be too hard to backport iOS 9.x support into Chad's version because some of us can't just throw away 9% of our users.

from barcodescanner.

DavidLari avatar DavidLari commented on May 19, 2024

Awesome Chad! Thanks!

from barcodescanner.

MohdElBasyouni avatar MohdElBasyouni commented on May 19, 2024

@chadcummings can you open a PR for your updated code?

from barcodescanner.

vadymmarkov avatar vadymmarkov commented on May 19, 2024

PR made by @chadcummings was successfully merged and version 3.0.0 is out.

from barcodescanner.

Related Issues (20)

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.