Coder Social home page Coder Social logo

capawesome-team / capacitor-mlkit Goto Github PK

View Code? Open in Web Editor NEW
114.0 3.0 28.0 610 KB

⚡️ ML Kit plugins for Capacitor. Supports Android and iOS.

Home Page: https://capawesome.io/plugins/mlkit/

License: Apache License 2.0

Ruby 3.18% Java 43.08% Swift 30.92% Objective-C 1.99% JavaScript 1.36% TypeScript 19.46%
capacitor capacitor-android capacitor-community capacitor-ios capacitor-plugin capacitorjs mlkit mlkit-android mlkit-ios mlkit-translate

capacitor-mlkit's Introduction


ML Kit


Features

Capacitor ML Kit is a collection of Capacitor plugins that enable the use of the ML Kit SDKs in Capacitor.1

  • 🔋 Supports Android and iOS
  • ⚡️ Capacitor 5 support
  • 🦋 Consistent versioning (no more SDK versions conflicts)
  • 👁 Unified Typescript definitions
  • 📄 Full documentation
  • ⚙️ Under active development, more plugins coming soon

Maintainers

Maintainer GitHub Social
Robin Genz robingenz @robin_genz

Sponsors

This is an Apache-2.0-licensed open source project. It can grow thanks to the support by these awesome people. If you'd like to join them, please read more here.

Installation

Each plugin has its own installation instructions. Click on the name of the desired plugin under the Plugins section to get to the installation guide.

Plugins

Name Package Version Downloads
Barcode Scanning @capacitor-mlkit/barcode-scanning npm badge npm downloads
Face Detection @capacitor-mlkit/face-detection npm badge npm downloads
Face Mesh Detection @capacitor-mlkit/face-mesh-detection npm badge npm downloads
Selfie Segmentation @capacitor-mlkit/selfie-segmentation npm badge npm downloads
Translation @capacitor-mlkit/translation npm badge npm downloads

Changelogs

Each plugin has its own CHANGELOG.md file which contains information about version changes. Click on the name of the desired plugin under the Plugins section to get to the plugin folder.

Breaking Changes

Each plugin has its own BREAKING.md file which contains information about breaking changes. Click on the name of the desired plugin under the Plugins section to get to the plugin folder.

Terms & Privacy

This plugin uses the Google ML Kit:

Contributing

See CONTRIBUTING.md.

License

See LICENSE.

Footnotes

  1. This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries.

capacitor-mlkit's People

Contributors

frankmarazita avatar github-actions[bot] avatar janmisker avatar jcesarmobile avatar reslear avatar robingenz avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

capacitor-mlkit's Issues

bug:

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

BarcodeScanner.isSupported() results in error Promise <rejected>: Error: This Barcode Scanner plugin method is not available on this platform.

Expected behavior

BarcodeScanner.isSupported() returns: Promise<IsSupportedResult> with {supported: false} as documentation says.

Reproduction

https://github.com/LoranRendel/temporary-mlkit-app

Steps to reproduce

npm start
open url
check devtools console

Other information

Promise<IsSupportedResult>

Capacitor doctor

[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/android: not installed
@capacitor/ios: not installed
@capacitor/core: 5.5.1
@capacitor/cli: 5.5.1

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Face mesh detection

Is your feature request related to a problem? Please describe:

The ML Kit Face Mesh Detection API is not yet supported.

Describe the solution you'd like:

Add a Face Mesh Detection plugin.

Describe alternatives you've considered:

Additional context:

bug(barcode-scanning): `scan failed` on some Android devices

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

When calling the scan(...) the following error message appears in Android Studio:

scan failed.
com.google.mlkit.common.MlKitException: Failed to scan code.
at com.google.mlkit.vision.codescanner.internal.zze.zzc(com.google.android.gms:play-services-code-scanner@@16.0.0-beta3:4)
at com.google.mlkit.vision.codescanner.internal.zzf.onActivityResult(com.google.android.gms:play-services-code-scanner@@16.0.0-beta3:5)
at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:409)
at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:366)
at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:712)
at android.app.Activity.dispatchActivityResult(Activity.java:8951)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5987)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:6033)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Expected behavior

No exception.

Reproduction

Steps to reproduce

  1. Call the scan(...) method on Android

Seems to be reproducible only on some devices (e.g. Samsung S21 with Android 13).

Other information

No response

Capacitor doctor

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat(barcode-scanning): mount camera to HTML tag OR set camera height/width

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Translation

Current problem

Currently, the camera preview takes up the full background. It would be useful to either mount the camera preview into an HTLM tag with set dimensions, or set the width/height of the camera preview itself, allowing to frame it by overlaying UI over it.

Preferred solution

Two possible solutions:

  1. Add selector for an HTML tag as a parent, to which the camera preview is mounted, e.g. by id:
export interface StartScanOptions {
    formats?: BarcodeFormat[];
    lensFacing?: LensFacing;
+   parentID?: string;
}

Which would mount to HTML tag with id provided in parentID (= camera-parent):

<div id="camera-parent" style="height: 400px" />
  1. Add height / width (dimensions) property for the camera preview:
export interface StartScanOptions {
    formats?: BarcodeFormat[];
    lensFacing?: LensFacing;
+   dimensions?: Dimensions;
}

+ export interface Dimensions {
+    width?: string;
+    height?: string;
+ }

To allow making the preview smaller than full viewport width and height.

Alternative options

No response

Additional context

No response

bug(barcode-scanning): Cocoapods dependency conflicts between MLKit and Firebase

The following error occurs when you use the @capacitor-firebase and @capacitor-mlkit dependencies in the same project:

✖ update ios - failed!
[error] Analyzing dependencies
        [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
        In Podfile:
        CapacitorFirebaseAuthentication/Google (from `../../node_modules/@capacitor-firebase/authentication`) was
        resolved to 1.3.0, which depends on
        Firebase/Auth (= 10.2.0) was resolved to 10.2.0, which depends on
        FirebaseAuth (~> 10.2.0) was resolved to 10.2.0, which depends on
        GTMSessionFetcher/Core (< 4.0, >= 2.1)
        
        CapacitorFirebaseAuthentication/Google (from `../../node_modules/@capacitor-firebase/authentication`) was
        resolved to 1.3.0, which depends on
        GoogleSignIn (= 6.2.4) was resolved to 6.2.4, which depends on
        GTMAppAuth (~> 1.3) was resolved to 1.3.1, which depends on
        GTMSessionFetcher/Core (< 3.0, >= 1.5)
        
        CapacitorFirebaseAuthentication/Google (from `../../node_modules/@capacitor-firebase/authentication`) was
        resolved to 1.3.0, which depends on
        GoogleSignIn (= 6.2.4) was resolved to 6.2.4, which depends on
        GTMSessionFetcher/Core (< 3.0, >= 1.1)
        
        CapacitorMlkitBarcodeScanning (from `../../node_modules/@capacitor-mlkit/barcode-scanning`) was resolved to
        0.0.2, which depends on
        GoogleMLKit/BarcodeScanning (= 3.2.0) was resolved to 3.2.0, which depends on
        MLKitBarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
        MLKitVision (~> 4.2) was resolved to 4.2.0, which depends on
        GTMSessionFetcher/Core (~> 1.1)

See https://issuetracker.google.com/issues/254418199

bug: flat orientation on ios

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

5.3.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

(PR incoming)

For the flat orientation bug, the x/y gets flipped as if it's in landscape - Ideally it should pick out the current window orientation instead of the device orientation. I can't see a way to do that without juggling with the main UI thread?

Further, the scale for the coordinates is unknown, so it's difficult to figure out how to scale for the webview, so having a screen size would be useful

Expected behavior

coordinates that are consistent with the window orientation, and a way to scale the barcode coordinates to match the webview.

Reproduction

N/A

Steps to reproduce

SVG polygon overlay on a div with barcode coordinates from scans.

Other information

I have created a fork and cutting a PR, but creating this issue to go with it.

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.6.0
@capacitor/core: 5.6.0
@capacitor/android: 5.6.0
@capacitor/ios: 5.6.0

Installed Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat(barcode-scanning): support `cornerPoints` in `readBarcodesFromImage(...)`

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

cornerPoints is empty

Expected behavior

cornerPoints should have points

Reproduction

https://github.com/tigohenryschultz/ionic-cap-ml-barcode-test

Steps to reproduce

  1. Go to the ML Kit tab
  2. Click take a picture
  3. Missing points data

Code is in TgMLKitBarcodes.vue

Other information

3
: 
bytes
: 
(9) [52, 45, 50, 68, 48, 55, 69, 50, 84]
cornerPoints
: 
[]
displayValue
: 
"4-2D07E2T"
format
: 
"QR_CODE"
rawValue
: 
"4-2D07E2T"
valueType
: 
"TEXT"
[[Prototype]]
: 
Object
4
: 
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D0775R', format: 'QR_CODE', rawValue: '4-2D0775R', …}
5
: 
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D0765X', format: 'QR_CODE', rawValue: '4-2D0765X', …}
6
: 
bytes
: 
(9) [52, 45, 50, 67, 57, 68, 56, 53, 77]
cornerPoints
: 
Array(0)
length
: 
0
[[Prototype]]
: 
Array(0)
displayValue
: 
"4-2C9D85M"
format
: 
"QR_CODE"
rawValue
: 
"4-2C9D85M"
valueType
: 
"TEXT"
[[Prototype]]
: 
Object
7
: 
{bytes: Array(9), cornerPoints: Array(0), displayValue: '4-2D07EFY', format: 'QR_CODE', rawValue: '4-2D07EFY', …}
8
: 
bytes
: 
(9) [52, 45, 50, 67, 57, 67, 68, 56, 87]
cornerPoints
: 
[]
displayValue
: 
"4-2C9CD8W"
format
: 
"QR_CODE"
rawValue
: 
"4-2C9CD8W"
valueType
: 
"TEXT"
[[Prototype]]
: 
Object

image

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.0.4
@capacitor/core: 5.0.4
@capacitor/android: 5.0.4
@capacitor/ios: 5.0.4

Installed Dependencies:

@capacitor/cli: 5.0.3
@capacitor/core: 5.0.3
@capacitor/android: 5.0.3
@capacitor/ios: 5.0.3

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Barcode scanner sometimes get bad value of EAN13

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Hello, I am using your barcode scanner in my new app and sometimes the read data are bad.

Preferred solution

Please, is it possible to add some settings for read it twice or three times and compare? Or some any other alghoritm for check, if it is ok?

Thank you very much!

Alternative options

No response

Additional context

No response

feat: Selfie segmentation

Is your feature request related to a problem? Please describe:

The ML Kit Selfie Segmentation API is not yet supported.

Describe the solution you'd like:

Add a Selfie Segmentation plugin.

Describe alternatives you've considered:

Additional context:

feat: Subject segmentation

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Are there any plans to make a plugin for Subject Segmentation of ML? https://developers.google.com/ml-kit/vision/subject-segmentation

Preferred solution

A plugin that support Subject Segmentation

Alternative options

No response

Additional context

No response

Before submitting

feat(barcode-scanning): zoom functionality

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Translation

Current problem

Hi,

I asked about this a few days ago in a different topic, but I would like to officially request a new feature, which is zoom functionality. It's a big challenge to work with small barcodes. I encountered a problem when scanning small CODE128 codes; basically, the scanner does not read them. I was able to hardcode a workaround in the library itself by adding a zoom of 1.6f during camera initialization, but this is only a temporary solution. It would be a great feature that would make the library even more attractive.

Preferred solution

Adding a zoom based on the google barcode scanner, which is implemented in the demo version
either zoom by "enlarging the screen" or by adding a slider

Alternative options

While working on react library i occured this kind of zoom which was very intuitive and it was known to be there.
1 (3)

Additional context

No response

bug:

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

const { barcodes } = await BarcodeScanner.scan({
formats: [BarcodeFormat.QrCode],
lensFacing: LensFacing.Front,
});

The lensFacing.Front is not being supported in Android, but this works on iOS.

Expected behavior

The LensFacing.Front works in iOS

Reproduction

https://github.com/capawesome-team/.capacitor-app

Steps to reproduce

  1. Install plugin on ionic
  2. Run the app on iOS, will scan with front cam by default
  3. Run the app on Android, will not run with front cam

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.0.5
@capacitor/core: 5.0.5
@capacitor/android: 5.0.5
@capacitor/ios: 5.0.5

Installed Dependencies:

@capacitor/cli: 5.0.4
@capacitor/core: 5.0.4
@capacitor/android: 5.0.4
@capacitor/ios: 5.0.4

[success] iOS looking great! 👌
[error] Missing attribute in app/src/main

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Face detection

Is your feature request related to a problem? Please describe:

The ML Kit Face Detection API is not yet supported.

Describe the solution you'd like:

Add a Face Detection plugin.

Describe alternatives you've considered:

Additional context:

feat(barcode-scanning): add `cornerPoints` option

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Currently, all detected barcodes are passed to the webview, even if they are outside a scan area. This leads to unnecessary data being transferred between the native layer and the web layer. In addition, some logic needs to be implemented at the web layer to filter out the barcodes that are outside the scan area.

Preferred solution

Add a cornerPoints option that allows you to define a valid area on the native layer. In the first step, this should have no effect on the size of the camera view. This information should only be used to filter the barcodes on the native layer.

In the next step, something like #79 could be implemented.

Alternative options

No response

Additional context

See #96 (comment)

Before submitting

bug: Running xcodebuild - failed! After installing barcode plugin on mac m1 (macOS Sonoma 14.0) / ios 17.

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

error.txt

Expected behavior

After installing the barcode scanning plugin and trying to run the simulator i get a huge error. When i remove the plugin, everything can build properly.

Reproduction

Steps to reproduce

  1. install plugin in a capacitatorjs project using mac m1 (macOS Sonoma 14.0) / ios 17.
  2. See error

Other information

No response

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.5.0
@capacitor/core: 5.5.0
@capacitor/android: 5.5.0
@capacitor/ios: 5.5.0

Installed Dependencies:

@capacitor/cli: 5.5.0
@capacitor/core: 5.5.0
@capacitor/android: 5.5.0
@capacitor/ios: 5.5.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug(barcode-scanning): Black screen on Android device

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

I followed the guide and tried to add it to my simple app. when i try to scan (after giving permissions), its showing black screen with the scanning square in the middle.

this is what i see on Samsung Galaxy A04e, just a black screen:

image

Expected behavior

Showing the camera preview and be able to scan barcodes.

Reproduction

https://github.com/robingenz/ionic-capacitor-barcode-scanner

Steps to reproduce

  1. clone the demo repo
  2. follow the installation guide in the README
  3. run on physical device through Android Studio
  4. open app, try to scan - black screen

Other information

Samsung Galaxy A04e with Android 13, running from android studio via Pair using WiFi

Capacitor doctor

PS J:\ionic-capacitor-barcode-scanner> npx cap doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.                                        
    Capacitor Doctor
                                                                                                                                                                                                                                                 Latest Dependencies:

  @capacitor/cli: 5.0.4
  @capacitor/core: 5.0.4
  @capacitor/android: 5.0.4
  @capacitor/ios: 5.0.4

Installed Dependencies:

  @capacitor/core: 5.0.0
  @capacitor/ios: 5.0.0                                                                                                             
  @capacitor/android: 5.0.0
  @capacitor/cli: 5.0.0

[error] Missing <manifest package=""> attribute in app/src/main 

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug: PreviewView is null on Android Device

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

When i execute the method startScan I have an issue on the Android Code
previewView = plugin.getActivity().findViewById(R.id.preview_view);

previewView is null so next line fails

preview.setSurfaceProvider(previewView.getSurfaceProvider());

This was working week ago

Expected behavior

startScan works and I do not see a black screen

Reproduction

No reproduction code

Steps to reproduce

  1. Use startScan on Android (Xiaomi Redmi Note 11)

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.0.5
@capacitor/core: 5.0.5
@capacitor/android: 5.0.5
@capacitor/ios: 5.0.5

Installed Dependencies:

@capacitor/core: 5.0.5
@capacitor/cli: 5.0.5
@capacitor/ios: 5.0.5
@capacitor/android: 5.0.5

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Entity extraction

Is your feature request related to a problem? Please describe:

The ML Kit Entity Extraction API is not yet supported.

Describe the solution you'd like:

Add a Entity Extraction plugin.

Describe alternatives you've considered:

Additional context:

bug: iOS Corner points detection issue

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

5.3.0-dev.966ebeb.1703101506

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

I have problem trying to scan.
The corner point problem occurs only on iOS device in my case.

Can't understand why iOS coords are different on every angle im attempting to scan. Is there a way to lock it somehow?
I seems like i can get scan go through on lucky strike.

Android works fine for me.

my scan log:

{"rawValue":"ASDSADASDAS","bytes":[71,80,76,50,50,48,53,48,53,50,56,50,57],"cornerPoints":[[686,973],[681,1069],[165,1094],[174,1008]],"format":"CODE_128","valueType":"TEXT","displayValue":"ASDSADASDAS"}
⚡️  [log] - Detection Corner Points: [[57,519.7821655273438],[357,519.7821655273438],[357,644.7821655273438],[57,644.7821655273438]]
⚡️  [log] - Current Corner Points: [[686,973],[681,1069],[165,1094],[174,1008]]
⚡️  [log] - Conditions not met. Returning...

It makes problem because as u can see in logs scan never getting the value and enter never ending loop, when im commenting corner detection scanner works fine.

Would be greatfull for some tips/help

similar case: there is opened issue on this case.
#115

Expected behavior

I expect the success scan when catch barcode in my scan box.

Reproduction

none

Steps to reproduce

  1. Add some logs to see detection coords and current cords
  2. Run demo barcode scanner on iOS device
  3. Try to scan from different angles

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0

Installed Dependencies:

@capacitor/core: 5.3.0
@capacitor/ios: 5.0.5
@capacitor/cli: 5.0.5
@capacitor/android: 5.3.0

[success] iOS looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug: Barcode-Scanner: Ionic apps using this package wont build for simulators in Xcode on arm64 Architecture (Macs with m-Series CPUS)

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Ionic apps fail to build for simulator in Xcode on Macs using Apples new m-Series CPUs if its incorporating (@capacitor-mlkit/barcode-scanning). (Only tested with macOS Sonoma and Xcode 15)

After implementing the barcode scanner plugin (@capacitor-mlkit/barcode-scanning) and running npx cap sync, the Build Setting Excluded Architectures in Xcode is set to arm64 for Any iOS Simulator SDK automatically (see Screenshot).

SeetingsSetByPlugin

Since newer Macs are running on this architecture and also try to build for an arm64 simulator, the build process fails, providing this error message:
/Users/timmoritzkuehle/Sirum Code/SirumApp_cap5/Code/ios/App/App/AppDelegate.swift:2:8 Could not find module 'Capacitor' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator, at: /Users/timmoritzkuehle/Library/Developer/Xcode/DerivedData/App-ednjbqvwcfwlcbgrebswvcdqcmqf/Build/Products/Debug-iphonesimulator/Capacitor/Capacitor.framework/Modules/Capacitor.swiftmodule

ErrorMessage

By turning the build setting Build For Active Architecture Only you get two different error messages:
Framework 'Pods_App' not found and Linker command failed with exit code 1 (use -v to see invocation)

ErrorMessageWithoutExludedArchs

Currently the only workaround is to run a simulator using apples Rosetta translation layer. This harms performance and introduces a whole new layer potential system related build errors.

Expected behavior

It would be great if barcode scanning would support arm64 architectures natively.

Reproduction

https://github.com/timmkuehle/capacitor-mlkit-barcode-scanning-test

Steps to reproduce

On a Mac with an m-Series CPU:

  1. Create a new ionic project ìonic start
  2. Add the ios folder ``ìonic cap add ios```
  3. Open it in Xcode, start the Simulator and see the build succeed
  4. Implement (@capacitor-mlkit/barcode-scanning)
  5. Sync new modules npx cap sync
  6. Open the app in Xcode again
  7. Notice the new setting for Excluded Architectures mentioned above
  8. Try to run the simulator again and see the build fail

Other information

@AntonGrafton reported this problem in #85. However, it seems that the discussion on that one never got down to the point, where the system architecture was discovered to be causing the issue.

Google has a guide on migrating their MLKit pods for iOS to arm64 Systems. You can find it here. Sadly my pitiful knowledge about capacitor plugin development won't even suffice to tell if this is helpful or not. Sorry for that. 😅

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug(barcode-scanning): unable to scan glitter insemination barcode

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

I'm struggling to scan these barcode labels, and it only works very rarely. I'm using an iPad Air. I have another app that can scan them without any issues.
image
image

Expected behavior

To scan the codebar correctly

Reproduction

https://github.com/FVolral/.capacitor-app

Steps to reproduce

$ npm run build && npx cap sync && npx cap open ios

The reproduction should try to scan the barcode use readBarcodesFromImage() but it doesn't work, not sure if it's me or a bug from the plugin. a working repro that use it may help.

Other information

My reproduction is not working, and I haven't been able to find a valid reproduction scenario. So, I did what I could, but it leads to a 'File does not exist' error when I'm trying to use the 'readBarcodesFromImage()' method. As far as I can tell, the path should be correct since the images load correctly in the DOM, right?".

Also, on my iPad, I can scan these insemination glitter barcodes almost instantly using an app called 'QR Reader' developed by Tap Media.

Those barcode use CODE_128 formats.

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.3.0
@capacitor/core: 5.3.0
@capacitor/android: 5.3.0
@capacitor/ios: 5.3.0

Installed Dependencies:

@capacitor/android: not installed
@capacitor/cli: 5.3.0
@capacitor/core: 5.3.0
@capacitor/ios: 5.3.0

[success] iOS looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Text recognition

Is your feature request related to a problem? Please describe:

The ML Kit Text Recognition API is not yet supported.

Describe the solution you'd like:

Add a Text Recognition plugin.

Describe alternatives you've considered:

Additional context:

feat: Smart reply

Is your feature request related to a problem? Please describe:

The ML Kit Smart Reply API is not yet supported.

Describe the solution you'd like:

Add a Smart Reply plugin.

Describe alternatives you've considered:

Additional context:

bug: startScan is not resolved on iOS

Plugin(s)

  • Barcode Scanning
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

The startScan() method returns a Promise that is never resolved.

Expected behavior

The Promise should resolve.

Reproduction

https://github.com/JanMisker/capacitor-mlkit-plugin-demo

Steps to reproduce

Run the demo app.
I added a console.log("before startScan()") and console.log("after startScan()").
On Android I see both messages logged, but on iOS only the before one.

Other information

No response

Capacitor doctor

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.0.5
  @capacitor/core: 5.0.5
  @capacitor/android: 5.0.5
  @capacitor/ios: 5.0.5

Installed Dependencies:

  @capacitor/cli: 5.0.0
  @capacitor/core: 5.0.0
  @capacitor/android: 5.0.0
  @capacitor/ios: 5.0.0

[success] iOS looking great! 👌
[error] Missing <manifest package=""> attribute in app/src/main

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug: App including barcode scanning plugin builds, install but does not start on simulators

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Hello,
Trying to use the plugin in a small capacitor app, and test on ios simulator (android works fine).

App builds and install fine on simulator (see details below) but when launched:

  • starts to open, showing a black screen for 1/2 second
  • immediately closes

I have narrowed things down to the mlkit barcode plugin by disabling all other features/plugin in the app. I get the exact same behavior using your full demo app.

See below for error from log file and possibly relevant info.

Pretty new to this, so please bear with me if I'm missing something obvious. Let me know if there's some more log files that I can go through.

Expected behavior

App starts and open its main window.

Reproduction

https://github.com/robingenz/capacitor-mlkit-plugin-demo

Steps to reproduce

  1. Environment
    McMini Sonoma, Xcode 15.0, capacitor 5.4.1

  2. Config: defaults

  3. Run either through capacitor CLI or from within Xcode. All default settings.

  4. Error from logs CoreSimulator.log:

Oct 23 19:35:05 Mini-de-XXXX com.apple.CoreSimulator.simctl[27577] <Error>: launchApplicationWithID:options:pid:error:: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "Simulator device returned an error for the requested operation." UserInfo={NSLocalizedDescription=Simulator device returned an error for the requested operation., NSUnderlyingError=0x60000034e940 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "dev.robingenz.capacitorjs.demo.mlkitplugins" failed." UserInfo={BSErrorCodeDescription=RequestDenied, NSLocalizedDescription=The request to open "dev.robingenz.capacitorjs.demo.mlkitplugins" failed., NSUnderlyingError=0x60000034e8e0 {Error Domain=FBProcessExit Code=64 "The process failed to launch." UserInfo={NSUnderlyingError=0x6000003ea400 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo=0x600001828bc0 (not displayed)}, BSErrorCodeDescription=launch-failed, NSLocalizedFailureReason=The process failed to launch.}}, FBSOpenApplicationRequestID=0x94bd, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace).}}, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., FBSOpenApplicationRequestID=0x94bd,

Other information

  • all work fine on android, both emulator and several physical devices
  • I tried with and without an Apple ID entered in Xcode, currently without. Result is the same with an AppleId
  • I have seen #85 but I already applied this fix, which I came about from a different source
  • tested on multiple simulators: iphone 15, 14, 13, exactly same result
  • don't have a physical iphone to test ATM, should have one within a couple of days
  • per various Google searches, I have many times:
    • rebooted machine
    • Cleared data in each simulator
    • made sure to Clean Build folder.. and Delete all files in Derived Data.. between each attempt
  • I installed @aparajita/capacitor-logger and added some logging to syslog at various points during mlkit-barcode-scanning use in my code, but nothing appear in syslog. Which makes me think the app dies before it evens starts.
  • At some point I saw a line in syslog that said:
Snapshot generation request for Bundle Id: com.weeblr.xxxxx app is denylisted

but I have not found it again since that one time. Not sure it adds anything to the error message listed above

Capacitor doctor

capacitor-mlkit-plugin-demo % npx cap doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.5.0
@capacitor/core: 5.5.0
@capacitor/android: 5.5.0
@capacitor/ios: 5.5.0

Installed Dependencies:

@capacitor/cli: 5.4.1
@capacitor/core: 5.4.1
@capacitor/android: 5.4.1
@capacitor/ios: 5.4.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug:

Plugin(s):

@capacitor-mlkit/barcode-scanning

Platform(s):

iOS

Current behavior:

Followed example on repo for simple use of plugin. on scanDevice() method, i got the permission alert and allowed but I got this error right after:
⚡️ [error] - Error: Uncaught (in promise): Error: "BarcodeScanner.checkPermission()" is not implemented on ios

Expected behavior:

The plugin request permission to work

Steps to reproduce:

Follow example given from read.me

Related code:

const startScan = async () => {
  // The camera is visible behind the WebView, so that you can customize the UI in the WebView.
  // However, this means that you have to hide all elements that should not be visible.
  // You can find an example in our demo repository.
  // In this case we set a class `barcode-scanner-active`, which then contains certain CSS rules for our app.
  document.querySelector('body')?.classList.add('barcode-scanner-active');

  // Add the `barcodeScanned` listener
  const listener = await BarcodeScanner.addListener(
    'barcodeScanned',
    async result => {
      console.log(result.barcode);
    },
  );

  // Start the barcode scanner
  await BarcodeScanner.startScan();
};

Other information:

Capacitor doctor:

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 4.7.0
  @capacitor/core: 4.7.0
  @capacitor/android: 4.7.0
  @capacitor/ios: 4.7.0

Installed Dependencies:

  @capacitor/cli: 4.6.2
  @capacitor/core: 4.6.2
  @capacitor/android: 4.6.2
  @capacitor/ios: 4.6.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

bug: Code39 scan results are incorrect

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Code39 Almost every scan results are different

Expected behavior

Code39 correct scan results

Reproduction

N/A

Steps to reproduce

N/A

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/ios: not installed
@capacitor/cli: 5.5.1
@capacitor/android: 5.5.1
@capacitor/core: 5.5.1

[success] Android looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

refactor(barcode-scanning): do not automatically request permissions

Before an app requests permissions, it should display a message to the user explaining why the permissions are required. For this reason, permissions should not be requested automatically by the plugin, but only actively by the developer. Instead, the plugin should throw an error that the permissions are missing.

feat: Image labeling

Is your feature request related to a problem? Please describe:

The ML Kit Image Labeling API is not yet supported.

Describe the solution you'd like:

Add a Image Labeling plugin.

Describe alternatives you've considered:

Additional context:

bug:

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

5.3.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

npx cap sync results in this error:

Ignoring ffi-1.16.3 because its extensions are not built. Try: gem pristine ffi --version 1.16.3
        Analyzing dependencies
        
        ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
        
        ### Command
        
        ```
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/bin/pod install
        ```
        
        ### Report
        
        * What did you do?
        
        * What did you expect to happen?
        
        * What happened instead?
        
        
        ### Stack
        
        ```
        CocoaPods : 1.14.2
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
        RubyGems : 3.5.4
        Host : macOS 14.1.2 (23B92)
        Xcode : 15.0.1 (15A507)
        Git : git version 2.42.0
        Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/lib
        Repositories : trunk - CDN - https://cdn.cocoapods.org/
        ```
        
        ### Plugins
        
        ```
        cocoapods-deintegrate : 1.0.5
        cocoapods-plugins     : 1.0.0
        cocoapods-search      : 1.0.1
        cocoapods-trunk       : 1.6.0
        cocoapods-try         : 1.2.0
        ```
        
        ### Podfile
        
        ```ruby
        require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
        
        platform :ios, '13.0'
        use_frameworks!
        
        # workaround to avoid Xcode caching of Pods that requires
        # Product -> Clean Build Folder after new Cordova plugins installed
        # Requires CocoaPods 1.6 or newer
        install! 'cocoapods', :disable_input_output_paths => true
        
        def capacitor_pods
        pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
        pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
        pod 'CapacitorCommunityAppleSignIn', :path => '../../node_modules/@capacitor-community/apple-sign-in'
        pod 'CapacitorCommunityFirebaseAnalytics', :path => '../../node_modules/@capacitor-community/firebase-analytics'
        pod 'CapacitorFirebaseMessaging', :path => '../../node_modules/@capacitor-firebase/messaging'
        pod 'CapacitorMlkitTranslation', :path => '../../node_modules/@capacitor-mlkit/translation'
        pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
        pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
        pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
        pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard'
        pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
        pod 'CapacitorGeolocation', :path => '../../node_modules/@capacitor/geolocation'
        pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
        pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
        pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
        pod 'CapacitorScreenOrientation', :path => '../../node_modules/@capacitor/screen-orientation'
        pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
        pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
        pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
        pod 'CapawesomeCapacitorAppUpdate', :path => '../../node_modules/@capawesome/capacitor-app-update'
        pod 'CapgoNativeAudio', :path => '../../node_modules/@capgo/native-audio'
        pod 'CodetrixStudioCapacitorGoogleAuth', :path => '../../node_modules/@codetrix-studio/capacitor-google-auth'
        pod 'CapacitorEmailComposer', :path => '../../node_modules/capacitor-email-composer'
        pod 'CapacitorJitsiMeet', :path => '../../node_modules/capacitor-jitsi-meet'
        pod 'CapacitorNativeSettings', :path => '../../node_modules/capacitor-native-settings'
        pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
        end
        
        target 'App' do
        capacitor_pods
        # Add your Pods here
        end
        
        post_install do |installer|
        assertDeploymentTarget(installer)
        end
        ```
        
        ### Error
        
        ```
        LoadError - dlopen(/opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ffi-1.16.3/lib/ffi_c.bundle, 0x0009):
        Library not loaded: /opt/homebrew/opt/ruby/lib/libruby.3.2.dylib
        Referenced from: <B5B93C65-B173-3A7C-B0C2-096CF05D3F20>
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ffi-1.16.3/lib/ffi_c.bundle
        Reason: tried: '/opt/homebrew/opt/ruby/lib/libruby.3.2.dylib' (no such file),
        '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/ruby/lib/libruby.3.2.dylib' (no such file),
        '/opt/homebrew/opt/ruby/lib/libruby.3.2.dylib' (no such file),
        '/opt/homebrew/Cellar/ruby/3.3.0/lib/libruby.3.2.dylib' (no such file),
        '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/ruby/3.3.0/lib/libruby.3.2.dylib' (no such file),
        '/opt/homebrew/Cellar/ruby/3.3.0/lib/libruby.3.2.dylib' (no such file) -
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ffi-1.16.3/lib/ffi_c.bundle
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ffi-1.16.3/lib/ffi.rb:5:in `rescue in <top (required)>'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ffi-1.16.3/lib/ffi.rb:2:in `<top (required)>'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/ethon-0.16.0/lib/ethon.rb:3:in `<top (required)>'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:440:in
        `download_typhoeus_impl_async'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:372:in
        `download_and_save_with_retries_async'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:365:in
        `download_file_async'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:338:in
        `download_file'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:284:in
        `ensure_versions_file_loaded'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/cdn_source.rb:208:in
        `search'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/source/aggregate.rb:83:in
        `block in search'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/source/aggregate.rb:83:in
        `select'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-core-1.14.2/lib/cocoapods-core/source/aggregate.rb:83:in
        `search'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:416:in
        `create_set_from_sources'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:385:in
        `find_cached_set'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:360:in
        `specifications_for_dependency'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:165:in
        `search_for'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:274:in `block in
        sort_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:267:in `each'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:267:in `sort_by'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:267:in `sort_by!'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:267:in
        `sort_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in
        `block in sort_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in
        `with_no_such_dependency_error_handling'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in
        `sort_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in
        `push_state_for_requirements'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in
        `require_nested_dependencies_for'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in
        `activate_new_spec'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in
        `attempt_to_activate'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in
        `process_topmost_state'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/resolver.rb:94:in `resolve'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer/analyzer.rb:1082:in
        `block in resolve_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/user_interface.rb:64:in
        `section'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer/analyzer.rb:1080:in
        `resolve_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer/analyzer.rb:125:in
        `analyze'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer.rb:422:in `analyze'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer.rb:244:in `block in
        resolve_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/user_interface.rb:64:in
        `section'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer.rb:243:in
        `resolve_dependencies'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/installer.rb:162:in `install!'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/command/install.rb:52:in `run'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/lib/cocoapods/command.rb:52:in `run'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/gems/cocoapods-1.14.2/bin/pod:55:in `<top (required)>'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/bin/pod:25:in `load'
        /opt/homebrew/Cellar/cocoapods/1.14.2/libexec/bin/pod:25:in `<main>'
        ```
        
        ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
        
        [!] Oh no, an error occurred.
        
        Search for existing GitHub issues similar to yours:
        https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.14.2%2Flibexec%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+Library+not+loaded%3A+%2Fopt%2Fhomebrew%2Fopt%2Fruby%2Flib%2Flibruby.3.2.dylib%0A++Referenced+from%3A+%3CB5B93C65-B173-3A7C-B0C2-096CF05D3F20%3E+%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.14.2%2Flibexec%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%0A++Reason%3A+tried%3A+%27%2Fopt%2Fhomebrew%2Fopt%2Fruby%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29%2C+%27%2FSystem%2FVolumes%2FPreboot%2FCryptexes%2FOS%2Fopt%2Fhomebrew%2Fopt%2Fruby%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29%2C+%27%2Fopt%2Fhomebrew%2Fopt%2Fruby%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29%2C+%27%2Fopt%2Fhomebrew%2FCellar%2Fruby%2F3.3.0%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29%2C+%27%2FSystem%2FVolumes%2FPreboot%2FCryptexes%2FOS%2Fopt%2Fhomebrew%2FCellar%2Fruby%2F3.3.0%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29%2C+%27%2Fopt%2Fhomebrew%2FCellar%2Fruby%2F3.3.0%2Flib%2Flibruby.3.2.dylib%27+%28no+such+file%29+-+%2Fopt%2Fhomebrew%2FCellar%2Fcocoapods%2F1.14.2%2Flibexec%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle&type=Issues
        
        If none exists, create a ticket, with the template displayed above, on:
        https://github.com/CocoaPods/CocoaPods/issues/new
        
        Be sure to first read the contributing guide for details on how to properly submit a ticket:
        https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
        
        Don't forget to anonymize any private data!
        
        Searching for inspections failed: undefined method `map' for nil
        Looking for related issues on cocoapods/cocoapods...

Expected behavior

It should install the plugin without an error

Reproduction

https://github.com

Steps to reproduce

Create an empty ionic capacitor project with ios and android platforms added. (5.6.0)
Try to install the plugin.

Other information

No response

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.6.0
@capacitor/core: 5.6.0
@capacitor/android: 5.6.0
@capacitor/ios: 5.6.0

Installed Dependencies:

@capacitor/cli: 5.5.1
@capacitor/android: 5.6.0
@capacitor/core: 5.6.0
@capacitor/ios: 5.6.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat(barcode-scanning): Support for using the model in Google Play Services

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Currently the plugin bundling the model with the app and this adds 10-20mb to the app. Will there be available the option of using the model in Google Play Services so it will automatically download the model to the device after the app is installed from the Play Store?

Preferred solution

Google's ml-kit is already offering this.
Scan barcodes with ML Kit on Android

Alternative options

No response

Additional context

No response

Bundle Google Play barcode scanning capabilities instead of having to download

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

isGoogleBarcodeScannerModuleAvailable and installGoogleBarcodeScannerModule... what if the app is offline?

How can I bundle dependencies in such a way that I don't have to do that check?

Preferred solution

Don't download dependencies via a line of code in my app.... bundle what's needed already like a normal app.

Alternative options

No response

Additional context

No response

⚡ Capacitor 6

According to this blog post, Capacitor 6 will be the latest version from February 2024. From this point on, all plugins in this repository should also support Capacitor 6. Capacitor 5 will no longer be supported from this date.

bug(barcode-scanning): multiple results while scanning same barcodes

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

We migrated from the deprecated package to this package and run into to issues while scanning multiple codes.

When we scan multiple barcodes, the scanner recognizes several different results for the same barcodes.

MicrosoftTeams-video.mp4

Expected behavior

Deterministic recognition of scanned barcodes.

Reproduction

https://github.com

Steps to reproduce

Use the Scanner with multiple Codes or see our attached video.

Other information

Given Barcodes:

4058172100963
4058172309519
4058172310232

Detected Barcodes:

4058172100963
4058172309519
4058172310232
9061177310232
9061177309519
9061177100963
3051877309519
4058172310102
3051877310232

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

bug: cannot scan with phone facing an angle of 30-45 degrees (iOS)

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

plugin does not scan a QR code when the phone is facing an angle of 30-45 degrees (previous plugin from capacitor worked OK)

Expected behavior

plugin scans correctly with the phone facing an angle of 30-45 degrees

Reproduction

Happens with any project/code

Steps to reproduce

  1. Open the plugin
  2. Put the phone in an angle like between 30 and 45 degrees
  3. Try to scan a QR code

Other information

It happens with any project/code. We find it very odd that no one has reported it yet.

Capacitor doctor

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

feat: Pose detection

Is your feature request related to a problem? Please describe:

The ML Kit Pose Detection API is not yet supported.

Describe the solution you'd like:

Add a Pose Detection plugin.

Describe alternatives you've considered:

Additional context:

feat(barcode-scanning): support all barcode types

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Currently, only the displayValue/rawValue of a barcode is returned.
However, the ML Kit Barcode Scanning SDK also offers the option of returning parsed data such as calendar event details or email details.

Preferred solution

Extend the barcode interface with the following properties:

Alternative options

No response

Additional context

No response

Before submitting

bug(barcode-scanning): `NullPointerException` during `startScan(...)`

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

5.3.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

I have a vue .js app (vue.js 2.0) and add barcode reader package but when start scan show me bellow error

startScan failed.
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner.lambda$startScan$0(BarcodeScanner.java:108)
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner.$r8$lambda$XoJ4tltbmXkBZjUvzn_RkQLTSis(Unknown Source:0)
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8437)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:560)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

Expected behavior

Start Scanning

Reproduction

capawesome-team/.capacitor-app.

Steps to reproduce

  1. install on vue.js app
  2. copy all sample code for scanning
  3. sync (npx cap sync android)
  4. open (npx cap open android)
  5. debug (on android platform)
  6. show erorr

Other information

No response

Capacitor doctor

[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: unknown
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/ios: not installed
@capacitor/cli: 5.5.1
@capacitor/android: 5.5.1
@capacitor/core: 5.5.1

[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.

Focus in center/scanning box

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Im having a problem with losing focus with im zooming or moving my phone, camera is somehow focusing on other elements viewed in camera which sometimes is problematic

Preferred solution

Adding an option to set focus in scanning box or make it possible to focus only on center.

Alternative options

No response

Additional context

No response

Before submitting

feat: Show a box outline for IOS QR Code Scan

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Current problem

Android has a nice box outline for scanning the QR Code. I.e - where to position the qr code for it to scan.

A feature like this on ios would improve user experience.

Preferred solution

show box outline on ios camera when scanning qr code

Alternative options

No response

Additional context

No response

feat: Barcode scanning

Is your feature request related to a problem? Please describe:

The ML Kit Barcode Scanning API is not yet supported.

Describe the solution you'd like:

Add a Barcode Scanning plugin.

Describe alternatives you've considered:

Additional context:

bug: On IOS Emulator [error] - Error: Uncaught (in promise): Error: Not available on iOS

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

If i try to start a new scan the plugin return me [error] - Error: Uncaught (in promise): Error: Not available on iOS

Expected behavior

I want to use it on iOS. On Android is OK

Reproduction

https://github.com/robingenz/capacitor-mlkit-plugin-demo.git

Steps to reproduce

async scan(): Promise<void> {
    await BarcodeScanner.requestPermissions();

        // Check if the Google ML Kit barcode scanner is available
        await BarcodeScanner.isGoogleBarcodeScannerModuleAvailable().then(async (data) => {
            if (data.available) {
                // Start the barcode scanner
                await this.startScanner().then(async (barcodes) => {
                    var code = barcodes[0].rawValue;
                    console.log(code);
                });
            } else {
                // Install the Google ML Kit barcode scanner
                await BarcodeScanner.installGoogleBarcodeScannerModule().then(async () => {
                    await this.startScanner().then(async (barcodes) => {
                        var code = barcodes[0].rawValue;
                        console.log(code);
                    });
                });
            }
        });
  }

  async startScanner() {
    const { barcodes } = await BarcodeScanner.scan({
        formats: [BarcodeFormat.QrCode, BarcodeFormat.Ean13]
    });
    return barcodes;
}

  async requestPermissions(): Promise<boolean> {
    const { camera } = await BarcodeScanner.requestPermissions();
    return camera === 'granted' || camera === 'limited';
  }

  async presentAlert(): Promise<void> {
    console.log("Non va");
  }

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1

Installed Dependencies:

@capacitor/cli: 5.4.1
@capacitor/core: 5.4.1
@capacitor/ios: 5.4.1
@capacitor/android: 5.4.1

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.

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.