Giter Site home page Giter Site logo

ashislaha / swift-objectivec-interoperability Goto Github PK

View Code? Open in Web Editor NEW
30.0 4.0 3.0 1.14 MB

Let's discover how to create a project where both swift and objective c class resides with each other. We will discuss more advanced by creating swift and objective c static library and how they can interact with each other.

Objective-C 72.39% Swift 27.61%
swift-objectivec-interoperability modulemap static-library swift bridging-header

swift-objectivec-interoperability's People

Contributors

ashislaha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swift-objectivec-interoperability's Issues

How to mix Swift & Objective-C in a static library?

First, thank you so much for your blog post. It's been helping me a ton to figure this stuff out.

But I'm curious how I'd go about mixing Swift & Objective-C in a static library. I have a framework that I want to make into a static library that has a private module as well to share code internally between Swift & Objective-C code (so this would require a module.private.modulemap file, which also means I need to make my module map by hand).

I see that on a framework target, the built product has a Modules/module.modulemap file which has a sub-module to expose the Swift generated header to Objective-C like so:

framework module MyFramework {
  umbrella header "MyFramework.h"

  export *
  module * { export * }
}

module MyFramework.Swift {
    header "MyFramework-Swift.h"
    requires objc
}

I'm not sure if there's a way for me to manually make this file to also then have my private module map expose the internal Objective-C to my internal Swift.

If you've got any ideas on how I can proceed here I'd much appreciate it. Thanks again!

'MixLibOne-Swift.h' file not found

1、clone Swift-ObjectiveC-Interoperability
2、open PlayWithLibraries.xcodeproj
3、select iPhone 11 Simulator
show the blew error
how to fix ?
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.