I'm trying to add an associated domain to my Expo (non-ejected) react-native project.
My app builds fine and submits through the XCode application loader normally.
But if I add the associatedDomains
array to my app.json
I get an error when I try to submit the application:
ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.associated-domains' in 'Payload/ExpoKitApp.app/ExpoKitApp'."
I'm not developing this at all within XCode. I've been building the app within my own environment, running expo build:ios
, downloading the .ipa
file, opening XCode on a mac, and then running the Xcode > Open Developer Tools > Application Loader
to submit it to testflight. That process has been working fine, but I'm not sure where in XCode or within my Apple developer account I need to enable the entitlement, if that requires updating some config file, and if so where I put it afterwards.
The expo documentation mentions (https://docs.expo.io/versions/latest/workflow/linking/#universal-links-on-ios) that I need to "To add your domain to the entitlement, click Add (+) at the bottom of the Domains table in order to add a placeholder domain with the webcredentials: prefix. Replace the placeholder with your site’s domain, retaining the prefix." but I don;'t know where my Domains table is. Is that in the apple web interface, or in XCode?
Apologies if the question is a bit basic, or if I'm missing something about the XCode or react-native app development workflow, and thanks for the help!
Add the associated domains entitlement to your app For watchOS apps, you must add the Associated Domains capability to the WatchKit Extension target. To add your domain to the entitlement, click Add (+) at the bottom of the Domains table to add a placeholder domain.
Linking to Expo GoExpo Go uses the exp:// scheme, but if we link to exp:// without any address afterwards, it will open the app to the home screen. In development, your app will live at a url like exp://127.0.0.1:19000 .
Note: this post was originally published on February 28, 2019, and subsequently updated on March 14, 2019 to reflect improvements to the workflow. Starting today, you can use as little or as much of the Expo SDK as you like in any React Native app.
Figured it out. I had two things going on:
Renewing Certificates in Expo
I had to log in to developer.apple.com and delete my keys, profiles, and any other data except for the App ID under https://developer.apple.com/account/resources/certificates/list
After that, I needed to refresh my certificates within expo by running expo build:ios -c
which clears the certificates that Expo stores on your servers.
Invalid App Domain
Following that, I was getting a different error because the app domain that had listed in associatedDomains
within app.json
was mywebsite.com
rather than the following:
{
expo: {
...
ios: {
associatedDomains: [
"applinks:mywebsite.com",
]
}
}
}
After doing that, builds resumed submitting to testflight with the proper entitlements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With