NeutrinosPlatform / cordova-plugin-document-scanner

cordova plugin for document scan
https://www.neutrinos.co/
MIT License
85 stars 60 forks source link

it seems build failed randomly with 3.x.x #51

Closed crapthings closed 5 years ago

crapthings commented 5 years ago

mojave 10.14.3 xcode 10.2 (10E125) pod 1.3.1

the framework that i use is meteor 1.8.0.2 which cordova version is 4.5.4

plugins list

"cordova-plugin-whitelist": "1.3.2",
    "cordova-plugin-wkwebview-engine": "1.1.3",
    "cordova-plugin-meteor-webapp": "1.6.0",
    "cordova-plugin-statusbar": "2.3.0",
    "cordova-plugin-splashscreen": "4.1.0",
    "cordova-plugin-cocoapod-support": "1.3.0",
    "cordova-plugin-document-scanner": "3.0.0"
ChrisTomAlx commented 5 years ago

Any specific build errors ? Do you know if any of the plugins use swift? or have swift pod dependencies?

Have not really worked on meteor, if you could give me some starter tips. I will test this on my end and get back to you. Cheers, Chris Neutrinos

crapthings commented 5 years ago

first you have to install meteor

curl https://install.meteor.com/ | sh

then clone this repo

git clone https://github.com/crapthings/testscan
cd testscan
meteor npm i

plug ios-device or use simulator

meteor run ios-device

after this will open workspace automaticly

i will upload a video on youtube to specify the problem

crapthings commented 5 years ago

https://www.youtube.com/watch?v=1XLDg6ybq7g&feature=youtu.be

crapthings commented 5 years ago

the error seems differently on cordova without meteor

npm i -g cordova@8.1.2 add platform ios add plugin

image

ChrisTomAlx commented 5 years ago

Thank you for giving such a detailed explanation of your problem. It just makes it so easy. :)

So in the youtube video around 3:43 you get an error in the line

guard let data = UIImageJPEGRepresentation(image, 1) ?? UIImagePNGRepresentation(image) else {

replace it with

guard let data = image.jpegData(compressionQuality:1.0) ?? image.pngData() else {

you can change compression quality from 0.0 to 1.0 where 1.0 is the best quality / least compression and 0.0 is the most compression / least quality. The plugin was written in swift 4.0 (and hence this issue when you build with 4.2), but it would seem using swift 4.2 fixes almost all your issues. So let me know if this fix works out for you.

Cheers, Chris Neutrinos

crapthings commented 5 years ago

is this the latest wescan lib?

ChrisTomAlx commented 5 years ago

This is the latest pod they have released Did the solution I provided not work ?

Cheers, Chris Neutrinos

crapthings commented 5 years ago

it works, but the original wescan integration doesnt need to convert code, weird

anyway it just works. im closing this issue.

crapthings commented 5 years ago

i have to set version to 1.0.0 to make this plugin working.

platform :ios, '10.3'
use_frameworks!
target 'EasyScroll' do
  pod 'WeScan', '= 1.0.0'
end
ChrisTomAlx commented 5 years ago

@crapthings Thanks for dropping this info here. Will update as required.

Cheers, Chris Neutrinos