-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
With this setup, the card data in the phone changes, but there is no pop-up notification
$options = [
'key_id' => env('APPLE_KEY_ID'), // The Key ID obtained from Apple developer account
'team_id' => env("APPLE_TEAM_ID"), // The Team ID obtained from Apple developer account
'app_bundle_id' => env("PASS_TYPE_ID"), // The bundle ID for app obtained from Apple developer account
'private_key_path' => base_path() . env("APPLE_APPLICATION_CREDENTIALS_P8"), // Path to private key
'private_key_secret' => null // Private key secret
];
$authProvider = AuthProvider\Token::create($options);
$alert = Alert::create()->setTitle('Hello!');
$alert = $alert->setBody('First push notification');
$payload = Payload::create()->setAlert($alert);
$payload->setSound('default');
$payload = $payload->setCustomValue("balance", "new");
// 更新的组
$deviceTokens = [];
$deviceTokens[] = $sPushToken;
$notifications = [];
foreach ($deviceTokens as $deviceToken) {
$notifications[] = new Notification($payload, $deviceToken);
}
$client = new Client($authProvider, $production = true);
$client->addNotifications($notifications);
$responses = $client->push();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels