Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: iOS bundle minimum supported version on AppStore fix #185

Merged
merged 14 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
1 change: 1 addition & 0 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an unnecessary empty space

name: Check PR

on:
Expand Down
24 changes: 8 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ APPLE_IOS := ios
APPLE_IOS_PLATFORM := iPhoneOS
APPLE_IOS_SDK ?= iPhoneOS
APPLE_IOS_VERSION_MIN ?= 15.4
THORVG_APPLE_IOS_VERSION_MIN ?= 11.0 # Minimum iOS version supported by ThorVG, needs to be the same for cpp_args and cpp_link_args
APPLE_XCODE_APP_NAME ?= Xcode.app

APPLE_IOS_SIMULATOR := ios-simulator
Expand Down Expand Up @@ -204,20 +205,20 @@ endef

define APPLE_CROSS_FILE
[binaries]
cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk']
cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk']
ld = 'ld'
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-config'

[properties]
root = '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(SDK).platform/Developer'
root = '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(SDK).platform/Developer'
has_function_printf = true

$(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\
[built-in options]\n\
cpp_args = ['-miphoneos-version-min=$(APPLE_IOS_VERSION_MIN)']\n\
cpp_link_args = ['-miphoneos-version-min=$(APPLE_IOS_VERSION_MIN)']\n\
cpp_args = ['-miphoneos-version-min=$(THORVG_APPLE_IOS_VERSION_MIN)']\n\
cpp_link_args = ['-miphoneos-version-min=$(THORVG_APPLE_IOS_VERSION_MIN)']\n\
,)

[host_machine]
Expand Down Expand Up @@ -401,14 +402,6 @@ define LIPO_CREATE
-o $@
endef

MIN_OS_VERSION_IOS=15.4
MIN_OS_VERSION_MACOS=12
ifneq (,$(findstring MacOSX,$(PLIST_ENABLE)))
MIN_OS_VERSION = $(MIN_OS_VERSION_IOS)
else
MIN_OS_VERSION = $(MIN_OS_VERSION_MACOS)
endif

define CREATE_FRAMEWORK
rm -rf $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK) $(RELEASE)/$(APPLE)/$(DOTLOTTIE_PLAYER_XCFRAMEWORK)
mkdir -p $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/{$(FRAMEWORK_HEADERS),$(FRAMEWORK_MODULES)}
Expand All @@ -423,12 +416,11 @@ define CREATE_FRAMEWORK
-c "Add :CFBundleShortVersionString string 1.0.0" \
-c "Add :CFBundlePackageType string FMWK" \
-c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \
-c "Add :MinimumOSVersion string $(MIN_OS_VERSION)" \
-c "Add :MinimumOSVersion string $(APPLE_IOS_VERSION_MIN)" \
-c "Add :CFBundleSupportedPlatforms array" \
$(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \
$(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \
$(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST)

$(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST)

$(INSTALL_NAME_TOOL) -id @rpath/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE)
endef
Expand Down Expand Up @@ -1020,4 +1012,4 @@ help:
@echo " - $(YELLOW)bench$(NC) - run all benchmarks"
@echo " - $(YELLOW)clippy$(NC) - run clippy on all projects"
@echo
@echo
@echo
Loading