i am making an application that uses Firebase as the backend and swift in xcode. What i have is i can add products to the database and users can view and see those products. But what i want to do is that whenever i add a new product i want to send notifications to all registered users. How can i achieve that? I have seen tutorials and Firebase's own documentation but all these send notifications via Firebase console. How can i achieve this through swift code? I am using Swift 3.0 and xcode 8.3.2. Please let me know how can i achieve this.
Related
Information.
IOS app swift, firebase+analytics, bigquery integration, iAd (https://developer.apple.com/documentation/iad)
Problem.
Most of installs are direct/none in firebase - so the same in analytics & bigquery. Main sources are google ads and apple ads. We can get apple ads source and campaign using iAd. But no info how to send this data to firebase (=how to set source for Firebase)
Question.
Is it possible to manually set source/medium/campaign for Firebase? Can't find anything :(
Any other tips how to get install source/medium/campaign and set it to Firebase?
Also, if we will use some tracker - appmetrica, appsflyer etc - there will be the same question - how to get source data from appsflyer and send it to Firebase
Thanks a lot!
As mentioned in the Firebase group conversation :
Setup multiple user properties based on the info you have (like
source, medium, campaign, etc)
Combine 2 or more user properties to
make an audience
Filter your attribution report on the audience
Follow the whole conversation here.
There is one documentation about how to add firebase to your apple project and another on installation of firebase in your apple app.
For more information you can refer to the blog5, medium post and link on how Campaign Attribution Works in Google Analytics for Firebase
Okay. After researches and tests I have this view
(1) First of all - unfortunately look like firebase team doesn't make clear and working method of setting custom sources
(2) There is some possibility to send something directly to source/medium/campaign in Firebase, but it work unstable.
To do this you need
Get somewhere your Source/Medium/Campaign (for example from iAd)
send 'campaign_details' event with source/medium/campaign params
Also, as mentioned Divyani Yadav - You can just send this params anywhere to user_properties
And somehow work with this data (using bigquery or making audiences to make some analysis in Analytics), but this approach doesn't rewrite firebase initial source/medium/campaign params
I have integrated Firebase Cloud Notifications for Push Notifications in my iOS App written in Swift.
Although, the notifications are working as expected and I can see the Number of Deliveries, It doesn't show the Open Count and Click Count.
I have searched for similar questions on StackOverflow but none of them has been answered yet.
As you can see in the screenshot below, the number of sends is being tracked but not Open Count or other things.
Any Help is Appreciated.
We had a similar issue and it was caused by the missing Firebase Analytics library.
Documentation for iOS:
Step 4: Add Firebase SDKs to your app
...
4. Choose the Firebase libraries you want to use.
If Google Analytics is enabled in your Firebase project, make sure to add
FirebaseAnalytics. For Analytics without IDFA collection capability, add
FirebaseAnalyticsWithoutAdId instead.
Documentation for Android:
Step 4: Add Firebase SDKs to your app
...
// Add the dependency for the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics'
Google Analytics also has a setup guide in the Admin UI (Admin - Property - Data Streams, select the stream, click "SDK Setup Instructions"):
We are developing an iOS application which has a chat through JSQMessagesViewController and Firebase. When a message is sent by one user, the other user will receive a notification for the message. However, we desire a functionality where if the other user is in the chat, he should not receive the notification as he can already see all the chat-messages.
What is the best logic / way to implement this desired functionality?
Xcode 8.1, Swift 3, Firebase, JSQMessagesViewController
According to me there are two things that you can do:
1)You can use observers, like typing , for mapping two users when they are in private chat. Just make a status key on firebase and set it to true if two users are on chat page. In this case just don't send push as probably you are sending it from client end.
2)Or you can just ignore notifications when application is active when you see that payload has same user with which you are chatting.
You would probably need to add a presence management system. I did something similar on my app while using Firebase and JSQMessagesViewController, you could probably customize the system to your liking.
Depending on what you use database wise for incoming and outgoing messages with the JSQMessagesViewController library, you could probably set it up there as well.
Firebase has worked best for me for what you're looking to do:
https://firebase.google.com/docs/database/ios/offline-capabilities
I'm looking for some guidance.
I'm using Firebase as the backend server for an app I'm building and I would like to alert users when somebody has either liked or disliked some content the user generated.
I understand that Firebase offers cloud messaging through which I can target very specific users and send updates to them; I have implemented that functionality. However, I would like to send updates based on changes in the database, and, as far as I understand, FCM is not built for this purpose.
I have come across OneSignal and it seems promising. Has anybody implemented this with Firebase and could it do what I'm looking for?
Thanks!
I have it set upon such a way that when a message is send by a user to another user, a notification is also send via OneSignal. You just need to store the OneSignal userId in a node with the firebase user UID.
I you like someone's content, then that would also send a notification out directly to the other user.
I am creating demo for private chat using Firebase sdk. I am using this github demo. From this I am able to do chat but how can I get notification when my app is closed and someone send me message on it.
I am not able to find any solution after doing lots of RnD in Firebase, so please help me if anybody knows it solution.