質問

I am using CocoaLibSpotify in my app, the app uses storyboard. When I try to present the loginviewcontroller like this:

[self presentViewController:[SPLoginViewController loginControllerForSession:[SPSession sharedSession]] animated:YES completion:nil];

I get this error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSBundle initWithURL:]: nil URL argument'

In this file: SPLoginViewController

And this line:

NSURL *bundlePath = [[NSBundle mainBundle] URLForResource:@"SPLoginResources" withExtension:@"bundle"];
NSBundle *resourcesBundle = [NSBundle bundleWithURL:bundlePath];

What could cause this error?

役に立ちましたか?

解決

As described in the CocoaLibSpotify ReadMe under the "Building - iOS" section, you must include the SPLoginResources.bundle bundle supplied with the library in your project.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top