iOS push notification with flutter

182 views
Skip to first unread message

Robin

unread,
Oct 19, 2020, 7:08:30 AM10/19/20
to Flutter Development (flutter-dev)
I have used firebase_messaging for push messaging in flutter. For Android everything looks good, its working as expected.
But getting issue when running on iOS. While trying to run on a iPhone getting compile time error. Without adding firebase_messaging the app is running on iOS device but once I added the firebase_messaging on dependency i started getting compiler issue.

As the error message is very long, putting few lines:
2020-10-19 16:35:52.651 xcodebuild[9277:87177] DTDeviceKit: deviceType from 76dcfe2b755d85b11eb23d4a0780e4119e546f45 was NULL
2020-10-19 16:35:52.812 xcodebuild[9277:87175] DTDeviceKit: deviceType from 76dcfe2b755d85b11eb23d4a0780e4119e546f45 was NULL
2020-10-19 16:35:52.812 xcodebuild[9277:87175] DTDeviceKit: deviceType from 76dcfe2b755d85b11eb23d4a0780e4119e546f45 was NULL

code's output:
    While building module 'nanopb' imported from /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
    In file included from <module-includes>:1:
    /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:13:9: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
    #import "pb.h"
            ^~~~~~
            <pb.h>
    /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:14:9: error: double-quoted include "pb_common.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
    #import "pb_common.h"
            ^~~~~~~~~~~~~
            <pb_common.h>
    While building module 'nanopb' imported from /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
    In file included from <module-includes>:1:
    In file included from /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:14:
    /Users/m1029313/Desktop/Latest_telesales/telesales/ios/Pods/nanopb/pb_common.h:8:10: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
    #include "pb.h"
             ^~~~~~

note: Constructing build description
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'AppAuth' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Protobuf' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'flutter_secure_storage' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'flutter_phone_direct_caller' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'flutter_appauth' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')

Thanks.

Lucky Mehndiratta

unread,
Oct 19, 2020, 8:41:02 AM10/19/20
to Robin, Flutter Development (flutter-dev)
1 Open iOS Code in XCode
2 Click on the pods(Left side Menu)
3 Select Pods 
4 Select Build Settings
5 Search Quote 
6 Quoted Include in Frameworks Change Yes to No <-------------------- change here
7 Delete drive Data 
8 Run Code 


--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/bd4795f2-35fc-4315-94b0-cf3f54361bf6n%40googlegroups.com.


--


Lucky Mehndiratta |  Associate Consultant - Development


www.oodlestechnologies.com | www.oodlesmarketing.com | www.oodlesstudio.com

Unit No. 159, Tower B1, Spaze I-Tech Park, Sector 49, Sohna Road, Gurgaon, India, 122018

Rabindra Laheri

unread,
Oct 21, 2020, 5:43:11 AM10/21/20
to Lucky Mehndiratta, Flutter Development (flutter-dev)
Got it, thanks! 
This fix is working for me
Reply all
Reply to author
Forward
0 new messages