Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: iOS 18 Simulator Problem #3264

Open
8 tasks done
bahadirarslan opened this issue Sep 24, 2024 · 3 comments
Open
8 tasks done

[Bug]: iOS 18 Simulator Problem #3264

bahadirarslan opened this issue Sep 24, 2024 · 3 comments
Labels
bug Something isn't working triage

Comments

@bahadirarslan
Copy link

Platform

iOS 18

Plugin

share_plus

Version

10.0.0

Flutter SDK

3.24.3

Steps to reproduce

I updated my simulator to iOS 18 and now I have very weird problems with simulator.
I have an open issue (flutter/flutter#155535) about flutter but I noticed this now.

When I use shareXFiles to share my file, the result is unexpected.

Simulator Screenshot - iPhone 16 Pro - 2024-09-24 at 12 15 07

Code Sample

Rect? rect = shareButtonRect(shareButtonKey);
Share.shareXFiles([XFile(file)], subject: 'Export', sharePositionOrigin: context.isLargeScreen || context.isMediumScreen ? rect : null);

Logs

UIKeyboardLayoutStar implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.
Failed to request default share mode for fileURL:file:///Users/bahadirarslan/Library/Developer/CoreSimulator/Devices/AA46777B-F7E7-4683-B1E5-B7C893100CAB/data/Containers/Data/Application/53338742-DD2D-43D5-9804-0EA336AEFDBC/Documents/exports/export_a36ccd37-a40d-40a3-b6b9-ce5118d2c60a.xlsx error:Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=1734, _LSFunction=runEvaluator}
Only support loading options for CKShare and SWY types.
error fetching item for URL:file:///Users/bahadirarslan/Library/Developer/CoreSimulator/Devices/AA46777B-F7E7-4683-B1E5-B7C893100CAB/data/Containers/Data/Application/53338742-DD2D-43D5-9804-0EA336AEFDBC/Documents/exports/export_a36ccd37-a40d-40a3-b6b9-ce5118d2c60a.xlsx : Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be opened."
error fetching item for URL:file:///Users/bahadirarslan/Library/Developer/CoreSimulator/Devices/AA46777B-F7E7-4683-B1E5-B7C893100CAB/data/Containers/Data/Application/53338742-DD2D-43D5-9804-0EA336AEFDBC/Documents/exports/export_a36ccd37-a40d-40a3-b6b9-ce5118d2c60a.xlsx : Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be opened."

Flutter Doctor

bahadirarslan@bahadirsmac % flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-TR)
    • Flutter version 3.24.3 on channel stable at /Users/bahadirarslan/Development/SDKS/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (12 days ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/bahadirarslan/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2023.2)
    • 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 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (6 available)
    • Bahadır’s iPhone (mobile)       • 00008120-00120CC93663C01E            • ios            • iOS 18.0 22A3354
    • iPhone 15 Pro (mobile)          • 62B1A11F-E38A-4906-A556-58EDD416CEEA • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • iPhone 16 Pro Max (mobile)      • 3BE587FB-5A67-4CCB-84D5-4A24C6EC42DA • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 128.0.6613.139
    ! Error: Browsing on the local area network for Bahadır's iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Bahadır’s Apple Watch needs to connect to determine its availability. Check the connection between the device and its companion iPhone, and the connection between the iPhone and Xcode. Both
      devices may also need to be restarted and unlocked. (code 1)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@bahadirarslan bahadirarslan added bug Something isn't working triage labels Sep 24, 2024
@miquelbeltran
Copy link
Member

Hello, can you explain further on what the issue is? "the result is unexpected" doesn't tell much.

@bahadirarslan
Copy link
Author

Sorry for the unclearity. As you can see from the screenshot after I press save to files, action sheet opens all empty and mostly I cannot close it without restarting the application. All action sheet is unresponsive even the Browse button. When I press hot restart on VSCode application restarts on the background and action sheet stays open like screenshot.

This error can cause because of some iOS 18 simulator bug but I wanted to be sure.

@miquelbeltran
Copy link
Member

Looking at the logs, the file file:///Users/bahadirarslan/Library/Developer/CoreSimulator/Devices/AA46777B-F7E7-4683-B1E5-B7C893100CAB/data/Containers/Data/Application/53338742-DD2D-43D5-9804-0EA336AEFDBC/Documents/exports/export_a36ccd37-a40d-40a3-b6b9-ce5118d2c60a.xlsx is not accessible by the app, as it says "The file couldn’t be opened.".

I am not sure if there has been a change in how the Simulator can access files in iOS 18.

In general, the plugin does not manage file access, it takes a file URI provided by the developer and passes it to the platform share method.

My recommendation for you is to investigate further why the file is not accessible, if there has been any changes in iOS 18, and as well to test on a physical device too. As well, you can also ask on Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants