Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld: SDK.framework compiled with older version of Swift language (XX) than previous files (unknown ABI version YYY) of ObjC Framework

Intro

I working on SDK.framework which I need to distribute as closed source software. To cover both objective-c and swift projects I decided to write it on objective-c

In local environment I have two projects:

  • SDK (framework source code)
  • DemoApp (app which links with SDK.framework)

*These projects in separate workspace

Problem

When I compile SDK.framework locally it work perfect.

Once I get one from CI (it have different iOS SDK version) and trying to link it with DemoApp I getting this error:

ld: SDK.framework compiled with older version of Swift language (4.0) than previous files (unknown ABI version 0x06)

Questions

  1. Because my SDK 100% objective-c framework, I have no idea why it claims about swift version
  2. My SDK have dependency on another frameworks and one of them is SocketIO-Client-Swift. AFAIK this should not be related to error above, because I compile SocketIO-Client-Swift with DemoApp, so it have the same swift version as DemoApp app

What I did

  1. With otool -l SDK.framework I checked all meta information, there is no any reference to swift
  2. I have tried distribute it as static library but in this case I will have problem with support Carthage dependency manager
like image 913
CAMOBAP Avatar asked Oct 29 '22 11:10

CAMOBAP


1 Answers

Most likely, this is because you are linked with Swift framework. Even your code is 100% Obj-C it contains references to Swift calls which are part of your SDK ABI.

Consider C++ version of SocketIO instead.

https://github.com/socketio/socket.io-client-cpp

like image 182
Ihar Tumashyk Avatar answered Nov 15 '22 05:11

Ihar Tumashyk