Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: build error due to swift version conflict #14140

Open
1 task done
m1ga opened this issue Oct 25, 2024 · 2 comments
Open
1 task done

iOS: build error due to swift version conflict #14140

m1ga opened this issue Oct 25, 2024 · 2 comments
Labels
bug needs triage This issue hasn't been reviewed by maintainers

Comments

@m1ga
Copy link
Contributor

m1ga commented Oct 25, 2024

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

I've simply created a new empty iOS module and tried to build it. When looking at the trace log I can see:

error: failed to build module 'TitaniumKit'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)', while this compiler is 'Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)'). Please select a toolchain which matches the SDK.

Other users had similar issues when building iOS modules too. Is there a way to get rid of it without searching a matching Xcode version?

https://stackoverflow.com/questions/58654714/module-compiled-with-swift-5-1-cannot-be-imported-by-the-swift-5-1-2-compiler/58656323#58656323 might be a solution (if not already done)

Expected Behavior

build a module without Xcode/swift error

Actual behavior

error building

Reproducible sample

Steps to reproduce

  • create a new iOS swift module
  • try to build it
  • 12.5.0.GA
  • Xcode Version 15.1 (15C65)

Platform

iOS

SDK version you are using

12.5.0

Alloy version you are using

No response

@m1ga m1ga added bug needs triage This issue hasn't been reviewed by maintainers labels Oct 25, 2024
@m1ga
Copy link
Contributor Author

m1ga commented Oct 25, 2024

Ti 12.5.1 with Xcode 16.0 (16A242d) breaks build with

[TRACE] [xcode-dist] <module-includes>:1:9: note: in file included from <module-includes>:1:
[TRACE] [xcode-dist] #import "Headers/TitaniumKit.h"
[TRACE] [xcode-dist]         ^
[TRACE] [xcode-dist] /Users/miga/Library/Application Support/Titanium/mobilesdk/osx/12.5.1.GA/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64/TitaniumKit.framework/Headers/TitaniumKit.h:17:9: error: 'TitaniumKit/TiBase.h' file not found
[TRACE] [xcode-dist] #import <TitaniumKit/TiBase.h>
[TRACE] [xcode-dist]         ^
[TRACE] [xcode-dist] /Users/miga/Library/Application Support/Titanium/mobilesdk/osx/12.5.1.GA/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64/TitaniumKit.framework/Headers/TitaniumKit.h:17:9: note: did not find header 'TiBase.h' in framework 'TitaniumKit' (loaded from '/Users/miga/Library/Developer/Xcode/DerivedData/test_swift-eeqxqbbwfhibfhgudinbgmtmrojt/Build/Intermediates.noindex/ArchiveIntermediates/ComTestSwift/BuildProductsPath/Release-maccatalyst')
[TRACE] [xcode-dist] #import <TitaniumKit/TiBase.h>
[TRACE] [xcode-dist]         ^
[TRACE] [xcode-dist] /Users/miga/test_swift/ios/Classes/ComTestSwiftExampleProxy.swift:10:8: error: could not build Objective-C module 'TitaniumKit'
[TRACE] [xcode-dist] import TitaniumKit
[TRACE] [xcode-dist]        ^
[TRACE] [xcode-dist] SwiftCompile normal x86_64 Compiling\ ComTestSwiftExampleProxy.swift,\ ComTestSwiftModule.swift /Users/miga/test_swift/ios/Classes/ComTestSwiftExampleProxy.swift /Users/miga/test_swift/ios/Classes/ComTestSwiftModule.swift (in target 'ComTestSwift' from project 'test_swift')

@AbdullahFaqeir
Copy link
Contributor

@m1ga I've already faced this and fixed it, give me this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage This issue hasn't been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants