Specify APNs credentials for turtle-cli build

#1

I’m running a standalone Expo app I built using turtle-cli under my Apple Developer Enterprise Account for In-House Distribution. Although I have push notifications enabled in production for my app and I’m using a distribution provisioning profile for which I specified my push notifications certificate at the time of creation, I’m unable to get Expo’s push notifications to my phone.

Using Expo’s push notifications tool, I got the following message:

apns

InvalidCredentials: Could not find APNs credentials for com.company.appname (@teamname/appname). Check whether you are trying to send a notification to a detached app. If not, you may need to clear your push credentials and regenerate or upload new ones.

It looks like I need Expo’s servers to somehow get my .p8/.p12 for push notifications, but I don’t see of a way to provide this without running expo build:ios and providing other credentials as well, which I’d like to avoid providing. Is there another way to do this?

#2

I’m working currently on sth like this, but it’s a part of a larger feature, so it might take a bit.

I’m not 100% sure if it work, but you can run build:ios in expo-cli and pass some random file as distribution cert and provisioning profile. Build will fail but credentials will be saved in db. This way you still need to pass apple login and password, but this is not stored anywhere.

1 Like
#3

That workaround worked. Thanks for your help! Looking forward to what’s next.

1 Like