Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Trouble building a native plugin for iOS with swift Library

Discussion in 'Editor & General Support' started by SourceKraut, Feb 24, 2020.

  1. SourceKraut

    SourceKraut

    Joined:
    Jun 27, 2015
    Posts:
    12
    Hi,
    I have problems building a native iOS plugin to use a Library written in swift. The part with the C wrapper to use ObjectiveC code works perfect, but when I want to use swift code from ObjectiveC the trouble begins.
    The bridging headers are generated while building the Project in Xcode, so I can't include it with Unity.
    I tried to build a framework for my plugin to include the header, I get this error.
    "using bridging headers with framework targets is unsupported"

    Does anybody now how to achieve my goal or is there a good resource to learn more about building native plugins with swift?
     
  2. PatientZero

    PatientZero

    Joined:
    Apr 8, 2015
    Posts:
    31