iOS Tutorial FirebaseNotifications / Push Messages (server not required)

Status
Not open for further replies.

tufanv

Expert
Licensed User
You can use this code to get the token:
B4X:
Private Sub GetToken As String
   Dim no As NativeObject
   Dim token As NativeObject = no.Initialize("FIRInstanceID").RunMethod("instanceID", Null).RunMethod("token", Null)
   If token.IsInitialized Then Return token.AsString Else Return ""
End Sub
Call it from FCMConnected event. Note that there are cases where the token is not available.
can this pushtoken change ? Or is it always the same for a single user ?
 

b4auser1

Well-Known Member
Licensed User
You can save to the db not token, but personal unique name of user, f.e. username or email. App should subscribe to both topics: common for all users and personal (unique) for the user with name unique. If you need to send message to all users, then use general topic name, otherwise - personal (unique) for the user topic name.
 

tufanv

Expert
Licensed User
You can save to the db not token, but personal unique name of user, f.e. username or email. App should subscribe to both topics: common for all users and personal (unique) for the user with name unique. If you need to send message to all users, then use general topic name, otherwise - personal (unique) for the user topic name.
it would make too many topics , lets say we have 1000 active users , wouldn't be it a problem ?
 

b4auser1

Well-Known Member
Licensed User
it would make too many topics , lets say we have 1000 active users , wouldn't be it a problem ?
"There is no limitation on the number of topics or subscriptions. There was a limitation of 1 million subscriptions for the first year after topics was initially launched but that restriction was removed at this year's (2016) Google I/O. FCM now supports unlimited topics and subscribers per app. See the docs for confirmation."
https://stackoverflow.com/questions...er-of-topics-a-device-can-subscribe-to-in-fcm

"Topic messaging supports unlimited topics and subscriptions for each app."
https://firebase.google.com/docs/cloud-messaging/android/topic-messaging
https://firebase.google.com/docs/cloud-messaging/ios/topic-messaging
 

hongbii khaw

Member
Licensed User
Hi all,
I got an error message:
ld: framework not found FirebaseMessaging
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: ** BUILD FAILED **


The following build commands failed:
Ld build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/SCloud normal armv7
Ld build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/SCloud normal arm64
(2 failures)
What can i do?
Thank you.
 

hongbii khaw

Member
Licensed User
I thought sending tool will be same as the android thing.!!!
Am sorry now it works..
So iOS sending tool have more data fields in the json write?..and that's the issue I was facing..!
Hi,
I think I have the same issue with u since I'm not using the b4j sending tools.
Can you share with me how you solve this problem?
Thank you.
 

dealsmonkey

Active Member
Licensed User
Quick question, please !

When I create an Apple Push Services Production Certificate, it is not showing when I try to create a distribution ad-hoc distribution profile? Only the ios Distribution certificates are available.

Any help would be greatly appreciated, as I am tearing out what hair I have left, getting the notifications to work !!

regards

Neil
 

dealsmonkey

Active Member
Licensed User
See the video tutorial. The provision profile goes with the distribution certificate note with the SSL certificate.
Thanks Erel, I have watched it a few times, but will do so again! Am I right in saying then, that the Apple Push certificate is only used to download and create the p12 file ?
 
Status
Not open for further replies.
Top