-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Entitlements replaced during build #64
Comments
Howdy,
Best |
I don't have an ios directory since I develop on a windows machine, but after inspecting my fastlane logs in EAS, here are the 2 warnings I have:
I started this journey back in November, and I selected 'yes' for push notifications. Since then, my logs when starting a build with eas always include this: |
Ahh. Try setting it to 'no'. Unfortunately, I'm unfamiliar with what EAS is doing under the hood, but maybe selecting 'yes' leads to Expo trying to manage the entitlements for you and this is leading to a conflict. I would have to test this myself to know for sure when I have the time. But give that a shot. |
Unfortunately, that didn't work. Setting up push notifications with EAS adds an Apple Push Key to my EAS account credentials. I'm not sure how it gets applied to the build. I removed and revoked that push key, but hit the same problem. I have my Push Notifications Certificate uploaded to the Apple Developer Portal under the Push Notifications capability. This is the same one I uploaded to my OneSignal portal. Should I have that push cert downloaded and saved somewhere in my project? |
We don't want EAS managing your push credentials since this is something you're doing on the side and uploading to OneSignal. I wonder if EAS is still somehow managing your notifications somehow. You could try building a blank example app to see if you learn anything.
That shouldn't be necessary. |
I had my coworker build our app with his personal EAS account using a different distribution certificate (and re-generated provisioning profiles). That didn't work, so it appears to be an issue relating to our local configuration, nothing to do with EAS managing push notification credentials. I'll try a blank project, or something similar next. |
I created a blank project and set up the onesignal-expo-plugin. The entitlements remained intact through the build process. So I copied my real app's Still working on finding the difference between the two... |
Installed all of my app's dependencies in the test app. Still builds with all the entitlements fine. I've followed the same process for creating new identifiers, provisioning profiles, and app groups for both so I'm at a loss here. |
Well, after many hours over the last week, and countless builds with cleared entitlements, I finally found the problem. I had I don't know why it's incompatible with the onesignal plugin, but I actually don't think I need that file anymore, so my issue is resolved. |
Definitely spoke too soon. I had one build work, but I haven't been able to recreate the success. I've spent hours now analyzing my XCode logs to see if there is a substantive difference between the build that worked and the ones that don't, but I haven't found anything. I verified in my logs that the correct provisioning profile is being used. And I inspected the provisioning profile itself and made sure it has the correct entitlements. It's very strange. To my memory, the only thing I did between the build that worked and the one before it was remove the GoogleServicesFile from app.config.ts. |
Discovered in the XCode logs that CODE_SIGN_ENTITLEMENTS was set only in the build that worked, and is not found in the builds that didn't. I'm unsure what this means in terms of fixing the problem. I also made a post on the expo forums here: https://forums.expo.dev/t/code-sign-entitlements-not-getting-set/62227 |
We set this setting for the NSE automatically within If it was not set, or it was replaced, it might be causing have side-effects. See if any other config plugins you are using are doing anything with this setting. |
To give another update, after copying my I reverted to old commits in my primary app to try and find the exact problem, but results were very inconsistent. At one point, I ran 3 builds in a row with out making any changes, and the 3rd attempt had a different result. |
Let's go ahead and leave #67 open since they're duplicates and that one has more participants |
iOS entitlements that were added manually through the Apple Developer portal appear to be erased during expo's
eas build
and replaced with one that's not useful.I have Beta11 installed.
Here are the enabled capabilities for my app, taken from the Provisioning Profile that I manually generated in the Apple Dev portal:
Here are the entitlements in my XCode logs when running a build with and without OneSignal configured...
Without OneSignal:
With OneSignal:
As you can see,
aps-environment
andapplesignin
are both overwritten withkeychain-access-groups
when the OneSignal plugin is included in the build.Here is my OneSignal plugin configuration in
app.config.ts
I've tried adding the entitlements manually to my
app.config.ts
like so:And I was able to verify that the configuration was updated by running
expo config --type introspect
, but the entitlements were cleared again once I built usingeas build
And here is the Apple email that brought the issue to my attention:
I just finished getting my builds to complete without error by following the steps here: #40
I'm hoping I just messed up a step somewhere along the way.
The text was updated successfully, but these errors were encountered: