Replies: 2 comments 1 reply
-
It seems like you are importing the plugin incorrectly and thus not running the plugin's native code. Please make sure that the plugin is imported like this: import { Plugins } from '@capacitor/core';
import 'capacitor-spotify';
const { SpotifySDK } = Plugins; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Unfortunately that doesn't work either. I get the same error. This is my full code: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Ionic with Capacitor to build an app, which interacts with the Spotify APi.
Therefore I use the cordova-spotify-auth plugin and the capacitor-spotify plugin.
In the app, you are supposed to log in to Spotify and then the app is supposed to play a song on the device via the native Spotify mobile app.
The login via the cordova-spotify-auth plugin works, I also get an access token. However, using the Spotify SDK via capacitor-spotify plugin does not work. I get the following error messages:
This is my code:
Wouldn't Capacitor have to translate the code into native languages and thus make the Spotify SDK work?
Also, if you know any other way to play a song in the native Spotify mobile app via Capacitor or Cordova, please let me know.
Beta Was this translation helpful? Give feedback.
All reactions