Skip to content

Instantly share code, notes, and snippets.

@steipete
Created November 6, 2020 14:18
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steipete/f517daee51845c360053f7385900e147 to your computer and use it in GitHub Desktop.
Save steipete/f517daee51845c360053f7385900e147 to your computer and use it in GitHub Desktop.
Hack to exclude arm64 when building Mac Catalyst in Xcode 12.2
// Hack to exclude arm64 when building Mac Catalyst in Xcode 12.2
// If this is not set and we do not set macosx as SUPPORTED_PLATFORMS, then selecting Mac as target forces arm64.
// This can be worked around by setting ONLY_ACTIVE_ARCH to NO (slow) or using the EXCLUDED_ARCHS trick
// Inspired by https://github.com/Carthage/Carthage/issues/3019
EXCLUDED_ARCHS__IS_MACCATALYST_YES__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__IS_MACCATALYST_$(IS_MACCATALYST)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
@steipete
Copy link
Author

steipete commented Nov 6, 2020

Use this if you get: could not find module for target 'arm64-apple-ios-macabi'; found: x86_64-apple-ios-macabi, x86_64 in Xcode 12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment