Skip to content

Commit 74e1444

Browse files
authored
fix: Xcode 15.3+ not setting TARGET_OS_IOS correctly (#248)
1 parent 3294c4b commit 74e1444

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

metadata-generator/build-step-metadata-generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ def generate_metadata(arch):
152152
deployment_target_flag_name + "=" + deployment_target])
153153
else:
154154
generator_call.extend(["-target", "{}-{}-{}{}".format(arch, llvm_target_triple_vendor, llvm_target_triple_os_version, llvm_target_triple_suffix)])
155-
# since iPhoneOS 17.4 sdk TARGET_OS_IPHONE is not defined for non-simulator builds
155+
# since iPhoneOS 17.4 sdk TARGET_OS_IPHONE and TARGET_OS_IOS is not defined for non-simulator builds
156156
# this seems to be a bug on Apple's side
157157
if effective_platform_name == "-iphoneos" and not llvm_target_triple_suffix:
158158
generator_call.extend(["-DTARGET_OS_IPHONE=1"])
159+
generator_call.extend(["-DTARGET_OS_IOS=1"])
159160

160161
generator_call.extend(header_search_paths_parsed) # HEADER_SEARCH_PATHS
161162
generator_call.extend(framework_search_paths_parsed) # FRAMEWORK_SEARCH_PATHS

0 commit comments

Comments
 (0)