Skip to content

[firebase_in_app_messaging] Is it functional for iOS??? #2515

Closed
@clus90

Description

@clus90

Describe the bug
I just added the package to my app, on Android it works perfectly but for some reason when I try to run the project I get a lot of errors compiling.

To Reproduce
Steps to reproduce the behavior:

  1. Install the package
  2. Run on iOS Device
  3. Doesn't even compile, a lot of errors showing on the console.
logs
**Console Errors**
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.4.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:71:5: warning: 'UIRemoteNotificationType' is deprecated: first deprecated in iOS 8.0 - Use UserNotifications Framework's UNAuthorizationOptions for user notifications and registerForRemoteNotifications for receiving remote notifications instead. [-Wdeprecated-declarations]
        UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
        ^
    In module 'UIKit' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:69:32: note: 'UIRemoteNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIRemoteNotificationType) {
                                   ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.4.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:71:72: warning: 'enabledRemoteNotificationTypes' is deprecated: first deprecated in iOS 8.0 - Use -[UIApplication isRegisteredForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] to retrieve user-enabled remote notification and user notification settings [-Wdeprecated-declarations]
        UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
                                                                           ^
    In module 'UIKit' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:229:1: note: 'enabledRemoteNotificationTypes' has been explicitly marked deprecated here
    - (UIRemoteNotificationType)enabledRemoteNotificationTypes API_DEPRECATED("Use -[UIApplication isRegisteredForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] to retrieve user-enabled remote notification and user notification settings", ios(3.0, 8.0)) API_UNAVAILABLE(tvos);
    ^
    2 warnings generated.
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/ios/Classes/GoogleMapController.m:176:7: note: enclose 'UIGraphicsImageRendererFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/ios/Classes/GoogleMapController.m:176:78: note: enclose 'defaultFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                                                 ^~~~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/ios/Classes/GoogleMapController.m:176:48: note: enclose 'UIGraphicsImageRendererFormat' in an @available check to silence this warning
          UIGraphicsImageRendererFormat* format = [UIGraphicsImageRendererFormat defaultFormat];
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/ios/Classes/GoogleMapController.m:178:7: note: enclose 'UIGraphicsImageRenderer' in an @available check to silence this warning
          UIGraphicsImageRenderer* renderer =
          ^~~~~~~~~~~~~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Target Support Files/google_maps_flutter/google_maps_flutter-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.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/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25+1/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.
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:33:5: error: unknown type name 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
        ^~~~~~~~~~~~~~~~~
        FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:33:32: error: unknown receiver 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                   ^~~~~~~~~~~~~~~~~
                                   FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:33:50: error: no known class method for selector 'inAppMessaging'
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                                     ^~~~~~~~~~~~~~
/Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:34:11: error: no visible @interface for 'FIRMessaging' declares the selector 'triggerEvent:'
        [fiam triggerEvent:eventName];
         ~~~~ ^~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:38:5: error: unknown type name 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
        ^~~~~~~~~~~~~~~~~
        FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:38:32: error: unknown receiver 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                   ^~~~~~~~~~~~~~~~~
                                   FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:38:50: error: no known class method for selector 'inAppMessaging'
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                                     ^~~~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:39:10: error: property 'messageDisplaySuppressed' not found on object of type 'FIRMessaging *'
        fiam.messageDisplaySuppressed = [suppress boolValue];
             ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:43:5: error: unknown type name 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
        ^~~~~~~~~~~~~~~~~
        FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:43:32: error: unknown receiver 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                   ^~~~~~~~~~~~~~~~~
                                   FIRMessaging
In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:43:32: error: unknown receiver 'FIRInAppMessaging'; did you mean 'FIRMessaging'?
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                   ^~~~~~~~~~~~~~~~~
                                   FIRMessaging
    In module 'FirebaseMessaging' imported from /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/curbina90/Projects/Flutter Apps/watudu/ios/Pods/FirebaseMessaging/Firebase/Messaging/Public/FIRMessaging.h:270:12: note: 'FIRMessaging' declared here
    @interface FIRMessaging : NSObject
               ^
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:43:50: error: no known class method for selector 'inAppMessaging'
        FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
                                                     ^~~~~~~~~~~~~~
    /Users/curbina90/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_in_app_messaging-0.1.1+3/ios/Classes/FirebaseInAppMessagingPlugin.m:44:10: error: property 'automaticDataCollectionEnabled' not found on object of type 'FIRMessaging *'
        fiam.automaticDataCollectionEnabled = [enabled boolValue];
             ^
    12 errors generated.
    note: Using new build system
    note: Planning build
    note: Constructing build description
Could not build the precompiled application for the device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions