Expo CLI doesn't recognise iOS cert / iOS push notifications

  • built standalone managed workflow app via expo CLI
  • push notification tokens are not available in the app
  • push certificate is missing
  • build -c --no-publish broke, see original tweets below.

Is there a step missing in the docs for expo “managed” standalone App store Push Notifications? https://developer.apple.com

On Authkeys I see the expo notifications key
On Provisioning Profile I see Push Notifications enabled
On App ID Configuration I see the :white_check_mark: to the left of push notifications.

… but there are 0 certificates attached, as shown in this image. iOS settings > notifications doesn’t show the app No push tokens are generated (I think status stays “UNDETERMINED”). I followed all the docs I think, but I feel like a step is missing? Can you help?

Update: I ran the seemingly safe command expo ios:build -c --no-publish, and chose for expo to handle everything. It then started regenerating EVERYTHING, now ending up with duplicate of everything except for:

× Failed to generate Apple Provisioning Profile

It said:

√ Didn’t find any previously uploaded Apple Distribution Certificate
√ Didn’t find any previously uploaded Apple Push Notifications service key

But this is incorrect, as I already had both, via expo-cli
The final error is to be expected: duplicate profile name.

I can’t find anything about this in the troubleshooting docs either. My next step is, unless I’ll be told otherwise, to run the command once more but then pick “let me handle it”. I’ll then upload the original ones to the expo server.

-c removes credentials only from expo servers, so you need to either revoke them on apple developer portal or add --revoke-credentials flag to build command when clearing credentials.
If I understand correctly, you managed to resolve problem with distribution certificate and push notification key and you are seeing error only for provisioning profile. In that case run expo build:ios --clear-provisioning-profile --revoke-credentials

This is correct

One step back:

  • I used expo-cli to build the ios app and create these credentials (the first time)
  • Push Notifications are enabled on that profile (after the first time)
  • Push Notifications are NOT showing up in the settings on the ios app (after the first time)

Is you this is correct confirming that the reason it doesn’t show up because the certificates are missing?

In order to fix the above, I tried to clear it. After the second time indeed the following is correct:

If I understand correctly, you managed to resolve problem with distribution certificate and push notification key and you are seeing error only for provisioning profile. In that case run

Correct.

In that case run expo build:ios --clear-provisioning-profile --revoke-credentials

Running it now!

We’re going to generate:

  • Apple Distribution Certificate
  • Apple Push Notifications service key
  • Apple Provisioning Profile
    × Failed to generate Apple Distribution Certificate

You can have only three Apple Distribution Certificates generated on your Apple Developer account.
Please revoke the old ones or reuse existing from your other apps.
Please remember that Apple Distribution Certificates are not application specific!


revoke-credentials therefore doesn’t seem to work correctly. Now revoking everything manually and running everything again.

I correctly recreated everything this time.

In the provisioning profile I see:

It’s linked to the correct app.

But the App ID still shows 0 certificates (I’m assuming the Push Key replaces the need for a certificate, so this is probably fine?)

On the iOS app I still don’t get push tokens and it still doesn’t show up under Settings > Notifications.

BY This is correct I meant that what you seeing in app id on apple developer portal is the way it suppose to be.

revoke-credentials flag is only revoking those credentials that are going to be cleared from expo server, so in that case, you need to run expo build:ios --clear-credentials --revoke-credentials
Based on your previous post I assumed that distribution certificate and push notification key was saved correctly on expo servers.

1 Like

Yes. I think you’re correct re: it was already fine / stored on expo server.

Push notifications work on Android; and on expo on iOS. Any way to determine why it’s not working on standalone on iOS?

What part is not working? Do you get push token when registering device or the problem is with sending notification?

I just noticed there was an “Invalid” on the AppleID page. I had to press edit and click the provisioning profile. The “Invalid” is now gone.

Let me test again (thank you for your time so far).

It shows up now!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.