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):
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:
CODE_SIGN_ENTITLEMENTS = {root-folder-name}/{root-folder-name}.entitlements
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
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 generated build.xcconfig somewhere in the platforms folder. I don't think NativeScript should edit files in App_Resources by itself.
@janoshrubos & I just tried to reproduce this locally, however no matter what we tried, the App_Resources/iOS/build.xcconfig was never touched/changed by the CLI. Is this with a specific flavor/template? How did you create the new project?
@janoshrubos & I just tried to reproduce this locally, however no matter what we tried, the
App_Resources/iOS/build.xcconfigwas never touched/changed by the CLI. Is this with a specific flavor/template? How did you create the new project?
@rigor789 Did you add a app.entitlements file in your App_Resources/iOS folder? I will test tomorrow on a new project when I have access to the mac mini again.
This is an Angular project, but I don't think it's related to the flavor/template.
@rigor789 I'm so sorry, this seems to be coming from nativescript-plugin-firebase:
https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/scripts/entitlements-before-prepare.js
Most helpful comment
@rigor789 I'm so sorry, this seems to be coming from
nativescript-plugin-firebase:https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/scripts/entitlements-before-prepare.js