我真的相信这在某些时候有效,但是当它到达这里时它会抛出异常并崩溃:
GTLYouTubeResourceId *thisVideo = item.identifier;
NSString *myVidId = thisVideo.videoId;
这是错误:
2012-12-17 10:13:02.494 STATS[21427:11603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GTLYouTubeVideo videoId]: unrecognized selector sent to instance 0xc471500'
*** First throw call stack:
(0x1e15012 0x16b2e7e 0x1ea04bd 0x1e04bbc 0x1e0494e 0x6e11 0x4ae5a 0x16c66b0 0xde7035 0x1d98f3f 0x1d9896f 0x1dbb734 0x1dbaf44 0x1dbae1b 0x276f7e3 0x276f668 0x2ee65c 0x278d 0x26b5)
libc++abi.dylib: terminate called throwing an exception
从 API 返回的 JSON 格式为 ? 在视频 ID 标题中
2012-12-17 10:20:46.476 STATS[21630:11603] ***** YOUTUBe thisVideo GTLYouTubeVideo 0x8267fe0: {kind:"youtube#video" videoId?:"AAAAAAAA"}