cordova-spotify-oauth icon indicating copy to clipboard operation
cordova-spotify-oauth copied to clipboard

Use of unresolved identifier 'SPTAuth'

Open MandelbrotMan opened this issue 6 years ago • 2 comments

Hello, Hows it going. I recently started getting this problem in XCode with this line of code let auth = SPTAuth.defaultInstance()! //Error = Use of unresolved identifier 'SPTAuth' this is inside the SPotifyOauthPlugin.swift file

I've tried all rebuilding the project in all the version of Xcode 9 and 10. Then I installed Xcode 8 and converted the file from swift version 2 to 3 and then installed xcode 9 again and this did not fix the issue Any idea of what it could be?

MandelbrotMan avatar Nov 16 '18 16:11 MandelbrotMan

I ran into this problem also. For me, I am running a meteor app, and the bridging header for the plugin was not being imported. If you are running a meteor app, you must edit the cordova ios project and import the bridging header.

Edit the file: [app folder]/.meteor/local/cordova-build/platforms/ios/[Project Name]/Bridging-Header.h

Add line: #import "SpotifyOAuth-Bridging-Header.h"

Then rebuild the app.

kcarwilemiller avatar Jun 17 '19 23:06 kcarwilemiller

Im using ionic but the solution translates great.

For me it was root_app_folder/platforms/ios/[Project Name]Bridging-Header.h

adding #import "SpotifyOAuth-Bridging-Header.h" and rebuilding it worked like a charm.

@kcarwilemiller you came in clutch when I needed it. Thank you!

MandelbrotMan avatar Jul 22 '19 16:07 MandelbrotMan