After upgrading to flutter latest version 3.7 and doing all packages upgrade. I am not able to build my project for iOS, for android its working fine.
Error Log
Swift Compiler Error (Xcode): Include of non-modular header inside framework module 'GTMSessionFetcher.GTMSessionFetcherLogging':
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcherLogging.h:15:8
Swift Compiler Error (Xcode): Duplicate interface definition for class 'GTMSessionFetcherUserDefaultsFactory'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:419:0
Swift Compiler Error (Xcode): Redefinition of 'GTMSessionFetcherError'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:429:27
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorDownloadFailed'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:430:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorUploadChunkUnavailable'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:431:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorBackgroundExpiration'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:432:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorBackgroundFetchFailed'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:433:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorInsecureRequest'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:434:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorTaskCreationFailed'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:435:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherErrorUserCancelled'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:439:2
Swift Compiler Error (Xcode): Redefinition of 'GTMSessionFetcherStatus'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:442:27
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherStatusNotModified'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:444:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherStatusBadRequest'
/ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:445:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherStatusUnauthorized'
ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:446:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherStatusForbidden'
ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:447:2
Swift Compiler Error (Xcode): Redefinition of enumerator 'GTMSessionFetcherStatusPreconditionFailed'
ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:448:2
Swift Compiler Error (Xcode): Reference to 'GTMSessionFetcherServiceProtocol' is ambiguous
Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:676:37
Swift Compiler Error (Xcode): Unknown class name 'GTMSessionFetcherServiceProtocol'; did you mean 'GTMSessionFetcherService'?
Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:676:37
Swift Compiler Error (Xcode): Type argument 'GTMSessionFetcherService' must be a pointer (requires a '*')
ios/Pods/GTMSessionFetcher/Sources/Core/Public/GTMSessionFetcher/GTMSessionFetcher.h:676:37
Swift Compiler Error (Xcode): Too many errors emitted, stopping now
Swift Compiler Error (Xcode): Could not build Objective-C module 'GTMSessionFetcher'
I tried all solutions -
the latest version of the library installed.
all the necessary dependencies are installed and up-to-date.
Clean the build folder and then build the project again.
updating your pods and running 'pod install'.
deleting the derived data folder and build again.
Related
Swift Compiler Error (Xcode): Unknown type name 'CGSize'; did you mean 'Size'?
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-AssetLibrary/PayUAssetLibraryKit.framework/Headers/PayUAssetLib
raryKit-Swift.h:267:22
Swift Compiler Error (Xcode): Could not build Objective-C module 'PayUAssetLibraryKit'
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-AssetLibrary/PayUAssetLibraryKit.framework/Modules/PayUAssetLib
raryKit.swiftmodule/arm64-apple-ios.private.swiftinterface:6:18
Swift Compiler Error (Xcode): Failed to build module 'PayUAssetLibraryKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2
(swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which
matches the SDK.
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-CheckoutPro/PayUCheckoutProKit.framework/Modules/PayUCheckoutPr
oKit.swiftmodule/arm64-apple-ios.private.swiftinterface:6:7
Swift Compiler Error (Xcode): No such module '_StringProcessing'
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-PayUParams/PayUParamsKit.framework/Modules/PayUParamsKit.swiftm
odule/arm64-apple-ios.private.swiftinterface:9:7
Swift Compiler Error (Xcode): Failed to build module 'PayUParamsKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2
(swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which
matches the SDK.
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-CheckoutProBase/PayUCheckoutProBaseKit.framework/Modules/PayUCh
eckoutProBaseKit.swiftmodule/arm64-apple-ios.private.swiftinterface:5:7
Swift Compiler Error (Xcode): Failed to build module 'PayUParamsKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2
(swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which
matches the SDK.
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-NativeOtpAssist/PayUNativeOtpAssist.framework/Modules/PayUNativ
eOtpAssist.swiftmodule/arm64-apple-ios.private.swiftinterface:10:7
Swift Compiler Error (Xcode): Failed to build module 'PayUParamsKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2
(swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which
matches the SDK.
/Users/apple/Documents/development/octoflutter/build/ios/Release-iphoneos/XCFrameworkIntermediates/PayUIndia-UPICore/PayUUPICoreKit.framework/Modules/PayUUPICoreKit.swiftmo
dule/arm64-apple-ios.private.swiftinterface:10:7
Swift Compiler Error (Xcode): Failed to build module 'PayUCheckoutProKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1
(swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which
matches the SDK.
/Users/apple/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/payumoney_pro_unofficial-0.0.9/ios/Classes/SwiftPayumoneyProUnofficialPlugin.swift:2:7
Encountered error while building for device.
Getting this issue while flutter build ios and also from xcode.
itry to build my app at ios device but I fount this error
Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/sayed/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.6+7/ios/Classes/messages.g.m:6:8
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
/Users/sayed/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.6+7/ios/Classes/messages.g.m:7:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/w7/k04jz9bj3ks2p5b_x3xgvpym0000gn/T/flutter_tools.sEDlgq/flutter_ios_build_temp_dir2zMQpj/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Volumes/Projects/SDK/flutter-sdk/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.2+2/ios/Classes/MyCookieManager.swift:259:43
Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Volumes/Projects/SDK/flutter-sdk/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.2+2/ios/Classes/MyCookieManager.swift:293:43
Could not build the application for the simulator
Error launching application on iPhone 11 Pro
Hi I am getting this error on build iOS Xcode.
error: unable to load standard library for target 'arm64-apple-ios10.0'
Module compiled with Swift 5.5.2 cannot be imported by the Swift 5.6 compiler: /Users/macmini/StudioProjects/customer-app-flutter-2.10.2/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
I recently copied some files from the iOS folder in an old flutter project to a new project so that I could preserve appIcons and launchScreens. Now I get the following error when trying to launch my code from VSCode, Xcode works fine.
I'm wondering if there's a way that I can just change certain parameters so that my signing id can be replaced, but I can't find anywhere in Xcode to do so.
(Nokia 3310 is just an iPhone 6 I use for debug testing :) )
Launching lib/main.dart on Nokia 3310 in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: **********
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Target 'Pods-Runner' of project 'Pods' was rejected as an implicit dependency for 'libPods-Runner.a' because its architectures 'arm64' didn't contain all required architectures 'armv7 arm64'
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
While building module 'Flutter' imported from /Users/jake/Desktop/cryptick-master/ios/Runner/main.m:1:
In file included from <module-includes>:1:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/Flutter.h:37:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
/Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:80:42: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations]
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
^
In module 'UIKit' imported from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:43:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
#interface UIUserNotificationSettings : NSObject
^
While building module 'Flutter' imported from /Users/jake/Desktop/cryptick-master/ios/Runner/main.m:1:
In file included from <module-includes>:1:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/Flutter.h:37:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
/Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:140:58: warning: this block declaration is not a prototype [-Wstrict-prototypes]
completionHandler:(nonnull void (^)())completionHandler;
^
void
2 warnings generated.
2 warnings generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
While building module 'Flutter' imported from /Users/jake/Desktop/cryptick-master/ios/Runner/AppDelegate.h:1:
In file included from <module-includes>:1:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/Flutter.h:37:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
/Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:80:42: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations]
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
^
In module 'UIKit' imported from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:43:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
#interface UIUserNotificationSettings : NSObject
^
While building module 'Flutter' imported from /Users/jake/Desktop/cryptick-master/ios/Runner/AppDelegate.h:1:
In file included from <module-includes>:1:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/Flutter.h:37:
In file included from /Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
/Users/jake/Desktop/cryptick-master/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:140:58: warning: this block declaration is not a prototype [-Wstrict-prototypes]
completionHandler:(nonnull void (^)())completionHandler;
^
void
2 warnings generated.
2 warnings generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: warning: directory not found for option '-F/Users/jake/Desktop/cryptick-master/ios/Pods/../.symlinks/flutter/ios'
ld: library not found for -lPods-Runner
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-F/Users/jake/Desktop/cryptick-master/ios/Pods/../.symlinks/flutter/ios'
ld: library not found for -lPods-Runner
clang: error: linker command failed with exit code 1 (use -v to see invocation)
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 Nokia 3310.
Exited (sigterm)
It looks like the issue has been solved by creating a new project again and migrating the code. With the current details, I'm unable to replicate this issue on my end.
If someone else is having similar issues, please provide the steps to replicate the behavior and file it here: https://github.com/flutter/flutter/issues/