Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WatchApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>WKApplication</key>
<true/>
<key>WKCompanionAppBundleIdentifier</key>
Expand Down
3 changes: 3 additions & 0 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ targets:
path: WatchApp/Info.plist
properties:
CFBundleDisplayName: Clementine Remote
# The App Store refuses a watch app whose versions aren't the phone app's.
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
WKApplication: true
WKCompanionAppBundleIdentifier: $(APP_BUNDLE_ID)
settings:
Expand Down
14 changes: 13 additions & 1 deletion scripts/archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ mv "$out/export/"*.ipa "$out/ClementineRemote.ipa"
rm -rf "$out/export"

# What App Store Connect checks on upload, so that a bundle it would refuse fails here: every
# framework is a dynamic library, and everything in the .ipa is signed.
# framework is a dynamic library, the bundles inside the app have its version and build number,
# and everything in the .ipa is signed.
check="$out/ipa-check"
rm -rf "$check"
unzip -q "$out/ClementineRemote.ipa" -d "$check"
Expand All @@ -108,6 +109,17 @@ for framework in "$check/Payload/"*.app/Frameworks/*.framework; do
exit 1
fi
done
for bundle in "$check/Payload/"*.app/PlugIns/*.appex "$check/Payload/"*.app/Watch/*.app; do
[ -e "$bundle" ] || continue
for key in CFBundleShortVersionString CFBundleVersion; do
value=$(/usr/libexec/PlistBuddy -c "Print :$key" "$bundle/Info.plist")
expected=$([ "$key" = CFBundleVersion ] && echo "$build" || echo "$version")
if [ "$value" != "$expected" ]; then
echo "$(basename "$bundle")'s $key is $value, not the app's $expected" >&2
exit 1
fi
done
done
codesign --verify --deep --strict --verbose=2 "$check/Payload/"*.app
rm -rf "$check"
echo "Built $out/ClementineRemote.ipa: $version ($build)"
Loading