File tree Expand file tree Collapse file tree 4 files changed +27
-6
lines changed
unit-test/test-imports-app
xcodeproj/Test-Imports-App-Project.xcodeproj
macos/xcodeproj/Test-Target-With-Test-Host-Project.xcodeproj Expand file tree Collapse file tree 4 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,30 @@ def build_carthage_frameworks(
101
101
verbose: if true, it will show the output of running carthage in the command line
102
102
"""
103
103
104
+ # Workaround for carthage failing on Xcode 12
105
+ # https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md
106
+ #
107
+ carthage_xc12_workaround = """
108
+ xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
109
+ trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
110
+
111
+ # For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
112
+ # the build will fail on lipo due to duplicate architectures.
113
+
114
+ CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
115
+ echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
116
+
117
+ echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
118
+ 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
119
+
120
+ export XCODE_XCCONFIG_FILE="$xcconfig"
121
+ """
104
122
_prebuilt_frameworks_importer (
105
123
implementation = _carthage_impl ,
106
124
name = name ,
107
125
directory = directory ,
108
126
files = files ,
109
- cmd = cmd % (carthage_version , git_repository_url ),
127
+ cmd = ( carthage_xc12_workaround + cmd ) % (carthage_version , git_repository_url ),
110
128
timeout = timeout ,
111
129
verbose = verbose ,
112
130
)
Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ ios_application(
20
20
"main.m" ,
21
21
],
22
22
bundle_id = "com.example.TestImports-App" ,
23
- families = ["ipad" ],
23
+ families = [
24
+ "ipad" ,
25
+ "iphone" ,
26
+ ],
24
27
minimum_os_version = "12.0" ,
25
28
module_name = "TestImports_App" ,
26
29
resource_bundles = {"ResourceBundle" : glob (
Original file line number Diff line number Diff line change 396
396
PRODUCT_BUNDLE_IDENTIFIER = "com.example.TestImports-App";
397
397
PRODUCT_NAME = "TestImports-App";
398
398
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
399
- TARGETED_DEVICE_FAMILY = 2 ;
399
+ TARGETED_DEVICE_FAMILY = "2,1" ;
400
400
};
401
401
name = Release;
402
402
};
421
421
PRODUCT_BUNDLE_IDENTIFIER = "com.example.TestImports-App";
422
422
PRODUCT_NAME = "TestImports-App";
423
423
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
424
- TARGETED_DEVICE_FAMILY = 2 ;
424
+ TARGETED_DEVICE_FAMILY = "2,1" ;
425
425
};
426
426
name = Debug;
427
427
};
Original file line number Diff line number Diff line change 463
463
PRODUCT_BUNDLE_IDENTIFIER = "com.example.TestImports-App";
464
464
PRODUCT_NAME = "TestImports-App";
465
465
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
466
- TARGETED_DEVICE_FAMILY = 2 ;
466
+ TARGETED_DEVICE_FAMILY = "2,1" ;
467
467
};
468
468
name = Debug;
469
469
};
536
536
PRODUCT_BUNDLE_IDENTIFIER = "com.example.TestImports-App";
537
537
PRODUCT_NAME = "TestImports-App";
538
538
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
539
- TARGETED_DEVICE_FAMILY = 2 ;
539
+ TARGETED_DEVICE_FAMILY = "2,1" ;
540
540
};
541
541
name = Release;
542
542
};
You can’t perform that action at this time.
0 commit comments