dispatch_async(dispatch_get_main_queue(), ^{
ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset){
ALAssetRepresentation *representation = [myasset defaultRepresentation];
NSString *fileName = [representation filename];
NSLog(@"fileName : %@",[representation filename]);
};
NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL];
ALAssetsLibrary* assetslibrary = [[ALAssetsLibrary alloc] init];
[assetslibrary assetForURL:imageURL
resultBlock:resultblock
failureBlock:nil];
});
报错信息:
-[__NSArrayI scheme]: unrecognized selector sent to instance 0x7ff84d58a1f0
2015-12-11 09:49:45.126 MobileOA[1126:25670] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI scheme]: unrecognized selector sent to instance 0x7ff84d58a1f0'
*** First throw call stack:
(
0 CoreFoundation 0x00000001092cff65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108c94deb objc_exception_throw + 48
2 CoreFoundation 0x00000001092d858d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000109225f7a ___forwarding_ + 970
4 CoreFoundation 0x0000000109225b28 CF_forwarding_prep_0 + 120
5 PhotoLibraryServices 0x000000010cb2b65b +[PLManagedAsset photoFromAssetURL:photoLibrary:sidecar:] + 83
6 AssetsLibrary 0x0000000106cf89bf __56-[ALAssetsLibrary assetForURL:resultBlock:failureBlock:]_block_invoke324 + 36
7 CoreData 0x0000000111af0f17 developerSubmittedBlockToNSManagedObjectContextPerform + 199
8 libdispatch.dylib 0x0000000109a6049b _dispatch_client_callout + 8
9 libdispatch.dylib 0x0000000109a45051 _dispatch_barrier_sync_f_invoke + 393
10 CoreData 0x0000000111af0dfc -[NSManagedObjectContext performBlockAndWait:] + 252
11 AssetsLibrary 0x0000000106cf5dcc -[ALAssetsLibrary _performBlockAndWait:] + 134
12 AssetsLibrary 0x0000000106cf888c __56-[ALAssetsLibrary assetForURL:resultBlock:failureBlock:]_block_invoke_2 + 191
13 libdispatch.dylib 0x0000000109a3fef9 _dispatch_call_block_and_release + 12
14 libdispatch.dylib 0x0000000109a6049b _dispatch_client_callout + 8
15 libdispatch.dylib 0x0000000109a4834b _dispatch_main_queue_callback_4CF + 1738
16 CoreFoundation 0x00000001092303e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE_ + 9
17 CoreFoundation 0x00000001091f1939 __CFRunLoopRun + 2073
18 CoreFoundation 0x00000001091f0e98 CFRunLoopRunSpecific + 488
19 GraphicsServices 0x000000010a7adad2 GSEventRunModal + 161
20 UIKit 0x000000010718a676 UIApplicationMain + 171
21 MobileOA 0x0000000105b6ee81 main + 97
22 libdyld.dylib 0x0000000109a9492d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
求大神帮忙看看,求解决啊