-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
[iOS] Update to support Firebase SDK v6 #9
Comments
@dpa99c I'm trying to upgrade from
I'm using version This is the corresponding entry in my
|
Looks like the target (min) SDK for iOS is set lower than what GoogleUtilities requires. |
Where do I need to check? 🤔 |
Give me a few minutes - just need fix a bug in a production build - and I'll push my test project to github so you can try building that. |
I believe that your's is building. I'm just wondering why mine isn't. Could that be because of another plugin? What else information could I paste? Hah! I just had a look at my
Interesting. iOS 9, uh? Just changed it, trying it again... |
We should probably either get rid of that or make it configurable in this fork of the firebase plugin |
I removed it manually, but it didn't change anything. Now I'm just removing ios platform and re-add it afterwards... |
I'm not getting it to work. :-( |
Try cloning and building this example project. I've got it building and running on both Android & iOS though currently not getting a device token on iOS - investigating why that is - might have been my updating of the Firebase SDK for iOS that did it... |
I can build that project (at least after changing the package-id), but it won't run because of the missing So it should not have anything to do with the |
I did try to change this line manually in my After that I removed the ios platform and re-added it, but nothing changed:
This is my current
Looks like what I did wasn't enough. |
Couple of related issues:
From the comments there it's worth trying |
That fixes it temporary, but a new pod issue occurs now:
And the old issue re-appears as soon as I drop the platform and re-add it. I need to run |
Looks like one of the other plugins in your project is pulling in I think that should get fixed when the the original title of this issue is resolved, i.e. update to Firebase SDK v6 - the newer version will probably request a newer version of |
Do you have any timetable for the upgrade to Firebase SDK v6? I wouldn't mind donating some bucks for your effort. |
I haven't looked at what the breaking changes exactly are with v6. In the meantime, maybe it's possible to track down where |
I've already tracked that down. The source is the |
I had a go at migrating to Firebase SDK v6 on iOS last night. I've managed to resolve all the build-time issues so far except one ( Once that's done, it should build and run but I expect there'll be some runtime issues I need to diagnose and fix. |
Thank you very much for keeping us noted! Appreciate the time and effort you put into this. Hopefully you will have less runtimes issues than expected. |
I've resolved that last issue and pushed a preliminary version to the dev branch - you can try it by installing as follows:
So far the runtime activity looks to be working OK. |
Can't install:
|
Your test project is using version 3.0.5:
Not the dev branch?! |
|
You'll need to change the package ID in the test project to one which you have control over (i.e. in your Apple Team ID and Firebase project) but if you've got it all setup correctly, you should be able to send a push notification via the Firebase Console and see something like this in the iOS test app: |
Thanks, I've tried again and got it to work. The app is building and running right now. That's a very good starting point. But the device log shows that it's not working the way I expect it to work:
I'm using a wrapper in my Ionic app: It looks like this wrapper is somehow referencing the original plugin: Looks like I should get rid of the wrapper. That would probably be the easiest way. At least easier than patching the Ionic-Native Plugin, or what do you think about? I'm using this wrapper only for Notifications and Analytics (two services in total). So I think I will rewrite them, and remove the wrapper. |
Nevermind, I just checked my two services in more detail and I discovered only 3 lines of code in total, that use the wrapper. So please don't worry about my questions in the last post. 😂 |
Any plans to merge the dev-branch into master and make a new NPM release? |
I was just keeping it on the dev branch until you can give it a sanity check - if you're happy with it, I'll merge it to master and do an npm release. |
I will do some more testing tomorrow morning and let you know about my results! No way to rush things. |
👍 |
To be honest: yesterday my project didn't install the But as of today I'm still unable to install this branch into my main project. Just to be clear, cloning and running your sample projects works fine. But I need to get this running in my real project. Not sure why it doesn't work. I've removed all references of
All fine. Then I add the plugin:
Works as well. But when I add the iOS platform:
Do you have any clue what's going on? Why is your sample project installing this dev branch without any issue, but my main project doesn't work? |
I added an explicit dependency on Can you check if the I made the dependency on |
There is no
And your request:
|
aha! 💡 So, another idea - clone the plugin repo and install the plugin from it locally:
|
I've replaced Btw, the While running on iOS I've noticed one message in the system log, that I probaby didn't notice before:
Should that worry me? |
looks like a warning rather than an error - was it preceded by a message something like this?
Might be a pre-existing issue if the plugin is performing UI operations on a bg thread, but not a major blocker |
Yes, the message is preceded by that text. Thanks for the info! So from my point of view everything seems to work. The only functionality I did not test with my app, is the notification handling. My sends one push notification each day, but in the morning. So I will check tomorrow if that did work. But requesting permissions for notifications worked. So I assume the rest will work as well. |
I've tested APNS push notifications via the Firebase Console and they worked fine, so on that basis I think this version is good to release. I'll merge to master and release to npm shortly. |
Published to npm as v3.0.6 |
I'm observing some interesting behavior. I can build and run my code via XCode, but I usually build via cli, to enable some optimizations (minify & aot). For whatever reason, the build via cli hangs at some point (no matter if I try a release build or not):
Do you have any idea why? |
No idea why it would hang: I just tried |
I just figured out that the build only hangs with the ionic cli, which in some cases should serve as a wrapper around cordova. When I build right away with cordova cli, the build went through. So it seems like it has nothing to do with your changes, but I can't say for sure. 🤷♂️ |
maybe best thing is to try to create an isolated test project where you can repro the problem then raise as issue against ionic which references that project as evidence |
Good idea, will try to! Thanks a lot, again. :-) |
The plugin currently defaults to Version 5.20.2 which is the final v5.x released on 10 April 2019.
However as of now, the most recent release is Version 6.3.0 released on 19 June 2019.
v6.x contains breaking changes so the plugin code needs updating before v6.x of the SDK can be used.
The text was updated successfully, but these errors were encountered: