Skip to content

Started getting InvalidArgumentException "Unable to load the key." #160

@trevorgehman

Description

@trevorgehman

Have been working fine except when we updated from 0.14.2 to 0.14.5.

I believe it is due to #158

Here is what we're doing:

       $options = [
            'key_id' => '***',
            'team_id' =>  '***',
            'app_bundle_id' =>  '***',
            'private_key_content' =>  '***',
        ];

        $tokenString = Token::create($options)->get(); // <-- Exception is thrown here

        $authProvider = Token::useExisting($tokenString, $options);

        $client = new Client($authProvider, config('apns.live'));

        // Create notifications here

        $client->addNotifications($notifications);

        $client->push();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions