Flutter will not build on iOS with Firebase - flutter

I am not a very experienced developer. I have run against the following error and can't figure out how to get around it.
Steps already taken:
Wipe iOS folder and replace with iOS folder from new project.
Insert GoogleService-Info.plist file to runner/runner using XCode
pod install from the command line
pod update from the command line
flutter clean
flutter run -v from the command line
This is the output portion with error:
Error output from Xcode build:
↳
[ +1 ms] ** BUILD FAILED **
The following build commands failed:
CompileC
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/firebase_core
.build/Objects-normal/x86_64/FirebaseCorePlugin.o
/Users/shannongalway/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/ios/Classes/FirebaseCorePlugin.m normal x86_64 objective-c
com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[ +1 ms] Xcode's output:
↳
[ +74 ms] Build settings from command line:
ARCHS = x86_64
BUILD_DIR = /Users/shannongalway/IdeaProjects/carlinehound/build/ios
COMPILER_INDEX_STORE_ENABLE = NO
FLUTTER_SUPPRESS_ANALYTICS = true
SCRIPT_OUTPUT_STREAM_FILE = /var/folders/bv/50ls2w0n1tl136bfb5xpp_hw0000gn/T/flutter_build_log_pipe.lhBeoU/pipe_to_stdout
SDKROOT = iphonesimulator13.1
VERBOSE_SCRIPT_LOGGING = YES
note: Using new build system
note: Planning build
note: Constructing build description
WriteAuxiliaryFile
ProcessInfoPlistFile
/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/firebase_analytics/firebase_analytics.framework/Info.plist
/Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/Target\ Support\ Files/firebase_analytics/firebase_analytics-Info.plist (in target
'firebase_analytics' from project 'Pods')
cd /Users/shannongalway/IdeaProjects/carlinehound/ios/Pods
builtin-infoPlistUtility /Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/Target\ Support\
Files/firebase_analytics/firebase_analytics-Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -format binary -platform
iphonesimulator -o
/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/firebase_analytics/firebase_analytics.framework/Info.plist
CompileC
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulat
or/firebase_analytics.build/Objects-normal/x86_64/FirebaseAnalyticsPlugin.o
/Users/shannongalway/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-5.0.2/ios/Classes/FirebaseAnalyticsPlugin.m normal
x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'firebase_analytics' from project 'Pods')
cd /Users/shannongalway/IdeaProjects/carlinehound/ios/Pods
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios8.0-simulator
-fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules
-fmodules-cache-path=/Users/shannongalway/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400
-fmodules-prune-after=345600
-fbuild-session-file=/Users/shannongalway/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation
-fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module
-fmodule-name=firebase_analytics -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes
-Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars
-Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch
-Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized
-Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion
-Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof
-Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1
-DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.1.sdk -fasm-blocks -fstrict-aliasing
-Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes
-Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/firebase_analytics-generated-files.hmap
-I/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphones
imulator/firebase_analytics.build/firebase_analytics-own-target-headers.hmap
-I/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphones
imulator/firebase_analytics.build/firebase_analytics-all-non-framework-target-headers.hmap -ivfsoverlay
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/all-product-headers.yaml -iquote
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/firebase_analytics-project-headers.hmap
-I/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/firebase_analytics/include
-I/Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/Headers/Public
-I/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphones
imulator/firebase_analytics.build/DerivedSources-normal/x86_64
-I/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphones
imulator/firebase_analytics.build/DerivedSources/x86_64
-I/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphones
imulator/firebase_analytics.build/DerivedSources
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/firebase_analytics
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/BoringSSL-GRPC
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/FirebaseCore
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/FirebaseCoreDiagnostics
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/FirebaseFirestore
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/FirebaseInstanceID
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/GoogleDataTransport
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/GoogleDataTransportCCTSupport
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/GoogleUtilities
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/Protobuf
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/gRPC-C++
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/gRPC-Core
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/leveldb-library
-F/Users/shannongalway/IdeaProjects/carlinehound/build/ios/Debug-iphonesimulator/nanopb
-F/Users/shannongalway/IdeaProjects/carlinehound/ios/.symlinks/flutter/ios
-F/Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/FirebaseAnalytics/Frameworks
-F/Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/GoogleAppMeasurement/Frameworks -include
/Users/shannongalway/IdeaProjects/carlinehound/ios/Pods/Target\ Support\ Files/firebase_analytics/firebase_analytics-prefix.pch -MMD -MT
dependencies -MF
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/Objects-normal/x86_64/FirebaseAnalyticsPlugin.d --serialize-diagnostics
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/Objects-normal/x86_64/FirebaseAnalyticsPlugin.dia -c
/Users/shannongalway/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-5.0.2/ios/Classes/FirebaseAnalyticsPlugin.m -o
/Users/shannongalway/Library/Developer/Xcode/DerivedData/Runner-gujmunagyejhsgfssbevzrusvdkc/Build/Intermediates.noindex/Pods.build/Debug-iphonesim
ulator/firebase_analytics.build/Objects-normal/x86_64/FirebaseAnalyticsPlugin.o
flutter doctor
Shannons-Mac:carlinehound shannongalway$ flutter doctor -v
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G1012, locale en-US)
• Flutter version 1.9.1+hotfix.6 at /Users/shannongalway/development/flutter
• Framework revision 68587a0916 (8 weeks ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/shannongalway/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Community Edition (version 2019.2.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 40.2.4
• Dart plugin version 192.7402
[✓] Connected device (1 available)
• iPhone 11 Pro • C7EAA15B-AD74-4525-B314-3A19D59A9DA4 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
• No issues found!
From pubspec.yaml
firebase_core: ^0.4.0+9
cloud_firestore: ^0.12.9+6
firebase_analytics: ^5.0.2
I feel like I have searched just about as hard as I can for a solution, but I am simply walking in circles.

Things to check for:
Did you download GoogleService-Info.plist?
Adding the file GoogleService-Info.plist should be done through xcode by going to Runner > right click the Runner folder > Add Files to "Runner"

The only solution I can find is to actually remove the "strong" attribute in the referenced line of the file.
FIRFirestoreSettings.h:46:1: error: property with 'retain (or strong)' attribute must be of object type
Once this is done the project runs and builds without problems. This method is obviously not a fix, but a pretty hokey workaround. This will comeback.

Related

Flutter Jitsi meet IOS xcode build "PiPViewCoordinator?" error on Macbook M1 pro

I am getting this build error for IOS, while integrating jitsi_meet 4.0.0 in a flutter.
I am unable to run my application on simulator, as I am getting this PiPViewCoordinator error. Has anyone else faced issue before?
Xcode Build Error
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/gp/6s965rts4v58r8yxc4cxd5800000gn/T/flutter_tools.fVaWqL/flutter_ios_build_temp_dirc1d2Np/temporary_xcresult_bundle
Command CompileSwiftSources failed with a nonzero exit code
error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
fileprivate var pipViewCoordinator: PiPViewCoordinator?
^~~~~~~~~~~~~~~~~~
Command EmitSwiftModule failed with a nonzero exit code
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
fileprivate var pipViewCoordinator: PiPViewCoordinator?
^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:87:30: error: cannot find 'PiPViewCoordinator' in scope
pipViewCoordinator = PiPViewCoordinator(withView: jitsiMeetView)
^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:102:30: error: 'nil' requires a contextual type
pipViewCoordinator = nil
^
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:8:41: error: cannot find type 'PiPViewCoordinator' in scope
fileprivate var pipViewCoordinator: PiPViewCoordinator?
^~~~~~~~~~~~~~~~~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:31:5: warning: result of call to 'ensurePathMonitor()' is unused
ensurePathMonitor()
^ ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:35:5: warning: result of call to 'ensurePathMonitor()' is unused
ensurePathMonitor()
^ ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/ReachabilityConnectivityProvider.swift:23:5: warning: result of call to 'ensureReachability()' is unused
ensureReachability()
^ ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:31:5: warning: result of call to 'ensurePathMonitor()' is unused
ensurePathMonitor()
^ ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/PathMonitorConnectivityProvider.swift:35:5: warning: result of call to 'ensurePathMonitor()' is unused
ensurePathMonitor()
^ ~~
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.4/ios/Classes/ReachabilityConnectivityProvider.swift:23:5: warning: result of call to 'ensureReachability()' is unused
ensureReachability()
^ ~~
Command CompileSwiftSources failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/tusharasodariya/git-projects/meet-app/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 'ReachabilitySwift' from project 'Pods')
/Users/tusharasodariya/git-projects/meet-app/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 'FMDB' from project 'Pods')
Result bundle written to path:
/var/folders/gp/6s965rts4v58r8yxc4cxd5800000gn/T/flutter_tools.fVaWqL/flutter_ios_build_temp_dirc1d2Np/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Uncategorized (Xcode): Command EmitSwiftModule failed with a nonzero exit code
Swift Compiler Error (Xcode): Cannot find type 'PiPViewCoordinator' in scope
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:7:40
Swift Compiler Error (Xcode): Cannot find 'PiPViewCoordinator' in scope
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:86:29
Swift Compiler Error (Xcode): 'nil' requires a contextual type
/Users/tusharasodariya/.pub-cache/hosted/pub.dartlang.org/jitsi_meet-4.0.0/ios/Classes/JitsiViewController.swift:101:29
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
Flutter doctor -v
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-IN)
• Flutter version 3.0.2 at /Users/tusharasodariya/fvm/versions/3.0.2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd495 (5 weeks ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/tusharasodariya/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• ANDROID_HOME = /Users/tusharasodariya/Library/Android/sdk
• Java binary at: /Users/tusharasodariya/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] Android Studio (version 2021.2)
• Android Studio at /Users/tusharasodariya/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents
• 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
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.68.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.44.0
[✓] Connected device (4 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 32) (emulator)
• iPhone 13 Pro (mobile) • 0FEE892A-E5DA-4405-BF13-B4103851E293 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Any solutions?
Add this line in Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
I managed to get it running again with the following steps:
flutter clean
pod repo update
cd ios
rm -rf Podfile.lock Pods/
cd ..
rm -rf pubspec.lock .packages .flutter-plungins
flutter pub cache repair
flutter packages get
cd ios
pod install
and finally starting the app from xcode

Flutter/ fatal error: 'Flutter/Flutter.h' file not found

Hello i am having this error when I run my app.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/daegilpyo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.10/ios/Classes/FLTURLLauncherPlugin.m:7:
/Users/daegilpyo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.10/ios/Classes/FLTURLLauncherPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
5
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on DAEGIL의 iPhone.
Exited (sigterm)
This is happening after I change the channel from stable to master..
I don`t know why I am having this error.
Plz let me know, I am waiting for you help..
this is flutter doctor - v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B50 darwin-x64, locale en-CA)
• Flutter version 1.22.5 at /Users/daegilpyo/Developer/flutter
• Framework revision 7891006299 (5 days ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/daegilpyo/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/12.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/12.app/Contents
• Flutter plugin version 47.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (1 available)
• DAEGIL의 iPhone (mobile) • 00008020-0011243A2279002E • ios • iOS 14.2
• No issues found!
I had this problem a week ago, I removed the ios/Flutter folder from my directory and ran these commands and changed by deployment target to 11.0
-> flutter create
-> flutter pub cache repair
-> cd ios
-> pod init
-> pod install
After following these commands, I could build the iOS on the simulator and also create the archive.
The project absolute path don't have Space ' '.
My project path is '/Volumes/Macintosh Data/work/test/ios' then error, move to '/Users/macbook/Documents/workspace/test/ios' is OK.
if modify pubspec.yaml file dependencies, then redo:
rm -rf ./ios
flutter create -i swift .

Build iOS Failed - Flutter

I'm new in flutter, I have project my client want me to extract .ipa file and upload it.
I made provisioning profile and all setup is done.
I run command flutter doctor -v
[✓] Flutter (Channel beta, 1.21.0-9.2.pre, on Mac OS X 10.15.4 19E266, locale en-US)
• Flutter version 1.21.0-9.2.pre at /Users/user/Documents/flutter
• Framework revision 81a45ec2e5 (2 weeks ago), 2020-08-27 14:14:33 -0700
• Engine revision 20a9531835
• Dart version 2.10.0 (build 2.10.0-7.3.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.6, Build version 11E708
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
Scan[✓] Connected device (2 available)
• iPhone 8 (mobile) • 7484DAD5-9562-4A70-A83C-D8D4C378B35A • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
• iPhone SE (2nd generation) (mobile) • 6A6DAEF0-D41D-4466-9815-826DF83ECB51 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
• No issues found!
But when run flutter build ios this found this exception after xcode build done:
Oops; flutter has exited unexpectedly: "ProcessException: Process timed out:
Command: /usr/bin/env xcrun xcodebuild -configuration Release -quiet
-workspace Runner.xcworkspace -scheme Runner BUILD_DIR=/Users/user/Desktop/LadyCare/build/ios -sdk iphoneos SCRIPT_OUTPUT_STREAM_FILE=/var/folders/rt/fl3hxxg54zg57wrggxsbx42m0000gn/T/flutter_tools.ziHuHJ/flutter_build_log_pipe.uI1i3M/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true COMPILER_INDEX_STORE_ENABLE=NO
-showBuildSettings".
Do this, it might fix your problem
flutter clean && flutter run
The above command is basically implementing the command at the same time
>>> flutter clean
>>> flutter run

Flutter won't run on iOS after updating to 1.15.22-pre.18. Xcode build failing

I am writing a flutter app that was working fine up until tonight. It compiled and ran on both iOS simulator and iOS device. This evening, VSCode informed me there was a new version of Flutter so I upgraded. After the upgrade, Flutter Doctor told me to upgrade cocoapods, which I also did (after having to mess around with the Ruby 2.3 SDK since i'm on OSX 10.14.6. However, now my project won't build for either iOS simulator or iOS device.
I've tried 'flutter clean' but to no avail.
The error I get is:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd (4 slices)
ld: building for iOS, but linking in object file (/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o) built for iOS Simulator, file '/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command: xcrun clang -x c -arch x86_64 /var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/flutter_tools_stub_source.F8IoZt/debug_app.cc -dynamiclib -fembed-bitcode-marker -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -install_name #rpath/App.framework/App -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -o /Users/paul/Documents/Development/flutter/scale_practice_app2/.dart_tool/flutter_build/eabd0dc878995215df4262cdd052ace8/simulator_framework
build failed.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Paul's iPhone XR.**
Here is the output of 'flutter doctor -v':
**[✓] Flutter (Channel master, v1.15.22-pre.18, on Mac OS X 10.14.6 18G3020, locale en-GB)
• Flutter version 1.15.22-pre.18 at /Users/paul/Apps/flutter
• Framework revision 8bff33e497 (2 hours ago), 2020-03-13 17:26:02 -0700
• Engine revision 9226a3881e
• Dart version 2.8.0 (build 2.8.0-dev.14.0 a303769fad)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/paul/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.43.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1
[✓] Connected device (3 available)
• Paul's iPhone XR • 00008020-001B64482ED8003A • ios • iOS 13.3.1
• iPhone XR • 154A94BD-01CF-40B0-B25E-88073359CA3E • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G3020
• No issues found!
I followed some Google suggestions to re-create my pod files etc but that hasn't fixed it. I have also created a fresh Flutter project, copied in my .dart and assets files but the new project still won't build, with the same errors.
Any help would be greatly appreciated.
Complete uninstall and re-install of cocoapods, flutter, and xcode (including manually clearing out all preferences) worked.

CocoaPods could not find compatible versions for "edge_detection" building flutter iOS app

After trying to build a flutter app for iOS I got the following error:
$ flutter build ios --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.example.mmpgui for device (ios-release)...
Running pod install... 0,8s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
...
[!] CocoaPods could not find compatible versions for pod "edge_detection":
In Podfile:
edge_detection (from `.symlinks/plugins/edge_detection/ios`)
Specs satisfying the `edge_detection (from `.symlinks/plugins/edge_detection/ios`)` dependency were found, but they required a higher
minimum deployment target.
...
Error output from CocoaPods:
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a
platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
First, I tried to follow the advice in the link and update the Pod file (ios/Pods/Pod)
by setting the platform version to 10.0
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
Now it compiled but I got lots of compilation errors:
$ flutter build ios --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.example.mmpgui for device (ios-release)...
Running pod install... 38.3s
Running Xcode build...
Xcode build done. 665.5s
Failed to build iOS app
Error output from Xcode build:
** BUILD FAILED **
...
error: the following command failed with exit code 0 but produced no further output
CompileC
/Users/administrator/Library/Developer/Xcode/DerivedData/Runner-gjlpspwywczpboarjfvvefatdons/Build/Intermediates.noindex/Pods.build/Release-iph
oneos/camera.build/Objects-normal/arm64/CameraPlugin.o
/Users/administrator/development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.5.7+3/ios/Classes/CameraPlugin.m normal arm64 objective-c
com.apple.compilers.llvm.clang.1_0.compiler
/Users/administrator/development/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.4/ios/Classes/HomeViewController.swift:29:49:
error: value of optional type 'UIImage?' must be unwrapped to a value of type 'UIImage'
var imagePath = saveImage(image:results.scannedImage)
^
/Users/administrator/development/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.4/ios/Classes/HomeViewController.swift:29:49:
note: coalesce using '??' to provide a default when the optional value contains 'nil'
var imagePath = saveImage(image:results.scannedImage)
^
?? <#default value#>
/Users/administrator/development/flutter/.pub-cache/hosted/pub.dartlang.org/edge_detection-1.0.4/ios/Classes/HomeViewController.swift:29:49:
note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
var imagePath = saveImage(image:results.scannedImage)
Flutter doctor showed the following:
$ flutter doctor -v
[✓] Flutter (Channel master, v1.15.3-pre.37, on Mac OS X 10.14.6 18G3020, locale de-AT)
• Flutter version 1.15.3-pre.37 at /Users/sebastiankubeck/Software/flutter
• Framework revision 6dc3bfaa98 (2 days ago), 2020-02-07 18:28:02 -0800
• Engine revision 6158f03ef5
• Dart version 2.8.0 (build 2.8.0-dev.8.0 514a8d4c84)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/sebastiankubeck/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.0
[✓] Connected device (3 available)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G3020
• Chrome • chrome • web-javascript • Google Chrome 80.0.3987.87
• Web Server • web-server • web-javascript • Flutter Tools
• No issues found!
The project was created with an older version of flutter and it seems that the ios directory is not updated correctly. Alternatively, it could be that my CocoaPods version is too new, so I tried 1.7.5, which wasn't successful either.