I'm using Firebase to push notifications to my iOS/Android Apps. The target estimate for the iOS app is "-" while it's >1000 for the android.
Is there a way to push notifications to more than 1000 users?
Why is the iOS target not defined? Does that mean I can push notifications to as much users as I want without restrictions?
Asked
Active
Viewed 748 times
2

Lyn
- 43
- 9
-
There are no limits for FCM and Firebase Notifications. – Doug Stevenson Apr 06 '17 at 14:31
2 Answers
1
You have two options. 1. Loop through all the DeviceIDs and send notification to each of them 2. Subscribe your users on some "topic" and send notification to that topic. https://firebase.google.com/docs/cloud-messaging/ios/topic-messaging

Yahya Ibrahim
- 251
- 4
- 15
0
use just for loop tack all device id from database if you stored othewise from arra use like this some syntax may change
$sql = 'select deviceid from tablename';
$deviceid = mysql_query( $sql, $conn );
if(! $deviceid ) {
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($deviceid, MYSQL_ASSOC)) {
$title=$_GET["Title"];
$massage=$_GET["massage"];
$fields=array('to'=> $row['deviceid'] ,'notification'=>array('title'=> $title,'body'=> $massage,'click_action'=> 'abc','icon'=>'ic','sound'=> 'default','color'=> '#00aff0'));
$headers = array (
key,
'Content-Type: application/json'
);
$ch = curl_init ();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
$result = curl_exec ( $ch );
echo $result;
curl_close ( $ch );
}
mysql_close($conn);

android_jain
- 788
- 8
- 19