diff --git a/Example/AztecExample.xcodeproj/project.pbxproj b/Example/AztecExample.xcodeproj/project.pbxproj index a76700b52..8ed52f936 100644 --- a/Example/AztecExample.xcodeproj/project.pbxproj +++ b/Example/AztecExample.xcodeproj/project.pbxproj @@ -614,6 +614,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; + VALIDATE_WORKSPACE = YES; }; name = Debug; }; @@ -667,6 +668,7 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; + VALIDATE_WORKSPACE = YES; }; name = Release; }; @@ -829,6 +831,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; + VALIDATE_WORKSPACE = YES; }; name = Profiling; }; @@ -912,6 +915,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; + VALIDATE_WORKSPACE = YES; }; name = "Release-Alpha"; }; diff --git a/Example/carthage.sh b/Example/carthage.sh new file mode 100755 index 000000000..41de89f1a --- /dev/null +++ b/Example/carthage.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# carthage.sh +# Usage example: ./carthage.sh build --platform iOS +# This script was copied from here: https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323 + +set -euo pipefail + +xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) +trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + +# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise +# the build will fail on lipo due to duplicate architectures. +echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig +echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig + +export XCODE_XCCONFIG_FILE="$xcconfig" +carthage "$@" diff --git a/README.md b/README.md index e27e6d3e1..a6797e0bb 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,13 @@ cd Example carthage update --platform iOS ``` +*If using XCode 12 use the follow script:* + +```bash +cd Example +./carthage.sh update --platform iOS +``` + Once Carthage finishes, you should open the file `Aztec.xcworkspace` from the root directory of Aztec. Make sure the `AztecExample` target it selected, and press CMD + R to run it.