Skip to content

Unable to run Flutter with hot reload on iOS 17 #128531

Closed

Description

@ArkinSolomon

Is there an existing issue for this?

Steps to reproduce

  1. Have a functioning Flutter project that builds on iOS 16.4
  2. Update to MacOS Sonoma developer beta, iOS 17 developer beta, and the Xcode 15 beta
  3. Run flutter doctor -v and see that everything checks out
  4. Run flutter run --debug -v and see that it doesn't work

Actual results

I had a project that was working fine, with iOS 16, but I recently updated to the iOS 17 developer beta. The project runs fine from Xcode using Product > Run, but it's a pain to have to rebuild every time. Note that the logs show that I am using the beta tool, but I get the same output on the stable tool.

I have switched the selected Xcode to the beta using xcode-select and xcode-select -p reflects that (/Applications/Xcode-beta.app/Contents/Developer).

I noticed this line near the end of the log:

[+2503 ms] 2023-06-08 14:40:10.025 ios-deploy[24347:205465] [ !! ] Unable to locate DeviceSupport directory with suffix 'DeveloperDiskImage.dmg'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!

I did look in the /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform folder, but there is no folder for 17. I have installed (and tried reinstalling) iOS 17 support through Xcode settings > Platforms > iOS 17.0 beta. I also found this thread and posted to it, but no one has responded yet. Anybody know what to do?

Again I'd like to point out that Product > Run does work, however I can't run it through VSCode or terminal, I can only run it through Xcode.

Also note that flutter build ios works fine.

Logs

log.txt

Flutter Doctor output

Doctor output
[✓] Flutter (Channel beta, 3.11.0-0.1.pre, on macOS 14.0 23A5257q darwin-x64, locale en-US)
    • Flutter version 3.11.0-0.1.pre on channel beta at /Users/arkinsolomon/fvm/versions/beta
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 350d2c3a6c (2 weeks ago), 2023-05-23 15:52:05 -0700
    • Engine revision 7eca5cd1c5
    • Dart version 3.1.0 (build 3.1.0-63.1.beta)
    • DevTools version 2.23.1

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Build 15A5160n
    • CocoaPods version 1.12.0

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

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2022.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (3 available)
    • Arkin’s iPhone (mobile) • <REDACTED-IPHONE-IDENTIFIER> • ios            • iOS 17.0 21A5248v
    • macOS (desktop)         • macos                        • darwin-x64     • macOS 14.0 23A5257q darwin-x64
    • Chrome (web)            • chrome                       • web-javascript • Google Chrome 114.0.5735.106

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

! Doctor found issues in 2 categories.

Activity

  1. ArkinSolomon commented on Jun 9, 2023

    @ArkinSolomon
    Author

    Alright so somebody from Apple responded to the thread on the Apple developer forum:

    Sounds like Flutter may need to update their assumptions about how the system works. (I don't know why Flutter relies on that folder; that's a question for Flutter.)

  2. darshankawar commented on Jun 9, 2023

    @darshankawar
    Member

    Thanks for the report @ArkinSolomon
    Please check this SO link and see if it helps in your case.

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jun 9, 2023
  4. ArkinSolomon commented on Jun 9, 2023

    @ArkinSolomon
    Author

    I came across that, and it points to the same GitHub as mentioned in the Apple developer thread. However, as they mentioned in the thread, these device files do not exist within the /Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform folder anymore. I'm assuming they changed the system for iOS 17.

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jun 9, 2023
  6. darshankawar commented on Jun 9, 2023

    @darshankawar
    Member

    Thanks for the feedback. I'll keep this issue open and label for tracking and team's attention, as currently I don't have the said configuration, ie, latest macOS and iOS version.

  7. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: xcode"xcodebuild" on iOS and general Xcode project management
    e: OS-version specificAffects only some versions of the relevant operating system
    t: hot reloadReloading code during "flutter run"
    and removed
    in triagePresently being triaged by the triage team
    on Jun 9, 2023
  8. leighajarett commented on Jun 9, 2023

    @leighajarett
    Contributor

    @vashworth sounds like what you had mentioned

  9. vashworth commented on Jun 9, 2023

    @vashworth
    Contributor

    Yes, this is the issue I had as well. Flutter uses a third-party tool called ios-deploy that is used to install the app on the device, launch the app, start debug server, and stream device logs. ios-deploy depends on the DeveloperDiskImage which should be located within Xcode-beta.app > Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport > 17.x as mentioned above. It could be that it's not there because it's in beta or it could be a permanent change. Either way, we're looking into alternatives.

  10. 19 remaining items

  11. montythemack commented on Jul 27, 2023

    @montythemack

    I tried to use the XCode 15 beta 5 version. And it works perfectly with my iPhone, which is updated to IOS 17 developer beta version.

    Make sure to download the ios 17 simulator pack in XCode for it to work.

    This worked for me with the simulator but not a physical device on iOS 17

  12. bibaswan-bhawal commented on Jul 27, 2023

    @bibaswan-bhawal

    Also note it works fine when running from Xcode the issues is the flutter run command is broken

  13. JaredEzz commented on Aug 9, 2023

    @JaredEzz
  14. Ethan-Katz commented on Aug 9, 2023

    @Ethan-Katz
  15. vashworth commented on Aug 23, 2023

    @vashworth
    Contributor

    New tooling has been added to Flutter 3.13 and Flutter 3.14.0-0.1.pre, which should allow flutter run to work with iOS 17 physical devices.

    If new issues are discovered, please file new issues for them.

  16. added
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 24, 2023
  17. mshere9 commented on Aug 29, 2023

    @mshere9
  18. github-actions commented on Sep 12, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  19. locked as resolved and limited conversation to collaborators on Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versiont: hot reloadReloading code during "flutter run"t: xcode"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-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