From 6303317b9ef7e61a7aa09a12d158bc527bd6a16c Mon Sep 17 00:00:00 2001 From: Franco Zalamena Date: Tue, 7 Apr 2026 16:07:01 +0100 Subject: [PATCH] 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 --- Iterable-React-Native-SDK.podspec | 5 ++++- ios/RNIterableAPI.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Iterable-React-Native-SDK.podspec b/Iterable-React-Native-SDK.podspec index cea2213b0..8ea1451b6 100644 --- a/Iterable-React-Native-SDK.podspec +++ b/Iterable-React-Native-SDK.podspec @@ -16,6 +16,8 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" s.private_header_files = "ios/**/*.h" + s.swift_version = '5.9' + # Load Iterables iOS SDK as a dependency s.dependency "Iterable-iOS-SDK", "6.6.7" @@ -23,9 +25,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'CLANG_ENABLE_MODULES' => 'YES', - 'SWIFT_VERSION' => '5.3', + 'SWIFT_VERSION' => '5.9', 'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'Iterable_React_Native_SDK-Swift.h', "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), + 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => '$(inherited)', } install_modules_dependencies(s) diff --git a/ios/RNIterableAPI.xcodeproj/project.pbxproj b/ios/RNIterableAPI.xcodeproj/project.pbxproj index 3acaf9d5f..8825dde53 100644 --- a/ios/RNIterableAPI.xcodeproj/project.pbxproj +++ b/ios/RNIterableAPI.xcodeproj/project.pbxproj @@ -264,7 +264,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -283,7 +283,7 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release;