Giter Site home page Giter Site logo

Comments (6)

jcesarmobile avatar jcesarmobile commented on June 8, 2024

The provided app doesn't include any removeAllListeners() call, can you update it?

Are you sure you updated correctly? looks like you updated your plugins to Capacitor 6 but you are still using @capacitor/ios 5.x.

from capacitor.

JanMisker avatar JanMisker commented on June 8, 2024

Sorry my bad I wasn't using the src dir, I modified the repository to show the issue. I just put everything in src/index.html.
I do use the 6 version of ios, as you can see in the package.json.

Below screenshot of what happens when running on iOS vs. Android emulator

iOS:
Screenshot 2024-04-29 at 13 56 18

Android:
Screenshot 2024-04-29 at 13 56 50

from capacitor.

ionitron-bot avatar ionitron-bot commented on June 8, 2024

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

from capacitor.

jcesarmobile avatar jcesarmobile commented on June 8, 2024

Oh, yeah, since you changed the sample to not import the plugin, the common methods like removeAllListeners don't get generated since that's generated from javascript.

I guess we could generate it from native too as we do for addListeners so it's available even if the plugin is not imported.

But if you import the plugin, the removeAllListeners method is available and works as expected, the problem is just a matter of generating method for being accessible from Capacitor.Plugins.PluginName, which is technically deprecated.

from capacitor.

JanMisker avatar JanMisker commented on June 8, 2024

One of our projects is really old and "vanilla" javascript, not using modules. So we'd have to find a way to include that generated plugin code without imports.

Still, isn't it strange that that same sample project, so without importing the plugin, does seem to work on Android? In the sense that the function is not undefined as you can see in the 2nd screenshot.

from capacitor.

jcesarmobile avatar jcesarmobile commented on June 8, 2024

This is an iOS issue only, on Android the plugins methods have annotations that auto generate the javascript and removeAllListeners is one of the base plugin class methods, but on iOS no such thing exists, so they have to be generated programmatically.

from capacitor.

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.