iOS/Configuration/HomeAssistant.xcconfig

108 lines
4.3 KiB
Plaintext

VERSIONING_SYSTEM = apple-generic
#include "Version.xcconfig"
DEVELOPMENT_TEAM = QMQYCKL255
BUNDLE_ID_PREFIX = io.robbie
ENABLE_CRITICAL_ALERTS_QMQYCKL255 = 1
ENABLE_PUSH_PROVIDER_QMQYCKL255 = 1
ENABLE_DEVICE_NAME_QMQYCKL255 = 1
ENABLE_THREAD_NETWORK_CREDENTIALS_QMQYCKL255 = 1
ENABLE_CARPLAY_QMQYCKL255 = 1
// cascades down
PRODUCT_BUNDLE_IDENTIFIER = ${BUNDLE_ID_PREFIX}.HomeAssistant${BUNDLE_ID_SUFFIX}${PROVISIONING_SUFFIX}
// resolves some catalyst build-time issues with frameworks and @importing in the objc header we never use
SWIFT_INSTALL_OBJC_HEADER=NO
// works around a realm crash on series 1-3 watches, see https://github.com/home-assistant/iOS/issues/1058
DEAD_CODE_STRIPPING[sdk=watchos*] = NO
// release builds override this
CODE_SIGN_IDENTITY = Apple Development
CODE_SIGN_STYLE_DEFAULT = Automatic
// Create this file to override configuration. It's ignored by git
#include? "HomeAssistant.overrides.xcconfig"
// set after overrides in case the team is changed by them - this is customized in e.g. the Release xcconfig
// only iOS, not catalyst, because no critical alerts provisioning for us exists on mac
ENABLE_CRITICAL_ALERTS[sdk=iphoneos*] = $(ENABLE_CRITICAL_ALERTS_$(DEVELOPMENT_TEAM))
ENABLE_PUSH_PROVIDER[sdk=iphoneos*] = $(ENABLE_PUSH_PROVIDER_$(DEVELOPMENT_TEAM))
ENABLE_DEVICE_NAME[sdk=iphoneos*] = $(ENABLE_DEVICE_NAME_$(DEVELOPMENT_TEAM))
ENABLE_THREAD_NETWORK_CREDENTIALS[sdk=iphoneos*] = $(ENABLE_THREAD_NETWORK_CREDENTIALS_$(DEVELOPMENT_TEAM))
ENABLE_CARPLAY[sdk=iphoneos*] = $(ENABLE_CARPLAY_$(DEVELOPMENT_TEAM))
// We mutate the entitlements at build time to support other development teams
CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION = YES
// Mutate certain targets' default signing style because we need manual on ios sdk
CODE_SIGN_STYLE = $(CODE_SIGN_STYLE_DEFAULT)
CODE_SIGN_STYLE[sdk=iphoneos*] = $(CODE_SIGN_STYLE_$(DEVELOPMENT_TEAM)_$(TARGET_NAME:c99extidentifier):default=$CODE_SIGN_STYLE_DEFAULT)
PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*] = $(PROVISIONING_PROFILE_SPECIFIER_$(DEVELOPMENT_TEAM)_$(TARGET_NAME:c99extidentifier))
// Baseline information
SDKROOT = iphoneos
SWIFT_VERSION = 5.0
TARGETED_DEVICE_FAMILY = 1,2,6
IPHONEOS_DEPLOYMENT_TARGET = 15.0
MACOSX_DEPLOYMENT_TARGET = 10.15
WATCHOS_DEPLOYMENT_TARGET = 8.0
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_ENABLE_OBJC_WEAK = YES
GCC_C_LANGUAGE_STANDARD = gnu11
CLANG_CXX_LANGUAGE_STANDARD = gnu++14
COPY_PHASE_STRIP = NO
// overridden on just the main .app target, since it's the only thing we want in archives
SKIP_INSTALL = YES
// makes the executable more HA-specific so it is in crash logs sorted nicely
PRODUCT_NAME = HomeAssistant-$(TARGET_NAME)
PRODUCT_MODULE_NAME = $(TARGET_NAME:c99extidentifier)
// watchOS-specific, to keep us under the 75 MB size limit
EXCLUDED_ARCHS[sdk=watchos*] = arm64
// Catalyst-specific
ENABLE_HARDENED_RUNTIME[sdk=macosx*] = YES
// Warnings/errors
ALWAYS_SEARCH_USER_PATHS = NO
TAPI_VERIFY_MODE = ErrorsAndWarnings
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
CLANG_WARN_INFINITE_RECURSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
GCC_NO_COMMON_BLOCKS = YES
// Add ThreadNetwork weak reference for iOS and macOS
OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) -weak_framework ThreadNetwork
OTHER_LDFLAGS[sdk=macosx*] = $(inherited) -weak_framework ThreadNetwork