essent / nativescript-custom-entitlements Goto Github PK
View Code? Open in Web Editor NEWnativescript hook for supporting custom xcode 8 entitlements, see https://github.com/NativeScript/nativescript-cli/issues/2075
License: MIT License
nativescript hook for supporting custom xcode 8 entitlements, see https://github.com/NativeScript/nativescript-cli/issues/2075
License: MIT License
Custom entitlements are copies to folder platforms/iOS
.
In NativeScript 3.1.2 the folder is named platforms/ios
:
This does not work on a case sensitive file system.
I think I am going to create a PR.
I think it's bad practice for us to modify files in App_Resources at build time, it would be ideal if we could append or create build.xcconfig in the platforms/ios folder instead after preparing.
We implemented this plugin on Windows so we could add entitlements for apple push and use NativeScript Side Kick cloud build to create our apple .ipa's. It seems that during the prepare the path to the .entitlements file is ...\app.entitlements which causes issues during cloud build (see the error below).
If we hardcode the entitlements in build.xcconfig, it builds without error.
Environment
npm - 5.6
tns - 3.4.2
Sidekick - Version: 1.5.0-v.2018.2.15.3
Error
[18-02-21 06:47:23.569] (Info) Code Signing Error: The file "/tmp/builds/_/4db63c0f19cce48a3b5124f7fe46019bb014047d/3.4.2/mobile/platforms/ios/mobile\mobile.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "mobile" and build configuration "Debug" is correct and that the file exists on disk.
[18-02-21 06:47:23.570] (Info) [xcode-build] Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0'
@spike1292 It seems that the plugin expects build.xcconfig to exist, if it doesn't, tns prepare
fails with no error message
When I wrote the original code, I made it overwrite build.xcconfig instead of checking if CODE_SIGN_ENTITLEMENT exists and appending only if that check was false.
As it stands, it will erase any other pre-existing values in build.xcconfig, so you want to update this, otherwise things like nativescript-cli's DEVELOPMENT_TEAM_ID can't be set there.
Hey,
First of all I would like to express my gratitude for creating this plugin. At the time it was created, this functionality was not available in NativeScript CLI out-of-the-box and this plugin helped many projects and application authors to achieve the desired result.
Some time after the plugin was created, we've introduced the same functionality in NativeScript CLI, i.e. - support for app.entitlements
file in <path to App_Resources>/iOS
dir, support for app.entitlements
file from plugins and merging all these files in a single file inside <project dir>/platforms/ios
.
As the functionality is already available in NativeScript CLI, maybe it is time to deprecate this plugin.
Also in NativeScript 6.0.0 release (coming soon), hooks are changed and this plugin will stop working. Instead of making it compatible with NativeScript 6.0.0 I think it will be better to just leave it as is and mark it as deprecated in npm and in its README.
What do you think?
Thanks again for the great work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.