Getting the path of an ALAsset
问题 How can I get the path of each item in an array of ALAssets? I would like to get the images so that I can add them to an email e.g. NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"png"]; NSData *myData = [NSData dataWithContentsOfFile:path]; [mailViewController addAttachmentData:myData mimeType:@"image/png" fileName:@"sample"]; How can this be done? 回答1: Assuming you already have access to an array of ALAsset objects, you can retrieve their URL like this: someAsset