Capacitor: Error in plugin music-controls on ios

Created on 11 Oct 2018  ·  7Comments  ·  Source: ionic-team/capacitor

Hi,

I'm trying to use this plugin https://beta.ionicframework.com/docs/native/music-controls with capacitor, but when I build the project with Xcode I got this error: 'MainViewController.h' file not found in node_modules/@capacitor/cli/assets/capacitor-cordova-ios-plugins/sources/CordovaPluginMusicControls/MainViewController+MusicControls.h.

It builds on cordova.

known incompatible cordova plugin ios

Most helpful comment

Working on a rewrite for Capacitor for Music Controls. iOS is mostly ported (have to fix the image) - it works for my needs. I'll try to find a way to get the Android side done asap - this is my first try at Swift and Android native code.

https://github.com/ingageco/capacitor-music-controls-plugin

All 7 comments

Sadly plugins that depend on some Cordova project classes such us MainViewController.h won't work on Capacitor as it doesn't have those classes.
It could be probably be fixed in the plugin if they change the category to CDVViewController class instead of doing it in MainViewController class.

I've added it to the list of incompatible plugins so it's skipped on install and added the known incompatible cordova plugins label

Just wanted to chime in - I'm a complete noob at iOS dev (outside of Ionic) but i did what you said - just string replaced 'MainViewController' with 'CDVViewController' and it built easily. Going to now see if the plugin actually works - fingers crossed!

Working on a rewrite for Capacitor for Music Controls. iOS is mostly ported (have to fix the image) - it works for my needs. I'll try to find a way to get the Android side done asap - this is my first try at Swift and Android native code.

https://github.com/ingageco/capacitor-music-controls-plugin

Android is mostly working now as well. Once I have this done, what would be the process of review to have this added to Community plugins, or removed from Incompatible plugins? @jcesarmobile

Working on a rewrite for Capacitor for Music Controls. iOS is mostly ported (have to fix the image) - it works for my needs. I'll try to find a way to get the Android side done asap - this is my first try at Swift and Android native code.

https://github.com/ingageco/capacitor-music-controls-plugin

Hi wanted to implement this in my project and I'm new to Ionic and capacitor how do i install it in my app, I did run

cordova plugin add https://github.com/ingageco/capacitor-music-controls-plugin

but this gave me an error

Cannot find plugin.xml for plugin "capacitor-music-controls-plugin"

@ingageco Hi, I am working on an app which is almost completed and now i am stuck at the music controls to handle inside the app can you tell me the steps how to use your plugin as when i try to build it capacitor skip that plugin inside build so unable to use the plugin. Thanks in advance

Thanks @ingageco! I'll be giving it a whirl now!

Was this page helpful?
0 / 5 - 0 ratings