ProgressNS / sidekick-feedback

This repository is for feedback regarding NativeScript Sidekick. Use the issues system here to submit feature requests or vote for existing ones.
45 stars 9 forks source link

Cloud build error after adding app.entitlements file for use in PUSH #297

Closed drophit closed 6 years ago

drophit commented 6 years ago

Please, provide the details below:

Did you verify whether this issue has already been reported here?

Yes

Tell us about the problem

Trying to add PUSH as an option using the app.entitlements files produces a cloud build error

Which platform(s) does the issue occur on?

iOS 8.2 or higher (target) Windows 10 64

Provide the following version numbers that the issue occurs with:

Version: 1.13.0-v.2018.10.5.2 (latest) NativeScript CLI version: 4.2.4 CLI extension nativescript-cloud version: 1.14.2 CLI extension nativescript-starter-kits version: 0.3.5

Tell us how to recreate the issue in as much detail as possible

  1. add an app.entitlements file to App_Resources\iOS Contents of file should be <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    aps-environment production
  2. Go to publish and select iOS

  3. Select Release/webpack not AOT

  4. Click Next main_18-11-09_20-16-12.014.log

Does this issue happen every time?

Yes

Send the client logs

drophit commented 6 years ago

Changing the app.entitlements to .entitlements as well as using a front slash in build.xcconfig solved this - ie. /.entitlements

drophit commented 6 years ago

Better example - you MUST declare your own filename and use FRONT slash in the path. It looks like allowing the cloud build process to create the entry in build.xcconfig results in backslash ie. {folder_name}{file_name}.entitlements which causes the build to fail when it can not find the *.entitlements file due to a bad path.

build.xcconfig CODE_SIGN_ENTITLEMENTS = {folder_name}/{file_name}.entitlements

{file_name}.entitlements <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

aps-environment production
drophit commented 6 years ago

I added a bit better formatted answer here https://stackoverflow.com/questions/53353454/cloud-build-for-ios-using-nativescript-sidekick-results-in-code-sign-entitlement/53353455#53353455

ggarabedian commented 5 years ago

@drophit, thank you for sharing such detailed answer on how to resolve the issue. I suspect we haven't addressed your comment because you have found a viable workaround quickly. Despite that, I wanted to let you know that your contribution is appreciated!