我尝试将ALAsset添加到Photo Stream,但看起来这是不可能的。 有什么建议吗?
我尝试了以下内容:
typedef void(^SaveImageCompletion)(NSError* error);
-(void)addAssetURL:(NSURL*)assetURL toPhotoStreamWithCompletionBlock:(SaveImageCompletion)completionBlock
{
[self enumerateGroupsWithTypes:ALAssetsGroupPhotoStream usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
if (group) {
*stop = YES;
[self assetForURL: assetURL resultBlock:^(ALAsset *asset) {
if ([group addAsset: asset]) {
NSLog(@"Added to photo stream!");
} else {
NSLog(@"ERROR! Adding to photo stream failed!");
}
completionBlock(nil);
} failureBlock: completionBlock];
return;
}
} failureBlock: completionBlock];
}
但是,addAsset:总是失败。它适用于常规专辑..
非常感谢提前!