Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 7.1.2
Cross-platform modules: 6.5.11
Android Runtime: 6.5.3
iOS Runtime: 6.5.4
XCode Version: 12.3
Plugin(s): irrelevant
Describe the bug
We had some issues where developers had the app cloned into a different directory, and thus having a different folder name during the build/run. We have a custom app.entitlements in our App_Resources/iOS folder. According to the docs it should automatically pick it up (and it does), however, it then links it in the build.xcconfig in the App_Resources/iOS folder. It adds the following line:
You probably already see when this will go wrong: another developer clones the repository with a different folder name, and the CODE_SIGN_ENTITLEMENTS reference isn't correct anymore. It also doesn't correct it resulting in an error/warning in the XCode build.
In my opinion it should not link it in the App_Resources/iOS folder, it should link it in the generated build.xcconfig somewhere in the platforms folder. I don't think NativeScript should edit files in App_Resources by itself.
To Reproduce
Create a new project
Add an app.entitlements in the App_Resources/iOS folder
Run the app
See that App_Resources/iOS/build.xcconfig has been edited and gets a reference to the entitlements file
Rename the root folder of the project
Run the app again
You will get an error about the entitlements not being found
Expected behavior
It should link CODE_SIGN_ENTITLEMENTS in the generated build.xcconfig somewhere in the platforms folder. I don't think this plugin should edit files in App_Resources by itself.
Environment Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
We had some issues where developers had the app cloned into a different directory, and thus having a different folder name during the build/run. We have a custom
app.entitlements
in ourApp_Resources/iOS
folder. According to the docs it should automatically pick it up (and it does), however, it then links it in thebuild.xcconfig
in theApp_Resources/iOS
folder. It adds the following line:You probably already see when this will go wrong: another developer clones the repository with a different folder name, and the
CODE_SIGN_ENTITLEMENTS
reference isn't correct anymore. It also doesn't correct it resulting in an error/warning in the XCode build.In my opinion it should not link it in the
App_Resources/iOS
folder, it should link it in the generatedbuild.xcconfig
somewhere in the platforms folder. I don't think NativeScript should edit files inApp_Resources
by itself.To Reproduce
App_Resources/iOS
folderApp_Resources/iOS/build.xcconfig
has been edited and gets a reference to the entitlements fileExpected behavior It should link
CODE_SIGN_ENTITLEMENTS
in the generatedbuild.xcconfig
somewhere in the platforms folder. I don't think this plugin should edit files inApp_Resources
by itself.The code that's doing it is: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/scripts/entitlements-before-prepare.js
Why is this code needed since NS should pick up the entitlements automatically?