尝试播放iTunes播放列表时,Spotify Beta 5 SDK for iOS崩溃

时间:2014-09-09 23:26:19

标签: ios sdk spotify playlists

使用Spotify iOS SDK Beta 5,当我使用以下方法请求播放列表时:

[SPTRequest playlistsForUserInSession:self.session callback:^(NSError *error, id object) {
    self.playlists = ((SPTListPage*)object).items;
}];

我得到一个包含Spotify桌面应用程序同化的本地Spotify和iTunes播放列表的列表。列表条目中没有任何内容可以消除它们的歧义。如果我尝试使用以下代码播放其中一个iTunes播放列表:

[SPTRequest requestItemAtURI:uri
                 withSession:session
                    callback:^(NSError *error, id object) {

                        if (error != nil) {
                            NSLog(@"*** got error %@", error);
                            return;
                        }

                        [self.streamer playTrackProvider:object callback:^(NSError *error) {
                            NSLog (@"*** reached callback");
                        }];

                    }];

我的应用在Spotify SDK中崩溃,出现此错误:

-[NSNull caseInsensitiveCompare:]: unrecognized selector sent to instance 0x198ba9fe0

和这个堆栈跟踪:

Thread 10, Queue : com.apple.root.default-priority
#0  0x000000019816c1c0 in objc_exception_throw ()
#1  0x000000018bc67db4 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#2  0x000000018bc65ae0 in ___forwarding___ ()
#3  0x000000018bb8578c in _CF_forwarding_prep_0 ()
#4  0x0000000100099d40 in -[SPTPartialAlbum initWithDecodedJSONObject:error:] at /Users/po/Projects/ios-sdk/src/SPTPartialAlbum.m:85
#5  0x00000001000a6578 in +[SPTJSONDecoding SPObjectFromDecodedJSON:collection:error:] at /Users/po/Projects/ios-sdk/src/SPTJSONDecoding.m:95
#6  0x000000010008bd2c in -[SPTTrack initWithDecodedJSONObject:error:] at /Users/po/Projects/ios-sdk/src/SPTTrack.m:83
#7  0x000000010008a350 in -[SPTPlaylistTrack initWithDecodedJSONObject:error:] at /Users/po/Projects/ios-sdk/src/SPTPlaylistTrack.m:44
#8  0x00000001000a6578 in +[SPTJSONDecoding SPObjectFromDecodedJSON:collection:error:] at /Users/po/Projects/ios-sdk/src/SPTJSONDecoding.m:95
#9  0x0000000100096ebc in -[SPTListPage initWithDecodedJSONObject:expectingPartialChildren:rootObjectKey:] at /Users/po/Projects/ios-sdk/src/SPTListPage.m:84
#10 0x000000010008fcac in -[SPTPlaylistSnapshot initWithDecodedJSONObject:error:] at /Users/po/Projects/ios-sdk/src/SPTPlaylistSnapshot.m:137
#11 0x00000001000a6578 in +[SPTJSONDecoding SPObjectFromDecodedJSON:collection:error:] at /Users/po/Projects/ios-sdk/src/SPTJSONDecoding.m:95
#12 0x00000001000a1664 in __56+[SPTRequest requestPlaylistAtURI:withSession:callback:]_block_invoke at /Users/po/Projects/ios-sdk/src/SPTRequest.m:595
#13 0x0000000198744014 in _dispatch_call_block_and_release ()
#14 0x0000000198743fd4 in _dispatch_client_callout ()
#15 0x000000019874b2b8 in _dispatch_root_queue_drain ()
#16 0x000000019874b4fc in _dispatch_worker_thread2 ()
#17 0x00000001988d96bc in _pthread_wqthread ()

Native Spotify播放列表播放效果很好。

帮助!这有解决方法吗?在请求播放列表时,我不认为SDK会返回iTunes播放列表。或者,给我一些我可以用来确定哪些播放列表是基于iTunes的,所以我可以将它们隐藏在我的iOS应用程序的用户中。或者,在尝试播放S​​DK时不要在SDK中崩溃。

Spotify SDK开发人员:帮助!?之前的SDK显示了iTunes播放列表,但在通过requestItemAtURI请求时没有崩溃。

0 个答案:

没有答案