GithubHelp home page GithubHelp logo

Comments (11)

constantine-fry avatar constantine-fry commented on August 15, 2024

Classes in the library are not prefixed with @objc. So you can't use it from objc code.
But you always can prepare a PR :)

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

a PR?
Is the @objc omission on purpose or just to make a statement that we should start using Swift? :P

from das-quadrat.

constantine-fry avatar constantine-fry commented on August 15, 2024

PR = Pull Request :)

It's my personal opinion that we should use Swift for new stuff. Do you think differently?

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

So do a pull request and add it to each of the headers?

I still feel like Swift is a bit new. I like it, but I want it to mature a bit more before making the switch. Would be nice to have the reverse compatibility either way. Let me know what I should do here.

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

2015-04-21 4 39 03 pm

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

It looks like the lack of struct support in Objective-C is going to kill this integration off for now unless someone feels like writing a wrapper. :(

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

This is kind of a bummer because there are a lot of people that haven't moved to Swift yet, or are trying to maintain active projects that can't be completely rewritten. It'd be nice to have Objective-C support, because Apple designed the Swift language to support both and provide portability.

It's a shame that struct support is missing and the Swift syntax keeps changing, because it seems like a pain to get this to work as easily as Apple implies?

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

I was able to write a Swift wrapper for the functions I needed and interface with that using Objective-C.

from das-quadrat.

billy84 avatar billy84 commented on August 15, 2024

Hi @benguild
How are you?
Could you share the Swift wrapper you wrote?

Thanks

from das-quadrat.

benguild avatar benguild commented on August 15, 2024

Hello again, @billy84!
The Swift wrapper I ended up writing is for a specific purpose and only covers the functions that I need/use, so it would not be suitable for public release nor for your use... most likely.

As I mentioned in the other issue, you should write your own wrapper that you can call from your Objective-C code, or simply rewrite your own class(es) that need to call this library in Swift. Either one is probably your best bet, but if you want to keep the bulk of your code in Objective-C, you need to write the wrapper as I have suggested and as you have acknowledged.

Good luck! Let us know if you run into any issues related to the library, or if you have any code you want to share with everyone that could be utilized by others.

from das-quadrat.

billy84 avatar billy84 commented on August 15, 2024

Hello @benguild
Thank you for your suggestion.
I will try to do so.
Good luck you too!

from das-quadrat.

Related Issues (20)

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.