Skip to content

Commit a5c789f

Browse files
committed
simplify the build as we have xcode 16 as minimum and we only support ios 15+ which should bundle the concurrency headers
1 parent 02d2448 commit a5c789f

5 files changed

Lines changed: 23 additions & 22 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ set(FIREBASE_CPP_SDK_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
100100

101101
project (firebase NONE)
102102

103-
set(CMAKE_Swift_LANGUAGE_VERSION 5.9)
103+
set(CMAKE_Swift_LANGUAGE_VERSION 6.2)
104104

105105
enable_language(C)
106106
enable_language(CXX)

analytics/integration_test/integration_test.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
isa = XCBuildConfiguration;
377377
buildSettings = {
378378
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
379-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
379+
OTHER_LDFLAGS = "$(inherited)";
380380
ALWAYS_SEARCH_USER_PATHS = NO;
381381
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
382382
CLANG_CXX_LIBRARY = "libc++";
@@ -421,7 +421,7 @@
421421
isa = XCBuildConfiguration;
422422
buildSettings = {
423423
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
424-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
424+
OTHER_LDFLAGS = "$(inherited)";
425425
ALWAYS_SEARCH_USER_PATHS = NO;
426426
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
427427
CLANG_CXX_LIBRARY = "libc++";
@@ -460,7 +460,7 @@
460460
isa = XCBuildConfiguration;
461461
buildSettings = {
462462
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
463-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
463+
OTHER_LDFLAGS = "$(inherited)";
464464
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
465465
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
466466
CLANG_ENABLE_MODULES = YES;
@@ -494,7 +494,7 @@
494494
isa = XCBuildConfiguration;
495495
buildSettings = {
496496
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
497-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
497+
OTHER_LDFLAGS = "$(inherited)";
498498
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
499499
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
500500
CLANG_ENABLE_MODULES = YES;
@@ -527,7 +527,7 @@
527527
isa = XCBuildConfiguration;
528528
buildSettings = {
529529
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
530-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
530+
OTHER_LDFLAGS = "$(inherited)";
531531
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
532532
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
533533
CLANG_ANALYZER_NONNULL = YES;
@@ -583,7 +583,7 @@
583583
isa = XCBuildConfiguration;
584584
buildSettings = {
585585
OTHER_CPLUSPLUSFLAGS = "$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY";
586-
OTHER_LDFLAGS = "$(inherited) -Wl,-weak-lswift_Concurrency";
586+
OTHER_LDFLAGS = "$(inherited)";
587587
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
588588
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
589589
CLANG_ANALYZER_NONNULL = YES;

analytics/src/ios/swift/AppleTransactionVerifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ internal struct AppleTransactionWorker {
4242
// Notice: To avoid C-pointer ABI layout issues across Swift boundaries,
4343
// this interface relies purely on a standard Swift closure. The calling
4444
// C++ layer captures any necessary pointers within an Objective-C block.
45-
@objc public static func verify(transactionId: String, completion: @escaping (Bool) -> Void) {
45+
@objc public static func verify(transactionId: String, completion: @escaping @Sendable (Bool) -> Void) {
4646
if #available(iOS 15.0, tvOS 15.0, macOS 12.0, watchOS 8.0, *) {
4747
// Create a pure Swift String copy of the transaction ID.
4848
// This ensures we do not rely on the memory of the bridged Objective-C

scripts/gha/integration_testing/xcode_tool.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,17 @@ def main
8888
end
8989

9090
framework_dir = "#@xcode_project_dir/Frameworks"
91-
set_build_setting('FRAMEWORK_SEARCH_PATHS', ['${inherited}', framework_dir])
91+
framework_search_paths = ['${inherited}', framework_dir]
92+
93+
@frameworks.each do |framework|
94+
framework_name = File.basename(framework)
95+
if framework_name.end_with?('.xcframework')
96+
framework_search_paths << "#{framework_dir}/#{framework_name}/ios-arm64_x86_64-simulator"
97+
end
98+
end
99+
100+
set_build_setting('FRAMEWORK_SEARCH_PATHS', framework_search_paths)
101+
92102
if !@include_path.nil?
93103
append_to_build_setting('HEADER_SEARCH_PATHS', @include_path)
94104
end
@@ -163,6 +173,9 @@ def add_custom_framework(framework_path)
163173
local_framework_path = "Frameworks/#{framework_name}"
164174
# Add the lib file as a reference
165175
libRef = @project['Frameworks'].new_file(framework_path)
176+
if framework_name.end_with?('.xcframework')
177+
libRef.last_known_file_type = 'wrapper.xcframework'
178+
end
166179
# Add it to the build phase
167180
@target.frameworks_build_phase.add_file_reference(libRef)
168181
puts 'Finished adding framework.'

setup_integration_tests.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,5 @@
5858
print('Copying %s to %s' % (src, dest))
5959
copy_tree(src, dest, update=1)
6060

61-
# Workaround for Xcode 15 / Swift 5.10 Concurrency crash on iOS 15 and 16
62-
pbxproj_path = os.path.join(dest, "integration_test.xcodeproj", "project.pbxproj")
63-
if os.path.exists(pbxproj_path):
64-
with open(pbxproj_path, "r") as f:
65-
pbx_content = f.read()
66-
if "-Wl,-weak-lswift_Concurrency" not in pbx_content:
67-
pbx_content = pbx_content.replace(
68-
"buildSettings = {",
69-
"buildSettings = {\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = \"$(inherited) -D_LIBCPP_HAS_NO_VERBOSE_ABORT -D_LIBCPP_DISABLE_AVAILABILITY\";\n\t\t\t\tOTHER_LDFLAGS = \"-Wl,-weak-lswift_Concurrency\";"
70-
)
71-
with open(pbxproj_path, "w") as f:
72-
f.write(pbx_content)
73-
print("Patched " + pbxproj_path + " for Swift Concurrency backwards compatibility.")
61+
7462

0 commit comments

Comments
 (0)