GithubHelp home page GithubHelp logo

Allow hooking of swift classes about logos HOT 4 CLOSED

theos avatar theos commented on June 8, 2024
Allow hooking of swift classes

from logos.

Comments (4)

kirb avatar kirb commented on June 8, 2024 2

The ObjC class for a Swift class is generated only for compatibility with other ObjC code that needs to interact with Swift. It calls through to the Swift function. While what you’ve done worked in your situation, it won’t always. When Swift code calls Swift code, it calls the C function directly. Also, a Swift class doesn’t necessarily need to interact with ObjC at all, in which case it won’t get an ObjC class generated for it.

We definitely need to work out a game plan to support Swift in Logos (both hooking it and writing code in it), but it seems like we’re going to be waiting for someone to design a hooking platform for it first.

from logos.

wizages avatar wizages commented on June 8, 2024

Even still should we still support the dot operator for hooking classes. Just saying.

from logos.

kirb avatar kirb commented on June 8, 2024

Fair. I'd want to ensure the risk is clear though, somehow.

from logos.

wizages avatar wizages commented on June 8, 2024

Maybe include a warning during compile time that says:
Warning: If you are potentially hooking a swift class unexpected results may occur.

Edit: To be fair also according to the naming conventions of objective c you actually can't even use the dot operator. So possibly we should wait until Swift is a stable api and then look at making a theos for swift.

from logos.

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.