Wait for completion block of writeImageToSavedPhotosAlbum by semaphore
问题 In my app I open the camera by a picker and after the photo has been taken I'd like to safe it by the following method the assets library. The method freezes after the call of the writeImageToSavedPhotosAlbum. Without the semaphores the methods work perfectly. But than I miss to receive the assetURL. + (NSURL*)safeImageToAssetsLibrary:(UIImage *)image metadata:(NSDictionary *)metadata { ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; __block NSURL *retAssestURL = nil; dispatch