efprefix / efqrcode Goto Github PK
View Code? Open in Web Editor NEWA better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
Home Page: https://efprefix.github.io/EFQRCode
License: MIT License
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
Home Page: https://efprefix.github.io/EFQRCode
License: MIT License
The judgement of isGIF in GeneratorController.swift Line 1079 will defend using the compressed image returned from selectedAlbumPhotosIncludingGifWithPHAssets, which seems a bug.
// 使用
if let image = EFQRCode.generate(content: "280580947644881355") {
let qrImage = UIImage(cgImage: image)
imageView.image = qrImage
}
第一次 用时 1.9432099166660919
第二次用时 0.02680799999507144
请问有什么解决方法么?
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
The Shape of I´m looking for is a circle.
[The steps to reproduce this issue. What are the parameters, where did you put your code, etc.]
[Add anything else here]
Add please the ability to read QR Code using the camera, and the ability to create a QR Code contact, event, location, wi-fi.
Latest release version seems not support Objective-c as i cannot see any external function at EFQRCode-Swift.h file ..
The CHANGELOG.md file says year 2018 for the 5.0.1 and 5.1.0 releases. Should be 2019.
I am using this lib to generate qr codes. But for iOS 12 it always fails to generate qr code.
After some investigation i found out that in iOS 12 filter CIFilter(name: "CIQRCodeGenerator") always return nil.
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
[Tell us about the issue]
[The steps to reproduce this issue. What are the parameters, where did you put your code, etc.]
[Add anything else here]
The Mac App Store version is still 4.1.1. Will it be updated to the latest version?
please remove non-free images for demo
请移除版权图片,包括测试或展示使用
請移除版權圖片,包括測試或展示使用
Thanks for sharing.
My suggestion is to make API a little bit more readable by adding couple of classes: Icon
and Watermark
.
Then, instead:
EFQRCode.generate(
content: String,
inputCorrectionLevel: EFInputCorrectionLevel,
size: CGFloat,
magnification: UInt?,
backgroundColor: UIColor,
foregroundColor: UIColor,
icon: UIImage?,
iconSize: CGFloat?,
isIconColorful: Bool,
watermark: UIImage?,
watermarkMode: EFWatermarkMode,
isWatermarkColorful: Bool
)
It will be
EFQRCode.generate(
content: String,
correction: EFInputCorrectionLevel,
size: CGFloat,
magnification: UInt?,
backgroundColor: UIColor,
foregroundColor: UIColor,
icon: Icon(image: UIImage, size: CGFloat, colorful: Bool)?,
watermark: Watermark(image: UIImage, mode: EFWatermarkMode, colorful: Bool)?
)
if let tryImage = EFQRCode.generate(content: "美少女战士",
size: EFIntSize.init(width: 120, height: 120),
backgroundColor: UIColor.orange.cgColor,
foregroundColor: UIColor.yellow.cgColor,
watermark: UIImage.init(named: "dog.png")?.toCGImage()) {
imageView.image? = UIImage.init(cgImage: tryImage)
}
above,It doesn't work.When I invoke like this,
if let tmpImage = EFQRCode.generate(content: "美少女战士",
watermark: UIImage.init(named: "dog.png")?.toCGImage()) {
imageView.image = UIImage.init(cgImage: tmpImage)
}
it works.why ?
Does it support barcode?
As we can see on https://travis-ci.org/EFPrefix/EFQRCode, all the tests are failing due to missing simulators. From this StackOverflow answer, we can install the necessary simulators within the execution of each matrix configuration.
There's a patch for iOS 9.3 simulator, which should now be executed for that configuration only, or completely removed if that's no longer necessary.
Hi,
In EFUIntPixelr.swift Line 66, it will always return nil when init by CGColor. Thus, function CGImage.binarization() will not be called. It's weird to see this useless function and initializer.
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
[Tell us about the issue]
[The steps to reproduce this issue. What are the parameters, where did you put your code, etc.]
[Add anything else here]
EFFoundation 跟 SwifterSwift 冲突了呀
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Add support for scanning data_matrix style codes
Example code:
Raw text: |0015BC001E009B4D|E105EC0AF23A449FD66FA1DD9DE2F48C3631|
Raw bytes: 7d 82 91 e6 60 45 19 db 19 ae 5f 12 10 f3 1f ea 73 05 5a 7f 2d f9 34 1c 6b db 78 f6 6c f6 6d 17 78 0d fe 44 a6 a1 7d 81 a7 3e d4 6b
Barcode format: DATA_MATRIX
Looks like AVFoundation (iOS) supports this. Maybe it's possible to update EFQRCode to support it as well?
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
New feature: TxQR animated QR code support
TxQR is a type of three-dimensional QR code with time as the third dimension to encode more data.
Here is a list of items that EFQRCode could have
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Since version 5, the library cannot be installed using Carthage. Searching for the returned error on the internet, I got many results back but all solutions don't work. This is the returned error:
A shell task (/usr/bin/env git checkout --quiet 122809d12f0a3ed8323d2e6b3ddc7ec107a6afc9 (launched in /Users/project/Carthage/Checkouts/EFQRCode/Examples/3rd/SnapKit)) failed with exit code 128: fatal: reference is not a tree: 122809d12f0a3ed8323d2e6b3ddc7ec107a6afc9
Add this to the Cartfile
and run carthage update
:
github "EFPrefix/EFQRCode"
Pinning a version also doesn't work. The only thing that works for me is using version 4 from your personal github account:
github "EyreFree/EFQRCode" ~> 4.3.0
Tested on multiple devices, same result.
Thanks for this great library!
Hi, I'm trying to install the framework via Carthage but i'm receiving the following error:
error: compiling for watchOS 2.0, but module 'swift_qrcodejs' has a minimum deployment target of watchOS 6.1:
my cartfile:
github "EFPrefix/EFQRCode" ~> 5.1.6
Command I'm using
Carthage update EFQRCode --platform watchOS
Hey there,
Thanks for making this! Before I use it in my project, I was wondering since you can embed multiple codes in an image, how a standard QR code reader will read this, if at all.
I'm just putting one string in my QR code but I want other devices to be able to use they reader to read my codes. Will that work automatically for my use-case?
Is it possible to generate CICode128BarcodeGenerator on watchOS? CIFilter is not available and I don't want to create barcode on the iPhone and send it later to watch. Is it possible with EFQRCode?
Hello !
In your READ.ME, you tell that your lib is compatible with Watch OS, but pod say that its not.
Is it still compatible ?
Probably a stupid question, but Is this library necessary to decode the QR code? Or can a normal QR code scanner read the data?
I would imagine a normal QR code scanner could read the data, but want to be sure before I implement it.
End goal: read the QR code in my Android App
好想用啊!
Using the podspec on WatchOS is undocumented
Before this commit I was using the regular podcast spec on watchOS, and it worked.
Now I think I need to use pod 'EFQRCode/watchOS'
but after pod install
ing that, there is no EFQRCode module installed.
More specifically, cocoapods seems to download and add EFQRCode as a module, but the project does not contain any source files. It looks like on watchOS it has been replaced by a dummy EFQRCode module.
Am I doing it wrong? Some documentation on the specifics of using this subspec on watchOS would be appreciated!
Hope to add an api to scan QR codes with camera.
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Currently, any input string passed in to the generate QR code function is encoded as utf8
before being encoded in the QR code. Having an option to encode in ASCII
or other encoding methods could allow larger texts to be encoded into smaller QR codes. Adding an argument to specify which text encoding method to use, which could default to utf8
would be a useful feature.
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
I would like to generate QRCode on watchOS. I am aware that CIFilter
is not available on watchOS, so I ported qrcodejs to Swift here, which is able to generate raw code matrix in [[Bool]]
. I wonder what would possibly be the most easy way to render that using EFQRCode. Thank you very much.
Although generating it on the phone and then transfer to the Apple Watch seems to be an acceptable approach. However, as Series 3 became more independent, there are cases where an iPhone is not available when in need.
Xcode Version: 9.4.1
Swift Version: 4.1
Podfile depenency: pod "EFQRCode", '~> 4.2.2'
Problem: Unable to overload the code below with the following parameters:
Error given when trying to overload the generate method:
Incorrect argument label in call (have 'content:mode:foregroundColor:watermark:', expected 'content:size:foregroundColor:watermark:')
Code used:
if let tryImage = EFQRCode.generate(
content: qrCodeString,
// backgroundColor: Color.coral.value.cgColor,
mode: EFQRCodeMode.binarization
foregroundColor: Color.bondiBlue.value.cgColor,
watermark: UIImage(named: "Logo-1.png")?.toCGImage()
) {
print("Create QRCode image success: \(tryImage)")
return UIImage(cgImage: tryImage)
} else {
print("Create QRCode image failed!")
return nil
}
Can you overload the generate method with more than just the base params? I also tried using the second option to initialize the code generator but got a different error. I do not want to throw multiple issues into one post but I felt that it was important to note why I am trying to overload the method rather than trying the other way.
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Inspect from func CIImage.generateQRCode()
, the qrFilter.outputImage
output correctly with following image
But func EFQRCodeGenerator.generate()
result in following wrong image
none
change codes[indexY][indexX]
to codes[indexX][indexY]
3 times in EFQRCodeGenerator.swift
will resolve this issue
没找到这个framework
I want QR code with company logo, but i want it centre of the QR code and some space around the logo so it looks clean.
Thanks
RahulTBI
您好:我在使用EFQRCode时,在真机器iPhone X以上机型中:CIFilter(name: "CIQRCodeGenerator") 方法会崩溃,在真机器iPhone X以下,及iPhone 8 等,系统版本均为iOS13.1.3最新的,方法会无缘无故崩溃掉.请帮忙分析以下.谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.