Tealium / tealium-ios-adjust-remote-command

Other
0 stars 0 forks source link

TealiumAdjust SDK not getting Build #11

Open vaibhavagarwal43 opened 4 weeks ago

vaibhavagarwal43 commented 4 weeks ago

Xcode: Version 15.1 (15C65) SDK Version Used: 1.1.0 & 1.3.0

Integration: Directly Integrated the framework in the project to build.

Error: Failed to build module 'TealiumAdjust'; 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.

craigrouse commented 4 weeks ago

@vaibhavagarwal43 I've spotted the error in the Xcode project - "Build Library for Distribution" isn't set. We'll get that corrected and a new build uploaded shortly.

craigrouse commented 4 weeks ago

@vaibhavagarwal43 can you please use the latest framework on the release? I've just updated it. Please note this uses Adjust 4.38.4. Their latest SDK release - 5.0.0 - includes a large amount of breaking changes, so we'll tackle those separately in another release.

vaibhavagarwal43 commented 3 weeks ago

@craigrouse I have used the latest version uploaded on release page v1.3.0, but i am facing the same issue on our end while building.

Failed to build module 'TealiumAdjust'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)', 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.

craigrouse commented 3 weeks ago

@vaibhavagarwal43 have you manually downloaded the "tealium.xcframework.zip" file from the release and added to your project? This should definitely work, as it was built with the latest version of Xcode and has library evolution enabled. It sounds to me like you still have the old xcframework file.

vaibhavagarwal43 commented 3 weeks ago

Hey @craigrouse I had downloaded the latest version from the link which was updated by you last week. I just added the framework do my project directly and tried to build it. The version that we are using of Xcode: Version 15.1 (15C65).

https://github.com/Tealium/tealium-ios-adjust-remote-command/releases

craigrouse commented 3 weeks ago

@vaibhavagarwal43 I believe you'll need to upgrade to Xcode 15.4, as the binary was built with 15.4. Are you able to do that?

vaibhavagarwal43 commented 3 weeks ago

@craigrouse we cannot upgrade to Xcode 15.4.

craigrouse commented 3 weeks ago

@vaibhavagarwal43 please try again with the latest version, which was built with Xcode 15.0. The binary has been updated on the release.

vaibhavagarwal43 commented 3 weeks ago

@craigrouse Can you please try and build this with Xcode 15.1 as we are facing the same error but for different compiler versions.

Failed to build module 'TealiumAdjust'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)', 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.

craigrouse commented 2 weeks ago

@vaibhavagarwal43 we're having a look at this and will get back to you ASAP.

Enricoza commented 2 weeks ago

Hi @vaibhavagarwal43, sorry you are still having issues with this, but hopefully they will be resolved soon.

The error you are seeing now, although very similar to the other ones you posted before, is entirely different and, most likely, just hiding some other errors in the project. With the "Build Library for Distribution" settings that we have enabled it should always be possible to use the SDK compiled with XCode 15.0 with any version of XCode greater or equal to that. Yet the error that you posted specifically states that you can't build in this exact situation.

What could happen, sometimes, is that the compiler doesn't recognize some other error that is happening and might throw this error instead.

For example, if you don't import the AdjustSDK XCFramework as well, or don't import it in a supported version (like this one being the last one we support at the moment), then this is exactly the same error that you would see on XCode.

So, hoping that this is the same issue you are facing, I would suggest to download a correct version of AdjustSDK (this one for example), extract from the zip and add the extracted xcframework into your project and your application target.

Let me know if this solves the issue or if you are still facing the same, or other, issues.

vaibhavagarwal43 commented 1 week ago

@Enricoza ,

I tried updating the Adjust SDK to 4.38.4, and used the latest SDK from Tealium. But I am still facing the same issue here.

Module compiled with Swift 5.5.2 cannot be imported by the Swift 5.9.2 compiler: /Users/vaibhavagarwal/Library/Developer/Xcode/DerivedData/OneApp-gvfehpcnaiicitatltvmepaxdrjd/Index.noindex/Build/Products/StagingDebug-iphoneos/TealiumAdjust.framework/Modules/TealiumAdjust.swiftmodule/arm64-apple-ios.swiftmodule

Enricoza commented 1 week ago

Hi @vaibhavagarwal43, sorry to hear you are still facing issues.

That being said, by the error message you posted it looks like you are not using the latest version of TealiumAdjust as it was not compiled with Swift 5.5.2 but rather Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1). If you are sure that you are using the latest version of TealiumAdjust then this makes me think even more that this error message is just hiding some other error elsewhere.

Unfortunately there is not much else I can do at the moment as I have tried to reproduce your issue on several machines, with different swift versions and different chips, but was unsuccessful.

To move forward with this could you share a small reproducing sample with us so that we can use it to reproduce the issue on our end? If your sample contains any sensitive information you can open a Support Ticket and share it in there.

Thank you for your patience.

vaibhavagarwal43 commented 6 days ago

Hey @Enricoza ,

As requested please find the demo attached.

Xcode: Version 15.1 (15C65) Tealium SDK Version Used: 1.3.0 Adjust SDK: 4.38.4

DtdlTealiumDemo.zip

Screenshot 2024-09-06 at 7 08 36 AM
Enricoza commented 6 days ago

Hi again @vaibhavagarwal43, thank you for taking the time to send us this sample.

As I suspected and as shown by your screenshot as well, the error you are seeing seems to be just hiding some other error.

In this case the real error is the one right below it:

No such module 'TealiumCore'

Which means that you haven't imported other required frameworks. Specifically TealiumCore and TealiumRemoteCommands which you can find here: https://github.com/Tealium/tealium-swift/releases

To be noted that you should probably also import the XCFramework (not the .framework) for Adjust as well, which should be this one: AdjustSdk-iOS-tvOS-Dynamic-4.38.4.xcframework.zip.

Hope that this finally resolves all of your issues.

Managing the dependencies and the frameworks manually can be tricky and tedious sometimes, so if you can I would probably suggest you to switch to SPM or Cocoapods which will do all the legwork for you.

Let me know if you experience any other issues, or if I can close this. Thank you.