开发者

Xcode deosn't detect a framework

I have added ALAssetsLibrary framework to my project and for some reason XCode doesnt detect it.

I have no code completion, and XCode gives a warning and then crashes when I use the following code

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupWithTypes:ALAssetsGroupAlbum
                      usingBlock:assetGroupEnumerator
                    failureBlock:^(NSError *error){
                        NSLog(@"A problem occured");

 }];

It doesnt detect what ALAssetsLibrary is and the warning which leads to a crash is

warning: 'ALAssetsLibrary' may not respond to '-enumerateGroupWithTypes:usingBlock:failureBlock:'

Xcode deosn't detect a framework

Why isnt XCode detecting the framework?

I have added it to my project as well as imported it.

Xcode deosn't detect a framework

Xcode deosn't detect a framework

I would really app开发者_运维知识库reciate the help with this, I dont understand what I did wrong. Thanks


Choose "Device", not "Simulator".


First, you're importing AssetsLibrary.h, are you sure this refers to the class ALAssetsLibrary and ALAssetsGroupAlbum?

Second, I'm not sure it failing to find it is the problem, I imagine there would be a different error in that case, such as, this class is not defined, first use in function.

It's saying unrecognized selector, which means there might be a problem with your pointers.


Have you got your SDK set to 3.x? Blocks were only introduced in iOS 4.0, along with all the methods relating to them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜