-
Notifications
You must be signed in to change notification settings - Fork 22
iOS Bump Version is overwriting CFBundleShortVersionString #26
Comments
Okay, I have to specify - task: ios-bundle-version@1
displayName: 'Bump iOS Versions in path/to/Info.plist'
inputs:
sourcePath: path/to/Info.plist
versionCode: '$(Build.BuildNumber)'
versionName: The yaml in my previous example have been generated by the yaml-export in the classic build pipleline, but obviously it doesn't behave in the same way. :-( In my opinion, an empty |
Can you include an example Info.plist, I think that will help in determining what the problem is. I just took a look at the code and if the vsts-mobile-tasks/tasks/iOSBumpVersion/task.ts Lines 74 to 81 in c70ca69
Having an example Info.plist will be useful to reproduce the problem to make an appropriate fix. Otherwise I'll just be taking educated guesses |
Yeah, but I think the main issue I had was that I were confused by the fact I have to specify I still think the yaml would be more readable if it contained a boolean or a special value as suggested in my second comment. But from my perspective, you can also close this issue. I do not have any special in my <?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">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>DemoApp</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist> |
You are absolutely right, I am thinking it may be best to update the vsts-mobile-tasks/tasks/iOSBumpVersion/task.json Lines 66 to 73 in c70ca69
The only problem with creating a default value of an empty string is this could be a breaking change across other integrations that expect it to be defaulted to With all of this being said, I think we can safely bump the Major Version of this task to make this fix. That will prevent any breaking changes for people using v1. Example Integration - task: ios-bundle-version@2
displayName: 'Bump iOS Versions in path/to/Info.plist'
inputs:
sourcePath: path/to/Info.plist
versionCode: '$(Build.BuildNumber)' Note that the task name is now |
The defaultValue is very useful in the Visual Editor because it gives the user an idea of what the |
Yes, that sounds to be a good idea! |
makes sense previously there was only the visual part :) open to PRS :) |
I need to look at the docs, but I think this means we need to support both a v1 and a v2 implementation side-by-side. If you don't do that how would a new installation know where to get the v1 code vs the v2code. At least that is my working theory, only the docs have the true answer. I'll do some research and submit a PR when it is ready for review. |
When ios-bump-version is used in a classic build pipeline, the task's behaviour regarding
versionName
corresponds to the description ("leave blank to use existing value in info.plist"):CFBundleShortVersionString
isn't overwritten.But when the same task is used in a yaml-pipeline,
CFBundleShortVersionString
is overwritten by1.0.$(Build.BuildId)
, which is thedefaultValue
from task.json.The text was updated successfully, but these errors were encountered: