2

I'm new to iOS development using flutter and just recently switch from android to iOS in flutter.

I got below error when the project was run for first time in mac, it does not gives any error on Android and runs successfully.

Failed to build iOS app
Error output from Xcode build:
↳
    2022-03-19 11:43:32.804 xcodebuild[9398:77766] 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-03-19 11:43:32.804 xcodebuild[9398:77766] 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/7x/7bvzz8356b79dpq_bq4cr_p40000gp/T/flutter_tools.YZ6rQ9/flutter_ios_build_temp_dirYwEDOD/temporary_xcresult_b
        undle

    /Users/icebit-imac3/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:13: warning:
    'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a
    preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                ^
    In module 'UIKit' imported from /Users/icebit-imac3/gem_client/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/System/
    Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated
    here
    @interface UIAlertView : UIView
               ^
    /Users/icebit-imac3/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:48: warning:
    'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a
    preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations]
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled"
                                                   ^
    In module 'UIKit' imported from /Users/icebit-imac3/gem_client/ios/Pods/Target Support Files/location/location-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/System/
    Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated
    here
    @interface UIAlertView : UIView
               ^
    2 warnings generated.
    2 warnings generated.
    No file or variants found for asset: .env.
    Failed to package /Users/icebit-imac3/gem_client.
    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/icebit-imac3/gem_client/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.4.99. (in
    target 'ReachabilitySwift' from project 'Pods')

    Result bundle written to path:
        /var/folders/7x/7bvzz8356b79dpq_bq4cr_p40000gp/T/flutter_tools.YZ6rQ9/flutter_ios_build_temp_dirYwEDOD/temporary_xcresult_b
        undle


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

Also tried,

  • pod install
  • iOS folder recreate using flutter create

but nothing works

Edit :

After setting IPHONEOS_DEPLOYMENT_TARGET to 9.0, gives below output,

Failed to build iOS app
Error output from Xcode build:
↳
    2022-03-19 12:53:28.631 xcodebuild[12230:115576] 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-03-19 12:53:28.631 xcodebuild[12230:115576] 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/7x/7bvzz8356b79dpq_bq4cr_p40000gp/T/flutter_tools.lDNtig/flutter_ios_build_temp_dirjdf2tt/temporary_xcresult_b
        undle

    No file or variants found for asset: .env.
    Failed to package /Users/icebit-imac3/gem_client.
    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

    Result bundle written to path:
        /var/folders/7x/7bvzz8356b79dpq_bq4cr_p40000gp/T/flutter_tools.lDNtig/flutter_ios_build_temp_dirjdf2tt/temporary_xcresult_b
        undle


Could not build the application for the simulator.
Error launching application on iPhone 11.
Saurabh D Vyas
  • 143
  • 1
  • 1
  • 7
  • ``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.4.99. (in target 'ReachabilitySwift' from project 'Pods')`` – OMi Shah Mar 19 '22 at 07:02
  • Does this answer your question? [The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1](https://stackoverflow.com/questions/54704207/the-ios-simulator-deployment-targets-is-set-to-7-0-but-the-range-of-supported-d) – OMi Shah Mar 19 '22 at 07:03
  • In xcode it shows iOS deployment target settled to 12.0 – Saurabh D Vyas Mar 19 '22 at 07:06
  • Read the solution from the link. – OMi Shah Mar 19 '22 at 07:13
  • Yes I tried that previously (forgot to mention in description) but gives same output – Saurabh D Vyas Mar 19 '22 at 07:14
  • Here is an answer I posted on a similar post - https://stackoverflow.com/a/71699463/6184696 - ultimately you had really bad luck switching to iOS in flutter this month. – C. Skjerdal Mar 31 '22 at 21:44

2 Answers2

2

There seems to have been some changes in Xcode 13.3, released on March 14, 2022. Downgrading to 13.2.1 was a viable workaround for me.

Mattias
  • 740
  • 10
  • 19
0

I had the same problem as you and after trying all the solution on the internet there's this command that worked : Flutter create . in your project terminal