简体   繁体   中英

Flutter app does not run on iOS simulator

I have been developing an app for both android and iOS, App is working perfectly on Android devices but I get some error when I try to run on iOS device. I updated xcode and developer tools to the latest as it is suggested in similar issues but none of them worked for me.


    Launching lib/main.dart on iPhone 13 in debug mode...
    Running Xcode build...                                                  
     └─Compiling, linking and signing...                         5,0s
    Xcode build done.                                           28,8s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        2022-07-11 18:35:57.582 xcodebuild[15576:52607] Requested but did not find extension point with identifier
        Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
        com.apple.dt.IDEWatchSupportCore
        2022-07-11 18:35:57.583 xcodebuild[15576:52607] Requested but did not find extension point with identifier
        Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in
        com.apple.dt.IDEWatchSupportCore
        ** BUILD FAILED **


    Xcode's output:
    ↳
        Writing result bundle at path:
            /var/folders/hn/zclkrvcx6z727_k0rssl_1x00000gn/T/flutter_tools.xkj85b/flutter_ios_build_temp_direwEhYz/temporary_xcresult_bundle

        /Users/haldiz/Library/Developer/Xcode/DerivedData/Runner-bxvlefboatfugfbdpodmkzmhtotl/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runne
        r.build/Script-014E83FBDAF3F33F05F23D32.sh: line 2: /Users/haldiz/Downloads/projectmain/ios/Pods/Target Support
        Files/Pods-Runner/Pods-Runner-frameworks.sh: Permission denied
        Command PhaseScriptExecution failed with a nonzero exit code
        note: Using new build system
        note: Planning
        note: Build preparation complete
        note: Building targets in dependency order
        /Users/haldiz/Downloads/projectmain/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
        8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'leveldb-library' from project 'Pods')

        Result bundle written to path:
            /var/folders/hn/zclkrvcx6z727_k0rssl_1x00000gn/T/flutter_tools.xkj85b/flutter_ios_build_temp_direwEhYz/temporary_xcresult_bundle


    Could not build the application for the simulator.
    Error launching application on iPhone 13.

What I've done to solve this until now (but failed):

  • Updated macOS, xcode and developer tools to the latest versions,
  • Deleted podfile and recreated it,
  • Deleted the iOS folder and recreated it,
  • Deleted developer tools and reinstalled it,

None of them worked unfortunately.

Edit 1:

Starting from zero I managed to install the app to the simulator but with the crash:


    Date/Time:           2022-07-13 15:27:24.5135 +0300
    Launch Time:         2022-07-13 15:27:24.1819 +0300
    OS Version:          macOS 12.4 (21F79)
    Release Type:        User
    Report Version:      104

    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Exception Note:  EXC_CORPSE_NOTIFY
    Triggered by Thread:  0

    Last Exception Backtrace:
    0   CoreFoundation                      0x7fff20420ae6 __exceptionPreprocess + 226
    1   libobjc.A.dylib                     0x7fff20177e78 objc_exception_throw + 48
    2   UIKitCore                           0x7fff24816dc2 -[UIStoryboard name] + 0
    3   UIKitCore                           0x7fff24695507 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 75
    4   UIKitCore                           0x7fff24695aa6 -[UIApplication _loadMainInterfaceFile] + 274
    5   UIKitCore                           0x7fff24694577 -[UIApplication _runWithMainScene:transitionContext:completion:] + 971
    6   UIKitCore                           0x7fff23cbd907 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
    7   UIKitCore                           0x7fff2424bdb6 _UIScenePerformActionsWithLifecycleActionMask + 88
    8   UIKitCore                           0x7fff23cbe416 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
    9   UIKitCore                           0x7fff23cbde28 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
    10  UIKitCore                           0x7fff23cbe247 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 819
    11  UIKitCore                           0x7fff23cbdadb -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
    12  UIKitCore                           0x7fff23cc5d73 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 178
    13  UIKitCore                           0x7fff241556ab +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 871
    14  UIKitCore                           0x7fff2426865e _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
    15  UIKitCore                           0x7fff23cc5a79 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 361
    16  UIKitCore                           0x7fff23ae896f __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 797
    17  UIKitCore                           0x7fff23ae7419 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
    18  UIKitCore                           0x7fff23ae85a8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 208
    19  UIKitCore                           0x7fff24692b20 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 508
    20  UIKitCore                           0x7fff2417dab7 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
    21  FrontBoardServices                  0x7fff25aa20ae -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
    22  FrontBoardServices                  0x7fff25acab41 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
    23  FrontBoardServices                  0x7fff25aafad5 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
    24  FrontBoardServices                  0x7fff25aca80f __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 352
    25  libdispatch.dylib                   0x7fff20106508 _dispatch_client_callout + 8
    26  libdispatch.dylib                   0x7fff20109052 _dispatch_block_invoke_direct + 281
    27  FrontBoardServices                  0x7fff25af07a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    28  FrontBoardServices                  0x7fff25af048b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
    29  FrontBoardServices                  0x7fff25af0950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
    30  CoreFoundation                      0x7fff2038f38a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    31  CoreFoundation                      0x7fff2038f282 __CFRunLoopDoSource0 + 180
    32  CoreFoundation                      0x7fff2038e764 __CFRunLoopDoSources0 + 248
    33  CoreFoundation                      0x7fff20388f2f __CFRunLoopRun + 878
    34  CoreFoundation                      0x7fff203886d6 CFRunLoopRunSpecific + 567
    35  GraphicsServices                    0x7fff2bededb3 GSEventRunModal + 139
    36  UIKitCore                           0x7fff24690e0b -[UIApplication _run] + 912
    37  UIKitCore                           0x7fff24695cbc UIApplicationMain + 101
    38  Runner                                 0x105fd8dff main + 63 (AppDelegate.swift:6)
    39  dyld                                   0x10dd5751e start + 462

    Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib              0x7fff60c5900e __pthread_kill + 10
    1   libsystem_pthread.dylib             0x7fff60c9a1ff pthread_kill + 263
    2   libsystem_c.dylib                   0x7fff200fab94 abort + 120
    3   libc++abi.dylib                     0x7fff20252818 abort_message + 231
    4   libc++abi.dylib                     0x7fff20243e7d demangling_terminate_handler() + 266
    5   libobjc.A.dylib                     0x7fff201780d1 _objc_terminate() + 96
    6   libc++abi.dylib                     0x7fff20251c47 std::__terminate(void (*)()) + 8
    7   libc++abi.dylib                     0x7fff20251be9 std::terminate() + 41
    8   libdispatch.dylib                   0x7fff2010651c _dispatch_client_callout + 28
    9   libdispatch.dylib                   0x7fff20109052 _dispatch_block_invoke_direct + 281
    10  FrontBoardServices                  0x7fff25af07a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    11  FrontBoardServices                  0x7fff25af048b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
    12  FrontBoardServices                  0x7fff25af0950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
    13  CoreFoundation                      0x7fff2038f38a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    14  CoreFoundation                      0x7fff2038f282 __CFRunLoopDoSource0 + 180
    15  CoreFoundation                      0x7fff2038e764 __CFRunLoopDoSources0 + 248
    16  CoreFoundation                      0x7fff20388f2f __CFRunLoopRun + 878
    17  CoreFoundation                      0x7fff203886d6 CFRunLoopRunSpecific + 567
    18  GraphicsServices                    0x7fff2bededb3 GSEventRunModal + 139
    19  UIKitCore                           0x7fff24690e0b -[UIApplication _run] + 912
    20  UIKitCore                           0x7fff24695cbc UIApplicationMain + 101
    21  Runner                                 0x105fd8dff main + 63 (AppDelegate.swift:6)
    22  dyld                                   0x10dd5751e start + 462



Open podfile uncomment the platform and change the value to 11.0. Run pod install. open the xcworkspave file in xcode. Go to projectand clean build folder. On top if you if see any warnings icon. Please click on that and resolve those warnings. Run it once from xcode and if it works then all subsequent build should work from your ide

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM