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.
CocoaLibSpotify storyboard error? App breaks when presenting loginviewcontroller
-
11-06-2023 - |
Domanda
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow