Push config set-apns

Open in

Use the ably push config set-apns command to configure APNs push notifications for an app.

Synopsis

ably push config set-apns [options]

Options

--app

The app ID to configure.

--certificate

The path to a P12 certificate file. Exclusive with --key-file.

--key-file

The path to a P8 key file. Exclusive with --certificate.

--key-id

The key ID for the P8 key. Required when using --key-file.

--password

The password for the P12 certificate.

--sandbox

Use the APNs sandbox environment. Defaults to false.

--team-id

The Apple Developer team ID. Required when using --key-file.

--topic

The bundle ID for the app. Required when using --key-file.

--json

Output results as compact JSON. Mutually exclusive with --pretty-json.

--pretty-json

Output results in formatted JSON. Mutually exclusive with --json.

--verbose | -v

Enable verbose logging. Can be combined with --json or --pretty-json.

Examples

Configure APNs with a P12 certificate:

ably push config set-apns --certificate /path/to/cert.p12 --password "cert-password"

Configure APNs with a P8 key:

ably push config set-apns --key-file /path/to/key.p8 --key-id "ABC123" --team-id "TEAM456" --topic "com.example.app"

Configure APNs with a P12 certificate and sandbox environment:

ably push config set-apns --certificate /path/to/cert.p12 --password secret --sandbox

Configure APNs and output the result in JSON format:

ably push config set-apns --certificate /path/to/cert.p12 --json

See also

  • Push — Explore all ably push commands.
  • CLI reference — Full list of available commands.