Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

handle issue about background thread in ios #231

Closed
josh-m-sharpe opened this issue May 1, 2023 · 6 comments
Closed

handle issue about background thread in ios #231

josh-m-sharpe opened this issue May 1, 2023 · 6 comments

Comments

@josh-m-sharpe
Copy link

Guessing we shouldn't be seeing this.
Using: @capacitor-community/[email protected]
Xcode 14.3
iPhone 13

I see this warning in xcode console when I invoke:
BarcodeScanner.startScan()

⚡️  TO JS undefined
⚡️  To Native ->  BarcodeScanner startScan 65416664
Thread Performance Checker: -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness
PID: 3349, TID: 187904
Backtrace
=================================================================
3   CapacitorCommunityBarcodeScanner    0x0000000104ecb154 $s32CapacitorCommunityBarcodeScanner0cD0C4scan33_E9781981B91FA2D5C67BE1318BC971C3LLyyFyyScMYccfU1_ + 512
4   CapacitorCommunityBarcodeScanner    0x0000000104ec99f4 $sIeg_IeyB_TR + 48
5   libdispatch.dylib                   0x00000001052e4520 _dispatch_call_block_and_release + 32
6   libdispatch.dylib                   0x00000001052e6038 _dispatch_client_callout + 20
7   libdispatch.dylib                   0x00000001052f6798 _dispatch_main_queue_drain + 1196
8   libdispatch.dylib                   0x00000001052f62dc _dispatch_main_queue_callback_4CF + 44
9   CoreFoundation                      0x00000001c36fdd18 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 625944
10  CoreFoundation                      0x00000001c36df650 6A07CBE8-4F65-3DBC-B59D-C1A188A7B95D + 501328
11  CoreFoundation                      0x00000001c36e44dc CFRunLoopRunSpecific + 612
12  GraphicsServices                    0x00000001fe94435c GSEventRunModal + 164
13  UIKitCore                           0x00000001c5a7037c B0858D8E-7220-37BF-873F-ECC2B0A358C3 + 3789692
14  UIKitCore                           0x00000001c5a6ffe0 UIApplicationMain + 340
15  App                                 0x0000000104a5ffbc main + 64
16  dyld                                0x00000001e2b6cdec 41605DC7-F412-37D1-B51B-FEE1A26701E9 + 89580
@josh-m-sharpe josh-m-sharpe changed the title handle issue above native thread in ios handle issue about background thread in ios May 1, 2023
@thegnuu
Copy link
Collaborator

thegnuu commented May 2, 2023

We are aware of this "issue" and I am pretty sure it is fixed in the upcoming release, but I will have a look at it and double-check it :)

@davidquon
Copy link

I just encountered this issue as well. Are there any work arounds for this on iOS?

@thegnuu
Copy link
Collaborator

thegnuu commented May 2, 2023

It is not an issue, it is a warning. The plugin works without any issues.

It is not ideal of course, but so far nobody had any issues because of this.

@davidquon
Copy link

davidquon commented May 2, 2023

I seem to only get a black screen when launching the barcode scanner. Here's what I'm using for Capacitor. Let me know if you have any suggestions of things I can try to get it working or if I can provide any further information. This is working on Android for me just not iOS. Thanks for your help.

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

@davidquon
Copy link

So the black screen issue is with an iPad 5th generation running iOS 16.2. I tested again on an iPhone 12 Pro running iOS 16.4.1 and it works as expected. My black screen issue is seemingly separate from this issue. Thanks for the help and feedback @thegnuu. 🍻

@thegnuu
Copy link
Collaborator

thegnuu commented May 8, 2023

This is fixed in v5.0.0-beta.1 :)

@thegnuu thegnuu closed this as completed May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants