..I am trying to generate the report using oclint-json-compilation
oclint-json-compilation-database -v oclint_args "-report-type html -o report.html -rc=LONG_LINE=120" open compile_commands.json open report.html
and I am getting the following error
`While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:153:25: note: property declared here
#property CATransform3D transform;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:166:18: error: property has a previous declaration
#property CGRect frame;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:166:18: note: property declared here
#property CGRect frame;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:171:33: error: property has a previous declaration
#property(getter=isHidden) BOOL hidden;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:171:33: note: property declared here
#property(getter=isHidden) BOOL hidden;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:176:38: error: property has a previous declaration
#property(getter=isDoubleSided) BOOL doubleSided;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:176:38: note: property declared here
#property(getter=isDoubleSided) BOOL doubleSided;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:184:42: error: property has a previous declaration
#property(getter=isGeometryFlipped) BOOL geometryFlipped;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:184:42: note: property declared here
#property(getter=isGeometryFlipped) BOOL geometryFlipped;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:201:30: error: property has a previous declaration
#property(readonly) CALayer *superlayer;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:201:30: note: property declared here
#property(readonly) CALayer *superlayer;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:4:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:214:26: error: property has a previous declaration
#property(copy) NSArray *sublayers;
^
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
While building module 'QuartzCore' imported from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:214:26: note: property declared here
#property(copy) NSArray *sublayers;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
While building module 'UIKit' imported from /Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:
In file included from <module-includes>:1:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:24:
In file included from /Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewFlowLayout.h:8:
/Users/prjwl/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:9: fatal error: could not build module 'QuartzCore'
#import <QuartzCore/CATransform3D.h>
~~~~~~~^
21 errors generated.
In file included from <built-in>:168:
In file included from <command line>:2:
/Users/prjwl/Documents/Samples/automation/automation/automation-Prefix.pch:14:13: fatal error: could not build module 'UIKit'
#import <UIKit/UIKit.h>
~~~~~~~^
and so on can any one help me how can I exclude system libraries from oclint?
I too got the same problem but was able to resolve it updating to OCLint 0.8 from here.
Related
I'm looking to add the firebase_messaging 7.0.3 package to add Push Notifications to my project. I've configured it for Android and it's working like a charm. Getting the Registration Token and can push notifications to my emulator and phone no problem.
Now, when I run the iOS build it fails on finding protocol declaration for 'FIRMessagingDelegate'. From what I understand the FIR- prefix has been removed some time ago and should now just be called MessagingDelegate.
I've ran both pod install and update and tried cleaning flutter.
flutter clean
pod install
pod update
Also, tried to add Firebase-Messaging to my Podfile version less and trying older versions to no avail.
I followed all the steps in the iOS configuration at: https://pub.dev/packages/firebase_messaging and tried it with method swizzling and without. I've ran out of options to try, perhaps some dependencies are not using the right version of firebase someplace but I'm not really sure how to check for those.
Here's the Stack Trace from the build:
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 56.0s
Failed to build iOS app
Error output from Xcode build:
↳
2021-02-08 16:55:26.766 xcodebuild[37625:1544731] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000E78DC3C81802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7fdc6daa9710>
Method: -platform
Thread: <NSThread: 0x7fdc6d00f3d0>{number = 2, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
Xcode's output:
↳
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:14:43: error: cannot find protocol declaration for 'FIRMessagingDelegate'
#interface FLTFirebaseMessagingPlugin () <FIRMessagingDelegate>
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: error: expected a type
- (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:284:28: error: expected a type
- (void)messaging:(nonnull FIRMessaging *)messaging
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:289:20: error: expected a type
- (void)messaging:(FIRMessaging *)messaging
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: error: expected a type
didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:55:6: error: use of undeclared identifier 'FIRMessaging'
[FIRMessaging messaging].delegate = self;
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:136:6: error: use of undeclared identifier 'FIRMessaging'
[FIRMessaging messaging].shouldEstablishDirectChannel = true;
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:144:7: error: use of undeclared identifier 'FIRMessaging'
[[FIRMessaging messaging] subscribeToTopic:topic
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:150:7: error: use of undeclared identifier 'FIRMessaging'
[[FIRMessaging messaging] unsubscribeFromTopic:topic
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:155:21: warning: 'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID]
^
In module 'FirebaseInstanceID' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
/Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID' has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation "
^
In module 'UIKit' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156:33: warning: 'FIRInstanceIDResult' is deprecated: FIRInstanceIDResult is deprecated, please use FIRInstallations for app instance identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult,
^
In module 'FirebaseInstanceID' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
/Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:153:1: note: 'FIRInstanceIDResult' has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceIDResult is deprecated, please use FIRInstallations "
^
In module 'UIKit' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156:9: warning: 'instanceIDWithHandler:' is deprecated: Use `Installations.installationID(completion:)` to get the app instance identifier instead. Use `Messaging.token(completion:)` to get FCM registration token instead. [-Wdeprecated-declarations]
instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult,
^
In module 'FirebaseInstanceID' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
/Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:215:5: note: 'instanceIDWithHandler:' has been explicitly marked deprecated here
__deprecated_msg("Use `Installations.installationID(completion:)` to get the app instance "
^
In module 'UIKit' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166:21: warning: 'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) {
^
In module 'FirebaseInstanceID' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
/Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID' has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation "
^
In module 'UIKit' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166:33: warning: 'deleteIDWithHandler:' is deprecated: Use `Installations.delete(completion:)` instead. Also check `Messaging.deleteData(completion:)`if you want to delete FCM registration token. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) {
^
In module 'FirebaseInstanceID' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
/Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:321:33: note: 'deleteIDWithHandler:' has been explicitly marked deprecated here
__deprecated_msg("Use `Installations.delete(completion:)` instead. "
^
In module 'UIKit' imported from /Users/peterpoliwoda/Development/git/bd4qol_mobile_app/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:176:20: error: use of undeclared identifier 'FIRMessaging'
BOOL value = [[FIRMessaging messaging] isAutoInitEnabled];
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:180:6: error: use of undeclared identifier 'FIRMessaging'
[FIRMessaging messaging].autoInitEnabled = value.boolValue;
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: error: property 'appData' not found on object of type '__strong id'
[self didReceiveRemoteNotification:remoteMessage.appData];
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:204:7: error: use of undeclared identifier 'FIRMessaging'
[[FIRMessaging messaging] appDidReceiveMessage:userInfo];
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:263:5: error: use of undeclared identifier 'FIRMessaging'
[[FIRMessaging messaging] setAPNSToken:deviceToken type:FIRMessagingAPNSTokenTypeSandbox];
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:268:48: error: use of undeclared identifier 'FIRMessaging'
[_channel invokeMethod:#"onToken" arguments:[FIRMessaging messaging].FCMToken];
^
/Users/peterpoliwoda/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: error: property 'appData' not found on object of type '__strong id'
[_channel invokeMethod:#"onMessage" arguments:remoteMessage.appData];
^
5 warnings and 16 errors generated.
$ flutter --version
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (3 weeks ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
I'm using cloud mac server for releasing in ios. And before changing my mac, i succesfully finished build of my ios app, but then i changed my mac server, now when i try to build, getting error below, what can i do to fix this issue, as i understand it's about deprecated libraries, but i can't delete them all because im using them in my app.
/Users/user191346/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.0.1/ios/Classes/FLTFirebaseAnalytic
sPlugin.m:49:19: warning: 'setScreenName:screenClass:' is deprecated: Use +[FIRAnalytics logEventWithName:kFIREventScreenView
parameters:] instead. [-Wdeprecated-declarations]
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
^
In module 'FirebaseAnalytics' imported from
/Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Headers/Public/Firebase/Firebase.h:22:
/Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnal
ytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here
DEPRECATED_MSG_ATTRIBUTE(
^
In module 'UIKit' imported from /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Target Support
Files/firebase_analytics/firebase_analytics-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/Availability
Macros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
1 warning generated.
/Users/user191346/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.0.1/ios/Classes/FLTFirebaseAnalytic
sPlugin.m:49:19: warning: 'setScreenName:screenClass:' is deprecated: Use +[FIRAnalytics logEventWithName:kFIREventScreenView
parameters:] instead. [-Wdeprecated-declarations]
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
^
In module 'FirebaseAnalytics' imported from
/Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Headers/Public/Firebase/Firebase.h:22:
/Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnal
ytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here
DEPRECATED_MSG_ATTRIBUTE(
^
In module 'UIKit' imported from /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Target Support
Files/firebase_analytics/firebase_analytics-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/UIKit.framework/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
s/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/Availability
Macros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
#define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
^
1 warning generated.
building file list ... rsync: link_stat "/Users/user191346/Desktop/rate_prof/rate_prof/ios/Flutter/App.framework" failed: No
such file or directory (2)
done
You needn't delete these packages, just follow these
commands and try in your terminal;
First Method for fix the issue:
flutter clean
flutter pub get
flutter run
if isn't work you can try this:
Second Solution:
flutter pub get
cd ios
pod install
Or you can remove Podfile.lock and after try this:
cd ios
pod install
I have a problem with Firebase Messaging (https://pub.dev/packages/firebase_messaging). I can't build in IOS after add this to project.
I tried:
flutter clean
flutter precache
pod deintegrate
pod setup
pod install
Tried:
Remove Podfile.lock
Edit/Remove WorkspaceSettings.xcsettings
Change the build system to Legacy
I have same problem in my real project. I created the blank project , build ios and run on simulator. After i add the FirebaseMessaging get this build errors. Tried the methods what i text but didn't work for me. Errors :
In file included from /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:9:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:81:10: warning: "FirebaseAnalytics.framework is not
included in your target. Please add the FirebaseAnalytics dependency to your project to ensure Messaging works as intended." [-W#warnings]
#warning "FirebaseAnalytics.framework is not included in your target. Please add the \
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: error: expected a
type
- (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:274: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
#interface UIUserNotificationSettings : NSObject
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:285:53: error: nullability
specifier 'nonnull' conflicts with existing specifier 'nullable'
didReceiveRegistrationToken:(nonnull NSString *)fcmToken {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: error: expected a
type
didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:117:7: warning:
'UIUserNotificationType' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
UIUserNotificationType notificationTypes = 0;
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:119:30: warning:
'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
notificationTypes |= UIUserNotificationTypeSound;
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:122:30: warning:
'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
notificationTypes |= UIUserNotificationTypeAlert;
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:125:30: warning:
'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
notificationTypes |= UIUserNotificationTypeBadge;
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:128:7: warning:
'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings
[-Wdeprecated-declarations]
UIUserNotificationSettings *settings =
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
#interface UIUserNotificationSettings : NSObject
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:129:39: warning:
'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings
[-Wdeprecated-declarations]
[UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
#interface UIUserNotificationSettings : NSObject
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:130:42: warning:
'registerUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's
-[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]
[-Wdeprecated-declarations]
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIApplication.h:250:1: note: 'registerUserNotificationSettings:' has been explicitly marked deprecated here
- (void)registerUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's
-[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]",
ios(8.0, 10.0)) API_UNAVAILABLE(tvos);
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:136:30: error: property
'shouldEstablishDirectChannel' not found on object of type 'FIRMessaging *'
[FIRMessaging messaging].shouldEstablishDirectChannel = true;
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:155:21: warning:
'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use
FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID]
^
In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID'
has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation "
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
ramework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
on.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156:33: warning:
'FIRInstanceIDResult' is deprecated: FIRInstanceIDResult is deprecated, please use FIRInstallations for app instance identifier handling and
use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult,
^
In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:153:1: note:
'FIRInstanceIDResult' has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceIDResult is deprecated, please use FIRInstallations "
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
ramework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
on.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156:9: warning:
'instanceIDWithHandler:' is deprecated: Use `Installations.installationID(completion:)` to get the app instance identifier instead. Use
`Messaging.token(completion:)` to get FCM registration token instead. [-Wdeprecated-declarations]
instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult,
^
In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:215:5: note:
'instanceIDWithHandler:' has been explicitly marked deprecated here
__deprecated_msg("Use `Installations.installationID(completion:)` to get the app instance "
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
ramework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
on.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166:21: warning:
'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use
FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) {
^
In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID'
has been explicitly marked deprecated here
__deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation "
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
ramework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
on.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166:33: warning:
'deleteIDWithHandler:' is deprecated: Use `Installations.delete(completion:)` instead. Also check `Messaging.deleteData(completion:)`if you
want to delete FCM registration token. [-Wdeprecated-declarations]
[[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) {
^
In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
/Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:321:33: note:
'deleteIDWithHandler:' has been explicitly marked deprecated here
__deprecated_msg("Use `Installations.delete(completion:)` instead. "
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
In module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIKit.h:8:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
ramework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
on.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: error: property
'appData' not found on object of type '__strong id'
[self didReceiveRemoteNotification:remoteMessage.appData];
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:273:1: warning: implementing
deprecated method [-Wdeprecated-implementations]
- (void)application:(UIApplication *)application
^
In module 'Flutter' imported from
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.h:5:
/Users/mac/Downloads/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-armv7_arm64/Flutter.framework/Headers/FlutterPlug
in.h:74:1: note: method 'application:didRegisterUserNotificationSettings:' declared here
- (void)application:(UIApplication*)application
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:276:70: warning:
'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
#"sound" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeSound],
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:277:70: warning:
'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
#"badge" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeBadge],
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:278:70: warning:
'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions
[-Wdeprecated-declarations]
#"alert" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeAlert],
^
In module 'UIKit' imported from /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: error: property
'appData' not found on object of type '__strong id'
[_channel invokeMethod:#"onMessage" arguments:remoteMessage.appData];
^
18 warnings and 6 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
SOLVED!
It resolved with run this commands :
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
flutter clean
flutter pub get
pod repo update
flutter build ios
I am new for flutter. My simple app running in Android device without any issue and also running in iOS device when I run it from Xcode but when I try to run in iOS device from either Android Studio or Visual Code it shows following errors
Launching lib/main.dart on Shafraz Buhary’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 836SQ257Z6
Running Xcode build...
Xcode build done. 6.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
#interface NSArray<ObjectType> (NSArrayDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
#interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:48:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
#interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be specified on a category
#interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
^
4 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h:12:9: fatal error: could not build module 'Foundation'
#import <Foundation/NSValue.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLDrawable.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
#include <Foundation/Foundation.h>
~~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
While building module 'IOSurface' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLIOSurface.h:13:
In file included from <module-includes>:3:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h:15:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
2 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'Metal' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:7:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
4 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:29:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:462:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBufferIOSurface.h:26:10: fatal error: could not build module 'IOSurface'
#include <IOSurface/IOSurfaceRef.h>
~~~~~~~~^
1 error generated.
2 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'FileProvider' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSFileProviderExtension.h:15:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/FileProvider.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'UserNotifications' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UNNotificationResponse+UIKitAdditions.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
13 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
In file included from <module-includes>:1:
In file included from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/Flutter.h:54:
/Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:9: fatal error: could not build module 'UIKit'
#import <UIKit/UIKit.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'CoreMedia' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterTexture.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h:29:10: fatal error: could not build module 'CoreVideo'
#include <CoreVideo/CoreVideo.h>
~~~~~~~~^
1 error generated.
15 errors generated.
In file included from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.m:5:
/Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
16 errors generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on Shafraz Buhary’s iPhone.
When I run flutter doctor -v it shows everything is ok
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-LK)
• Flutter version 1.12.13+hotfix.5 at /Library/Frameworks/flutter
• Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Library/Frameworks/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
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 40.2.4
• Dart plugin version 192.6817.14
[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] VS Code (version 1.41.1)
• VS Code at /Users/shafraz/Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] Connected device (1 available)
• Shafraz Buhary’s iPhone • bb37XXXXXXc167be5XXXXXX48d70136c2XXXXXX • ios • iOS 13.3
• No issues found!
How can I fix this?
Here's my terminal output:
I have tried to update Xcode but i still get the same error. When i run flutter -doctor v it passes all cases, and theres a check-mark in every section. I have tried to build with AndroidStudio and then from the terminal and in both cases got the same error. AndroidStudio built with Nexus 6 API works fine, just having troubles with iOS building
~/Doc/FlutterLearn ❯ cd first_app Py anaconda3
~/Doc/F/first_app ❯ c Py anaconda3
~/Doc/F/first_app ❯ flutter run Py anaconda3
Launching lib/main.dart on iPhone 8 in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 5.6s
└─Compiling, linking and signing... 5.0s
Xcode build done. 12.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/Foundation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/NSArray.h:109:12: error: attributes may not be specified
on a category
#interface NSArray<ObjectType> (NSArrayDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/NSArray.h:196:12: error: attributes may not be specified
on a category
#interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/Foundation.h:48:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/NSKeyValueCoding.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be
specified on a category
#interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Foundatio
n.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be
specified on a category
#interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
^
4 errors generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIKit.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIView.h:10:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/QuartzCore.h:9:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/CoreAnimation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/CATransform3D.h:12:9: fatal error: could not build
module 'Foundation'
#import <Foundation/NSValue.h>
~~~~~~~^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIView.h:10:
While building module 'OpenGLES' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/CAEAGLLayer.h:7:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/OpenGLES.
framework/Headers/EAGLDrawable.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/OpenGLES.
framework/Headers/EAGL.h:8:10: fatal error: could not build module
'Foundation'
#include <Foundation/Foundation.h>
~~~~~~~~^
1 error generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIView.h:10:
While building module 'Metal' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/CAMetalLayer.h:7:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Metal.fra
mework/Headers/Metal.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Metal.fra
mework/Headers/MTLTypes.h:8:9: fatal error: could not build module
'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIView.h:10:
While building module 'Metal' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/QuartzCor
e.framework/Headers/CAMetalLayer.h:7:
While building module 'IOSurface' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/Metal.fra
mework/Headers/MTLTexture.h:15:
In file included from <module-includes>:3:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/IOSurface
.framework/Headers/IOSurfaceObjC.h:15:9: fatal error: could not build module
'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
2 errors generated.
4 errors generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIColor.h:13:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreImage
.framework/Headers/CoreImage.h:9:9: fatal error: could not build module
'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UIColor.h:13:
While building module 'CoreVideo' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreImage
.framework/Headers/CIImage.h:10:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreVideo
.framework/Headers/CoreVideo.h:29:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreVideo
.framework/Headers/CVPixelBuffer.h:462:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreVideo
.framework/Headers/CVPixelBufferIOSurface.h:26:10: fatal error: could not
build module 'IOSurface'
#include <IOSurface/IOSurfaceRef.h>
~~~~~~~~^
1 error generated.
2 errors generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'FileProvider' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/NSFileProviderExtension.h:15:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/FileProvi
der.framework/Headers/FileProvider.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/FileProvi
der.framework/Headers/NSFileProviderDomain.h:8:9: fatal error: could not
build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'UIKit' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:
While building module 'UserNotifications' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.fra
mework/Headers/UNNotificationResponse+UIKitAdditions.h:10:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UserNotif
ications.framework/Headers/UserNotifications.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UserNotif
ications.framework/Headers/NSString+UserNotifications.h:8:9: fatal error:
could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
13 errors generated.
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
In file included from <module-includes>:1:
In file included from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/Flutter.h:54:
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterAppDelegate.h:8:9: fatal error: could not build module
'UIKit'
#import <UIKit/UIKit.h>
~~~~~~~^
While building module 'Flutter' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:
While building module 'CoreMedia' imported from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Flutter/Flutter.framework/
Headers/FlutterTexture.h:8:
In file included from <module-includes>:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreMedia
.framework/Headers/CoreMedia.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor
m/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/CoreMedia
.framework/Headers/CMFormatDescription.h:29:10: fatal error: could not build
module 'CoreVideo'
#include <CoreVideo/CoreVideo.h>
~~~~~~~~^
1 error generated.
15 errors generated.
In file included from
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.m:5:
/Users/snak3/Documents/FlutterLearn/first_app/ios/Runner/GeneratedPluginRegi
strant.h:8:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
16 errors generated.
note: Using new build systemnote: Planning buildnote: Constructing build
description
Could not build the application for the simulator.
Error launching application on iPhone 8.
~/Doc/F/first_app ❯
took 24s Py anaconda3
Here's the output from flutter doctor :
~ ❯ flutter doctor -v Py anaconda3
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale en-CA)
• Flutter version 1.9.1+hotfix.6 at /Users/snak3/flutter
• Framework revision 68587a0916 (3 months 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/snak3/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.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 39.0.4
• Dart plugin version 192.7761
[✓] VS Code (version 1.40.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.6.0
[✓] Connected device (1 available)
• iPhone 8 • EB666770-13C5-4CE6-B24A-657C875939A7 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)
• No issues found!
EDIT:
I have found a way to make it work momentarily. I open Xcode and I build it it there and the Simulator runs, i then close Xcode and have the Simulator and build my app with VSCode. But how would I fix the terminal command errors?
I had a similar issue (different errors, but all were about imports).
I managed to fix it eventually by upgrading cocoapods and cocoapods-core from version 1.9.3 to 1.10.
Hope this may help someone else facing the same issue.