How to create a production build on Expo?
Hello,
Expo guides point to this command:
eas build --platform ios --profile production --local
It generates an .ipa file to upload later to the Store.
The problem is that this app version doesn't works with Apple authentication. It throws:
Error: The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)", }",
When I compile it manually with Xcode adding the Sign in with Apple capability, it works. But it's a dev build (with Expo dev tools) and only targeted for my iPhone.
So I don't know exactly what steps should I take to get the ipa working with this library.
Thank you in advance.
It worked after install and add the following in app.json:
{
"expo": {
"plugins": ["expo-apple-authentication"]
}
}
I didn't saw it in the docs, so maybe should be included in the Expo setup. I leave it open to know if it should be mandatory.
["expo-apple-authentication"]
should I also install expo-apple-authentication ? this plugin config is for expo-apple-authentication
["expo-apple-authentication"]
should I also install expo-apple-authentication ? this plugin config is for expo-apple-authentication
Yes.
Hey @mikehardy, can you confirm the need to include this plugin for expo projects?
The only thing we actually need from expo-apple-authentication is their plugin which adds the com.apple.developer.applesignin: ["Default"] entitlement during prebuild.
It does this when the ios.usesAppleSignIn field is set in expo app.json.
Instead, just manually add this to your app.json:
{
"expo": {
"ios": {
"entitlements": {
"com.apple.developer.applesignin": ["Default"]
}
}
}
}
Don't set ios.usesAppleSignIn since that's an expo-apple-authentication property.
This gives you the iOS entitlement you need for EAS builds without the dependency conflict. I'd suggest we update the docs to replace the "Expo usage" section with this manual approach.
Follow-up: Please bring some attention to #373 where I propose fixing the README.md
The only thing we actually need from
expo-apple-authenticationis their plugin which adds thecom.apple.developer.applesignin: ["Default"]entitlement during prebuild.It does this when the
ios.usesAppleSignInfield is set in expoapp.json.Instead, just manually add this to your
app.json:{ "expo": { "ios": { "entitlements": { "com.apple.developer.applesignin": ["Default"] } } } } Don't set
ios.usesAppleSignInsince that's anexpo-apple-authenticationproperty.This gives you the iOS entitlement you need for EAS builds without the dependency conflict. I'd suggest we update the docs to replace the "Expo usage" section with this manual approach.
Follow-up: Please bring some attention to #373 where I propose fixing the README.md
You saved my day!