Skip to content

[camera][ios] Landscape orientation seems to be inverted on iOS #117981

@letsar

Description

@letsar

Steps to Reproduce

  1. Execute flutter run on and iOS device, on the code sample available on this repo: https://github.com/letsar/flutter_camera_ios_orientation_issue
  2. Rotate the device to the left so that it will display DeviceOrientation.landscapeLeft at the top-right of the screen
  3. Take a photo with the FAB

Expected results:
The picture should be in the right orientation

Actual results:
The picture is upside down

IMG_0013

Code sample

The code is available on a dedicated repo because it's easier to reproduce this way.

Logs
[  +73 ms] ------ Debug phase ------
[        ] Starting debug of 00008030-000139323E86402E (D79AP, iPhone SE 2G, iphoneos, arm64e, 15.6.1, 19G82) a.k.a. 'iPhone' connected through USB...
[+1291 ms] [  0%] Looking up developer disk image
[  +13 ms] [ 95%] Developer disk image mounted successfully
[  +76 ms] Symbol Path: /Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols
[ +345 ms] [100%] Connecting to remote debug server
[        ] -------------------------
[ +211 ms] (lldb) command source -s 0 '/tmp/A3B7F0DE-1719-44BA-A0CB-6E838EF6BB20/fruitstrap-lldb-prep-cmds-00008030_000139323E86402E'
[        ] Executing commands in '/tmp/A3B7F0DE-1719-44BA-A0CB-6E838EF6BB20/fruitstrap-lldb-prep-cmds-00008030_000139323E86402E'.
[        ] (lldb)     platform select remote-'ios' --sysroot '/Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols'
[        ]   Platform: remote-ios
[        ]  Connected: no
[        ]   SDK Path: "/Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols"
[        ] (lldb)     target create "/Users/user/projets/perso/flutter_camera_ios_orientation_issue/build/ios/iphoneos/Runner.app"
[+2897 ms] Current executable set to '/Users/user/projets/perso/flutter_camera_ios_orientation_issue/build/ios/iphoneos/Runner.app' (arm64).
[        ] (lldb)     script fruitstrap_device_app="/private/var/containers/Bundle/Application/C6E8D036-1CE4-417E-AE3D-068B00F69A56/Runner.app"
[ +130 ms] (lldb)     script fruitstrap_connect_url="connect://127.0.0.1:60765"
[        ] (lldb)     script fruitstrap_output_path=""
[        ] (lldb)     script fruitstrap_error_path=""
[        ] (lldb)     target modules search-paths add /usr "/Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols/usr" /System "/Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols/System" "/private/var/containers/Bundle/Application/C6E8D036-1CE4-417E-AE3D-068B00F69A56" "/Users/user/projets/perso/flutter_camera_ios_orientation_issue/build/ios/iphoneos" "/var/containers/Bundle/Application/C6E8D036-1CE4-417E-AE3D-068B00F69A56" "/Users/user/projets/perso/flutter_camera_ios_orientation_issue/build/ios/iphoneos" /Developer "/Users/user/Library/Developer/Xcode/iOS DeviceSupport/15.6.1 (19G82) arm64e/Symbols/Developer"
[   +8 ms] (lldb)     command script import "/tmp/A3B7F0DE-1719-44BA-A0CB-6E838EF6BB20/fruitstrap_00008030_000139323E86402E.py"
[   +3 ms] (lldb)     command script add -f fruitstrap_00008030_000139323E86402E.connect_command connect
[        ] (lldb)     command script add -s asynchronous -f fruitstrap_00008030_000139323E86402E.run_command run
[        ] (lldb)     command script add -s asynchronous -f fruitstrap_00008030_000139323E86402E.autoexit_command autoexit
[        ] (lldb)     command script add -s asynchronous -f fruitstrap_00008030_000139323E86402E.safequit_command safequit
[        ] (lldb)     connect
[  +37 ms] (lldb)     run
[ +174 ms] success
[        ] Application launched on the device. Waiting for observatory url.
[+1596 ms] Observatory URL on device: http://127.0.0.1:59819/
[   +1 ms] Attempting to forward device port 59819 to host port 60773
[        ] executing: /Users/user/dev/flutter/bin/cache/artifacts/usbmuxd/iproxy 60773:59819 --udid 00008030-000139323E86402E --debug
[ +453 ms] The selected imageFormatGroup is not supported by iOS. Defaulting to brga8888
[ +553 ms] Forwarded port ForwardedPort HOST:60773 to DEVICE:59819
[        ] Forwarded host port 60773 to device port 59819 for Observatory
[   +1 ms] Installing and launching... (completed in 9,8s)
[        ] Caching compiled dill
[  +29 ms] Connecting to service protocol: http://127.0.0.1:60773/
[ +110 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:60773/.
[  +50 ms] DDS is listening at http://127.0.0.1:60776/d8CORtEsXI8=/.
[  +26 ms] Successfully connected to service protocol: http://127.0.0.1:60773/
[  +16 ms] DevFS: Creating new filesystem on the device (null)
[  +12 ms] DevFS: Created new filesystem on the device (file:///private/var/mobile/Containers/Data/Application/5577B2F5-0636-4410-9551-DA14A54FC104/tmp/flutter_camera_ios_orientation_issueyUttMU/flutter_camera_ios_orientation_issue/)
[   +1 ms] Updating assets
[  +52 ms] Syncing files to device iPhone...
[        ] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[        ] <- recompile package:flutter_camera_ios_orientation_issue/main.dart c5a01c89-37ca-42c2-a90c-6a22bae1d0f4
[        ] <- c5a01c89-37ca-42c2-a90c-6a22bae1d0f4
[        ] Bundle processing done.
[  +27 ms] Updating files.
[        ] DevFS: Sync finished
[        ] Syncing files to device iPhone... (completed in 30ms)
[        ] Synced 0.0MB.
[        ] <- accept
[   +2 ms] Connected to _flutterView/0x10381dc20.
[   +1 ms] Flutter run key commands.
[        ] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[        ] An Observatory debugger and profiler on iPhone is available at: http://127.0.0.1:60776/d8CORtEsXI8=/
[  +11 ms] The Flutter DevTools debugger and profiler on iPhone is available at: http://127.0.0.1:9103?uri=http://127.0.0.1:60776/d8CORtEsXI8=/
[+11969 ms] DevFS: Deleting filesystem on the device (file:///private/var/mobile/Containers/Data/Application/5577B2F5-0636-4410-9551-DA14A54FC104/tmp/flutter_camera_ios_orientation_issueyUttMU/flutter_camera_ios_orientation_issue/)
[  +12 ms] DevFS: Deleted filesystem on the device (file:///private/var/mobile/Containers/Data/Application/5577B2F5-0636-4410-9551-DA14A54FC104/tmp/flutter_camera_ios_orientation_issueyUttMU/flutter_camera_ios_orientation_issue/)
[   +3 ms] Application finished.
[   +3 ms] "flutter run" took 72 171ms.
[   +3 ms] ios-deploy exited with code 0
[   +9 ms] Service protocol connection closed.
[  +36 ms] ensureAnalyticsSent: 47ms
[        ] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
Analyzing flutter_camera_ios_orientation_issue...                       
No issues found! (ran in 1.4s)
[✓] Flutter (Channel stable, 3.3.7, on macOS 12.5.1 21G83 darwin-arm, locale fr-FR)
    • Flutter version 3.3.7 on channel stable at /Users/user/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e99c9c7cd9 (il y a 9 semaines), 2022-11-01 16:59:00 -0700
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
    • Xcode at /Applications/Xcode-14.0.0.app/Contents/Developer
    • Build 14A309
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Connected device (4 available)
    • IN2023 (mobile) • 87950fce                  • android-arm64  • Android 13 (API 33)
    • iPhone (mobile) • 00008030-000139323E86402E • ios            • iOS 15.6.1 19G82
    • macOS (desktop) • macos                     • darwin-arm64   • macOS 12.5.1 21G83 darwin-arm
    • Chrome (web)    • chrome                    • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: layoutSystemChrome and Framework's Layout Issuesfound in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions