SDK 10.1+ integration problem in Swift framework


#1

Hi everyone,

I can’t find a way to integrate the new SDK dynamic framework version 10.1+ into my app. I have a Swift static framework where I need to access SDK. Before 10.1, I did it by a cocoapod wrapper. But I’m not able to do it no with the new SDK format.

I tried to add it directly as embedded framework in target + in my framework as said in the release note but it doesn’t work . I tried to do a pod with it but doesn’t work too.

I asked developper support but they don’t support Swift project. They gave me a SDK with a modulemap and an umbrella header but doesn’t seems to work too.

Do anyone of you did it or can help me?

Thanks,


#2

Isn’t this what @paul.addy was battling a while ago?


#3

Yes it looks like we try to do the same thing, by the way I did it with previous SDK versions (including 10.0) by using a pod wrapper but can’t do it anymore since 10.1 and SDK format update to dynamic framework.


#4

Can you post an example project that shows how you are trying to call the Structure SDK from your static framework or at least the error output from your build.


#5

If I add the framework in my app + my swift framework and that I try to import Structure then it just says “No such module “Structure””.

If I add it in my pod wrapper, It doesn’t find Structure SDK classes.

Here a sample where we have a swift cocoa touch library where I want to use the Structure SDK. I added the sdk as embedded in my app then link frameworks in my library. You will see in TestViewController that we can’t import Structure.

Repo url : https://github.com/NameX44/structure-integration-ios

Thanks,


#6

Hi Fledref

To use this project please take the following steps:

  1. Overwrite your framework with the framework from the project that you received
  2. Disable bitcode
  3. Add HAS_LIBCXX to the Proprocessor Macros
  4. Uncomment import Structure and var x: STMesh.

This should be enough for your project to compile correctly.

Please note - as seen in this screenshot your sample app does not link to any of the required frameworks. They are not being called in the sample and would not cause any compile errors, but this would cause a runtime error later.


#7

Hi! We had chosen a different approach and are not integrating the Structure SDK in a Swift framework. Good luck guys!


#8

It seems to work thanks !