Skip to content

Commit 6303317

Browse files
Fix build compatibility with Xcode 26 on ARM64
Update Swift version from 5.0/5.3 to 5.9 across podspec and Xcode project settings. Xcode 26 removed the swiftCompatibility56 and swiftCompatibilityPacks libraries that were required by older Swift versions, causing linker failures. Swift 5.9 does not depend on these compatibility libraries. Also adds ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = $(inherited) to the pod target xcconfig and declares s.swift_version in the podspec for proper CocoaPods Swift version resolution. Fixes #778 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e69c305 commit 6303317

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Iterable-React-Native-SDK.podspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
1717
s.private_header_files = "ios/**/*.h"
1818

19+
s.swift_version = '5.9'
20+
1921
# Load Iterables iOS SDK as a dependency
2022
s.dependency "Iterable-iOS-SDK", "6.6.7"
2123

2224
# Basic Swift support
2325
s.pod_target_xcconfig = {
2426
'DEFINES_MODULE' => 'YES',
2527
'CLANG_ENABLE_MODULES' => 'YES',
26-
'SWIFT_VERSION' => '5.3',
28+
'SWIFT_VERSION' => '5.9',
2729
'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'Iterable_React_Native_SDK-Swift.h',
2830
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
31+
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => '$(inherited)',
2932
}
3033

3134
install_modules_dependencies(s)

ios/RNIterableAPI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
PRODUCT_NAME = "$(TARGET_NAME)";
265265
SKIP_INSTALL = YES;
266266
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
267-
SWIFT_VERSION = 5.0;
267+
SWIFT_VERSION = 5.9;
268268
TARGETED_DEVICE_FAMILY = "1,2";
269269
};
270270
name = Debug;
@@ -283,7 +283,7 @@
283283
OTHER_LDFLAGS = "-ObjC";
284284
PRODUCT_NAME = "$(TARGET_NAME)";
285285
SKIP_INSTALL = YES;
286-
SWIFT_VERSION = 5.0;
286+
SWIFT_VERSION = 5.9;
287287
TARGETED_DEVICE_FAMILY = "1,2";
288288
};
289289
name = Release;

0 commit comments

Comments
 (0)