Managed Workflow
eas-cli 0.48.2
When building for multiple targets, I get the following error:
» ios: paths-entitlements: Found multiple *.entitlements file paths, using "ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements". Ignored paths: ["ios/PROJECT/PROJECT.entitlements"]
When I inspect the project.pbxproj file, it seems that both targets are identified. How can I ensure that the entitlements are applied to the correct target without being overwritten?
I’ll link a couple relevant issues here:
opened 03:30PM - 21 Mar 22 UTC
closed 09:35PM - 04 May 22 UTC
Help Wanted
Problem Statement - Our iOS integration with OneSignal is not functional due to … a Missing Push Capability error in OneSignal.

Environment Details
* Expo SDK 44
* EAS managed workflow build
Steps Taken to Resolve / Root Cause Analysis
1. iOS setup has been completed as per the discussion in https://github.com/OneSignal/onesignal-expo-plugin/discussions -
2. Ensured the provisioning profiles created as part of the above were regenerated / up-to-date (even tried recreating them, inc. distribution cert).
3. Experimented with all plugin props (mode, devTeam, iPhoneDeploymentTarget).
4. Experimented with `EXPO_NO_CAPABILITY_SYNC` as per https://docs.expo.dev/build-reference/ios-capabilities/
5. Experimented with adding the aps-environment entitlement as per https://docs.expo.dev/versions/v44.0.0/config/app/#entitlements
None of these yielded a positive result.
In combination with the above, I also experimented with stripping the app right back to a boilerplate Expo app and gradually building the functionality of our app back up from scratch. Certain configurations of the source code *would* work through this process, but results were inconsistent:
* The totally stripped back app _succeeded_ reliably.
* Our full app _failed_ reliably.
* Intermediate states were inconsistent - successive builds (of the exact same source configuration) would yield different results; some would fail, some would succeed.
Looking at the Xcode logs for source configurations that had inconsistent results, the logs are quite different. A key difference I observed in the logs is that a working run would include in the `aps-environment` in the entitlements (see below). This feels significant to the presence or absence of the "Missing Push Capability" error, but I'm unable to determine what causes it to be present or not, and why different `eas build` runs (with identical input and parameters) would have different results.
```json
{
"application-identifier" = "XYZ";
"aps-environment" = production;
"com.apple.developer.team-identifier" = ABC;
"com.apple.security.application-groups" = (
"DEF"
);
```
opened 09:21AM - 25 Nov 21 UTC
closed 03:14PM - 01 Dec 21 UTC
needs more info
### Summary
Hey guys, I have a problem with eas. It wont built & throws this … error:
```error: The file "/Users/expo/workingdir/build/ios/TestNotificationService/TestNotificationService.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "TestNotificationService" is correct and that the file exists on disk. (in target 'TestNotificationService' from project 'FlickAssistant')```
and i think its related to this warning which appears when i run `eas build -p ios`
```» ios: paths-entitlements: Found multiple *.entitlements file paths, using "ios/FlickAssistant/FlickAssistant.entitlements". Ignored paths: ["ios/TestNotificationService/TestNotificationService.entitlements"]```
### Environment
EAS CLI 0.38.0 environment info:
System:
OS: macOS 11.5.2
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - /usr/local/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.14.13 - /usr/local/bin/npm
Utilities:
Git: 2.32.0 - /usr/local/bin/git
npmPackages:
react: 17.0.1 => 17.0.1
react-dom: 16.9.0 => 16.9.0
react-native: 0.64.0 => 0.64.0
npmGlobalPackages:
eas-cli: 0.23.0
### Error output
_No response_
### Reproducible demo or steps to reproduce from a blank project
1. create blank react native project
2. in xcode add file->new target->notification service extension
3. in notification service extensions add capability->app groups, create & select an app group
4. run eas build -p ios
Issue 793 appears to have been closed, but I am on the most recent version of eas, and am still getting this error.
I am facing this issue as well. Was it resolved?
It was solved through an update to EAS and the OneSignal config plugin.
Make sure you use the most recent eas-cli and onesignal-expo plugin.
If you still have trouble, try moving the config plugin to the first one in the plugins array.