Skip to content

Apple frameworks: stamp CFBundleShortVersionString from $(MARKETING_VERSION)#970

Draft
armahnii2000 wants to merge 1 commit intomicrosoft:mainfrom
armahnii2000:user/v-garmah/apple-version-stamp-infoplist
Draft

Apple frameworks: stamp CFBundleShortVersionString from $(MARKETING_VERSION)#970
armahnii2000 wants to merge 1 commit intomicrosoft:mainfrom
armahnii2000:user/v-garmah/apple-version-stamp-infoplist

Conversation

@armahnii2000
Copy link
Copy Markdown

@armahnii2000 armahnii2000 commented May 7, 2026

Summary

Today, when libHttpClient's Apple framework targets are built with xcodebuild MARKETING_VERSION=X.Y.Z on the command line, the produced framework still ships with CFBundleShortVersionString=1.0 in its Info.plist. The reason: the static plist files have 1.0 written as a literal, not as a $(MARKETING_VERSION) reference, so Xcode has nothing to substitute. This PR replaces the literals with the variable so xcodebuild's CLI override actually flows through to the framework.

What changes

The same one-line edit in four files — only CFBundleShortVersionString:

  • Utilities/FrameworkResources/Info_iOS.plist
  • Utilities/FrameworkResources/Info_mac.plist
  • Utilities/FrameworkResources/Info_NOWEBSOCKETS_iOS.plist
  • Utilities/FrameworkResources/Info_NOWEBSOCKETS_macOS.plist
 <key>CFBundleShortVersionString</key>
-<string>1.0</string>
+<string>$(MARKETING_VERSION)</string>

CFBundleVersion is already wired to $(CURRENT_PROJECT_VERSION) in these files, so this is a one-line nudge per plist.

Local verification

xcodebuild -workspace Build/libHttpClient.Apple.C/libHttpClient.xcworkspace \
           -scheme libHttpClientFramework_iOS -sdk iphonesimulator -configuration Release \
           MARKETING_VERSION=2.3.1 CURRENT_PROJECT_VERSION=2.3.1 build

/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' \
  <DerivedData>/Build/Products/Release-iphonesimulator/HttpClient.framework/Info.plist

Before this PR: 1.0. After this PR: 2.3.1.

…ERSION)

Replace hardcoded literal '1.0' for CFBundleShortVersionString with
$(MARKETING_VERSION) in the four static Info.plist files used by libHttpClient's
Apple framework targets. CFBundleVersion was already wired to
$(CURRENT_PROJECT_VERSION). After this change, xcodebuild CLI overrides for
MARKETING_VERSION/CURRENT_PROJECT_VERSION flow into both keys of the produced
framework's Info.plist.

Affects:
- Utilities/FrameworkResources/Info_iOS.plist
- Utilities/FrameworkResources/Info_mac.plist
- Utilities/FrameworkResources/Info_NOWEBSOCKETS_iOS.plist
- Utilities/FrameworkResources/Info_NOWEBSOCKETS_macOS.plist

Default xcodeproj MARKETING_VERSION (1.0) is unchanged, so developer Xcode
builds without an override behave exactly as today.

Driven by the PlayFab Unified SDK Apple V2 release pipeline change to stamp
consumer-readable versions on shipped frameworks.
@armahnii2000
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@armahnii2000
Copy link
Copy Markdown
Author

cc @rgomez391 @yuehanlin — flagging for review. CLA cleared. One-line-per-file plist edit unblocking Apple V2 release-pipeline version stamping; full context in the description above.

@armahnii2000 armahnii2000 marked this pull request as ready for review May 7, 2026 17:59
@armahnii2000 armahnii2000 marked this pull request as draft May 7, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant