Skip to content

Commit

Permalink
Added documentation for batchImport service
Browse files Browse the repository at this point in the history
  • Loading branch information
TalalM committed Jun 30, 2016
1 parent f299587 commit 95c834c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,22 @@ The default notification **priority** is set to *high* (to always be sent). You


And that's it!

APNS Batch import
-----------------

If you are migrating from another service ([Parse](http://www.parse.com) for example) and you already have APNS tokens on your database, you can [batch import them to Firebase](https://developers.google.com/instance-id/reference/server#create_registration_tokens_for_apns_tokens).

To do so, just call the batchImport method with the following parameters:

- **application**: Bundle id of the application
- **sandbox**: Boolean to indicate sandbox environment (TRUE) or production (FALSE) - default to true
- **apns_tokens**: The array of APNs tokens for the app instances you want to add or remove. *Maximum 100 tokens per request.*

Example:

$client->batchImport([
'application' => "com.french.revolution",
'apns_tokens' => ["Robespierre's token", "Danton's token", "Louis XVI's token", ...],
'sandbox' => false,
]);

0 comments on commit 95c834c

Please sign in to comment.