Reputation: 135
I am not able to run my flutter app on iOS Simulator. It is giving me this error :
Launching lib/main.dart on iPhone XR in debug mode... Starting Xcode build... Xcode build done. 7.9s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **
Xcode's output: ↳ === BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug === /Users/snehal/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/ios/Classes/SwiftSimplePermissionsPlugin.swift:51:38: error: 'UIApplicationOpenSettingsURLString' has been renamed to 'UIApplication.openSettingsURLString' if let url = URL(string: UIApplicationOpenSettingsURLString) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UIApplication.openSettingsURLString UIKit.UIApplicationOpenSettingsURLString:3:12: note: 'UIApplicationOpenSettingsURLString' was obsoleted in Swift 4.2 public let UIApplicationOpenSettingsURLString: String ^
Could not build the application for the simulator. Error launching application on iPhone XR.
Please Help. Thanks in advance :)
I want to run my app on iOS Simulator.
Upvotes: 5
Views: 19434
Reputation: 1
Xcode installation is incomplete; a full installation is necessary for iOS and macOS development. Download at: https://developer.apple.com/xcode/download/ Or install Xcode via the App Store. Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
Upvotes: -1
Reputation: 688
hello my case is add dependencie wrong path haha. not about upgrade anything
please check dependencie if you try fix same on top comment then can't fix your problem.
in my case wrong path of asset , image , font of my project.
Upvotes: 0
Reputation: 2129
Upvotes: 1
Reputation: 121
Did you check flutter channel ?
Firstly, you should check after run flutter channel command in terminal.
then , you should change flutter channel as master with flutter channel master command.
Finally, restart IOS Simulator and run flutter in your application.
I hope that will be useful.
Upvotes: 0
Reputation: 11
Open POD file in ios folder. Search 'SWIFT_VERSION' and change it to 4.2 ...like this
config.build_settings['SWIFT_VERSION'] = '4.2'
then do flutter run
Upvotes: 1
Reputation: 10610
if you have no luck then try to open with Xcode (Build and Run Enjoy):
Upvotes: 3