Home:ALL Converter>Flutter - iOS/Firebase-related build issues

Flutter - iOS/Firebase-related build issues

Ask Time:2020-04-09T07:27:21         Author:Sean

Json Formatter

I can't build on iOS. More often than not, I see a version of the below error. To fix it, I've tried various combinations of flutter clean and pod install related commands. This leads me to believe it doesn't seems to be a caching issue. I've also set the min iOS version to 13, but that has not helped.

Any help on this is much appreciated. I've been unable to fix this for a week now.

Xcode's output:
↳
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:7: warning: 'UIGraphicsImageRendererFormat' is only available on iOS 10.0 or newer [-Wunguarded-availability]
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsImageRenderer.h:26:50: note: 'UIGraphicsImageRendererFormat' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    UIKIT_EXTERN API_AVAILABLE(ios(10.0)) @interface UIGraphicsImageRendererFormat : UIGraphicsRendererFormat
                                                     ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:7: note: enclose 'UIGraphicsImageRendererFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:78: warning: 'defaultFormat' is only available on iOS 10.0 or newer [-Wunguarded-availability]
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                                                 ^~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsRenderer.h:24:1: note: 'defaultFormat' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    + (instancetype)defaultFormat API_DEPRECATED_WITH_REPLACEMENT("preferredFormat", tvos(10.0, 11.0)) API_AVAILABLE(ios(10.0), watchos(3.0));
    ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:78: note: enclose 'defaultFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                                                 ^~~~~~~~~~~~~~
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:48: warning: 'UIGraphicsImageRendererFormat' is only available on iOS 10.0 or newer [-Wunguarded-availability]
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsImageRenderer.h:26:50: note: 'UIGraphicsImageRendererFormat' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    UIKIT_EXTERN API_AVAILABLE(ios(10.0)) @interface UIGraphicsImageRendererFormat : UIGraphicsRendererFormat
                                                     ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:176:48: note: enclose 'UIGraphicsImageRendererFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:178:7: warning: 'UIGraphicsImageRenderer' is only available on iOS 10.0 or newer [-Wunguarded-availability]
          UIGraphicsImageRenderer* renderer =
          ^~~~~~~~~~~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsImageRenderer.h:43:50: note: 'UIGraphicsImageRenderer' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    UIKIT_EXTERN API_AVAILABLE(ios(10.0)) @interface UIGraphicsImageRenderer : UIGraphicsRenderer
                                                     ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:178:7: note: enclose 'UIGraphicsImageRenderer' in an @available check to silence this warning
          UIGraphicsImageRenderer* renderer =
          ^~~~~~~~~~~~~~~~~~~~~~~
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:179:13: warning: 'UIGraphicsImageRenderer' is only available on iOS 10.0 or newer [-Wunguarded-availability]
              [[UIGraphicsImageRenderer alloc] initWithSize:_mapView.frame.size format:format];
                ^~~~~~~~~~~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsImageRenderer.h:43:50: note: 'UIGraphicsImageRenderer' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    UIKIT_EXTERN API_AVAILABLE(ios(10.0)) @interface UIGraphicsImageRenderer : UIGraphicsRenderer
                                                     ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:179:13: note: enclose 'UIGraphicsImageRenderer' in an @available check to silence this warning
              [[UIGraphicsImageRenderer alloc] initWithSize:_mapView.frame.size format:format];
                ^~~~~~~~~~~~~~~~~~~~~~~
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:181:53: warning: 'UIGraphicsImageRendererContext' is only available on iOS 10.0 or newer [-Wunguarded-availability]
          UIImage* image = [renderer imageWithActions:^(UIGraphicsImageRendererContext* context) {
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'UIKit' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIGraphicsImageRenderer.h:39:50: note: 'UIGraphicsImageRendererContext' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    UIKIT_EXTERN API_AVAILABLE(ios(10.0)) @interface UIGraphicsImageRendererContext : UIGraphicsRendererContext
                                                     ^
    /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+3/ios/Classes/GoogleMapController.m:181:53: note: enclose 'UIGraphicsImageRendererContext' in an @available check to silence this warning
          UIImage* image = [renderer imageWithActions:^(UIGraphicsImageRendererContext* context) {
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6 warnings generated.
    === BUILD TARGET firebase_auth OF PROJECT Pods WITH CONFIGURATION Debug ===
    While building module 'FirebaseFirestore' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Headers/Public/Firebase/Firebase.h:49:
    In file included from <module-includes>:1:
    In file included from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/FirebaseFirestore/FirebaseFirestore-umbrella.h:17:
    In file included from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/FirebaseFirestore/Firestore/Source/Public/FirebaseFirestore.h:25:
    /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/FirebaseFirestore/Firestore/Source/Public/FIRFirestoreSettings.h:46:1: error: property with 'retain (or strong)' attribute must be of object type
    @property(nonatomic, strong) dispatch_queue_t dispatchQueue;
    ^
    1 error generated.
    In file included from /Users/sthomas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4+3/ios/Classes/FLTFirebaseCorePlugin.m:7:
    /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Headers/Public/Firebase/Firebase.h:49:13: fatal error: could not build module 'FirebaseFirestore'
        #import <FirebaseFirestore/FirebaseFirestore.h>
         ~~~~~~~^
    While building module 'FirebaseStorage' imported from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Headers/Public/Firebase/Firebase.h:157:
    In file included from <module-includes>:1:
    In file included from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/Target Support Files/FirebaseStorage/FirebaseStorage-umbrella.h:13:
    In file included from /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Public/FirebaseStorage.h:17:
    /Users/sthomas/Desktop/Flutter/nothing_new/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Public/FIRStorage.h:100:1: error: property with 'retain (or strong)' attribute must be of object type
    @property(strong, nonatomic) dispatch_queue_t callbackQueue;
    ^
    1 error generated.
    3 errors generated.

The results of flutter doctor --verbose:

[✓] Flutter (Channel master, v1.18.1-pre.9, on Mac OS X 10.15.3 19D76, locale en-NZ)
    • Flutter version 1.18.1-pre.9 at /Users/sthomas/flutter
    • Framework revision 17079f26b5 (3 days ago), 2020-04-06 01:21:01 -0400
    • Engine revision 9b8dcc7ecf
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 05103dfe5a)


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/sthomas/Library/Android/sdk
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4, Build version 11E146
    • CocoaPods version 1.9.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (3 available)
    • iPhone 11 Pro Max • F01FDB37-BA30-4A31-8F90-EE6DC28CD28F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
    • Chrome            • chrome                               • web-javascript • Google Chrome 80.0.3987.163
    • Web Server        • web-server                           • web-javascript • Flutter Tools

• No issues found!

Author:Sean,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61111620/flutter-ios-firebase-related-build-issues
yy