I\'d like to use an iCloud, but when I compile the app on iOS 4.3 Simulator it crashes.
dyld: Symbol not found: _OBJC_CLASS_$_NSMetadataQuery
What should I do to
my sulotion is:
Where have NSMetadataQuery change to id: ex
normal : - (void)loadData:(NSMetadataQuery *)query; change to: - (void)loadData:(id)query;
normal: @property (retain, nonatomic) NSMetadataQuery *query; change to: @property (retain, nonatomic) id query;
and check iCloud available:
if ([[NSFileManager defaultManager] respondsToSelector:@selector(URLForUbiquityContainerIdentifier:)]) {
NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
if (ubiq) {
// Code for access iCloud here
}
}
When use NSMetadataQuery:
id _query = [[NSClassFromString(@"NSMetadataQuery") alloc] init];
// Some code here
[_query startQuery];
Have fun (^_^)