jamesmontemagno / vsts-mobile-tasks

VSTS Tasks for Mobile!
MIT License
79 stars 22 forks source link

Added New Build Task - Transform Entitlement Property #16

Closed SkyeHoefling closed 5 years ago

SkyeHoefling commented 6 years ago

My Problem While building an iOS app that requires push notification I have set the entitlements.plist to include the following property

<dict>
    <key>aps-environment</key>
    <string>development</string>
</dict>

The problem comes when I want to transition from a development environment to a production environment. I was unable to publish my build to the Apple App Store or Test Flight until I updated the xml to read as follows:

<dict>
    <key>aps-environment</key>
    <string>production</string>
</dict>

This is a simple transform that we should be able to apply at build time depending on the build we are running. The version number build tasks are very specific which is good. We should add a new task that allows us to leverage the more of the PlistBuddy command to provide more customization to a plist file and in our case here the entitlements.plist file.

Solution Create a new VSTS Build Task that provides support to edit entitlement.plist properties.

Sample Build Configuration image

Sample Build Output image

As part of this pull request I updated the extension version to 8 since we are adding a new task to the suite of mobile tasks

SkyeHoefling commented 6 years ago

@jamesmontemagno any chance we can get this reviewed and merged in so we can have the new task available on your marketplace extension. Currently I have a private extension that I am using but would love to have this in the one everyone is using

jamesmontemagno commented 5 years ago

@ahoefling any changes here or you think is good to go?

SkyeHoefling commented 5 years ago

@jamesmontemagno I just updated the branch with additional changes from my private fork that I use on my own instance of Azure DevOps.

The big change was the addition of npm and gulp so it is easier to determine if the TypeScript will actually build and run before we get it to Azure DevOps. I found this easy to quickly iterate on the code.

This should be good to merge and publish. Let me know if you need anything from me for this change