-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASSERT failure in FirebaseQtApp: "App::Create" #6
Comments
yes, you need to set App ID, API key, and Project ID before initialize, it can also load this from JSON but I didn't test that |
how and where do I set this? |
|
so I managed to build, however it brings couple issues/questions:
|
hmm I don't have |
ok I also have... |
i fixed |
yup, both are listed to be added by Firebase docs, but trying to be minimal I removed since I still got the token. |
yes, currently receiving notification while app is running results in: also when app is not running, nothing happens and notification is not received...
|
So these 3 lines are not needed if you have your google-services.json in /android dir Next the issue with notifications not arriving when the app is closed, is because of android unused app permission, if you disable that, then it will work, hopefuly on release more this is not an issue, but needs testing if androidmanifest.xml isn't missing something, now for the OnMessages I have not clue on what's wrong... |
Found the issue! :) Sadly it's more manual work but we now have Android working... if you look at the AndroidManifest.xml at firebase-sdk-cpp/messaging you will see what's needed, sadly our build system doesn't automate that...
|
this I can not agree... with "old" (I reference old as your video two years ago) build.gradle these i didnt have to set, however with new I have to, and EDIT: tedted again when removed those three lines and worked, so it got me wondering why it didnt worked before, and after futher testing i found out that commented out |
yes, you are the best... |
Well all we get is on the firebase::messaging::Message, I think in the past it had less info, not sure, the data part is IMO what is most important since you can send any number of pairs like openPage=Foo.qml or showMsg="Your order is ready", still I'm thinking on changing this API to pass firebase::messaging::Message object instead of copying only it's data field. |
I don't add them to RESOURCES and it just works |
great, got it, thank you :). |
done |
how do I change: |
it's a new signal signature, it now gives you a copy of firebase::messaging::Message |
you must ofc include the headers from firebase-cpp-sdk |
yes, thats what i figured... what I am asking is how to translate all message to either string so later I can serialize as JSON, or send it as JSON document right away |
well you need to do it manually like what I was doing for dada
the good thing is that the threading issue is covered by Qt delayed calls |
I think I need features from cmake 3.28, and no never tried to build for Windows, on iOS I pushed some changes that should almost be enough, but I get now link issues due usage of Swift, no idea how to fix that yet. |
where do you define FIREBASE_IOS_SDK_DIR, and which source it is actually? |
Daniel, I think this is much closer then we think :) so I think that basicaly it only doesnt load GoogleService-Info.plist |
well you know, the .plist file is the same as the json one, you can manually setKey..(), which XCode version are you using? I updated to the latests yesterday, I think I was on 14 and now on 16, but now instead of Swift link issues (which maybe will happen later) I get: About how I use it I have it as a submodule so to include firebase-qt I do:
|
Plus to link it's just this as I'm trying to have the CPP and iOS SDK linked at FirebaseQt stage
|
hello dantti, hows your progress? |
Didn't have time to investigate further, and yes Firebase on iOS is just a wrapper for their APN think, which you import on Firebase console so you don't need to write different code for 2 OSes. |
ok, so this is how it goes.
after build in the console I see:
i guess this would take you also to same point, so able to build and compile without linking errors... if you want, I cant give you minimal example via email XCode 16.0 |
So, on iOS it used to work like this, you get a Firebase token like in Android, Google knows that this token is from iOS, so when your server calls Firebase to send this notification it will then relay the message to Apple servers, which is why you need to import your APN keys in Firebase web console. |
yes, I also figured as it makes sence :) |
I think so, since I didn't pass the compilation issues yet, you can make a PR if that's the only part left, I might try to automate what you said tho, but ofc might just fail and require these manual steps :( |
it wont let me create PR :( |
dunno, does it work for you after setting the APN and getting a new token? |
im stuck at the last screenshot i sent.. i dont know how to set the APN and THEN request new token :( |
Project Overview -> Project Settings -> Cloud Messaging -> Apple app configuration -> there you have the upload button to upload the APN stuff |
ok sorry for misunderstanding, this i of course did, and issue is the very same... so I assume in your FirebaseQt.h we must set somehow to configure() before initialize()? or even directly connect initialize() to call after APNs success? |
I don't see this configure in their API |
seems to do what I do https://github.com/firebase/quickstart-cpp/blob/main/messaging/testapp/src/common_main.cc |
dantti, done :D received token on iOS and received notification when app is off (will test during app is on and backgrounded later). |
Hello Daniel,
for the CMake, i managed (perhaps I even slighly simplified) to work it out.
However if I use your approach in readme for build.gradle then build give me:
E firebase: Failed to load default options when attempting to populate missing fields
E firebase: App ID, API key, and Project ID must be specified in App options.
F Filmtoro: ASSERT failure in FirebaseQtApp: "App::Create", file C:/Qt/Projects/extralibs/firebase-qt/src/firebaseqtapp.cpp, line 91
F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 18692 (qtMainLoopThrea), pid 18663 (mtoro.appMobile)
on the other hand, if I use your OLD approach and use build.gradle as per your video two years ago, all works fine
The text was updated successfully, but these errors were encountered: