Skip to content

Proposed solution for #155 [BUG] iOS camera preview crashes when switching app#157

Merged
AlexV525 merged 5 commits intofluttercandies:mainfrom
lcuis:patch-2
Jan 16, 2023
Merged

Proposed solution for #155 [BUG] iOS camera preview crashes when switching app#157
AlexV525 merged 5 commits intofluttercandies:mainfrom
lcuis:patch-2

Conversation

@lcuis
Copy link
Contributor

@lcuis lcuis commented Jan 10, 2023

This proposed solution solved my issue on iPhone SE 2020 through near-production installation through test-flight.

@AlexV525
Copy link
Member

Please verify if it's still working without the regression: flutter/flutter#97199.

@lcuis
Copy link
Contributor Author

lcuis commented Jan 12, 2023

Here is what I did to validate this on my iPhone SE 2020:

  1. uninstall example app
  2. run example app with the correction
  3. open photo example
  4. validate permission
    => camera preview displayed as expected

I did the same with uninstall for the tap video example. I got an additional permission request for the microphone and the camera preview also displayed as expected.

Is there another scenario you had in mind?

@AlexV525
Copy link
Member

Is there another scenario you had in mind?

Yes, more cases like when previewing the captured picture then throwing the app back to the background and opening it again could cause related issues.

@lcuis
Copy link
Contributor Author

lcuis commented Jan 13, 2023

I just tried the following with success on my iPhone SE 2020:

  1. run plugin example app
  2. take a picture (first example)
  3. while staying on the taken image preview, switch to other app
  4. switch back to example app
    => As expected, taken image preview is still displayed. Also, when going back, the camera preview is displayed as expected.

lcuis and others added 2 commits January 13, 2023 16:54
Verified with mentioned scenarios that the fix continues to work on iPhone SE 2020.
@AlexV525
Copy link
Member

Please verify if the latest change still works fine.

@AlexV525 AlexV525 linked an issue Jan 15, 2023 that may be closed by this pull request
@lcuis
Copy link
Contributor Author

lcuis commented Jan 15, 2023

I confirm that the formatted version works as well for the mentioned scenarios on my iPhone SE 2020.

@AlexV525 AlexV525 merged commit 9e29888 into fluttercandies:main Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] iOS camera preview crashes when switching app

2 participants