Reputation: 2044
I'm working on a project that I'm trying to build on Xcode's iOS simulator and the build keeps failing because of a whole load of errors that I don't really understand.
Looking for guidance and help if anyone has the time.
Thanks
Xcode build done. 11.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
/Users/chris/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/screenshot_callback-1.1.1/ios/Classes/SwiftScreenshotCallbackPlugin.swift:27:34: error: 'userDidTakeScreenshotNotification' has been renamed to 'NSNotification.Name.UIApplicationUserDidTakeScreenshot'
forName: UIApplication.userDidTakeScreenshotNotification,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSNotification.Name.UIApplicationUserDidTakeScreenshot
UIKit.UIApplication:73:22: note: 'userDidTakeScreenshotNotification' was introduced in Swift 4.2
public class let userDidTakeScreenshotNotification: NSNotification.Name
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'camera' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'camera' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone SE (2nd generation).
Exited (sigterm)```
Upvotes: 3
Views: 2342
Reputation: 41
Try this command in your project's ios / folder
pod install
If already installed, use
pod update
If you are using any camera plugin or image_picker let me know
Upvotes: 2