문제

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