From 6ac39c9b93df23a5004ea13032f81a969591f2bf Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Tue, 25 Apr 2023 04:26:13 +0530 Subject: [PATCH] Updated name of common objects pod --- mediapipe/tasks/ios/BUILD | 8 ++++---- ...template => MediaPipeTaskCommon.podspec.template} | 8 ++++---- mediapipe/tasks/ios/build_ios_framework.sh | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) rename mediapipe/tasks/ios/{MediaPipeTaskCommonObjects.podspec.template => MediaPipeTaskCommon.podspec.template} (73%) diff --git a/mediapipe/tasks/ios/BUILD b/mediapipe/tasks/ios/BUILD index c94d1b48e..25b7ab9ce 100644 --- a/mediapipe/tasks/ios/BUILD +++ b/mediapipe/tasks/ios/BUILD @@ -33,7 +33,7 @@ licenses(["notice"]) # frameworks but are avoided from the framework binaries to avoid duplicate symbols # error when included in an xcode project: # 1. iOS classes shared amongst the various vision and text tasks. These classes -# will be built with ":MediaPipeTaskCommonObjects_framework" +# will be built with ":MediaPipeTaskCommon_framework" # 2. Task graphs. These will be built with ":MediaPipeTaskGraphs_library". # 3. gpu targets which will be built with the ":MediaPipeTaskGraphs_library". OBJC_COMMON_DEPS = [ @@ -102,7 +102,7 @@ apple_static_xcframework( "//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifier", "//mediapipe/tasks/ios/text/text_embedder:MPPTextEmbedder", ], - # avoid dependencies of ":MediaPipeCommonObjects_framework" and + # avoid dependencies of ":MediaPipeCommon_framework" and # ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error # when the frameworks are imported in iOS projects. avoid_deps = OBJC_COMMON_DEPS @@ -139,7 +139,7 @@ apple_static_xcframework( "//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier", "//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector", ], - # Avoids dependencies of ":MediaPipeCommonObjects_framework" and + # Avoids dependencies of ":MediaPipeCommon_framework" and # ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error # when the frameworks are imported in iOS projects. # Also avoids opencv since it will be built with @@ -171,7 +171,7 @@ apple_static_library( ) apple_static_xcframework( - name = "MediaPipeTaskCommonObjects_framework", + name = "MediaPipeTaskCommon_framework", bundle_name = "MediaPipeTaskCommon", ios = { "simulator" : ["arm64", "x86_64"], diff --git a/mediapipe/tasks/ios/MediaPipeTaskCommonObjects.podspec.template b/mediapipe/tasks/ios/MediaPipeTaskCommon.podspec.template similarity index 73% rename from mediapipe/tasks/ios/MediaPipeTaskCommonObjects.podspec.template rename to mediapipe/tasks/ios/MediaPipeTaskCommon.podspec.template index a58d0b262..52dc73b3a 100644 --- a/mediapipe/tasks/ios/MediaPipeTaskCommonObjects.podspec.template +++ b/mediapipe/tasks/ios/MediaPipeTaskCommon.podspec.template @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.name = 'MediaPipeTaskCommonObjects' + s.name = 'MediaPipeTaskCommon' s.version = '${MPP_BUILD_VERSION}' s.authors = 'Google Inc.' s.license = { :type => 'Apache',:file => "LICENSE" } @@ -10,11 +10,11 @@ Pod::Spec.new do |s| s.ios.deployment_target = '11.0' - s.module_name = 'MediaPipeTaskCommonObjects' + s.module_name = 'MediaPipeTaskCommon' s.static_framework = true s.user_target_xcconfig = { - 'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -force_load "${PODS_ROOT}/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_simulator_graph.a"', - 'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -force_load "$(PODS_ROOT)/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_device_graph.a"', + 'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -force_load "${PODS_ROOT}/MediaPipeTaskCommon/frameworks/graph_libraries/libMediaPipeTaskCommon_simulator_graph.a"', + 'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -force_load "$(PODS_ROOT)/MediaPipeTaskCommon/frameworks/graph_libraries/libMediaPipeTaskCommon_device_graph.a"', } s.frameworks = 'Accelerate', 'CoreMedia', 'AssetsLibrary', 'CoreFoundation', 'CoreGraphics', 'CoreImage', 'QuartzCore', 'AVFoundation', 'CoreVideo' s.preserve_paths ='frameworks/graph_libraries/*.a' diff --git a/mediapipe/tasks/ios/build_ios_framework.sh b/mediapipe/tasks/ios/build_ios_framework.sh index 6d59a9ac9..7ebbedca0 100755 --- a/mediapipe/tasks/ios/build_ios_framework.sh +++ b/mediapipe/tasks/ios/build_ios_framework.sh @@ -16,7 +16,7 @@ # Set the following variables as appropriate. # * BAZEL: path to bazel. defaults to the first one available in PATH # * FRAMEWORK_NAME: name of the iOS framework to be built. Currently the -# * accepted values are MediaPipeTaskText. +# * accepted values are MediaPipeTaskCommon, MediaPipeTaskText, MediaPipeTaskVision. # * MPP_BUILD_VERSION: to specify the release version. defaults to 0.0.1-dev # * IS_RELEASE_BUILD: set as true if this build should be a release build # * ARCHIVE_FRAMEWORK: set as true if the framework should be archived @@ -106,11 +106,11 @@ function build_ios_frameworks_and_libraries { local FRAMEWORK_CQUERY_COMMAND="-c opt --apple_generate_dsym=false ${FULL_FRAMEWORK_TARGET}" IOS_FRAMEWORK_PATH="$(build_target "${FRAMEWORK_CQUERY_COMMAND}")" - # `MediaPipeTaskCommonObjects`` pods must also include the task graph libraries which + # `MediaPipeTaskCommon`` pods must also include the task graph libraries which # are to be force loaded. Hence the graph libraies are only built if the framework - # name is `MediaPipeTaskCommonObjects`.` + # name is `MediaPipeTaskCommon`.` case $FRAMEWORK_NAME in - "MediaPipeTaskCommonObjects") + "MediaPipeTaskCommon") local IOS_SIM_FAT_LIBRARY_CQUERY_COMMAND="-c opt --config=ios_sim_fat --apple_generate_dsym=false //mediapipe/tasks/ios:MediaPipeTaskGraphs_library" IOS_GRAPHS_SIMULATOR_LIBRARY_PATH="$(build_target "${IOS_SIM_FAT_LIBRARY_CQUERY_COMMAND}")" @@ -141,10 +141,10 @@ function create_framework_archive { echo ${IOS_FRAMEWORK_PATH} unzip "${IOS_FRAMEWORK_PATH}" -d "${FRAMEWORKS_DIR}" - # If the framwork being built is `MediaPipeTaskCommonObjects`, the built graph + # If the framwork being built is `MediaPipeTaskCommon`, the built graph # libraries should be copied to the output directory which is to be archived. case $FRAMEWORK_NAME in - "MediaPipeTaskCommonObjects") + "MediaPipeTaskCommon") local GRAPH_LIBRARIES_DIR="graph_libraries"