"You can have only two Apple Keys generated on your Apple Developer account"

Trying to build our app and getting the error “You can have only two Apple Keys generated on your Apple Developer account.” It seems like Expo isn’t reusing the existing push notification key from our other app.

Some more information:

  • We currently have two apps on the app store, both under our Apple Team Account (Summer Playbook Inc.) but different expo accounts, and are trying to add another one
    • Hangline, which we first put on the store about a year ago and last built about a month ago, and is under the raphael@summerplaybook expo account
    • Codestar, which we put on the store about a week ago, and is under the luke@summerplaybook expo account
    • We’re trying to build an app called 3d chat right now under raphael@summerplaybook, and are running into this push notifications bug
  • This seems to happen whether I reuse the hangline distribution certificate or create a new one. I haven’t tried manually uploading my push keys – they weren’t available to download on the apple developer page and I don’t think running expo fetch:ios:certs on hangline produced the push key .p8 file (but did download a .p12, .key and .mobileprovision)

Questions:

  • How do we fix this? Is this something that can be fixed with us manually uploading keys and if so, how do we get them? Is this a bug caused by us using two different expo accounts? Will we have to disable notifications for one of our apps to fix this? Should we be using a team expo account? Or maybe this fixable on the expo side and we don’t have to do anything?
  • It also shows our Apple Push Services certificate as expiring in one week – does that affect the answer at all? Are our push notifications going to stop working for our old apps?

Screenshots

Here’s the terminal output:

Our certificates page

Our identifiers page

Our profiles page

Our keys page

Expo Diagnostics:

  Expo CLI 3.2.3 environment info:
    System:
      OS: macOS 10.14.6
      Shell: Unknown - /usr/local/bin/fish
    Binaries:
      Node: 12.6.0 - /usr/local/bin/node
      Yarn: 1.17.3 - /usr/local/bin/yarn
      npm: 6.11.3 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5199772
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^35.0.0 => 35.0.0 
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8 
      react-navigation: ^4.0.7 => 4.0.7 
    npmGlobalPackages:
      expo-cli: 3.2.3

Hey @raphaelrk,

Can you try running expo credentials:manager and then selecting ios for the platform prompt? You’ll be able to manage the credentials we have stored for your account and it will show you what Apple credentials are in use for what projects.

Cheers,
Adam

Thanks @adamjnav!

Opened up the credentials manager and it sees my hangline and 3d chat projects. I tried to run “Use existing Push Notifications Key in current project” but it says “There are no push credentials available in your account”, even though hangline push notifications are working and are through expo. (Codestar push notifications are also working through expo, but are under a different account.)

Best,
Raphael

Hi
expo can only reuse credentials on the same expo account. Apple allows to download credentials only when creating them, after that there is no way to access them. When expo is checking for existing credentials it’s looking only expo servers not your apple account.

If you want to use the same key on different accounts you need to run expo fetch:ios:certs on app and account that has already configured them. Log in to the second account and go to your second project and then run expo build:ios and when asked about push key specify path to .p8 file and password.

3 Likes

Thanks @wkozyra! I was able to download the .p8 key for codestar from luke@ and set it as the key for 3dchat under raphael@.

A remaining confusing thing for me is that there was no push key found under the raphael@ account, even though hangline is actively sending push notifications. Any idea what’s going on there?

1 Like

If that app is older than 6 months it might use push certificates instead push notifications keys. We deprecated them in expo, but they are still working for apps that had them configured already. If your app uses push certificate it should be visible in expo credentials:manager listing of all credentials.

1 Like

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