Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build iOS example project, SpotifyiOS.h not found #63

Closed
GitGeddes opened this issue Jul 23, 2020 · 4 comments
Closed

Can't build iOS example project, SpotifyiOS.h not found #63

GitGeddes opened this issue Jul 23, 2020 · 4 comments

Comments

@GitGeddes
Copy link

I am trying to run the example project and server, but the example folder doesn't include the SpotifyiOS framework, even after doing pod install. I assume that the files come from here, https://github.com/spotify/ios-sdk/tree/master/SpotifyiOS.framework/Versions/A but I'm not sure which files I need or how to create the ".framework" folder so that XCode can link to it.

Without this framework, XCode build fails with "'SpotifyiOS.h' file not found" in RNSpotifyItem.h using the example project. How can I download the framework and get the example working?

@cjam
Copy link
Owner

cjam commented Jul 24, 2020

hey @GitGeddes you'll likely need to get the git submodules. There's a script to do this in the package.json:

yarn submodules

@GitGeddes
Copy link
Author

Hello again. Running yarn submodules got past the missing files errors (with some re-arranging of the subfolders in the framework) and now the example builds. It builds but can't install the app. When my teammate tries to run the example now, it throws this error:
chrome_2020-07-24_22-48-49

We included the SpotifyiOS.framework in the project settings. I'm not sure what could be wrong. Sorry if this is less of an issue and more of just help setting this up.

@GitGeddes
Copy link
Author

GitGeddes commented Jul 29, 2020

We figured out these problems and got the example running. Setting the SpotifyiOS.framework to not embed fixed the last issue. And reading the yarn commands in package.json helped. I saw that I needed to run yarn build in the react-native-spotify-remote directory after yarn install. Running the server on localhost worked as well. I hope this being documented helps somebody trying to set this up. Please add these to the setup instructions.

One last thing, I couldn't get the simulator to work properly because it doesn't have the Spotify app installed. The canOpenURL method would throw an error because spotify: was not a valid URL. It would still authenticate with the fallback web view, but the player could not initialize. So testing has to be done on a real device with Spotify installed. Let me know if this is not intentional. Otherwise, I'll close the issue.

@cjam
Copy link
Owner

cjam commented Jul 29, 2020

Hey @GitGeddes , glad you were able to figure this out, sorry for the delay. There is a Contributing guide in the repo that walks through how to get started with the example app:

https://github.com/cjam/react-native-spotify-remote/blob/master/CONTRIBUTING.md

Adding to this issue in the event that anyone finds it by searching.

As for the simulator, the spotify SDK, and by proxy this package, needs to be run on an actual device with spotify installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants