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
2 changes: 1 addition & 1 deletion OpenGlasses/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>mwdat-YOUR_META_APP_ID</string>
<string>mwdat-$(MWDAT_META_APP_ID)</string>
<string>openglasses</string>
</array>
</dict>
Expand Down
19 changes: 18 additions & 1 deletion Scripts/fetch-mediapipe-frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,27 @@ repo_root="$(cd "$(dirname "$0")/.." && pwd)"
dest="$repo_root/Vendor/MediaPipeTasks/Frameworks"
stamp="$dest/.fetched-$VERSION"

# Google ships these frameworks with no CFBundleVersion / CFBundleShortVersionString, which App
# Store Connect rejects on upload ("This bundle ... is invalid. The Info.plist file is missing the
# required key: CFBundleVersion"). Embedded frameworks must carry both, so stamp the pinned
# MediaPipe version into every slice. `plutil -replace` adds the key when absent, so this is
# idempotent — and it runs on the already-fetched path too, so existing checkouts and warm CI
# caches get repaired without a 1.2 GB re-download.
patch_bundle_versions() {
local plist
while IFS= read -r plist; do
plutil -replace CFBundleVersion -string "$VERSION" "$plist"
plutil -replace CFBundleShortVersionString -string "$VERSION" "$plist"
done < <(find "$dest" -path "*.framework/Info.plist" -type f)
}

if [ -f "$stamp" ] \
&& [ -d "$dest/MediaPipeTasksVision.xcframework" ] \
&& [ -d "$dest/MediaPipeTasksCommon.xcframework" ] \
&& [ -f "$dest/graph_libraries/libMediaPipeTasksCommon_device_graph.a" ] \
&& [ -f "$dest/graph_libraries/libMediaPipeTasksCommon_simulator_graph.a" ]; then
echo "MediaPipeTasks ${VERSION} already fetched."
patch_bundle_versions
echo "MediaPipeTasks ${VERSION} already fetched (bundle versions verified)."
exit 0
fi

Expand All @@ -50,5 +65,7 @@ mv "$work/vision/frameworks/MediaPipeTasksVision.xcframework" "$dest/"
mv "$work/common/frameworks/MediaPipeTasksCommon.xcframework" "$dest/"
mv "$work/common/frameworks/graph_libraries/"*.a "$dest/graph_libraries/"

patch_bundle_versions

touch "$stamp"
echo "MediaPipeTasks ${VERSION} installed under Vendor/MediaPipeTasks/Frameworks."
Loading