From 623d445a11cbbed5351f05ef0b16c3dda8ddec16 Mon Sep 17 00:00:00 2001 From: Shane Brinkman-Davis Date: Tue, 10 Mar 2015 08:40:32 -0600 Subject: [PATCH 01/10] fixed bug where some images got a white line on the right or bottom. (ex: 1500x1001 pixel image gets a white line on the bottom) --- src/ios/SOSPicker.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index da08db24..c3076ae7 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -27,7 +27,7 @@ - (void) getPictures:(CDVInvokedUrlCommand *)command { // Create the an album controller and image picker ELCAlbumPickerController *albumController = [[ELCAlbumPickerController alloc] init]; - + if (maximumImagesCount == 1) { albumController.immediateReturn = true; albumController.singleSelection = true; @@ -35,7 +35,7 @@ - (void) getPictures:(CDVInvokedUrlCommand *)command { albumController.immediateReturn = false; albumController.singleSelection = false; } - + ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] initWithRootViewController:albumController]; imagePicker.maximumImagesCount = maximumImagesCount; imagePicker.returnsOriginalImage = 1; @@ -69,11 +69,11 @@ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPic do { filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_PHOTO_PREFIX, i++, @"jpg"]; } while ([fileMgr fileExistsAtPath:filePath]); - + @autoreleasepool { ALAssetRepresentation *assetRep = [asset defaultRepresentation]; CGImageRef imgRef = NULL; - + //defaultRepresentation returns image as it appears in photo picker, rotated and sized, //so use UIImageOrientationUp when creating our image below. if (picker.returnsOriginalImage) { @@ -82,7 +82,7 @@ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPic } else { imgRef = [assetRep fullScreenImage]; } - + UIImage* image = [UIImage imageWithCGImage:imgRef scale:1.0f orientation:orientation]; if (self.width == 0 && self.height == 0) { data = UIImageJPEGRepresentation(image, self.quality/100.0f); @@ -90,7 +90,7 @@ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPic UIImage* scaledImage = [self imageByScalingNotCroppingForSize:image toSize:targetSize]; data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f); } - + if (![data writeToFile:filePath options:NSAtomicWrite error:&err]) { result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]]; break; @@ -100,7 +100,7 @@ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPic } } - + if (nil == result) { result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:resultStrings]; } @@ -143,7 +143,7 @@ - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)fr } else { scaleFactor = widthFactor; // scale to fit width } - scaledSize = CGSizeMake(width * scaleFactor, height * scaleFactor); + scaledSize = CGSizeMake(floor(width * scaleFactor), floor(height * scaleFactor)); } UIGraphicsBeginImageContext(scaledSize); // this will resize From 959b379ded95a57f965f219decf81506c221b749 Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Sat, 13 Jun 2015 23:54:56 +0200 Subject: [PATCH 02/10] #1 Cordova-Android 4 compatibility --- .gitignore | 1 + plugin.xml | 10 +++++++++- src/android/Library/res/values-de/strings.xml | 7 +++++++ src/android/Library/res/values-es/strings.xml | 7 +++++++ src/android/Library/res/values-fr/strings.xml | 7 +++++++ .../res/values-hu/multiimagechooser_strings_hu.xml | 1 - src/android/Library/res/values-hu/strings.xml | 7 +++++++ src/android/Library/res/values-ja/strings.xml | 7 +++++++ src/android/Library/res/values-ko/strings.xml | 7 +++++++ .../res/values/multiimagechooser_strings_en.xml | 4 ++-- 10 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/android/Library/res/values-de/strings.xml create mode 100644 src/android/Library/res/values-es/strings.xml create mode 100644 src/android/Library/res/values-fr/strings.xml create mode 100644 src/android/Library/res/values-hu/strings.xml create mode 100644 src/android/Library/res/values-ja/strings.xml create mode 100644 src/android/Library/res/values-ko/strings.xml diff --git a/.gitignore b/.gitignore index 2e9df623..3d5b3ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ xcuserdata/ project.xcworkspace/ tags +.idea \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index 7fc9ffbb..b1b3201b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.0.7"> ImagePicker @@ -106,5 +106,13 @@ + + + + + + + + diff --git a/src/android/Library/res/values-de/strings.xml b/src/android/Library/res/values-de/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-de/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values-es/strings.xml b/src/android/Library/res/values-es/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-es/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values-fr/strings.xml b/src/android/Library/res/values-fr/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-fr/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml b/src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml index 5bb897ce..1c60b5a0 100644 --- a/src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml +++ b/src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml @@ -1,7 +1,6 @@ MultiImageChooser - Ingyenes verzió - hátralévő képek: %d Képadatbázis megnyitási hiba történt. Kérjük, jelentse a problémát. Miniatűrök lekérése, kérjük legyen türelemmel diff --git a/src/android/Library/res/values-hu/strings.xml b/src/android/Library/res/values-hu/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-hu/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values-ja/strings.xml b/src/android/Library/res/values-ja/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-ja/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values-ko/strings.xml b/src/android/Library/res/values-ko/strings.xml new file mode 100644 index 00000000..6741b2ed --- /dev/null +++ b/src/android/Library/res/values-ko/strings.xml @@ -0,0 +1,7 @@ + + + ImagePicker + ignore + https://app.icenium.com/appbuilder + icenium: + diff --git a/src/android/Library/res/values/multiimagechooser_strings_en.xml b/src/android/Library/res/values/multiimagechooser_strings_en.xml index 2566b2f9..bc11a8fb 100644 --- a/src/android/Library/res/values/multiimagechooser_strings_en.xml +++ b/src/android/Library/res/values/multiimagechooser_strings_en.xml @@ -4,6 +4,6 @@ Free version - Images left: %d There was an error opening the images database. Please report the problem. Requesting thumbnails, please be patient - Cancel - OK + Cancel + OK From 48711ae54d41ccde97f2c2401e0bc5f176676756 Mon Sep 17 00:00:00 2001 From: hanssens Date: Wed, 19 Aug 2015 22:42:35 +0200 Subject: [PATCH 03/10] Deleted the ELCImagePicker plugin --- .../ELCImagePicker/ELCAlbumPickerController.h | 24 - .../ELCImagePicker/ELCAlbumPickerController.m | 164 ------- src/ios/ELCImagePicker/ELCAsset.h | 29 -- src/ios/ELCImagePicker/ELCAsset.m | 49 -- src/ios/ELCImagePicker/ELCAssetCell.h | 15 - src/ios/ELCImagePicker/ELCAssetCell.m | 117 ----- .../ELCAssetPickerFilterDelegate.h | 12 - .../ELCAssetSelectionDelegate.h | 18 - src/ios/ELCImagePicker/ELCAssetTablePicker.h | 31 -- src/ios/ELCImagePicker/ELCAssetTablePicker.m | 217 --------- .../ELCImagePicker/ELCImagePickerController.h | 48 -- .../ELCImagePicker/ELCImagePickerController.m | 95 ---- .../Resources/ELCAlbumPickerController.xib | 374 --------------- .../Resources/ELCAssetPicker.xib | 435 ------------------ .../Resources/ELCAssetTablePicker.xib | 422 ----------------- src/ios/ELCImagePicker/Resources/Overlay.png | Bin 2719 -> 0 bytes .../ELCImagePicker/Resources/Overlay@2x.png | Bin 6568 -> 0 bytes 17 files changed, 2050 deletions(-) delete mode 100644 src/ios/ELCImagePicker/ELCAlbumPickerController.h delete mode 100644 src/ios/ELCImagePicker/ELCAlbumPickerController.m delete mode 100644 src/ios/ELCImagePicker/ELCAsset.h delete mode 100644 src/ios/ELCImagePicker/ELCAsset.m delete mode 100644 src/ios/ELCImagePicker/ELCAssetCell.h delete mode 100644 src/ios/ELCImagePicker/ELCAssetCell.m delete mode 100644 src/ios/ELCImagePicker/ELCAssetPickerFilterDelegate.h delete mode 100644 src/ios/ELCImagePicker/ELCAssetSelectionDelegate.h delete mode 100644 src/ios/ELCImagePicker/ELCAssetTablePicker.h delete mode 100644 src/ios/ELCImagePicker/ELCAssetTablePicker.m delete mode 100644 src/ios/ELCImagePicker/ELCImagePickerController.h delete mode 100644 src/ios/ELCImagePicker/ELCImagePickerController.m delete mode 100644 src/ios/ELCImagePicker/Resources/ELCAlbumPickerController.xib delete mode 100644 src/ios/ELCImagePicker/Resources/ELCAssetPicker.xib delete mode 100644 src/ios/ELCImagePicker/Resources/ELCAssetTablePicker.xib delete mode 100644 src/ios/ELCImagePicker/Resources/Overlay.png delete mode 100644 src/ios/ELCImagePicker/Resources/Overlay@2x.png diff --git a/src/ios/ELCImagePicker/ELCAlbumPickerController.h b/src/ios/ELCImagePicker/ELCAlbumPickerController.h deleted file mode 100644 index 151c0f77..00000000 --- a/src/ios/ELCImagePicker/ELCAlbumPickerController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// AlbumPickerController.h -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import -#import -#import "ELCAssetSelectionDelegate.h" -#import "ELCAssetPickerFilterDelegate.h" - -@interface ELCAlbumPickerController : UITableViewController - -@property (nonatomic, weak) id parent; -@property (nonatomic, strong) NSMutableArray *assetGroups; -@property (nonatomic, assign) BOOL singleSelection; -@property (nonatomic, assign) BOOL immediateReturn; - -// optional, can be used to filter the assets displayed -@property (nonatomic, weak) id assetPickerFilterDelegate; - -@end - diff --git a/src/ios/ELCImagePicker/ELCAlbumPickerController.m b/src/ios/ELCImagePicker/ELCAlbumPickerController.m deleted file mode 100644 index 8317d97d..00000000 --- a/src/ios/ELCImagePicker/ELCAlbumPickerController.m +++ /dev/null @@ -1,164 +0,0 @@ -// -// AlbumPickerController.m -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import "ELCAlbumPickerController.h" -#import "ELCImagePickerController.h" -#import "ELCAssetTablePicker.h" - -@interface ELCAlbumPickerController () - -@property (nonatomic, strong) ALAssetsLibrary *library; - -@end - -@implementation ELCAlbumPickerController - -//Using auto synthesizers - -#pragma mark - -#pragma mark View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.navigationItem setTitle:@"Loading..."]; - - UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self.parent action:@selector(cancelImagePicker)]; - [self.navigationItem setRightBarButtonItem:cancelButton]; - - NSMutableArray *tempArray = [[NSMutableArray alloc] init]; - self.assetGroups = tempArray; - - ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init]; - self.library = assetLibrary; - - // Load Albums into assetGroups - dispatch_async(dispatch_get_main_queue(), ^ - { - @autoreleasepool { - - // Group enumerator Block - void (^assetGroupEnumerator)(ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop) - { - if (group == nil) { - return; - } - - // added fix for camera albums order - NSString *sGroupPropertyName = (NSString *)[group valueForProperty:ALAssetsGroupPropertyName]; - NSUInteger nType = [[group valueForProperty:ALAssetsGroupPropertyType] intValue]; - - if ([[sGroupPropertyName lowercaseString] isEqualToString:@"camera roll"] && nType == ALAssetsGroupSavedPhotos) { - [self.assetGroups insertObject:group atIndex:0]; - } - else { - [self.assetGroups addObject:group]; - } - - // Reload albums - [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES]; - }; - - // Group Enumerator Failure Block - void (^assetGroupEnumberatorFailure)(NSError *) = ^(NSError *error) { - - UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[NSString stringWithFormat:@"Album Error: %@ - %@", [error localizedDescription], [error localizedRecoverySuggestion]] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; - [alert show]; - - NSLog(@"A problem occured %@", [error description]); - }; - - // Enumerate Albums - [self.library enumerateGroupsWithTypes:ALAssetsGroupAll - usingBlock:assetGroupEnumerator - failureBlock:assetGroupEnumberatorFailure]; - - } - }); -} - -- (void)reloadTableView -{ - [self.tableView reloadData]; - [self.navigationItem setTitle:@"Select an Album"]; -} - -- (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount -{ - return [self.parent shouldSelectAsset:asset previousCount:previousCount]; -} - -- (void)selectedAssets:(NSArray*)assets -{ - [_parent selectedAssets:assets]; -} - -#pragma mark - -#pragma mark Table view data source - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - // Return the number of sections. - return 1; -} - - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - // Return the number of rows in the section. - return [self.assetGroups count]; -} - - -// Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; - } - - // Get count - ALAssetsGroup *g = (ALAssetsGroup*)[self.assetGroups objectAtIndex:indexPath.row]; - [g setAssetsFilter:[ALAssetsFilter allPhotos]]; - NSInteger gCount = [g numberOfAssets]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ (%ld)",[g valueForProperty:ALAssetsGroupPropertyName], (long)gCount]; - [cell.imageView setImage:[UIImage imageWithCGImage:[(ALAssetsGroup*)[self.assetGroups objectAtIndex:indexPath.row] posterImage]]]; - [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; - - return cell; -} - -#pragma mark - -#pragma mark Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - ELCAssetTablePicker *picker = [[ELCAssetTablePicker alloc] initWithNibName: nil bundle: nil]; - picker.parent = self; - - picker.assetGroup = [self.assetGroups objectAtIndex:indexPath.row]; - [picker.assetGroup setAssetsFilter:[ALAssetsFilter allPhotos]]; - - picker.assetPickerFilterDelegate = self.assetPickerFilterDelegate; - picker.immediateReturn = self.immediateReturn; - picker.singleSelection = self.singleSelection; - - [self.navigationController pushViewController:picker animated:YES]; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return 57; -} - -@end - diff --git a/src/ios/ELCImagePicker/ELCAsset.h b/src/ios/ELCImagePicker/ELCAsset.h deleted file mode 100644 index ebef3685..00000000 --- a/src/ios/ELCImagePicker/ELCAsset.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Asset.h -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import -#import - -@class ELCAsset; - -@protocol ELCAssetDelegate - -@optional -- (void)assetSelected:(ELCAsset *)asset; -- (BOOL)shouldSelectAsset:(ELCAsset *)asset; -@end - - -@interface ELCAsset : NSObject - -@property (nonatomic, strong) ALAsset *asset; -@property (nonatomic, weak) id parent; -@property (nonatomic, assign) BOOL selected; - -- (id)initWithAsset:(ALAsset *)asset; - -@end \ No newline at end of file diff --git a/src/ios/ELCImagePicker/ELCAsset.m b/src/ios/ELCImagePicker/ELCAsset.m deleted file mode 100644 index 12413af5..00000000 --- a/src/ios/ELCImagePicker/ELCAsset.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// Asset.m -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import "ELCAsset.h" -#import "ELCAssetTablePicker.h" - -@implementation ELCAsset - -//Using auto synthesizers - -- (id)initWithAsset:(ALAsset*)asset -{ - self = [super init]; - if (self) { - self.asset = asset; - _selected = NO; - } - return self; -} - -- (void)toggleSelection -{ - self.selected = !self.selected; -} - -- (void)setSelected:(BOOL)selected -{ - if (selected) { - if ([_parent respondsToSelector:@selector(shouldSelectAsset:)]) { - if (![_parent shouldSelectAsset:self]) { - return; - } - } - } - _selected = selected; - if (selected) { - if (_parent != nil && [_parent respondsToSelector:@selector(assetSelected:)]) { - [_parent assetSelected:self]; - } - } -} - - -@end - diff --git a/src/ios/ELCImagePicker/ELCAssetCell.h b/src/ios/ELCImagePicker/ELCAssetCell.h deleted file mode 100644 index b9071562..00000000 --- a/src/ios/ELCImagePicker/ELCAssetCell.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AssetCell.h -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import - - -@interface ELCAssetCell : UITableViewCell - -- (void)setAssets:(NSArray *)assets; - -@end diff --git a/src/ios/ELCImagePicker/ELCAssetCell.m b/src/ios/ELCImagePicker/ELCAssetCell.m deleted file mode 100644 index 2a6706aa..00000000 --- a/src/ios/ELCImagePicker/ELCAssetCell.m +++ /dev/null @@ -1,117 +0,0 @@ -// -// AssetCell.m -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import "ELCAssetCell.h" -#import "ELCAsset.h" - -@interface ELCAssetCell () - -@property (nonatomic, strong) NSArray *rowAssets; -@property (nonatomic, strong) NSMutableArray *imageViewArray; -@property (nonatomic, strong) NSMutableArray *overlayViewArray; - -@end - -@implementation ELCAssetCell - -//Using auto synthesizers - -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier -{ - self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; - if (self) { - UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(cellTapped:)]; - [self addGestureRecognizer:tapRecognizer]; - - NSMutableArray *mutableArray = [[NSMutableArray alloc] initWithCapacity:4]; - self.imageViewArray = mutableArray; - - NSMutableArray *overlayArray = [[NSMutableArray alloc] initWithCapacity:4]; - self.overlayViewArray = overlayArray; - } - return self; -} - -- (void)setAssets:(NSArray *)assets -{ - self.rowAssets = assets; - for (UIImageView *view in _imageViewArray) { - [view removeFromSuperview]; - } - for (UIImageView *view in _overlayViewArray) { - [view removeFromSuperview]; - } - //set up a pointer here so we don't keep calling [UIImage imageNamed:] if creating overlays - UIImage *overlayImage = nil; - for (int i = 0; i < [_rowAssets count]; ++i) { - - ELCAsset *asset = [_rowAssets objectAtIndex:i]; - - if (i < [_imageViewArray count]) { - UIImageView *imageView = [_imageViewArray objectAtIndex:i]; - imageView.image = [UIImage imageWithCGImage:asset.asset.thumbnail]; - } else { - UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithCGImage:asset.asset.thumbnail]]; - [_imageViewArray addObject:imageView]; - } - - if (i < [_overlayViewArray count]) { - UIImageView *overlayView = [_overlayViewArray objectAtIndex:i]; - overlayView.hidden = asset.selected ? NO : YES; - } else { - if (overlayImage == nil) { - overlayImage = [UIImage imageNamed:@"Overlay.png"]; - } - UIImageView *overlayView = [[UIImageView alloc] initWithImage:overlayImage]; - [_overlayViewArray addObject:overlayView]; - overlayView.hidden = asset.selected ? NO : YES; - } - } -} - -- (void)cellTapped:(UITapGestureRecognizer *)tapRecognizer -{ - CGPoint point = [tapRecognizer locationInView:self]; - CGFloat totalWidth = self.rowAssets.count * 75 + (self.rowAssets.count - 1) * 4; - CGFloat startX = (self.bounds.size.width - totalWidth) / 2; - - CGRect frame = CGRectMake(startX, 2, 75, 75); - - for (int i = 0; i < [_rowAssets count]; ++i) { - if (CGRectContainsPoint(frame, point)) { - ELCAsset *asset = [_rowAssets objectAtIndex:i]; - asset.selected = !asset.selected; - UIImageView *overlayView = [_overlayViewArray objectAtIndex:i]; - overlayView.hidden = !asset.selected; - break; - } - frame.origin.x = frame.origin.x + frame.size.width + 4; - } -} - -- (void)layoutSubviews -{ - CGFloat totalWidth = self.rowAssets.count * 75 + (self.rowAssets.count - 1) * 4; - CGFloat startX = (self.bounds.size.width - totalWidth) / 2; - - CGRect frame = CGRectMake(startX, 2, 75, 75); - - for (int i = 0; i < [_rowAssets count]; ++i) { - UIImageView *imageView = [_imageViewArray objectAtIndex:i]; - [imageView setFrame:frame]; - [self addSubview:imageView]; - - UIImageView *overlayView = [_overlayViewArray objectAtIndex:i]; - [overlayView setFrame:frame]; - [self addSubview:overlayView]; - - frame.origin.x = frame.origin.x + frame.size.width + 4; - } -} - - -@end diff --git a/src/ios/ELCImagePicker/ELCAssetPickerFilterDelegate.h b/src/ios/ELCImagePicker/ELCAssetPickerFilterDelegate.h deleted file mode 100644 index 478c256f..00000000 --- a/src/ios/ELCImagePicker/ELCAssetPickerFilterDelegate.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// ELCAssetPickerFilterDelegate.h - -@class ELCAsset; -@class ELCAssetTablePicker; - -@protocol ELCAssetPickerFilterDelegate - -// respond YES/NO to filter out (not show the asset) --(BOOL)assetTablePicker:(ELCAssetTablePicker *)picker isAssetFilteredOut:(ELCAsset *)elcAsset; - -@end \ No newline at end of file diff --git a/src/ios/ELCImagePicker/ELCAssetSelectionDelegate.h b/src/ios/ELCImagePicker/ELCAssetSelectionDelegate.h deleted file mode 100644 index 47d85d77..00000000 --- a/src/ios/ELCImagePicker/ELCAssetSelectionDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// ELCAssetSelectionDelegate.h -// ELCImagePickerDemo -// -// Created by JN on 9/6/12. -// Copyright (c) 2012 ELC Technologies. All rights reserved. -// - -#import - -@class ELCAsset; - -@protocol ELCAssetSelectionDelegate - -- (void)selectedAssets:(NSArray *)assets; -- (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount; - -@end diff --git a/src/ios/ELCImagePicker/ELCAssetTablePicker.h b/src/ios/ELCImagePicker/ELCAssetTablePicker.h deleted file mode 100644 index 8148ef64..00000000 --- a/src/ios/ELCImagePicker/ELCAssetTablePicker.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// ELCAssetTablePicker.h -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import -#import -#import "ELCAsset.h" -#import "ELCAssetSelectionDelegate.h" -#import "ELCAssetPickerFilterDelegate.h" - -@interface ELCAssetTablePicker : UITableViewController - -@property (nonatomic, weak) id parent; -@property (nonatomic, strong) ALAssetsGroup *assetGroup; -@property (nonatomic, strong) NSMutableArray *elcAssets; -@property (nonatomic, strong) IBOutlet UILabel *selectedAssetsLabel; -@property (nonatomic, assign) BOOL singleSelection; -@property (nonatomic, assign) BOOL immediateReturn; - -// optional, can be used to filter the assets displayed -@property(nonatomic, weak) id assetPickerFilterDelegate; - -- (int)totalSelectedAssets; -- (void)preparePhotos; - -- (void)doneAction:(id)sender; - -@end \ No newline at end of file diff --git a/src/ios/ELCImagePicker/ELCAssetTablePicker.m b/src/ios/ELCImagePicker/ELCAssetTablePicker.m deleted file mode 100644 index f7a5a5ab..00000000 --- a/src/ios/ELCImagePicker/ELCAssetTablePicker.m +++ /dev/null @@ -1,217 +0,0 @@ -// -// ELCAssetTablePicker.m -// -// Created by ELC on 2/15/11. -// Copyright 2011 ELC Technologies. All rights reserved. -// - -#import "ELCAssetTablePicker.h" -#import "ELCAssetCell.h" -#import "ELCAsset.h" -#import "ELCAlbumPickerController.h" - -@interface ELCAssetTablePicker () - -@property (nonatomic, assign) int columns; - -@end - -@implementation ELCAssetTablePicker - -//Using auto synthesizers - -- (id)init -{ - self = [super init]; - if (self) { - //Sets a reasonable default bigger then 0 for columns - //So that we don't have a divide by 0 scenario - self.columns = 4; - } - return self; -} - -- (void)viewDidLoad -{ - [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; - [self.tableView setAllowsSelection:NO]; - - NSMutableArray *tempArray = [[NSMutableArray alloc] init]; - self.elcAssets = tempArray; - - if (self.immediateReturn) { - - } else { - UIBarButtonItem *doneButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneAction:)]; - [self.navigationItem setRightBarButtonItem:doneButtonItem]; - [self.navigationItem setTitle:@"Loading..."]; - } - - [self performSelectorInBackground:@selector(preparePhotos) withObject:nil]; -} - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - self.columns = self.view.bounds.size.width / 80; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation -{ - return YES; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation -{ - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - self.columns = self.view.bounds.size.width / 80; - [self.tableView reloadData]; -} - -- (void)preparePhotos -{ - @autoreleasepool { - - [self.assetGroup enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) { - - if (result == nil) { - return; - } - - ELCAsset *elcAsset = [[ELCAsset alloc] initWithAsset:result]; - [elcAsset setParent:self]; - - BOOL isAssetFiltered = NO; - if (self.assetPickerFilterDelegate && - [self.assetPickerFilterDelegate respondsToSelector:@selector(assetTablePicker:isAssetFilteredOut:)]) - { - isAssetFiltered = [self.assetPickerFilterDelegate assetTablePicker:self isAssetFilteredOut:(ELCAsset*)elcAsset]; - } - - if (!isAssetFiltered) { - [self.elcAssets addObject:elcAsset]; - } - - }]; - - dispatch_sync(dispatch_get_main_queue(), ^{ - [self.tableView reloadData]; - // scroll to bottom - long section = [self numberOfSectionsInTableView:self.tableView] - 1; - long row = [self tableView:self.tableView numberOfRowsInSection:section] - 1; - if (section >= 0 && row >= 0) { - NSIndexPath *ip = [NSIndexPath indexPathForRow:row - inSection:section]; - [self.tableView scrollToRowAtIndexPath:ip - atScrollPosition:UITableViewScrollPositionBottom - animated:NO]; - } - - [self.navigationItem setTitle:self.singleSelection ? @"Pick Photo" : @"Pick Photos"]; - }); - } -} - -- (void)doneAction:(id)sender -{ - NSMutableArray *selectedAssetsImages = [[NSMutableArray alloc] init]; - - for (ELCAsset *elcAsset in self.elcAssets) { - if ([elcAsset selected]) { - [selectedAssetsImages addObject:[elcAsset asset]]; - } - } - [self.parent selectedAssets:selectedAssetsImages]; -} - - -- (BOOL)shouldSelectAsset:(ELCAsset *)asset -{ - NSUInteger selectionCount = 0; - for (ELCAsset *elcAsset in self.elcAssets) { - if (elcAsset.selected) selectionCount++; - } - BOOL shouldSelect = YES; - if ([self.parent respondsToSelector:@selector(shouldSelectAsset:previousCount:)]) { - shouldSelect = [self.parent shouldSelectAsset:asset previousCount:selectionCount]; - } - return shouldSelect; -} - -- (void)assetSelected:(ELCAsset *)asset -{ - if (self.singleSelection) { - - for (ELCAsset *elcAsset in self.elcAssets) { - if (asset != elcAsset) { - elcAsset.selected = NO; - } - } - } - if (self.immediateReturn) { - NSArray *singleAssetArray = @[asset.asset]; - [(NSObject *)self.parent performSelector:@selector(selectedAssets:) withObject:singleAssetArray afterDelay:0]; - } -} - -#pragma mark UITableViewDataSource Delegate Methods - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - // Return the number of sections. - return 1; -} - - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - if (self.columns <= 0) { //Sometimes called before we know how many columns we have - self.columns = 4; - } - NSInteger numRows = ceil([self.elcAssets count] / (float)self.columns); - return numRows; -} - -- (NSArray *)assetsForIndexPath:(NSIndexPath *)path -{ - long index = path.row * self.columns; - long length = MIN(self.columns, [self.elcAssets count] - index); - return [self.elcAssets subarrayWithRange:NSMakeRange(index, length)]; -} - -// Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - ELCAssetCell *cell = (ELCAssetCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - - if (cell == nil) { - cell = [[ELCAssetCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; - } - - [cell setAssets:[self assetsForIndexPath:indexPath]]; - - return cell; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return 79; -} - -- (int)totalSelectedAssets -{ - int count = 0; - - for (ELCAsset *asset in self.elcAssets) { - if (asset.selected) { - count++; - } - } - - return count; -} - - -@end diff --git a/src/ios/ELCImagePicker/ELCImagePickerController.h b/src/ios/ELCImagePicker/ELCImagePickerController.h deleted file mode 100644 index 0d1b54e5..00000000 --- a/src/ios/ELCImagePicker/ELCImagePickerController.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// ELCImagePickerController.h -// ELCImagePickerDemo -// -// Created by ELC on 9/9/10. -// Copyright 2010 ELC Technologies. All rights reserved. -// - -#import -#import "ELCAssetSelectionDelegate.h" - -@class ELCImagePickerController; -@class ELCAlbumPickerController; - -@protocol ELCImagePickerControllerDelegate - -/** - * Called with the picker the images were selected from, as well as an array of dictionary's - * containing keys for ALAssetPropertyLocation, ALAssetPropertyType, - * UIImagePickerControllerOriginalImage, and UIImagePickerControllerReferenceURL. - * @param picker - * @param info An NSArray containing dictionary's with the key UIImagePickerControllerOriginalImage, which is a rotated, and sized for the screen 'default representation' of the image selected. If you want to get the original image, use the UIImagePickerControllerReferenceURL key. - */ -- (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info; - -/** - * Called when image selection was cancelled, by tapping the 'Cancel' BarButtonItem. - */ -- (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker; - -@end - -@interface ELCImagePickerController : UINavigationController - -@property (nonatomic, weak) id imagePickerDelegate; -@property (nonatomic, assign) NSInteger maximumImagesCount; - -/** - * YES if the picker should return the original image, - * or NO for an image suitable for displaying full screen on the device. - */ -@property (nonatomic, assign) BOOL returnsOriginalImage; - -- (id)initImagePicker; -- (void)cancelImagePicker; - -@end - diff --git a/src/ios/ELCImagePicker/ELCImagePickerController.m b/src/ios/ELCImagePicker/ELCImagePickerController.m deleted file mode 100644 index 7b2a931a..00000000 --- a/src/ios/ELCImagePicker/ELCImagePickerController.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// ELCImagePickerController.m -// ELCImagePickerDemo -// -// Created by ELC on 9/9/10. -// Copyright 2010 ELC Technologies. All rights reserved. -// - -#import "ELCImagePickerController.h" -#import "ELCAsset.h" -#import "ELCAssetCell.h" -#import "ELCAssetTablePicker.h" -#import "ELCAlbumPickerController.h" -#import - -@implementation ELCImagePickerController - -//Using auto synthesizers - -- (id)initImagePicker -{ - ELCAlbumPickerController *albumPicker = [[ELCAlbumPickerController alloc] initWithStyle:UITableViewStylePlain]; - - self = [super initWithRootViewController:albumPicker]; - if (self) { - self.maximumImagesCount = 4; - [albumPicker setParent:self]; - } - return self; -} - -- (id)initWithRootViewController:(UIViewController *)rootViewController -{ - self = [super initWithRootViewController:rootViewController]; - if (self) { - self.maximumImagesCount = 4; - } - return self; -} - -- (void)cancelImagePicker -{ - if ([_imagePickerDelegate respondsToSelector:@selector(elcImagePickerControllerDidCancel:)]) { - [_imagePickerDelegate performSelector:@selector(elcImagePickerControllerDidCancel:) withObject:self]; - } -} - -- (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount -{ - BOOL shouldSelect = previousCount < self.maximumImagesCount; - if (!shouldSelect) { - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"Maximum %d photos.", nil), self.maximumImagesCount]; - NSString *message = [NSString stringWithFormat:NSLocalizedString(@"You can only select %d photos at a time.", nil), self.maximumImagesCount]; - [[[UIAlertView alloc] initWithTitle:title - message:message - delegate:nil - cancelButtonTitle:nil - otherButtonTitles:NSLocalizedString(@"Okay", nil), nil] show]; - } - return shouldSelect; -} - -- (void)selectedAssets:(NSArray *)assets -{ - NSMutableArray *returnArray = [[NSMutableArray alloc] init]; - - for(ALAsset *asset in assets) { - id obj = [asset valueForProperty:ALAssetPropertyType]; - if (!obj) { - continue; - } - NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init]; - [workingDictionary setObject:asset forKey:@"ALAsset"]; - [workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:UIImagePickerControllerReferenceURL]; - - [returnArray addObject:workingDictionary]; - - } - if (_imagePickerDelegate != nil && [_imagePickerDelegate respondsToSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:)]) { - [_imagePickerDelegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:returnArray]; - } else { - [self popToRootViewControllerAnimated:NO]; - } -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation -{ - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - return YES; - } else { - return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown; - } -} - -@end diff --git a/src/ios/ELCImagePicker/Resources/ELCAlbumPickerController.xib b/src/ios/ELCImagePicker/Resources/ELCAlbumPickerController.xib deleted file mode 100644 index 4170520f..00000000 --- a/src/ios/ELCImagePicker/Resources/ELCAlbumPickerController.xib +++ /dev/null @@ -1,374 +0,0 @@ - - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 416} - - - 3 - MQA - - NO - YES - NO - - - NO - - IBCocoaTouchFramework - NO - 1 - 0 - YES - 44 - 22 - 22 - - - - - YES - - - view - - - - 5 - - - - dataSource - - - - 6 - - - - delegate - - - - 7 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 4.IBEditorWindowLastContentRect - 4.IBPluginDependency - - - YES - AlbumPickerController - UIResponder - {{329, 504}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 7 - - - - YES - - AlbumPickerController - UITableViewController - - IBProjectSource - Classes/AlbumPickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - diff --git a/src/ios/ELCImagePicker/Resources/ELCAssetPicker.xib b/src/ios/ELCImagePicker/Resources/ELCAssetPicker.xib deleted file mode 100644 index 5d5e2b57..00000000 --- a/src/ios/ELCImagePicker/Resources/ELCAssetPicker.xib +++ /dev/null @@ -1,435 +0,0 @@ - - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 268 - {320, 416} - - - 1 - MSAxIDEAA - - YES - YES - IBCocoaTouchFramework - - - {320, 416} - - - 3 - MQA - - 2 - - - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - scrollview - - - - 7 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - YES - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - - - YES - AssetPicker - UIResponder - {{575, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAw88AAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 15 - - - - YES - - AssetPicker - UIViewController - - dismiss: - id - - - dismiss: - - dismiss: - id - - - - YES - - YES - parent - scrollview - selectedAssetsLabel - - - YES - id - UIScrollView - UILabel - - - - YES - - YES - parent - scrollview - selectedAssetsLabel - - - YES - - parent - id - - - scrollview - UIScrollView - - - selectedAssetsLabel - UILabel - - - - - IBProjectSource - Classes/ELCImagePickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - diff --git a/src/ios/ELCImagePicker/Resources/ELCAssetTablePicker.xib b/src/ios/ELCImagePicker/Resources/ELCAssetTablePicker.xib deleted file mode 100644 index e59456c7..00000000 --- a/src/ios/ELCImagePicker/Resources/ELCAssetTablePicker.xib +++ /dev/null @@ -1,422 +0,0 @@ - - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 436} - - - 3 - MQA - - YES - - NO - - IBCocoaTouchFramework - YES - 1 - 0 - YES - 44 - 22 - 22 - - - - - YES - - - view - - - - 3 - - - - dataSource - - - - 4 - - - - delegate - - - - 5 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - - - YES - AssetTablePicker - UIResponder - {{0, 526}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 5 - - - - YES - - AssetTablePicker - UITableViewController - - dismiss: - id - - - dismiss: - - dismiss: - id - - - - YES - - YES - parent - selectedAssetsLabel - - - YES - id - UILabel - - - - YES - - YES - parent - selectedAssetsLabel - - - YES - - parent - id - - - selectedAssetsLabel - UILabel - - - - - IBProjectSource - Classes/ELCImagePickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - diff --git a/src/ios/ELCImagePicker/Resources/Overlay.png b/src/ios/ELCImagePicker/Resources/Overlay.png deleted file mode 100644 index a86f47f3a8a9fdf5f80ef3d34e79a1ba20bd1fe6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2719 zcmV;Q3Sjk#P)002t}1^@s6I8J)%0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU+K}keGRCwC#oNH_x)fLD8vpf5kecFz_ zw%1uZvE$GX0;wS+Z46QqkV0D^B9vCB@S&6Ieur_W5fv-d7M%OdBJ3eRc&*ydT^;#&G z%Rd3&r>?+ipVZvc7ex9JtaJ<3`C-|_3M8im>%6VZd~6nn&)zIp7Ay;v1Khs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5pEKRgg!AfrS_dZEgv~@BteViWPN@8LUT)Vx~;V>)z;Rw5DteG zc0rC;%dE=Wr#rkGKq=nFhpD_#H#s%wnVgvP(KRqXKkvd%UN&xms^{+Xd zPR%2E)IcyGQ^w0hRz@-79!&fdwmj`y3{d9*X!;@kw;FD&qiK>ECMFOD2 zVlgR^Ot`ZPS(mKHyv<^(e2*@I~NB^A#y36@$TGkzCY(#BR4N zM&XlSv584WrDnp$lcPy8IDt~VKp;TwsgVn!pcFKQwfq-D7?#WJ(#aKh?FZ_1%6c{e zE}jPzGg28=y0XqR?cXWoNfIo+3IqdWB|=aO8oxnP+16QlZqW)CuZzp5Pf=m~1>FA# ZFaY6KNbr3Qoq7NO002ovPDHLkV1fd)L&*RD diff --git a/src/ios/ELCImagePicker/Resources/Overlay@2x.png b/src/ios/ELCImagePicker/Resources/Overlay@2x.png deleted file mode 100644 index a6fd78c57b22523c5841e6efdfcc3d7a381ff438..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6568 zcmds6^;Z0LUOUb1A-uC1kwzx$xA^u3Jgs~7SRzlC2PiM*gQ{{20f zV%gv#??xumuYC0=d=ikel~sqOL_u#j7&iF^T>9imY540;G7fr#>>2}uv!84w928z= zrD!uXpSDs)T3eUJv(h`qxj6eLfs7~PJ|)?iFN?Tc1^X_ub|pQr?r64II6CtD7MQiw z6&M_f30}Eb4!)2ej{2M)j+X5Au++Ki3HPqq+Pnh*Bhgk!BT`^2+Ms@3wCb5O?XlGyRu)8zs@yXObAx0Bo8MTDcPr}a zb9Jd)Q;Rc0^0{NMhWF318jn2Mc8&mt>GJ&+H*&Z!`RwlrIW(qN+Mt>!h3mqd_QRCC zBm|WZE){Cir$ZyL|541hpG6<~ZvZGxIZs(EYox&QSHmwJ+BO(t>q>s~vD7IWce-Tj zs-Z;S>KAA~?CrZ4{k7e|ln#yrsZVLRz@nh%i3M zRBxw#_nJADDlOZeR55phmwuU&*7OHVAKOf^yNj`)IPt zM}1k-!Bw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PS+xi|+xCwsXKBv|^UWik(C-M57{qNM(pVMSpAjYDzB0?L%fmpQ-^=#Ss%>`? zK3t%dwz1rC%QQ;8_6Sc9iB<9!b{gyI)EGY8{*_G0m3x=7x!)=!2{f3K`}sxWBXO0q@5=SJ55`Cs g();ECHa=F@%55~2^GW{w*9+DwCCwK#3KkLn13kuh0RR91 From 924651f11f3fc59064d63ae1ff431f146ceef6f3 Mon Sep 17 00:00:00 2001 From: hanssens Date: Wed, 19 Aug 2015 22:43:31 +0200 Subject: [PATCH 04/10] Added the GMImagePicker - See also https://github.com/guillermomuntaner/GMImagePicker --- .../AFNetworking/AFHTTPRequestOperation.h | 67 + .../AFNetworking/AFHTTPRequestOperation.m | 206 +++ .../AFHTTPRequestOperationManager.h | 308 ++++ .../AFHTTPRequestOperationManager.m | 253 ++++ .../AFNetworking/AFHTTPSessionManager.h | 238 +++ .../AFNetworking/AFHTTPSessionManager.m | 321 ++++ .../AFNetworkReachabilityManager.h | 193 +++ .../AFNetworkReachabilityManager.m | 259 ++++ .../AFNetworking/AFNetworking/AFNetworking.h | 44 + .../AFNetworking/AFSecurityPolicy.h | 143 ++ .../AFNetworking/AFSecurityPolicy.m | 320 ++++ .../AFNetworking/AFURLConnectionOperation.h | 328 ++++ .../AFNetworking/AFURLConnectionOperation.m | 786 ++++++++++ .../AFNetworking/AFURLRequestSerialization.h | 453 ++++++ .../AFNetworking/AFURLRequestSerialization.m | 1335 +++++++++++++++++ .../AFNetworking/AFURLResponseSerialization.h | 302 ++++ .../AFNetworking/AFURLResponseSerialization.m | 793 ++++++++++ .../AFNetworking/AFURLSessionManager.h | 529 +++++++ .../AFNetworking/AFURLSessionManager.m | 1036 +++++++++++++ src/ios/GMImagePicker/AFNetworking/LICENSE | 19 + src/ios/GMImagePicker/AFNetworking/README.md | 383 +++++ .../AFNetworkActivityIndicatorManager.h | 76 + .../AFNetworkActivityIndicatorManager.m | 171 +++ .../UIActivityIndicatorView+AFNetworking.h | 64 + .../UIActivityIndicatorView+AFNetworking.m | 97 ++ .../UIAlertView+AFNetworking.h | 96 ++ .../UIAlertView+AFNetworking.m | 111 ++ .../UIButton+AFNetworking.h | 179 +++ .../UIButton+AFNetworking.m | 262 ++++ .../UIImageView+AFNetworking.h | 143 ++ .../UIImageView+AFNetworking.m | 216 +++ .../UIKit+AFNetworking/UIKit+AFNetworking.h | 38 + .../UIProgressView+AFNetworking.h | 88 ++ .../UIProgressView+AFNetworking.m | 183 +++ .../UIRefreshControl+AFNetworking.h | 64 + .../UIRefreshControl+AFNetworking.m | 95 ++ .../UIWebView+AFNetworking.h | 83 + .../UIWebView+AFNetworking.m | 151 ++ .../Base.lproj/GMImagePicker.strings | Bin 0 -> 1628 bytes src/ios/GMImagePicker/GMAlbumsViewCell.h | 33 + src/ios/GMImagePicker/GMAlbumsViewCell.m | 173 +++ .../GMImagePicker/GMAlbumsViewController.h | 32 + .../GMImagePicker/GMAlbumsViewController.m | 445 ++++++ src/ios/GMImagePicker/GMEmptyFolder@1x.png | Bin 0 -> 2932 bytes src/ios/GMImagePicker/GMEmptyFolder@2x.png | Bin 0 -> 3077 bytes src/ios/GMImagePicker/GMFetchItem.h | 26 + src/ios/GMImagePicker/GMFetchItem.m | 32 + src/ios/GMImagePicker/GMGridViewCell.h | 40 + src/ios/GMImagePicker/GMGridViewCell.m | 217 +++ src/ios/GMImagePicker/GMGridViewController.h | 24 + src/ios/GMImagePicker/GMGridViewController.m | 764 ++++++++++ .../GMImagePicker/GMImagePickerController.h | 238 +++ .../GMImagePicker/GMImagePickerController.m | 236 +++ src/ios/GMImagePicker/GMPHAsset.h | 36 + src/ios/GMImagePicker/GMPHAsset.m | 21 + src/ios/GMImagePicker/GMSelected.png | Bin 0 -> 2141 bytes src/ios/GMImagePicker/GMSelected@2x.png | Bin 0 -> 3543 bytes src/ios/GMImagePicker/GMVideoIcon.png | Bin 0 -> 158 bytes src/ios/GMImagePicker/GMVideoIcon@2x.png | Bin 0 -> 194 bytes src/ios/GMImagePicker/PSYBlockTimer.h | 32 + src/ios/GMImagePicker/PSYBlockTimer.m | 57 + .../GMImagePicker/UIImage+fixOrientation.h | 5 + .../GMImagePicker/UIImage+fixOrientation.m | 15 + .../ca.lproj/GMImagePicker.strings | Bin 0 -> 1682 bytes .../de.lproj/GMImagePicker.strings | Bin 0 -> 1668 bytes .../en.lproj/GMImagePicker.strings | Bin 0 -> 1628 bytes .../es.lproj/GMImagePicker.strings | Bin 0 -> 1610 bytes .../fr.lproj/GMImagePicker.strings | Bin 0 -> 1698 bytes .../it.lproj/GMImagePicker.strings | Bin 0 -> 1656 bytes .../mrprogress/Blur/MRBlurView.h | 23 + .../mrprogress/Blur/MRBlurView.m | 196 +++ .../mrprogress/Blur/UIImage+MRImageEffects.h | 124 ++ .../mrprogress/Blur/UIImage+MRImageEffects.m | 238 +++ .../Components/MRActivityIndicatorView.h | 64 + .../Components/MRActivityIndicatorView.m | 217 +++ .../Components/MRCircularProgressView.h | 65 + .../Components/MRCircularProgressView.m | 272 ++++ .../mrprogress/Components/MRIconView.h | 53 + .../mrprogress/Components/MRIconView.m | 140 ++ .../Components/MRNavigationBarProgressView.h | 65 + .../Components/MRNavigationBarProgressView.m | 254 ++++ .../Components/MRProgressOverlayView.h | 242 +++ .../Components/MRProgressOverlayView.m | 837 +++++++++++ .../mrprogress/Components/MRProgressView.h | 44 + .../mrprogress/Components/MRProgressView.m | 21 + .../mrprogress/Components/MRStopButton.h | 47 + .../mrprogress/Components/MRStopButton.m | 111 ++ .../mrprogress/Components/MRStopableView.h | 34 + src/ios/GMImagePicker/mrprogress/MRProgress.h | 52 + .../MRActivityIndicatorView+AFNetworking.h | 71 + .../MRActivityIndicatorView+AFNetworking.m | 51 + .../MRProgressOverlayView+AFNetworking.h | 65 + .../MRProgressOverlayView+AFNetworking.m | 315 ++++ .../MRProgressView+AFNetworking.h | 95 ++ .../MRProgressView+AFNetworking.m | 56 + .../mrprogress/Utils/MRMessageInterceptor.h | 38 + .../mrprogress/Utils/MRMessageInterceptor.m | 42 + .../mrprogress/Utils/MRMethodCopier.h | 44 + .../mrprogress/Utils/MRMethodCopier.m | 36 + .../mrprogress/Utils/MRProgressHelper.h | 50 + .../mrprogress/Utils/MRWeakProxy.h | 31 + .../mrprogress/Utils/MRWeakProxy.m | 32 + .../pt.lproj/GMImagePicker.strings | Bin 0 -> 1586 bytes 103 files changed, 16884 insertions(+) create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.m create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.h create mode 100644 src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.m create mode 100644 src/ios/GMImagePicker/AFNetworking/LICENSE create mode 100644 src/ios/GMImagePicker/AFNetworking/README.md create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h create mode 100644 src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m create mode 100755 src/ios/GMImagePicker/Base.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/GMAlbumsViewCell.h create mode 100755 src/ios/GMImagePicker/GMAlbumsViewCell.m create mode 100755 src/ios/GMImagePicker/GMAlbumsViewController.h create mode 100755 src/ios/GMImagePicker/GMAlbumsViewController.m create mode 100755 src/ios/GMImagePicker/GMEmptyFolder@1x.png create mode 100755 src/ios/GMImagePicker/GMEmptyFolder@2x.png create mode 100644 src/ios/GMImagePicker/GMFetchItem.h create mode 100644 src/ios/GMImagePicker/GMFetchItem.m create mode 100755 src/ios/GMImagePicker/GMGridViewCell.h create mode 100755 src/ios/GMImagePicker/GMGridViewCell.m create mode 100755 src/ios/GMImagePicker/GMGridViewController.h create mode 100755 src/ios/GMImagePicker/GMGridViewController.m create mode 100755 src/ios/GMImagePicker/GMImagePickerController.h create mode 100755 src/ios/GMImagePicker/GMImagePickerController.m create mode 100644 src/ios/GMImagePicker/GMPHAsset.h create mode 100644 src/ios/GMImagePicker/GMPHAsset.m create mode 100755 src/ios/GMImagePicker/GMSelected.png create mode 100755 src/ios/GMImagePicker/GMSelected@2x.png create mode 100755 src/ios/GMImagePicker/GMVideoIcon.png create mode 100755 src/ios/GMImagePicker/GMVideoIcon@2x.png create mode 100644 src/ios/GMImagePicker/PSYBlockTimer.h create mode 100644 src/ios/GMImagePicker/PSYBlockTimer.m create mode 100644 src/ios/GMImagePicker/UIImage+fixOrientation.h create mode 100644 src/ios/GMImagePicker/UIImage+fixOrientation.m create mode 100755 src/ios/GMImagePicker/ca.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/de.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/en.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/es.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/fr.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/it.lproj/GMImagePicker.strings create mode 100755 src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.h create mode 100755 src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRIconView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRIconView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRProgressView.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRProgressView.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRStopButton.h create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRStopButton.m create mode 100755 src/ios/GMImagePicker/mrprogress/Components/MRStopableView.h create mode 100755 src/ios/GMImagePicker/mrprogress/MRProgress.h create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.h create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.m create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.h create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.m create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.h create mode 100755 src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.m create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.h create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.m create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.h create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.m create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRProgressHelper.h create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.h create mode 100755 src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.m create mode 100755 src/ios/GMImagePicker/pt.lproj/GMImagePicker.strings diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.h new file mode 100644 index 00000000..dfa82f66 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.h @@ -0,0 +1,67 @@ +// AFHTTPRequestOperation.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFURLConnectionOperation.h" + +/** + `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. + */ +@interface AFHTTPRequestOperation : AFURLConnectionOperation + +///------------------------------------------------ +/// @name Getting HTTP URL Connection Information +///------------------------------------------------ + +/** + The last HTTP response received by the operation's connection. + */ +@property (readonly, nonatomic, strong) NSHTTPURLResponse *response; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. + + @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error. + */ +@property (readonly, nonatomic, strong) id responseObject; + +///----------------------------------------------------------- +/// @name Setting Completion Block Success / Failure Callbacks +///----------------------------------------------------------- + +/** + Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. + + This method should be overridden in subclasses in order to specify the response object passed into the success block. + + @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. + @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. + */ +- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.m new file mode 100644 index 00000000..1de5812c --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperation.m @@ -0,0 +1,206 @@ +// AFHTTPRequestOperation.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFHTTPRequestOperation.h" + +static dispatch_queue_t http_request_operation_processing_queue() { + static dispatch_queue_t af_http_request_operation_processing_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_http_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.http-request.processing", DISPATCH_QUEUE_CONCURRENT); + }); + + return af_http_request_operation_processing_queue; +} + +static dispatch_group_t http_request_operation_completion_group() { + static dispatch_group_t af_http_request_operation_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_http_request_operation_completion_group = dispatch_group_create(); + }); + + return af_http_request_operation_completion_group; +} + +#pragma mark - + +@interface AFURLConnectionOperation () +@property (readwrite, nonatomic, strong) NSURLRequest *request; +@property (readwrite, nonatomic, strong) NSURLResponse *response; +@end + +@interface AFHTTPRequestOperation () +@property (readwrite, nonatomic, strong) NSHTTPURLResponse *response; +@property (readwrite, nonatomic, strong) id responseObject; +@property (readwrite, nonatomic, strong) NSError *responseSerializationError; +@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; +@end + +@implementation AFHTTPRequestOperation +@dynamic lock; + +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { + self = [super initWithRequest:urlRequest]; + if (!self) { + return nil; + } + + self.responseSerializer = [AFHTTPResponseSerializer serializer]; + + return self; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + [self.lock lock]; + _responseSerializer = responseSerializer; + self.responseObject = nil; + self.responseSerializationError = nil; + [self.lock unlock]; +} + +- (id)responseObject { + [self.lock lock]; + if (!_responseObject && [self isFinished] && !self.error) { + NSError *error = nil; + self.responseObject = [self.responseSerializer responseObjectForResponse:self.response data:self.responseData error:&error]; + if (error) { + self.responseSerializationError = error; + } + } + [self.lock unlock]; + + return _responseObject; +} + +- (NSError *)error { + if (_responseSerializationError) { + return _responseSerializationError; + } else { + return [super error]; + } +} + +#pragma mark - AFHTTPRequestOperation + +- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wgnu" + self.completionBlock = ^{ + if (self.completionGroup) { + dispatch_group_enter(self.completionGroup); + } + + dispatch_async(http_request_operation_processing_queue(), ^{ + if (self.error) { + if (failure) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(self, self.error); + }); + } + } else { + id responseObject = self.responseObject; + if (self.error) { + if (failure) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(self, self.error); + }); + } + } else { + if (success) { + dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ + success(self, responseObject); + }); + } + } + } + + if (self.completionGroup) { + dispatch_group_leave(self.completionGroup); + } + }); + }; +#pragma clang diagnostic pop +} + +#pragma mark - AFURLRequestOperation + +- (void)pause { + [super pause]; + + u_int64_t offset = 0; + if ([self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey]) { + offset = [(NSNumber *)[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedLongLongValue]; + } else { + offset = [(NSData *)[self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey] length]; + } + + NSMutableURLRequest *mutableURLRequest = [self.request mutableCopy]; + if ([self.response respondsToSelector:@selector(allHeaderFields)] && [[self.response allHeaderFields] valueForKey:@"ETag"]) { + [mutableURLRequest setValue:[[self.response allHeaderFields] valueForKey:@"ETag"] forHTTPHeaderField:@"If-Range"]; + } + [mutableURLRequest setValue:[NSString stringWithFormat:@"bytes=%llu-", offset] forHTTPHeaderField:@"Range"]; + self.request = mutableURLRequest; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestOperation *operation = [super copyWithZone:zone]; + + operation.responseSerializer = [self.responseSerializer copyWithZone:zone]; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h new file mode 100644 index 00000000..9f390294 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h @@ -0,0 +1,308 @@ +// AFHTTPRequestOperationManager.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +#import "AFHTTPRequestOperation.h" +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" +#import "AFSecurityPolicy.h" +#import "AFNetworkReachabilityManager.h" + +/** + `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. + + ## Subclassing Notes + + Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. + + For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect. + + ## Methods to Override + + To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`. + + ## Serialization + + Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. + + Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` + + ## URL Construction Using Relative Paths + + For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. + + Below are a few examples of how `baseURL` and relative paths interact: + + NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; + [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz + [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo + [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ + [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ + + Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. + + ## Network Reachability Monitoring + + Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. + + ## NSSecureCoding & NSCopying Caveats + + `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however: + + - Archives and copies of HTTP clients will be initialized with an empty operation queue. + - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set. + */ +@interface AFHTTPRequestOperationManager : NSObject + +/** + The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + */ +@property (readonly, nonatomic, strong) NSURL *baseURL; + +/** + Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. + + @warning `requestSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + The operation queue on which request operations are scheduled and run. + */ +@property (nonatomic, strong) NSOperationQueue *operationQueue; + +///------------------------------- +/// @name Managing URL Credentials +///------------------------------- + +/** + Whether request operations should consult the credential storage for authenticating the connection. `YES` by default. + + @see AFURLConnectionOperation -shouldUseCredentialStorage + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + The credential used by request operations for authentication challenges. + + @see AFURLConnectionOperation -credential + */ +@property (nonatomic, strong) NSURLCredential *credential; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///------------------------------------ +/// @name Managing Network Reachability +///------------------------------------ + +/** + The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default. + */ +@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; + +///------------------------------- +/// @name Managing Callback Queues +///------------------------------- + +/** + The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used. + */ +@property (nonatomic, strong) dispatch_queue_t completionQueue; + +/** + The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used. + */ +@property (nonatomic, strong) dispatch_group_t completionGroup; + +///--------------------------------------------- +/// @name Creating and Initializing HTTP Clients +///--------------------------------------------- + +/** + Creates and returns an `AFHTTPRequestOperationManager` object. + */ ++ (instancetype)manager; + +/** + Initializes an `AFHTTPRequestOperationManager` object with the specified base URL. + + This is the designated initializer. + + @param url The base URL for the HTTP client. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(NSURL *)url; + +///--------------------------------------- +/// @name Managing HTTP Request Operations +///--------------------------------------- + +/** + Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client. + + @param request The request object to be loaded asynchronously during execution of the operation. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. + */ +- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +///--------------------------- +/// @name Making HTTP Requests +///--------------------------- + +/** + Creates and runs an `AFHTTPRequestOperation` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `PUT` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +/** + Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. + + @see -HTTPRequestOperationWithRequest:success:failure: + */ +- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; + +@end + diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m new file mode 100644 index 00000000..4ae72754 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m @@ -0,0 +1,253 @@ +// AFHTTPRequestOperationManager.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AFHTTPRequestOperationManager.h" +#import "AFHTTPRequestOperation.h" + +#import +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +@interface AFHTTPRequestOperationManager () +@property (readwrite, nonatomic, strong) NSURL *baseURL; +@end + +@implementation AFHTTPRequestOperationManager + ++ (instancetype)manager { + return [[self alloc] initWithBaseURL:nil]; +} + +- (instancetype)init { + return [self initWithBaseURL:nil]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url { + self = [super init]; + if (!self) { + return nil; + } + + // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected + if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { + url = [url URLByAppendingPathComponent:@""]; + } + + self.baseURL = url; + + self.requestSerializer = [AFHTTPRequestSerializer serializer]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + + self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; + + self.operationQueue = [[NSOperationQueue alloc] init]; + + self.shouldUseCredentialStorage = YES; + + return self; +} + +#pragma mark - + +#ifdef _SYSTEMCONFIGURATION_H +#endif + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + NSParameterAssert(requestSerializer); + + _requestSerializer = requestSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + _responseSerializer = responseSerializer; +} + +#pragma mark - + +- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + operation.responseSerializer = self.responseSerializer; + operation.shouldUseCredentialStorage = self.shouldUseCredentialStorage; + operation.credential = self.credential; + operation.securityPolicy = self.securityPolicy; + + [operation setCompletionBlockWithSuccess:success failure:failure]; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +#pragma mark - + +- (AFHTTPRequestOperation *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"GET" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"HEAD" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *requestOperation, __unused id responseObject) { + if (success) { + success(requestOperation); + } + } failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"PUT" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"PATCH" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success + failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure +{ + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"DELETE" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:nil]; + AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; + + [self.operationQueue addOperation:operation]; + + return operation; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.operationQueue]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURL *baseURL = [decoder decodeObjectForKey:NSStringFromSelector(@selector(baseURL))]; + + self = [self initWithBaseURL:baseURL]; + if (!self) { + return nil; + } + + self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; + [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestOperationManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL]; + + HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; + HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; + + return HTTPClient; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.h new file mode 100644 index 00000000..a84fcc55 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.h @@ -0,0 +1,238 @@ +// AFHTTPSessionManager.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +#import "AFURLSessionManager.h" + +/** + `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. + + ## Subclassing Notes + + Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. + + For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect. + + ## Methods to Override + + To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`. + + ## Serialization + + Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. + + Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` + + ## URL Construction Using Relative Paths + + For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. + + Below are a few examples of how `baseURL` and relative paths interact: + + NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; + [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz + [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo + [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ + [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ + + Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. + */ + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +@interface AFHTTPSessionManager : AFURLSessionManager + +/** + The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + */ +@property (readonly, nonatomic, strong) NSURL *baseURL; + +/** + Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. + + @warning `requestSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns an `AFHTTPSessionManager` object. + */ ++ (instancetype)manager; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + @param url The base URL for the HTTP client. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(NSURL *)url; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + This is the designated initializer. + + @param url The base URL for the HTTP client. + @param configuration The configuration used to create the managed session. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(NSURL *)url + sessionConfiguration:(NSURLSessionConfiguration *)configuration; + +///--------------------------- +/// @name Making HTTP Requests +///--------------------------- + +/** + Creates and runs an `NSURLSessionDataTask` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PUT` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.m new file mode 100644 index 00000000..6413297d --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFHTTPSessionManager.m @@ -0,0 +1,321 @@ +// AFHTTPSessionManager.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFHTTPSessionManager.h" + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" + +#import +#import + +#ifdef _SYSTEMCONFIGURATION_H +#import +#import +#import +#import +#import +#endif + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +@interface AFHTTPSessionManager () +@property (readwrite, nonatomic, strong) NSURL *baseURL; +@end + +@implementation AFHTTPSessionManager + ++ (instancetype)manager { + return [[[self class] alloc] initWithBaseURL:nil]; +} + +- (instancetype)init { + return [self initWithBaseURL:nil]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url { + return [self initWithBaseURL:url sessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + return [self initWithBaseURL:nil sessionConfiguration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + sessionConfiguration:(NSURLSessionConfiguration *)configuration +{ + self = [super initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected + if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { + url = [url URLByAppendingPathComponent:@""]; + } + + self.baseURL = url; + + self.requestSerializer = [AFHTTPRequestSerializer serializer]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + return self; +} + +#pragma mark - + +#ifdef _SYSTEMCONFIGURATION_H +#endif + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + NSParameterAssert(requestSerializer); + + _requestSerializer = requestSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + [super setResponseSerializer:responseSerializer]; +} + +#pragma mark - + +- (NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(NSURLSessionDataTask *task, __unused id responseObject) { + if (success) { + success(task); + } + } failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + constructingBodyWithBlock:(void (^)(id formData))block + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(task, error); + } + } else { + if (success) { + success(task, responseObject); + } + } + }]; + + [task resume]; + + return task; +} + +- (NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + success:(void (^)(NSURLSessionDataTask *, id))success + failure:(void (^)(NSURLSessionDataTask *, NSError *))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; + if (serializationError) { + if (failure) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); +#pragma clang diagnostic pop + } + + return nil; + } + + __block NSURLSessionDataTask *dataTask = nil; + dataTask = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(dataTask, error); + } + } else { + if (success) { + success(dataTask, responseObject); + } + } + }]; + + return dataTask; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + if (!configuration) { + NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@"identifier"]; + if (configurationIdentifier) { +#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1100) + configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier]; +#else + configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:configurationIdentifier]; +#endif + } + } + + self = [self initWithBaseURL:baseURL sessionConfiguration:configuration]; + if (!self) { + return nil; + } + + self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; + if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; + } else { + [coder encodeObject:self.session.configuration.identifier forKey:@"identifier"]; + } + [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; + + HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; + HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; + + return HTTPClient; +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h new file mode 100644 index 00000000..5e610d88 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h @@ -0,0 +1,193 @@ +// AFNetworkReachabilityManager.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { + AFNetworkReachabilityStatusUnknown = -1, + AFNetworkReachabilityStatusNotReachable = 0, + AFNetworkReachabilityStatusReachableViaWWAN = 1, + AFNetworkReachabilityStatusReachableViaWiFi = 2, +}; + +/** + `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + + Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. + + See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/) + + @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. + */ +@interface AFNetworkReachabilityManager : NSObject + +/** + The current network reachability status. + */ +@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; + +/** + Whether or not the network is currently reachable. + */ +@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable; + +/** + Whether or not the network is currently reachable via WWAN. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN; + +/** + Whether or not the network is currently reachable via WiFi. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Returns the shared network reachability manager. + */ ++ (instancetype)sharedManager; + +/** + Creates and returns a network reachability manager for the specified domain. + + @param domain The domain used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified domain. + */ ++ (instancetype)managerForDomain:(NSString *)domain; + +/** + Creates and returns a network reachability manager for the socket address. + + @param address The socket address (`sockaddr_in`) used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified socket address. + */ ++ (instancetype)managerForAddress:(const void *)address; + +/** + Initializes an instance of a network reachability manager from the specified reachability object. + + @param reachability The reachability object to monitor. + + @return An initialized network reachability manager, actively monitoring the specified reachability. + */ +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability; + +///-------------------------------------------------- +/// @name Starting & Stopping Reachability Monitoring +///-------------------------------------------------- + +/** + Starts monitoring for changes in network reachability status. + */ +- (void)startMonitoring; + +/** + Stops monitoring for changes in network reachability status. + */ +- (void)stopMonitoring; + +///------------------------------------------------- +/// @name Getting Localized Reachability Description +///------------------------------------------------- + +/** + Returns a localized string representation of the current network reachability status. + */ +- (NSString *)localizedNetworkReachabilityStatusString; + +///--------------------------------------------------- +/// @name Setting Network Reachability Change Callback +///--------------------------------------------------- + +/** + Sets a callback to be executed when the network availability of the `baseURL` host changes. + + @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. + */ +- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Network Reachability + + The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses. + + enum { + AFNetworkReachabilityStatusUnknown, + AFNetworkReachabilityStatusNotReachable, + AFNetworkReachabilityStatusReachableViaWWAN, + AFNetworkReachabilityStatusReachableViaWiFi, + } + + `AFNetworkReachabilityStatusUnknown` + The `baseURL` host reachability is not known. + + `AFNetworkReachabilityStatusNotReachable` + The `baseURL` host cannot be reached. + + `AFNetworkReachabilityStatusReachableViaWWAN` + The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS. + + `AFNetworkReachabilityStatusReachableViaWiFi` + The `baseURL` host can be reached via a Wi-Fi connection. + + ### Keys for Notification UserInfo Dictionary + + Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification. + + `AFNetworkingReachabilityNotificationStatusItem` + A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification. + The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status. + */ + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when network reachability changes. + This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability. + + @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). + */ +extern NSString * const AFNetworkingReachabilityDidChangeNotification; +extern NSString * const AFNetworkingReachabilityNotificationStatusItem; + +///-------------------- +/// @name Functions +///-------------------- + +/** + Returns a localized string representation of an `AFNetworkReachabilityStatus` value. + */ +extern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m new file mode 100644 index 00000000..1da14828 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m @@ -0,0 +1,259 @@ +// AFNetworkReachabilityManager.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkReachabilityManager.h" + +#import +#import +#import +#import +#import + +NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change"; +NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem"; + +typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); + +typedef NS_ENUM(NSUInteger, AFNetworkReachabilityAssociation) { + AFNetworkReachabilityForAddress = 1, + AFNetworkReachabilityForAddressPair = 2, + AFNetworkReachabilityForName = 3, +}; + +NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusNotReachable: + return NSLocalizedStringFromTable(@"Not Reachable", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWWAN: + return NSLocalizedStringFromTable(@"Reachable via WWAN", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWiFi: + return NSLocalizedStringFromTable(@"Reachable via WiFi", @"AFNetworking", nil); + case AFNetworkReachabilityStatusUnknown: + default: + return NSLocalizedStringFromTable(@"Unknown", @"AFNetworking", nil); + } +} + +static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) { + BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); + BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); + BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)); + BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0); + BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction)); + + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown; + if (isNetworkReachable == NO) { + status = AFNetworkReachabilityStatusNotReachable; + } +#if TARGET_OS_IPHONE + else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { + status = AFNetworkReachabilityStatusReachableViaWWAN; + } +#endif + else { + status = AFNetworkReachabilityStatusReachableViaWiFi; + } + + return status; +} + +static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); + AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info; + if (block) { + block(status); + } + + + dispatch_async(dispatch_get_main_queue(), ^{ + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }]; + }); + +} + +static const void * AFNetworkReachabilityRetainCallback(const void *info) { + return Block_copy(info); +} + +static void AFNetworkReachabilityReleaseCallback(const void *info) { + if (info) { + Block_release(info); + } +} + +@interface AFNetworkReachabilityManager () +@property (readwrite, nonatomic, assign) SCNetworkReachabilityRef networkReachability; +@property (readwrite, nonatomic, assign) AFNetworkReachabilityAssociation networkReachabilityAssociation; +@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; +@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; +@end + +@implementation AFNetworkReachabilityManager + ++ (instancetype)sharedManager { + static AFNetworkReachabilityManager *_sharedManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + struct sockaddr_in address; + bzero(&address, sizeof(address)); + address.sin_len = sizeof(address); + address.sin_family = AF_INET; + + _sharedManager = [self managerForAddress:&address]; + }); + + return _sharedManager; +} + ++ (instancetype)managerForDomain:(NSString *)domain { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); + + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + manager.networkReachabilityAssociation = AFNetworkReachabilityForName; + + return manager; +} + ++ (instancetype)managerForAddress:(const void *)address { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); + + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress; + + return manager; +} + +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { + self = [super init]; + if (!self) { + return nil; + } + + self.networkReachability = reachability; + self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; + + return self; +} + +- (void)dealloc { + [self stopMonitoring]; + + if (_networkReachability) { + CFRelease(_networkReachability); + _networkReachability = NULL; + } +} + +#pragma mark - + +- (BOOL)isReachable { + return [self isReachableViaWWAN] || [self isReachableViaWiFi]; +} + +- (BOOL)isReachableViaWWAN { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN; +} + +- (BOOL)isReachableViaWiFi { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi; +} + +#pragma mark - + +- (void)startMonitoring { + [self stopMonitoring]; + + if (!self.networkReachability) { + return; + } + + __weak __typeof(self)weakSelf = self; + AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + + strongSelf.networkReachabilityStatus = status; + if (strongSelf.networkReachabilityStatusBlock) { + strongSelf.networkReachabilityStatusBlock(status); + } + + }; + + SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL}; + SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); + SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); + + switch (self.networkReachabilityAssociation) { + case AFNetworkReachabilityForName: + break; + case AFNetworkReachabilityForAddress: + case AFNetworkReachabilityForAddressPair: + default: { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ + SCNetworkReachabilityFlags flags; + SCNetworkReachabilityGetFlags(self.networkReachability, &flags); + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); + dispatch_async(dispatch_get_main_queue(), ^{ + callback(status); + + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }]; + + + }); + }); + } + break; + } +} + +- (void)stopMonitoring { + if (!self.networkReachability) { + return; + } + + SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); +} + +#pragma mark - + +- (NSString *)localizedNetworkReachabilityStatusString { + return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus); +} + +#pragma mark - + +- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block { + self.networkReachabilityStatusBlock = block; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { + if ([key isEqualToString:@"reachable"] || [key isEqualToString:@"reachableViaWWAN"] || [key isEqualToString:@"reachableViaWiFi"]) { + return [NSSet setWithObject:@"networkReachabilityStatus"]; + } + + return [super keyPathsForValuesAffectingValueForKey:key]; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworking.h new file mode 100644 index 00000000..68273da5 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFNetworking.h @@ -0,0 +1,44 @@ +// AFNetworking.h +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +#ifndef _AFNETWORKING_ + #define _AFNETWORKING_ + + #import "AFURLRequestSerialization.h" + #import "AFURLResponseSerialization.h" + #import "AFSecurityPolicy.h" + #import "AFNetworkReachabilityManager.h" + + #import "AFURLConnectionOperation.h" + #import "AFHTTPRequestOperation.h" + #import "AFHTTPRequestOperationManager.h" + +#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ + ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) + #import "AFURLSessionManager.h" + #import "AFHTTPSessionManager.h" +#endif + +#endif /* _AFNETWORKING_ */ diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.h new file mode 100644 index 00000000..b86e76b4 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.h @@ -0,0 +1,143 @@ +// AFSecurity.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, +}; + +/** + `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + + Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + */ +@interface AFSecurityPolicy : NSObject + +/** + The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. + */ +@property (nonatomic, assign) AFSSLPinningMode SSLPinningMode; + +/** + Whether to evaluate an entire SSL certificate chain, or just the leaf certificate. Defaults to `YES`. + */ +@property (nonatomic, assign) BOOL validatesCertificateChain; + +/** + The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle. + */ +@property (nonatomic, strong) NSArray *pinnedCertificates; + +/** + Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL allowInvalidCertificates; + +/** + Whether or not to validate the domain name in the certificates CN field. Defaults to `YES` for `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate`, otherwise `NO`. + */ +@property (nonatomic, assign) BOOL validatesDomainName; + +///----------------------------------------- +/// @name Getting Specific Security Policies +///----------------------------------------- + +/** + Returns the shared default security policy, which does not accept invalid certificates, and does not validate against pinned certificates or public keys. + + @return The default security policy. + */ ++ (instancetype)defaultPolicy; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a security policy with the specified pinning mode. + + @param pinningMode The SSL pinning mode. + + @return A new security policy. + */ ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; + +///------------------------------ +/// @name Evaluating Server Trust +///------------------------------ + +/** + Whether or not the specified server trust should be accepted, based on the security policy. + + This method should be used when responding to an authentication challenge from a server. + + @param serverTrust The X.509 certificate trust of the server. + + @return Whether or not to trust the server. + + @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`. + */ +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE; + +/** + Whether or not the specified server trust should be accepted, based on the security policy. + + This method should be used when responding to an authentication challenge from a server. + + @param serverTrust The X.509 certificate trust of the server. + @param domain The domain of serverTrust. If `nil`, the domain will not be validated. + + @return Whether or not to trust the server. + */ +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(NSString *)domain; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## SSL Pinning Modes + + The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes. + + enum { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, + } + + `AFSSLPinningModeNone` + Do not used pinned certificates to validate servers. + + `AFSSLPinningModePublicKey` + Validate host certificates against public keys of pinned certificates. + + `AFSSLPinningModeCertificate` + Validate host certificates against pinned certificates. +*/ diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.m new file mode 100644 index 00000000..f11caaa6 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFSecurityPolicy.m @@ -0,0 +1,320 @@ +// AFSecurity.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFSecurityPolicy.h" + +// Equivalent of macro in , without causing compiler warning: +// "'DebugAssert' is deprecated: first deprecated in OS X 10.8" +#ifndef AF_Require + #define AF_Require(assertion, exceptionLabel) \ + do { \ + if (__builtin_expect(!(assertion), 0)) { \ + goto exceptionLabel; \ + } \ + } while (0) +#endif + +#ifndef AF_Require_noErr + #define AF_Require_noErr(errorCode, exceptionLabel) \ + do { \ + if (__builtin_expect(0 != (errorCode), 0)) { \ + goto exceptionLabel; \ + } \ + } while (0) +#endif + +#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +static NSData * AFSecKeyGetData(SecKeyRef key) { + CFDataRef data = NULL; + + AF_Require_noErr(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out); + + return (__bridge_transfer NSData *)data; + +_out: + if (data) { + CFRelease(data); + } + + return nil; +} +#endif + +static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + return [(__bridge id)key1 isEqual:(__bridge id)key2]; +#else + return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; +#endif +} + +static id AFPublicKeyForCertificate(NSData *certificate) { + id allowedPublicKey = nil; + SecCertificateRef allowedCertificate; + SecCertificateRef allowedCertificates[1]; + CFArrayRef tempCertificates = nil; + SecPolicyRef policy = nil; + SecTrustRef allowedTrust = nil; + SecTrustResultType result; + + allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate); + AF_Require(allowedCertificate != NULL, _out); + + allowedCertificates[0] = allowedCertificate; + tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL); + + policy = SecPolicyCreateBasicX509(); + AF_Require_noErr(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out); + AF_Require_noErr(SecTrustEvaluate(allowedTrust, &result), _out); + + allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust); + +_out: + if (allowedTrust) { + CFRelease(allowedTrust); + } + + if (policy) { + CFRelease(policy); + } + + if (tempCertificates) { + CFRelease(tempCertificates); + } + + if (allowedCertificate) { + CFRelease(allowedCertificate); + } + + return allowedPublicKey; +} + +static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) { + BOOL isValid = NO; + SecTrustResultType result; + AF_Require_noErr(SecTrustEvaluate(serverTrust, &result), _out); + + isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); + +_out: + return isValid; +} + +static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) { + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]; + } + + return [NSArray arrayWithArray:trustChain]; +} + +static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { + SecPolicyRef policy = SecPolicyCreateBasicX509(); + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + + SecCertificateRef someCertificates[] = {certificate}; + CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL); + + SecTrustRef trust; + AF_Require_noErr(SecTrustCreateWithCertificates(certificates, policy, &trust), _out); + + SecTrustResultType result; + AF_Require_noErr(SecTrustEvaluate(trust, &result), _out); + + [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)]; + + _out: + if (trust) { + CFRelease(trust); + } + + if (certificates) { + CFRelease(certificates); + } + + continue; + } + CFRelease(policy); + + return [NSArray arrayWithArray:trustChain]; +} + +#pragma mark - + +@interface AFSecurityPolicy() +@property (readwrite, nonatomic, strong) NSArray *pinnedPublicKeys; +@end + +@implementation AFSecurityPolicy + ++ (NSArray *)defaultPinnedCertificates { + static NSArray *_defaultPinnedCertificates = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; + + NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]]; + for (NSString *path in paths) { + NSData *certificateData = [NSData dataWithContentsOfFile:path]; + [certificates addObject:certificateData]; + } + + _defaultPinnedCertificates = [[NSArray alloc] initWithArray:certificates]; + }); + + return _defaultPinnedCertificates; +} + ++ (instancetype)defaultPolicy { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = AFSSLPinningModeNone; + + return securityPolicy; +} + ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = pinningMode; + securityPolicy.validatesDomainName = YES; + [securityPolicy setPinnedCertificates:[self defaultPinnedCertificates]]; + + return securityPolicy; +} + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + self.validatesCertificateChain = YES; + + return self; +} + +#pragma mark - + +- (void)setPinnedCertificates:(NSArray *)pinnedCertificates { + _pinnedCertificates = pinnedCertificates; + + if (self.pinnedCertificates) { + NSMutableArray *mutablePinnedPublicKeys = [NSMutableArray arrayWithCapacity:[self.pinnedCertificates count]]; + for (NSData *certificate in self.pinnedCertificates) { + id publicKey = AFPublicKeyForCertificate(certificate); + if (!publicKey) { + continue; + } + [mutablePinnedPublicKeys addObject:publicKey]; + } + self.pinnedPublicKeys = [NSArray arrayWithArray:mutablePinnedPublicKeys]; + } else { + self.pinnedPublicKeys = nil; + } +} + +#pragma mark - + +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust { + return [self evaluateServerTrust:serverTrust forDomain:nil]; +} + +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(NSString *)domain +{ + NSMutableArray *policies = [NSMutableArray array]; + if (self.validatesDomainName) { + [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; + } else { + [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()]; + } + + SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); + + if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) { + return NO; + } + + NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); + switch (self.SSLPinningMode) { + case AFSSLPinningModeNone: + return YES; + case AFSSLPinningModeCertificate: { + NSMutableArray *pinnedCertificates = [NSMutableArray array]; + for (NSData *certificateData in self.pinnedCertificates) { + [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)]; + } + SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates); + + if (!AFServerTrustIsValid(serverTrust)) { + return NO; + } + + if (!self.validatesCertificateChain) { + return YES; + } + + NSUInteger trustedCertificateCount = 0; + for (NSData *trustChainCertificate in serverCertificates) { + if ([self.pinnedCertificates containsObject:trustChainCertificate]) { + trustedCertificateCount++; + } + } + + return trustedCertificateCount == [serverCertificates count]; + } + case AFSSLPinningModePublicKey: { + NSUInteger trustedPublicKeyCount = 0; + NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); + if (!self.validatesCertificateChain && [publicKeys count] > 0) { + publicKeys = @[[publicKeys firstObject]]; + } + + for (id trustChainPublicKey in publicKeys) { + for (id pinnedPublicKey in self.pinnedPublicKeys) { + if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) { + trustedPublicKeyCount += 1; + } + } + } + + return trustedPublicKeyCount > 0 && ((self.validatesCertificateChain && trustedPublicKeyCount == [serverCertificates count]) || (!self.validatesCertificateChain && trustedPublicKeyCount >= 1)); + } + } + + return NO; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys { + return [NSSet setWithObject:@"pinnedCertificates"]; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.h new file mode 100644 index 00000000..85435564 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.h @@ -0,0 +1,328 @@ +// AFURLConnectionOperation.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" +#import "AFSecurityPolicy.h" + +/** + `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods. + + ## Subclassing Notes + + This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see "`NSURLConnection` Delegate Methods" below), or to provide additional properties and/or class constructors. + + If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes. + + ## NSURLConnection Delegate Methods + + `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods: + + - `connection:didReceiveResponse:` + - `connection:didReceiveData:` + - `connectionDidFinishLoading:` + - `connection:didFailWithError:` + - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:` + - `connection:willCacheResponse:` + - `connectionShouldUseCredentialStorage:` + - `connection:needNewBodyStream:` + - `connection:willSendRequestForAuthenticationChallenge:` + + If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. + + ## Callbacks and Completion Blocks + + The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. + + Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/). + + ## SSL Pinning + + Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle. + + SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice. + + Connections will be validated on all matching certificates with a `.cer` extension in the bundle root. + + ## App Extensions + + When using AFNetworking in an App Extension, `#define AF_APP_EXTENSIONS` to avoid using unavailable APIs. + + ## NSCoding & NSCopying Conformance + + `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind: + + ### NSCoding Caveats + + - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`. + - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged. + + ### NSCopying Caveats + + - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations. + - A copy of an operation will not include the `outputStream` of the original. + - Operation copies do not include `completionBlock`, as it often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. + */ + +@interface AFURLConnectionOperation : NSOperation + +///------------------------------- +/// @name Accessing Run Loop Modes +///------------------------------- + +/** + The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`. + */ +@property (nonatomic, strong) NSSet *runLoopModes; + +///----------------------------------------- +/// @name Getting URL Connection Information +///----------------------------------------- + +/** + The request used by the operation's connection. + */ +@property (readonly, nonatomic, strong) NSURLRequest *request; + +/** + The last response received by the operation's connection. + */ +@property (readonly, nonatomic, strong) NSURLResponse *response; + +/** + The error, if any, that occurred in the lifecycle of the request. + */ +@property (readonly, nonatomic, strong) NSError *error; + +///---------------------------- +/// @name Getting Response Data +///---------------------------- + +/** + The data received during the request. + */ +@property (readonly, nonatomic, strong) NSData *responseData; + +/** + The string representation of the response data. + */ +@property (readonly, nonatomic, copy) NSString *responseString; + +/** + The string encoding of the response. + + If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`. + */ +@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding; + +///------------------------------- +/// @name Managing URL Credentials +///------------------------------- + +/** + Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. + + This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. + + This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. + */ +@property (nonatomic, strong) NSURLCredential *credential; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used to evaluate server trust for secure connections. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///------------------------ +/// @name Accessing Streams +///------------------------ + +/** + The input stream used to read data to be sent during the request. + + This property acts as a proxy to the `HTTPBodyStream` property of `request`. + */ +@property (nonatomic, strong) NSInputStream *inputStream; + +/** + The output stream that is used to write data received until the request is finished. + + By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request, with the intermediary `outputStream` property set to `nil`. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set. + */ +@property (nonatomic, strong) NSOutputStream *outputStream; + +///--------------------------------- +/// @name Managing Callback Queues +///--------------------------------- + +/** + The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. + */ +@property (nonatomic, strong) dispatch_queue_t completionQueue; + +/** + The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. + */ +@property (nonatomic, strong) dispatch_group_t completionGroup; + +///--------------------------------------------- +/// @name Managing Request Operation Information +///--------------------------------------------- + +/** + The user info dictionary for the receiver. + */ +@property (nonatomic, strong) NSDictionary *userInfo; + +///------------------------------------------------------ +/// @name Initializing an AFURLConnectionOperation Object +///------------------------------------------------------ + +/** + Initializes and returns a newly allocated operation object with a url connection configured with the specified url request. + + This is the designated initializer. + + @param urlRequest The request object to be used by the operation connection. + */ +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest; + +///---------------------------------- +/// @name Pausing / Resuming Requests +///---------------------------------- + +/** + Pauses the execution of the request operation. + + A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect. + */ +- (void)pause; + +/** + Whether the request operation is currently paused. + + @return `YES` if the operation is currently paused, otherwise `NO`. + */ +- (BOOL)isPaused; + +/** + Resumes the execution of the paused request operation. + + Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request. + */ +- (void)resume; + +///---------------------------------------------- +/// @name Configuring Backgrounding Task Behavior +///---------------------------------------------- + +/** + Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task. + + @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified. + */ +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) +- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; +#endif + +///--------------------------------- +/// @name Setting Progress Callbacks +///--------------------------------- + +/** + Sets a callback to be called when an undetermined number of bytes have been uploaded to the server. + + @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block; + +/** + Sets a callback to be called when an undetermined number of bytes have been downloaded from the server. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block; + +///------------------------------------------------- +/// @name Setting NSURLConnection Delegate Callbacks +///------------------------------------------------- + +/** + Sets a block to be executed when the connection will authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequestForAuthenticationChallenge:`. + + @param block A block object to be executed when the connection will authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. This block must invoke one of the challenge-responder methods (NSURLAuthenticationChallengeSender protocol). + + If `allowsInvalidSSLCertificate` is set to YES, `connection:willSendRequestForAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates. + */ +- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block; + +/** + Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDataDelegate` method `connection:willSendRequest:redirectResponse:`. + + @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect. + */ +- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block; + + +/** + Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`. + + @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request. + */ +- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block; + +/// + +/** + + */ ++ (NSArray *)batchOfRequestOperations:(NSArray *)operations + progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock + completionBlock:(void (^)(NSArray *operations))completionBlock; + +@end + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when an operation begins executing. + */ +extern NSString * const AFNetworkingOperationDidStartNotification; + +/** + Posted when an operation finishes. + */ +extern NSString * const AFNetworkingOperationDidFinishNotification; diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.m new file mode 100644 index 00000000..d8b55e3e --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLConnectionOperation.m @@ -0,0 +1,786 @@ +// AFURLConnectionOperation.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLConnectionOperation.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +#if !__has_feature(objc_arc) +#error AFNetworking must be built with ARC. +// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files. +#endif + +typedef NS_ENUM(NSInteger, AFOperationState) { + AFOperationPausedState = -1, + AFOperationReadyState = 1, + AFOperationExecutingState = 2, + AFOperationFinishedState = 3, +}; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) +typedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier; +#else +typedef id AFBackgroundTaskIdentifier; +#endif + +static dispatch_group_t url_request_operation_completion_group() { + static dispatch_group_t af_url_request_operation_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_request_operation_completion_group = dispatch_group_create(); + }); + + return af_url_request_operation_completion_group; +} + +static dispatch_queue_t url_request_operation_completion_queue() { + static dispatch_queue_t af_url_request_operation_completion_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_request_operation_completion_queue = dispatch_queue_create("com.alamofire.networking.operation.queue", DISPATCH_QUEUE_CONCURRENT ); + }); + + return af_url_request_operation_completion_queue; +} + +static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; + +NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; +NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; + +typedef void (^AFURLConnectionOperationProgressBlock)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +typedef void (^AFURLConnectionOperationAuthenticationChallengeBlock)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge); +typedef NSCachedURLResponse * (^AFURLConnectionOperationCacheResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse); +typedef NSURLRequest * (^AFURLConnectionOperationRedirectResponseBlock)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse); + +static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { + switch (state) { + case AFOperationReadyState: + return @"isReady"; + case AFOperationExecutingState: + return @"isExecuting"; + case AFOperationFinishedState: + return @"isFinished"; + case AFOperationPausedState: + return @"isPaused"; + default: { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" + return @"state"; +#pragma clang diagnostic pop + } + } +} + +static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperationState toState, BOOL isCancelled) { + switch (fromState) { + case AFOperationReadyState: + switch (toState) { + case AFOperationPausedState: + case AFOperationExecutingState: + return YES; + case AFOperationFinishedState: + return isCancelled; + default: + return NO; + } + case AFOperationExecutingState: + switch (toState) { + case AFOperationPausedState: + case AFOperationFinishedState: + return YES; + default: + return NO; + } + case AFOperationFinishedState: + return NO; + case AFOperationPausedState: + return toState == AFOperationReadyState; + default: { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" + switch (toState) { + case AFOperationPausedState: + case AFOperationReadyState: + case AFOperationExecutingState: + case AFOperationFinishedState: + return YES; + default: + return NO; + } + } +#pragma clang diagnostic pop + } +} + +@interface AFURLConnectionOperation () +@property (readwrite, nonatomic, assign) AFOperationState state; +@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; +@property (readwrite, nonatomic, strong) NSURLConnection *connection; +@property (readwrite, nonatomic, strong) NSURLRequest *request; +@property (readwrite, nonatomic, strong) NSURLResponse *response; +@property (readwrite, nonatomic, strong) NSError *error; +@property (readwrite, nonatomic, strong) NSData *responseData; +@property (readwrite, nonatomic, copy) NSString *responseString; +@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding; +@property (readwrite, nonatomic, assign) long long totalBytesRead; +@property (readwrite, nonatomic, assign) AFBackgroundTaskIdentifier backgroundTaskIdentifier; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock uploadProgress; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock downloadProgress; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationChallengeBlock authenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationCacheResponseBlock cacheResponse; +@property (readwrite, nonatomic, copy) AFURLConnectionOperationRedirectResponseBlock redirectResponse; + +- (void)operationDidStart; +- (void)finish; +- (void)cancelConnection; +@end + +@implementation AFURLConnectionOperation +@synthesize outputStream = _outputStream; + ++ (void)networkRequestThreadEntryPoint:(id)__unused object { + @autoreleasepool { + [[NSThread currentThread] setName:@"AFNetworking"]; + + NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; + [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; + [runLoop run]; + } +} + ++ (NSThread *)networkRequestThread { + static NSThread *_networkRequestThread = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _networkRequestThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkRequestThreadEntryPoint:) object:nil]; + [_networkRequestThread start]; + }); + + return _networkRequestThread; +} + +- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { + NSParameterAssert(urlRequest); + + self = [super init]; + if (!self) { + return nil; + } + + _state = AFOperationReadyState; + + self.lock = [[NSRecursiveLock alloc] init]; + self.lock.name = kAFNetworkingLockName; + + self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes]; + + self.request = urlRequest; + + self.shouldUseCredentialStorage = YES; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + + return self; +} + +- (void)dealloc { + if (_outputStream) { + [_outputStream close]; + _outputStream = nil; + } + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) + if (_backgroundTaskIdentifier) { + [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier]; + _backgroundTaskIdentifier = UIBackgroundTaskInvalid; + } +#endif +} + +#pragma mark - + +- (void)setResponseData:(NSData *)responseData { + [self.lock lock]; + if (!responseData) { + _responseData = nil; + } else { + _responseData = [NSData dataWithBytes:responseData.bytes length:responseData.length]; + } + [self.lock unlock]; +} + +- (NSString *)responseString { + [self.lock lock]; + if (!_responseString && self.response && self.responseData) { + self.responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseStringEncoding]; + } + [self.lock unlock]; + + return _responseString; +} + +- (NSStringEncoding)responseStringEncoding { + [self.lock lock]; + if (!_responseStringEncoding && self.response) { + NSStringEncoding stringEncoding = NSUTF8StringEncoding; + if (self.response.textEncodingName) { + CFStringEncoding IANAEncoding = CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)self.response.textEncodingName); + if (IANAEncoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(IANAEncoding); + } + } + + self.responseStringEncoding = stringEncoding; + } + [self.lock unlock]; + + return _responseStringEncoding; +} + +- (NSInputStream *)inputStream { + return self.request.HTTPBodyStream; +} + +- (void)setInputStream:(NSInputStream *)inputStream { + NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; + mutableRequest.HTTPBodyStream = inputStream; + self.request = mutableRequest; +} + +- (NSOutputStream *)outputStream { + if (!_outputStream) { + self.outputStream = [NSOutputStream outputStreamToMemory]; + } + + return _outputStream; +} + +- (void)setOutputStream:(NSOutputStream *)outputStream { + [self.lock lock]; + if (outputStream != _outputStream) { + if (_outputStream) { + [_outputStream close]; + } + + _outputStream = outputStream; + } + [self.lock unlock]; +} + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) +- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler { + [self.lock lock]; + if (!self.backgroundTaskIdentifier) { + UIApplication *application = [UIApplication sharedApplication]; + __weak __typeof(self)weakSelf = self; + self.backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ + __strong __typeof(weakSelf)strongSelf = weakSelf; + + if (handler) { + handler(); + } + + if (strongSelf) { + [strongSelf cancel]; + + [application endBackgroundTask:strongSelf.backgroundTaskIdentifier]; + strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid; + } + }]; + } + [self.lock unlock]; +} +#endif + +#pragma mark - + +- (void)setState:(AFOperationState)state { + if (!AFStateTransitionIsValid(self.state, state, [self isCancelled])) { + return; + } + + [self.lock lock]; + NSString *oldStateKey = AFKeyPathFromOperationState(self.state); + NSString *newStateKey = AFKeyPathFromOperationState(state); + + [self willChangeValueForKey:newStateKey]; + [self willChangeValueForKey:oldStateKey]; + _state = state; + [self didChangeValueForKey:oldStateKey]; + [self didChangeValueForKey:newStateKey]; + [self.lock unlock]; +} + +- (void)pause { + if ([self isPaused] || [self isFinished] || [self isCancelled]) { + return; + } + + [self.lock lock]; + if ([self isExecuting]) { + [self performSelector:@selector(operationDidPause) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + + dispatch_async(dispatch_get_main_queue(), ^{ + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; + }); + } + + self.state = AFOperationPausedState; + [self.lock unlock]; +} + +- (void)operationDidPause { + [self.lock lock]; + [self.connection cancel]; + [self.lock unlock]; +} + +- (BOOL)isPaused { + return self.state == AFOperationPausedState; +} + +- (void)resume { + if (![self isPaused]) { + return; + } + + [self.lock lock]; + self.state = AFOperationReadyState; + + [self start]; + [self.lock unlock]; +} + +#pragma mark - + +- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block { + self.uploadProgress = block; +} + +- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block { + self.downloadProgress = block; +} + +- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block { + self.authenticationChallenge = block; +} + +- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block { + self.cacheResponse = block; +} + +- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block { + self.redirectResponse = block; +} + +#pragma mark - NSOperation + +- (void)setCompletionBlock:(void (^)(void))block { + [self.lock lock]; + if (!block) { + [super setCompletionBlock:nil]; + } else { + __weak __typeof(self)weakSelf = self; + [super setCompletionBlock:^ { + __strong __typeof(weakSelf)strongSelf = weakSelf; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_group_t group = strongSelf.completionGroup ?: url_request_operation_completion_group(); + dispatch_queue_t queue = strongSelf.completionQueue ?: dispatch_get_main_queue(); +#pragma clang diagnostic pop + + dispatch_group_async(group, queue, ^{ + block(); + }); + + dispatch_group_notify(group, url_request_operation_completion_queue(), ^{ + [strongSelf setCompletionBlock:nil]; + }); + }]; + } + [self.lock unlock]; +} + +- (BOOL)isReady { + return self.state == AFOperationReadyState && [super isReady]; +} + +- (BOOL)isExecuting { + return self.state == AFOperationExecutingState; +} + +- (BOOL)isFinished { + return self.state == AFOperationFinishedState; +} + +- (BOOL)isConcurrent { + return YES; +} + +- (void)start { + [self.lock lock]; + if ([self isCancelled]) { + [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } else if ([self isReady]) { + self.state = AFOperationExecutingState; + + [self performSelector:@selector(operationDidStart) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } + [self.lock unlock]; +} + +- (void)operationDidStart { + [self.lock lock]; + if (![self isCancelled]) { + self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; + + NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; + for (NSString *runLoopMode in self.runLoopModes) { + [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode]; + [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode]; + } + + [self.outputStream open]; + [self.connection start]; + } + [self.lock unlock]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidStartNotification object:self]; + }); +} + +- (void)finish { + [self.lock lock]; + self.state = AFOperationFinishedState; + [self.lock unlock]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; + }); +} + +- (void)cancel { + [self.lock lock]; + if (![self isFinished] && ![self isCancelled]) { + [super cancel]; + + if ([self isExecuting]) { + [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; + } + } + [self.lock unlock]; +} + +- (void)cancelConnection { + NSDictionary *userInfo = nil; + if ([self.request URL]) { + userInfo = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey]; + } + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; + + if (![self isFinished]) { + if (self.connection) { + [self.connection cancel]; + [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:error]; + } else { + // Accomodate race condition where `self.connection` has not yet been set before cancellation + self.error = error; + [self finish]; + } + } +} + +#pragma mark - + ++ (NSArray *)batchOfRequestOperations:(NSArray *)operations + progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock + completionBlock:(void (^)(NSArray *operations))completionBlock +{ + if (!operations || [operations count] == 0) { + return @[[NSBlockOperation blockOperationWithBlock:^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(@[]); + } + }); + }]]; + } + + __block dispatch_group_t group = dispatch_group_create(); + NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{ + dispatch_group_notify(group, dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(operations); + } + }); + }]; + + for (AFURLConnectionOperation *operation in operations) { + operation.completionGroup = group; + void (^originalCompletionBlock)(void) = [operation.completionBlock copy]; + __weak __typeof(operation)weakOperation = operation; + operation.completionBlock = ^{ + __strong __typeof(weakOperation)strongOperation = weakOperation; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + dispatch_queue_t queue = strongOperation.completionQueue ?: dispatch_get_main_queue(); +#pragma clang diagnostic pop + dispatch_group_async(group, queue, ^{ + if (originalCompletionBlock) { + originalCompletionBlock(); + } + + NSUInteger numberOfFinishedOperations = [[operations indexesOfObjectsPassingTest:^BOOL(id op, NSUInteger __unused idx, BOOL __unused *stop) { + return [op isFinished]; + }] count]; + + if (progressBlock) { + progressBlock(numberOfFinishedOperations, [operations count]); + } + + dispatch_group_leave(group); + }); + }; + + dispatch_group_enter(group); + [batchedOperation addDependency:operation]; + } + + return [operations arrayByAddingObject:batchedOperation]; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response]; +} + +#pragma mark - NSURLConnectionDelegate + +- (void)connection:(NSURLConnection *)connection +willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge +{ + if (self.authenticationChallenge) { + self.authenticationChallenge(connection, challenge); + return; + } + + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] cancelAuthenticationChallenge:challenge]; + } + } else { + if ([challenge previousFailureCount] == 0) { + if (self.credential) { + [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } +} + +- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { + return self.shouldUseCredentialStorage; +} + +- (NSURLRequest *)connection:(NSURLConnection *)connection + willSendRequest:(NSURLRequest *)request + redirectResponse:(NSURLResponse *)redirectResponse +{ + if (self.redirectResponse) { + return self.redirectResponse(connection, request, redirectResponse); + } else { + return request; + } +} + +- (void)connection:(NSURLConnection __unused *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite +{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.uploadProgress) { + self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + }); +} + +- (void)connection:(NSURLConnection __unused *)connection +didReceiveResponse:(NSURLResponse *)response +{ + self.response = response; +} + +- (void)connection:(NSURLConnection __unused *)connection + didReceiveData:(NSData *)data +{ + NSUInteger length = [data length]; + while (YES) { + NSInteger totalNumberOfBytesWritten = 0; + if ([self.outputStream hasSpaceAvailable]) { + const uint8_t *dataBuffer = (uint8_t *)[data bytes]; + + NSInteger numberOfBytesWritten = 0; + while (totalNumberOfBytesWritten < (NSInteger)length) { + numberOfBytesWritten = [self.outputStream write:&dataBuffer[(NSUInteger)totalNumberOfBytesWritten] maxLength:(length - (NSUInteger)totalNumberOfBytesWritten)]; + if (numberOfBytesWritten == -1) { + break; + } + + totalNumberOfBytesWritten += numberOfBytesWritten; + } + + break; + } + + if (self.outputStream.streamError) { + [self.connection cancel]; + [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError]; + return; + } + } + + dispatch_async(dispatch_get_main_queue(), ^{ + self.totalBytesRead += (long long)length; + + if (self.downloadProgress) { + self.downloadProgress(length, self.totalBytesRead, self.response.expectedContentLength); + } + }); +} + +- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection { + self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; + + [self.outputStream close]; + if (self.responseData) { + self.outputStream = nil; + } + + self.connection = nil; + + [self finish]; +} + +- (void)connection:(NSURLConnection __unused *)connection + didFailWithError:(NSError *)error +{ + self.error = error; + + [self.outputStream close]; + if (self.responseData) { + self.outputStream = nil; + } + + self.connection = nil; + + [self finish]; +} + +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection + willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + if (self.cacheResponse) { + return self.cacheResponse(connection, cachedResponse); + } else { + if ([self isCancelled]) { + return nil; + } + + return cachedResponse; + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURLRequest *request = [decoder decodeObjectOfClass:[NSURLRequest class] forKey:NSStringFromSelector(@selector(request))]; + + self = [self initWithRequest:request]; + if (!self) { + return nil; + } + + self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue]; + self.response = [decoder decodeObjectOfClass:[NSHTTPURLResponse class] forKey:NSStringFromSelector(@selector(response))]; + self.error = [decoder decodeObjectOfClass:[NSError class] forKey:NSStringFromSelector(@selector(error))]; + self.responseData = [decoder decodeObjectOfClass:[NSData class] forKey:NSStringFromSelector(@selector(responseData))]; + self.totalBytesRead = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(totalBytesRead))] longLongValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [self pause]; + + [coder encodeObject:self.request forKey:NSStringFromSelector(@selector(request))]; + + switch (self.state) { + case AFOperationExecutingState: + case AFOperationPausedState: + [coder encodeInteger:AFOperationReadyState forKey:NSStringFromSelector(@selector(state))]; + break; + default: + [coder encodeInteger:self.state forKey:NSStringFromSelector(@selector(state))]; + break; + } + + [coder encodeObject:self.response forKey:NSStringFromSelector(@selector(response))]; + [coder encodeObject:self.error forKey:NSStringFromSelector(@selector(error))]; + [coder encodeObject:self.responseData forKey:NSStringFromSelector(@selector(responseData))]; + [coder encodeInt64:self.totalBytesRead forKey:NSStringFromSelector(@selector(totalBytesRead))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFURLConnectionOperation *operation = [(AFURLConnectionOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request]; + + operation.uploadProgress = self.uploadProgress; + operation.downloadProgress = self.downloadProgress; + operation.authenticationChallenge = self.authenticationChallenge; + operation.cacheResponse = self.cacheResponse; + operation.redirectResponse = self.redirectResponse; + operation.completionQueue = self.completionQueue; + operation.completionGroup = self.completionGroup; + + return operation; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.h new file mode 100644 index 00000000..17a4e496 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.h @@ -0,0 +1,453 @@ +// AFSerialization.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#endif + +/** + The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. + + For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`. + */ +@protocol AFURLRequestSerialization + +/** + Returns a request with the specified parameters encoded into a copy of the original request. + + @param request The original request. + @param parameters The parameters to be encoded. + @param error The error that occurred while attempting to encode the request parameters. + + @return A serialized request. + */ +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError * __autoreleasing *)error; + +@end + +#pragma mark - + +/** + + */ +typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { + AFHTTPRequestQueryStringDefaultStyle = 0, +}; + +@protocol AFMultipartFormData; + +/** + `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPRequestSerializer : NSObject + +/** + The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default. + */ +@property (nonatomic, assign) NSStringEncoding stringEncoding; + +/** + Whether created requests can use the device’s cellular radio (if present). `YES` by default. + + @see NSMutableURLRequest -setAllowsCellularAccess: + */ +@property (nonatomic, assign) BOOL allowsCellularAccess; + +/** + The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default. + + @see NSMutableURLRequest -setCachePolicy: + */ +@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; + +/** + Whether created requests should use the default cookie handling. `YES` by default. + + @see NSMutableURLRequest -setHTTPShouldHandleCookies: + */ +@property (nonatomic, assign) BOOL HTTPShouldHandleCookies; + +/** + Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default + + @see NSMutableURLRequest -setHTTPShouldUsePipelining: + */ +@property (nonatomic, assign) BOOL HTTPShouldUsePipelining; + +/** + The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default. + + @see NSMutableURLRequest -setNetworkServiceType: + */ +@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; + +/** + The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds. + + @see NSMutableURLRequest -setTimeoutInterval: + */ +@property (nonatomic, assign) NSTimeInterval timeoutInterval; + +///--------------------------------------- +/// @name Configuring HTTP Request Headers +///--------------------------------------- + +/** + Default HTTP header field values to be applied to serialized requests. + */ +@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +/** + Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header. + + @param field The HTTP header to set a default value for + @param value The value set as default for the specified header, or `nil` + */ +- (void)setValue:(NSString *)value +forHTTPHeaderField:(NSString *)field; + +/** + Returns the value for the HTTP headers set in the request serializer. + + @param field The HTTP header to retrieve the default value for + + @return The value set as default for the specified header, or `nil` + */ +- (NSString *)valueForHTTPHeaderField:(NSString *)field; + +/** + Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. + + @param username The HTTP basic auth username + @param password The HTTP basic auth password + */ +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password; + +/** + @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead. + */ +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE; + + +/** + Clears any existing value for the "Authorization" HTTP header. + */ +- (void)clearAuthorizationHeader; + +///------------------------------------------------------- +/// @name Configuring Query String Parameter Serialization +///------------------------------------------------------- + +/** + HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. + */ +@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; + +/** + Set the method of query string serialization according to one of the pre-defined styles. + + @param style The serialization style. + + @see AFHTTPRequestQueryStringSerializationStyle + */ +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style; + +/** + Set the a custom method of query string serialization according to the specified block. + + @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. + */ +- (void)setQueryStringSerializationWithBlock:(NSString * (^)(NSURLRequest *request, NSDictionary *parameters, NSError * __autoreleasing *error))block; + +///------------------------------- +/// @name Creating Request Objects +///------------------------------- + +/** + @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead. + */ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters DEPRECATED_ATTRIBUTE; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. + + If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. + + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. + @param error The error that occured while constructing the request. + + @return An `NSMutableURLRequest` object. + */ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + error:(NSError * __autoreleasing *)error; + +/** + @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead. + */ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block DEPRECATED_ATTRIBUTE; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + + Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. + + @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded and set in the request HTTP body. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param error The error that occured while constructing the request. + + @return An `NSMutableURLRequest` object + */ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block + error:(NSError * __autoreleasing *)error; + +/** + Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. + + @param request The multipart form request. + @param fileURL The file URL to write multipart form contents to. + @param handler A handler block to execute. + + @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request. + + @see https://github.com/AFNetworking/AFNetworking/issues/1398 + */ +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(void (^)(NSError *error))handler; + +@end + +#pragma mark - + +/** + The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`. + */ +@protocol AFMultipartFormData + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. + + The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended, otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`. + @param mimeType The declared MIME type of the file data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. + + @param inputStream The input stream to be appended to the form data + @param name The name to be associated with the specified input stream. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`. + @param length The length of the specified input stream in bytes. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithInputStream:(NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + */ + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name; + + +/** + Appends HTTP headers, followed by the encoded data and the multipart form boundary. + + @param headers The HTTP headers to be appended to the form data. + @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. + */ +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body; + +/** + Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. + + When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. + + @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb. + @param delay Duration of delay each time a packet is read. By default, no delay is set. + */ +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay; + +@end + +#pragma mark - + +@interface AFJSONRequestSerializer : AFHTTPRequestSerializer + +/** + Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONWritingOptions writingOptions; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param writingOptions The specified JSON writing options. + */ ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; + +@end + +@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + @warning The `writeOptions` property is currently unused. + */ +@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param writeOptions The property list write options. + + @warning The `writeOptions` property is currently unused. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLRequestSerializationErrorDomain` + + ### Constants + + `AFURLRequestSerializationErrorDomain` + AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +extern NSString * const AFURLRequestSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLRequestErrorKey` + The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. + */ +extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; + +/** + ## Throttling Bandwidth for HTTP Request Input Streams + + @see -throttleBandwidthWithPacketSize:delay: + + ### Constants + + `kAFUploadStream3GSuggestedPacketSize` + Maximum packet size, in number of bytes. Equal to 16kb. + + `kAFUploadStream3GSuggestedDelay` + Duration of delay each time a packet is read. Equal to 0.2 seconds. + */ +extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; +extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.m new file mode 100644 index 00000000..aea41d9b --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLRequestSerialization.m @@ -0,0 +1,1335 @@ +// AFSerialization.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLRequestSerialization.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED +#import +#else +#import +#endif + +NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request"; +NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response"; + +typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, NSDictionary *parameters, NSError *__autoreleasing *error); + +static NSString * AFBase64EncodedStringFromString(NSString *string) { + NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; + NSUInteger length = [data length]; + NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; + + uint8_t *input = (uint8_t *)[data bytes]; + uint8_t *output = (uint8_t *)[mutableData mutableBytes]; + + for (NSUInteger i = 0; i < length; i += 3) { + NSUInteger value = 0; + for (NSUInteger j = i; j < (i + 3); j++) { + value <<= 8; + if (j < length) { + value |= (0xFF & input[j]); + } + } + + static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + NSUInteger idx = (i / 3) * 4; + output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; + output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; + output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; + output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; + } + + return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; +} + +static NSString * const kAFCharactersToBeEscapedInQueryString = @":/?&=;+!@#$()',*"; + +static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { + static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[]."; + + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescapedInQueryStringPairKey, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); +} + +static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); +} + +#pragma mark - + +@interface AFQueryStringPair : NSObject +@property (readwrite, nonatomic, strong) id field; +@property (readwrite, nonatomic, strong) id value; + +- (id)initWithField:(id)field value:(id)value; + +- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; +@end + +@implementation AFQueryStringPair + +- (id)initWithField:(id)field value:(id)value { + self = [super init]; + if (!self) { + return nil; + } + + self.field = field; + self.value = value; + + return self; +} + +- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { + if (!self.value || [self.value isEqual:[NSNull null]]) { + return AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding); + } else { + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringValueFromStringWithEncoding([self.value description], stringEncoding)]; + } +} + +@end + +#pragma mark - + +extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); +extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); + +static NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) { + NSMutableArray *mutablePairs = [NSMutableArray array]; + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]]; + } + + return [mutablePairs componentsJoinedByString:@"&"]; +} + +NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) { + return AFQueryStringPairsFromKeyAndValue(nil, dictionary); +} + +NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { + NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; + + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; + + if ([value isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictionary = value; + // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries + for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + id nestedValue = [dictionary objectForKey:nestedKey]; + if (nestedValue) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; + } + } + } else if ([value isKindOfClass:[NSArray class]]) { + NSArray *array = value; + for (id nestedValue in array) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; + } + } else if ([value isKindOfClass:[NSSet class]]) { + NSSet *set = value; + for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)]; + } + } else { + [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]]; + } + + return mutableQueryStringComponents; +} + +#pragma mark - + +@interface AFStreamingMultipartFormData : NSObject +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding; + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; +@end + +#pragma mark - + +static NSArray * AFHTTPRequestSerializerObservedKeyPaths() { + static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))]; + }); + + return _AFHTTPRequestSerializerObservedKeyPaths; +} + +static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext; + +@interface AFHTTPRequestSerializer () +@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders; +@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle; +@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization; +@end + +@implementation AFHTTPRequestSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = NSUTF8StringEncoding; + + self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary]; + + // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 + NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; + [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + float q = 1.0f - (idx * 0.1f); + [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]]; + *stop = q <= 0.5f; + }]; + [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"]; + + NSString *userAgent = nil; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; +#endif +#pragma clang diagnostic pop + if (userAgent) { + if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) { + NSMutableString *mutableUserAgent = [userAgent mutableCopy]; + if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@"Any-Latin; Latin-ASCII; [:^ASCII:] Remove", false)) { + userAgent = mutableUserAgent; + } + } + [self setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } + + // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html + self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@"GET", @"HEAD", @"DELETE", nil]; + + self.mutableObservedChangedKeyPaths = [NSMutableSet set]; + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext]; + } + + return self; +} + +- (void)dealloc { + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext]; + } +} + +#pragma mark - + +- (NSDictionary *)HTTPRequestHeaders { + return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders]; +} + +- (void)setValue:(NSString *)value +forHTTPHeaderField:(NSString *)field +{ + [self.mutableHTTPRequestHeaders setValue:value forKey:field]; +} + +- (NSString *)valueForHTTPHeaderField:(NSString *)field { + return [self.mutableHTTPRequestHeaders valueForKey:field]; +} + +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password +{ + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; + [self setValue:[NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)] forHTTPHeaderField:@"Authorization"]; +} + +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token { + [self setValue:[NSString stringWithFormat:@"Token token=\"%@\"", token] forHTTPHeaderField:@"Authorization"]; +} + +- (void)clearAuthorizationHeader { + [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"]; +} + +#pragma mark - + +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style { + self.queryStringSerializationStyle = style; + self.queryStringSerialization = nil; +} + +- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, NSDictionary *, NSError *__autoreleasing *))block { + self.queryStringSerialization = block; +} + +#pragma mark - + +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters +{ + return [self requestWithMethod:method URLString:URLString parameters:parameters error:nil]; +} + +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(URLString); + + NSURL *url = [NSURL URLWithString:URLString]; + + NSParameterAssert(url); + + NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url]; + mutableRequest.HTTPMethod = method; + + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) { + [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath]; + } + } + + mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy]; + + return mutableRequest; +} + +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block +{ + return [self multipartFormRequestWithMethod:method URLString:URLString parameters:parameters constructingBodyWithBlock:block error:nil]; +} + +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]); + + NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error]; + + __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding]; + + if (parameters) { + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + NSData *data = nil; + if ([pair.value isKindOfClass:[NSData class]]) { + data = pair.value; + } else if ([pair.value isEqual:[NSNull null]]) { + data = [NSData data]; + } else { + data = [[pair.value description] dataUsingEncoding:self.stringEncoding]; + } + + if (data) { + [formData appendPartWithFormData:data name:[pair.field description]]; + } + } + } + + if (block) { + block(formData); + } + + return [formData requestByFinalizingMultipartFormData]; +} + +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(void (^)(NSError *error))handler +{ + if (!request.HTTPBodyStream) { + return [request mutableCopy]; + } + + NSParameterAssert([fileURL isFileURL]); + + NSInputStream *inputStream = request.HTTPBodyStream; + NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO]; + __block NSError *error = nil; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + + [inputStream open]; + [outputStream open]; + + while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) { + uint8_t buffer[1024]; + + NSInteger bytesRead = [inputStream read:buffer maxLength:1024]; + if (inputStream.streamError || bytesRead < 0) { + error = inputStream.streamError; + break; + } + + NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead]; + if (outputStream.streamError || bytesWritten < 0) { + error = outputStream.streamError; + break; + } + + if (bytesRead == 0 && bytesWritten == 0) { + break; + } + } + + [outputStream close]; + [inputStream close]; + + if (handler) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(error); + }); + } + }); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + mutableRequest.HTTPBodyStream = nil; + + return mutableRequest; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + NSString *query = nil; + if (self.queryStringSerialization) { + NSError *serializationError; + query = self.queryStringSerialization(request, parameters, &serializationError); + + if (serializationError) { + if (error) { + *error = serializationError; + } + + return nil; + } + } else { + switch (self.queryStringSerializationStyle) { + case AFHTTPRequestQueryStringDefaultStyle: + query = AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding); + break; + } + } + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; + } else { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + } + [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; + } + } + + return mutableRequest; +} + +#pragma mark - NSKeyValueObserving + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(__unused id)object + change:(NSDictionary *)change + context:(void *)context +{ + if (context == AFHTTPRequestSerializerObserverContext) { + if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) { + [self.mutableObservedChangedKeyPaths removeObject:keyPath]; + } else { + [self.mutableObservedChangedKeyPaths addObject:keyPath]; + } + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; + self.queryStringSerializationStyle = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))]; + [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; + serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; + serializer.queryStringSerialization = self.queryStringSerialization; + + return serializer; +} + +@end + +#pragma mark - + +static NSString * AFCreateMultipartFormBoundary() { + return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()]; +} + +static NSString * const kAFMultipartFormCRLF = @"\r\n"; + +static inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"--%@%@", boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFContentTypeForPathExtension(NSString *extension) { +#ifdef __UTTYPE__ + NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); + NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); + if (!contentType) { + return @"application/octet-stream"; + } else { + return contentType; + } +#else +#pragma unused (extension) + return @"application/octet-stream"; +#endif +} + +NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; +NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; + +@interface AFHTTPBodyPart : NSObject +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSDictionary *headers; +@property (nonatomic, copy) NSString *boundary; +@property (nonatomic, strong) id body; +@property (nonatomic, assign) unsigned long long bodyContentLength; +@property (nonatomic, strong) NSInputStream *inputStream; + +@property (nonatomic, assign) BOOL hasInitialBoundary; +@property (nonatomic, assign) BOOL hasFinalBoundary; + +@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable; +@property (readonly, nonatomic, assign) unsigned long long contentLength; + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@interface AFMultipartBodyStream : NSInputStream +@property (nonatomic, assign) NSUInteger numberOfBytesInPacket; +@property (nonatomic, assign) NSTimeInterval delay; +@property (nonatomic, strong) NSInputStream *inputStream; +@property (readonly, nonatomic, assign) unsigned long long contentLength; +@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; + +- (id)initWithStringEncoding:(NSStringEncoding)encoding; +- (void)setInitialAndFinalBoundaries; +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; +@end + +#pragma mark - + +@interface AFStreamingMultipartFormData () +@property (readwrite, nonatomic, copy) NSMutableURLRequest *request; +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, copy) NSString *boundary; +@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream; +@end + +@implementation AFStreamingMultipartFormData + +- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding +{ + self = [super init]; + if (!self) { + return nil; + } + + self.request = urlRequest; + self.stringEncoding = encoding; + self.boundary = AFCreateMultipartFormBoundary(); + self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding]; + + return self; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + + NSString *fileName = [fileURL lastPathComponent]; + NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]); + + return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error]; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + if (![fileURL isFileURL]) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } + + NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error]; + if (!fileAttributes) { + return NO; + } + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = fileURL; + bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; + [self.bodyStream appendHTTPBodyPart:bodyPart]; + + return YES; +} + +- (void)appendPartWithInputStream:(NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = inputStream; + + bodyPart.bodyContentLength = (unsigned long long)length; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name +{ + NSParameterAssert(name); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body +{ + NSParameterAssert(body); + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = headers; + bodyPart.boundary = self.boundary; + bodyPart.bodyContentLength = [body length]; + bodyPart.body = body; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay +{ + self.bodyStream.numberOfBytesInPacket = numberOfBytes; + self.bodyStream.delay = delay; +} + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData { + if ([self.bodyStream isEmpty]) { + return self.request; + } + + // Reset the initial and final boundaries to ensure correct Content-Length + [self.bodyStream setInitialAndFinalBoundaries]; + [self.request setHTTPBodyStream:self.bodyStream]; + + [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.boundary] forHTTPHeaderField:@"Content-Type"]; + [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"]; + + return self.request; +} + +@end + +#pragma mark - + +@interface NSStream () +@property (readwrite) NSStreamStatus streamStatus; +@property (readwrite, copy) NSError *streamError; +@end + +@interface AFMultipartBodyStream () +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts; +@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; +@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart; +@property (readwrite, nonatomic, strong) NSOutputStream *outputStream; +@property (readwrite, nonatomic, strong) NSMutableData *buffer; +@end + +@implementation AFMultipartBodyStream +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-atomic-properties" +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100) +@synthesize delegate; +#endif +@synthesize streamStatus; +@synthesize streamError; +#pragma clang diagnostic pop + +- (id)initWithStringEncoding:(NSStringEncoding)encoding { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = encoding; + self.HTTPBodyParts = [NSMutableArray array]; + self.numberOfBytesInPacket = NSIntegerMax; + + return self; +} + +- (void)setInitialAndFinalBoundaries { + if ([self.HTTPBodyParts count] > 0) { + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + bodyPart.hasInitialBoundary = NO; + bodyPart.hasFinalBoundary = NO; + } + + [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES]; + [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; + } +} + +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart { + [self.HTTPBodyParts addObject:bodyPart]; +} + +- (BOOL)isEmpty { + return [self.HTTPBodyParts count] == 0; +} + +#pragma mark - NSInputStream + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + if ([self streamStatus] == NSStreamStatusClosed) { + return 0; + } + + NSInteger totalNumberOfBytesRead = 0; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) { + if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { + if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { + break; + } + } else { + NSUInteger maxLength = length - (NSUInteger)totalNumberOfBytesRead; + NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; + if (numberOfBytesRead == -1) { + self.streamError = self.currentHTTPBodyPart.inputStream.streamError; + break; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if (self.delay > 0.0f) { + [NSThread sleepForTimeInterval:self.delay]; + } + } + } + } +#pragma clang diagnostic pop + + return totalNumberOfBytesRead; +} + +- (BOOL)getBuffer:(__unused uint8_t **)buffer + length:(__unused NSUInteger *)len +{ + return NO; +} + +- (BOOL)hasBytesAvailable { + return [self streamStatus] == NSStreamStatusOpen; +} + +#pragma mark - NSStream + +- (void)open { + if (self.streamStatus == NSStreamStatusOpen) { + return; + } + + self.streamStatus = NSStreamStatusOpen; + + [self setInitialAndFinalBoundaries]; + self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator]; +} + +- (void)close { + self.streamStatus = NSStreamStatusClosed; +} + +- (id)propertyForKey:(__unused NSString *)key { + return nil; +} + +- (BOOL)setProperty:(__unused id)property + forKey:(__unused NSString *)key +{ + return NO; +} + +- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + length += [bodyPart contentLength]; + } + + return length; +} + +#pragma mark - Undocumented CFReadStream Bridged Methods + +- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags + callback:(__unused CFReadStreamClientCallBack)inCallback + context:(__unused CFStreamClientContext *)inContext { + return NO; +} + +#pragma mark - NSCopying + +-(id)copyWithZone:(NSZone *)zone { + AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; + + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]]; + } + + [bodyStreamCopy setInitialAndFinalBoundaries]; + + return bodyStreamCopy; +} + +@end + +#pragma mark - + +typedef enum { + AFEncapsulationBoundaryPhase = 1, + AFHeaderPhase = 2, + AFBodyPhase = 3, + AFFinalBoundaryPhase = 4, +} AFHTTPBodyPartReadPhase; + +@interface AFHTTPBodyPart () { + AFHTTPBodyPartReadPhase _phase; + NSInputStream *_inputStream; + unsigned long long _phaseReadOffset; +} + +- (BOOL)transitionToNextPhase; +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@implementation AFHTTPBodyPart + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + [self transitionToNextPhase]; + + return self; +} + +- (void)dealloc { + if (_inputStream) { + [_inputStream close]; + _inputStream = nil; + } +} + +- (NSInputStream *)inputStream { + if (!_inputStream) { + if ([self.body isKindOfClass:[NSData class]]) { + _inputStream = [NSInputStream inputStreamWithData:self.body]; + } else if ([self.body isKindOfClass:[NSURL class]]) { + _inputStream = [NSInputStream inputStreamWithURL:self.body]; + } else if ([self.body isKindOfClass:[NSInputStream class]]) { + _inputStream = self.body; + } else { + _inputStream = [NSInputStream inputStreamWithData:[NSData data]]; + } + } + + return _inputStream; +} + +- (NSString *)stringForHeaders { + NSMutableString *headerString = [NSMutableString string]; + for (NSString *field in [self.headers allKeys]) { + [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]]; + } + [headerString appendString:kAFMultipartFormCRLF]; + + return [NSString stringWithString:headerString]; +} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + length += [encapsulationBoundaryData length]; + + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + length += [headersData length]; + + length += _bodyContentLength; + + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + length += [closingBoundaryData length]; + + return length; +} + +- (BOOL)hasBytesAvailable { + // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer + if (_phase == AFFinalBoundaryPhase) { + return YES; + } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcovered-switch-default" + switch (self.inputStream.streamStatus) { + case NSStreamStatusNotOpen: + case NSStreamStatusOpening: + case NSStreamStatusOpen: + case NSStreamStatusReading: + case NSStreamStatusWriting: + return YES; + case NSStreamStatusAtEnd: + case NSStreamStatusClosed: + case NSStreamStatusError: + default: + return NO; + } +#pragma clang diagnostic pop +} + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + NSInteger totalNumberOfBytesRead = 0; + + if (_phase == AFEncapsulationBoundaryPhase) { + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFHeaderPhase) { + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFBodyPhase) { + NSInteger numberOfBytesRead = 0; + + numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + if (numberOfBytesRead == -1) { + return -1; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) { + [self transitionToNextPhase]; + } + } + } + + if (_phase == AFFinalBoundaryPhase) { + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + return totalNumberOfBytesRead; +} + +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); + [data getBytes:buffer range:range]; +#pragma clang diagnostic pop + + _phaseReadOffset += range.length; + + if (((NSUInteger)_phaseReadOffset) >= [data length]) { + [self transitionToNextPhase]; + } + + return (NSInteger)range.length; +} + +- (BOOL)transitionToNextPhase { + if (![[NSThread currentThread] isMainThread]) { + [self performSelectorOnMainThread:@selector(transitionToNextPhase) withObject:nil waitUntilDone:YES]; + return YES; + } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcovered-switch-default" + switch (_phase) { + case AFEncapsulationBoundaryPhase: + _phase = AFHeaderPhase; + break; + case AFHeaderPhase: + [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + [self.inputStream open]; + _phase = AFBodyPhase; + break; + case AFBodyPhase: + [self.inputStream close]; + _phase = AFFinalBoundaryPhase; + break; + case AFFinalBoundaryPhase: + default: + _phase = AFEncapsulationBoundaryPhase; + break; + } + _phaseReadOffset = 0; +#pragma clang diagnostic pop + + return YES; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; + + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = self.headers; + bodyPart.bodyContentLength = self.bodyContentLength; + bodyPart.body = self.body; + bodyPart.boundary = self.boundary; + + return bodyPart; +} + +@end + +#pragma mark - + +@implementation AFJSONRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithWritingOptions:(NSJSONWritingOptions)0]; +} + ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions +{ + AFJSONRequestSerializer *serializer = [[self alloc] init]; + serializer.writingOptions = writingOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + NSString *charset = (__bridge NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)); + [mutableRequest setValue:[NSString stringWithFormat:@"application/json; charset=%@", charset] forHTTPHeaderField:@"Content-Type"]; + } + + [mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeInteger:self.writingOptions forKey:NSStringFromSelector(@selector(writingOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.writingOptions = self.writingOptions; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFPropertyListRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions +{ + AFPropertyListRequestSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.writeOptions = writeOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerializer + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + NSString *charset = (__bridge NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)); + [mutableRequest setValue:[NSString stringWithFormat:@"application/x-plist; charset=%@", charset] forHTTPHeaderField:@"Content-Type"]; + } + + [mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeInteger:self.format forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.format = self.format; + serializer.writeOptions = self.writeOptions; + + return serializer; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.h new file mode 100644 index 00000000..ed1204c2 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.h @@ -0,0 +1,302 @@ +// AFSerialization.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +/** + The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. + + For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object. + */ +@protocol AFURLResponseSerialization + +/** + The response object decoded from the data associated with a specified response. + + @param response The response to be processed. + @param data The response data to be decoded. + @param error The error that occurred while attempting to decode the response data. + + @return The object decoded from the specified response data. + */ +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error; + +@end + +#pragma mark - + +/** + `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPResponseSerializer : NSObject + +/** + The string encoding used to serialize parameters. + */ +@property (nonatomic, assign) NSStringEncoding stringEncoding; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +///----------------------------------------- +/// @name Configuring Response Serialization +///----------------------------------------- + +/** + The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation. + + See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + */ +@property (nonatomic, copy) NSIndexSet *acceptableStatusCodes; + +/** + The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. + */ +@property (nonatomic, copy) NSSet *acceptableContentTypes; + +/** + Validates the specified response and data. + + In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks. + + @param response The response to be validated. + @param data The data associated with the response. + @param error The error that occurred while attempting to validate the response. + + @return `YES` if the response is valid, otherwise `NO`. + */ +- (BOOL)validateResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error; + +@end + +#pragma mark - + + +/** + `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses. + + By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types: + + - `application/json` + - `text/json` + - `text/javascript` + */ +@interface AFJSONResponseSerializer : AFHTTPResponseSerializer + +/** + Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONReadingOptions readingOptions; + +/** + Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL removesKeysWithNullValues; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param readingOptions The specified JSON reading options. + */ ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions; + +@end + +#pragma mark - + +/** + `AFXMLParserSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects. + + By default, `AFXMLParserSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +/** + `AFXMLDocumentSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFXMLDocumentSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer + +/** + Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. + */ +@property (nonatomic, assign) NSUInteger options; + +/** + Creates and returns an XML document serializer with the specified options. + + @param mask The XML document options. + */ ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask; + +@end + +#endif + +#pragma mark - + +/** + `AFPropertyListSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFPropertyListSerializer` accepts the following MIME types: + + - `application/x-plist` + */ +@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions." + */ +@property (nonatomic, assign) NSPropertyListReadOptions readOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param readOptions The property list reading options. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions; + +@end + +#pragma mark - + +/** + `AFImageSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses. + + By default, `AFImageSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage: + + - `image/tiff` + - `image/jpeg` + - `image/gif` + - `image/png` + - `image/ico` + - `image/x-icon` + - `image/bmp` + - `image/x-bmp` + - `image/x-xbitmap` + - `image/x-win-bitmap` + */ +@interface AFImageResponseSerializer : AFHTTPResponseSerializer + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +/** + The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. + */ +@property (nonatomic, assign) CGFloat imageScale; + +/** + Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default. + */ +@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage; +#endif + +@end + +#pragma mark - + +/** + `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer. + */ +@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer + +/** + The component response serializers. + */ +@property (readonly, nonatomic, copy) NSArray *responseSerializers; + +/** + Creates and returns a compound serializer comprised of the specified response serializers. + + @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. + */ ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLResponseSerializationErrorDomain` + + ### Constants + + `AFURLResponseSerializationErrorDomain` + AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +extern NSString * const AFURLResponseSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey` + - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLResponseErrorKey` + The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + + `AFNetworkingOperationFailingURLResponseDataErrorKey` + The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + */ +extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey; + +extern NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; + + diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.m new file mode 100644 index 00000000..7b042f75 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLResponseSerialization.m @@ -0,0 +1,793 @@ +// AFSerialization.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLResponseSerialization.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#import +#endif + +NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response"; +NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response"; +NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @"com.alamofire.serialization.response.error.data"; + +static NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) { + if (!error) { + return underlyingError; + } + + if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) { + return error; + } + + NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy]; + mutableUserInfo[NSUnderlyingErrorKey] = underlyingError; + + return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo]; +} + +static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) { + if ([error.domain isEqualToString:domain] && error.code == code) { + return YES; + } else if (error.userInfo[NSUnderlyingErrorKey]) { + return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain); + } + + return NO; +} + +static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) { + if ([JSONObject isKindOfClass:[NSArray class]]) { + NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]]; + for (id value in (NSArray *)JSONObject) { + [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)]; + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray]; + } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { + NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; + for (id key in [(NSDictionary *)JSONObject allKeys]) { + id value = [(NSDictionary *)JSONObject objectForKey:key]; + if (!value || [value isEqual:[NSNull null]]) { + [mutableDictionary removeObjectForKey:key]; + } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { + [mutableDictionary setObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions) forKey:key]; + } + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary]; + } + + return JSONObject; +} + +@implementation AFHTTPResponseSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = NSUTF8StringEncoding; + + self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; + self.acceptableContentTypes = nil; + + return self; +} + +#pragma mark - + +- (BOOL)validateResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError * __autoreleasing *)error +{ + BOOL responseIsValid = YES; + NSError *validationError = nil; + + if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) { + if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]]) { + if ([data length] > 0) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError); + } + + responseIsValid = NO; + } + + if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode]) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError); + + responseIsValid = NO; + } + } + + if (error && !responseIsValid) { + *error = validationError; + } + + return responseIsValid; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + [self validateResponse:(NSHTTPURLResponse *)response data:data error:error]; + + return data; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; + serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFJSONResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithReadingOptions:(NSJSONReadingOptions)0]; +} + ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions { + AFJSONResponseSerializer *serializer = [[self alloc] init]; + serializer.readingOptions = readingOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. + // See https://github.com/rails/rails/issues/1742 + NSStringEncoding stringEncoding = self.stringEncoding; + if (response.textEncodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); + if (encoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); + } + } + + id responseObject = nil; + NSError *serializationError = nil; + @autoreleasepool { + NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding]; + if (responseString && ![responseString isEqualToString:@" "]) { + // Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character + // See http://stackoverflow.com/a/12843465/157142 + data = [responseString dataUsingEncoding:NSUTF8StringEncoding]; + + if (data) { + if ([data length] > 0) { + responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError]; + } else { + return nil; + } + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Data failed decoding as a UTF-8 string", @"AFNetworking", nil), + NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Could not decode string: %@", @"AFNetworking", nil), responseString] + }; + + serializationError = [NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; + } + } + } + + if (self.removesKeysWithNullValues && responseObject) { + responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions); + } + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue]; + self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))]; + [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.readingOptions = self.readingOptions; + serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFXMLParserResponseSerializer + ++ (instancetype)serializer { + AFXMLParserResponseSerializer *serializer = [[self alloc] init]; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + return [[NSXMLParser alloc] initWithData:data]; +} + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +@implementation AFXMLDocumentResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithXMLDocumentOptions:0]; +} + ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask { + AFXMLDocumentResponseSerializer *serializer = [[self alloc] init]; + serializer.options = mask; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + NSError *serializationError = nil; + NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError]; + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return document; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.options = self.options; + + return serializer; +} + +@end + +#endif + +#pragma mark - + +@implementation AFPropertyListResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions +{ + AFPropertyListResponseSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.readOptions = readOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/x-plist", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + id responseObject; + NSError *serializationError = nil; + + if (data) { + responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError]; + } + + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.format = self.format; + serializer.readOptions = self.readOptions; + + return serializer; +} + +@end + +#pragma mark - + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import + +static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { + UIImage *image = [[UIImage alloc] initWithData:data]; + + return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; +} + +static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) { + if (!data || [data length] == 0) { + return nil; + } + + CGImageRef imageRef = NULL; + CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data); + + if ([response.MIMEType isEqualToString:@"image/png"]) { + imageRef = CGImageCreateWithPNGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + } else if ([response.MIMEType isEqualToString:@"image/jpeg"]) { + imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + + // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so if so, fall back to AFImageWithDataAtScale + if (imageRef) { + CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef); + CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace); + if (imageColorSpaceModel == kCGColorSpaceModelCMYK) { + CGImageRelease(imageRef); + imageRef = NULL; + } + } + } + + CGDataProviderRelease(dataProvider); + + UIImage *image = AFImageWithDataAtScale(data, scale); + if (!imageRef) { + if (image.images || !image) { + return image; + } + + imageRef = CGImageCreateCopy([image CGImage]); + if (!imageRef) { + return nil; + } + } + + size_t width = CGImageGetWidth(imageRef); + size_t height = CGImageGetHeight(imageRef); + size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef); + + if (width * height > 1024 * 1024 || bitsPerComponent > 8) { + CGImageRelease(imageRef); + + return image; + } + + size_t bytesPerRow = 0; // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace); + CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); + + if (colorSpaceModel == kCGColorSpaceModelRGB) { + uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wassign-enum" + if (alpha == kCGImageAlphaNone) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaNoneSkipFirst; + } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaPremultipliedFirst; + } +#pragma clang diagnostic pop + } + + CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo); + + CGColorSpaceRelease(colorSpace); + + if (!context) { + CGImageRelease(imageRef); + + return image; + } + + CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef); + CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context); + + CGContextRelease(context); + + UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation]; + + CGImageRelease(inflatedImageRef); + CGImageRelease(imageRef); + + return inflatedImage; +} +#endif + + +@implementation AFImageResponseSerializer + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + self.imageScale = [[UIScreen mainScreen] scale]; + self.automaticallyInflatesResponseImage = YES; +#endif + + return self; +} + +#pragma mark - AFURLResponseSerializer + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + if (self.automaticallyInflatesResponseImage) { + return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); + } else { + return AFImageWithDataAtScale(data, self.imageScale); + } +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + // Ensure that the image is set to it's correct pixel width and height + NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; + NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; + [image addRepresentation:bitimage]; + + return image; +#endif + + return nil; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; +#if CGFLOAT_IS_DOUBLE + self.imageScale = [imageScale doubleValue]; +#else + self.imageScale = [imageScale floatValue]; +#endif + + self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; + [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + serializer.imageScale = self.imageScale; + serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; +#endif + + return serializer; +} + +@end + +#pragma mark - + +@interface AFCompoundResponseSerializer () +@property (readwrite, nonatomic, copy) NSArray *responseSerializers; +@end + +@implementation AFCompoundResponseSerializer + ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers { + AFCompoundResponseSerializer *serializer = [[self alloc] init]; + serializer.responseSerializers = responseSerializers; + + return serializer; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + for (id serializer in self.responseSerializers) { + if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) { + continue; + } + + NSError *serializerError = nil; + id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError]; + if (responseObject) { + if (error) { + *error = AFErrorWithUnderlyingError(serializerError, *error); + } + + return responseObject; + } + } + + return [super responseObjectForResponse:response data:data error:error]; +} + +#pragma mark - NSSecureCoding + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.responseSerializers = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(responseSerializers))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.responseSerializers = self.responseSerializers; + + return serializer; +} + +@end diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.h b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.h new file mode 100644 index 00000000..6939b7d4 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.h @@ -0,0 +1,529 @@ +// AFURLSessionManager.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" +#import "AFSecurityPolicy.h" +#import "AFNetworkReachabilityManager.h" + +/** + `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + + ## Subclassing Notes + + This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead. + + ## NSURLSession & NSURLSessionTask Delegate Methods + + `AFURLSessionManager` implements the following delegate methods: + + ### `NSURLSessionDelegate` + + - `URLSession:didBecomeInvalidWithError:` + - `URLSession:didReceiveChallenge:completionHandler:` + - `URLSessionDidFinishEventsForBackgroundURLSession:` + + ### `NSURLSessionTaskDelegate` + + - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` + - `URLSession:task:didReceiveChallenge:completionHandler:` + - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` + - `URLSession:task:didCompleteWithError:` + + ### `NSURLSessionDataDelegate` + + - `URLSession:dataTask:didReceiveResponse:completionHandler:` + - `URLSession:dataTask:didBecomeDownloadTask:` + - `URLSession:dataTask:didReceiveData:` + - `URLSession:dataTask:willCacheResponse:completionHandler:` + + ### `NSURLSessionDownloadDelegate` + + - `URLSession:downloadTask:didFinishDownloadingToURL:` + - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:` + - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:` + + If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. + + ## Network Reachability Monitoring + + Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. + + ## NSCoding Caveats + + - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`. + + ## NSCopying Caveats + + - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original. + - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied. + */ + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +@interface AFURLSessionManager : NSObject + +/** + The managed session. + */ +@property (readonly, nonatomic, strong) NSURLSession *session; + +/** + The operation queue on which delegate callbacks are run. + */ +@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) id responseSerializer; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///-------------------------------------- +/// @name Monitoring Network Reachability +///-------------------------------------- + +/** + The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. + */ +@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; + +///---------------------------- +/// @name Getting Session Tasks +///---------------------------- + +/** + The data, upload, and download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *tasks; + +/** + The data tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *dataTasks; + +/** + The upload tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *uploadTasks; + +/** + The download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *downloadTasks; + +///------------------------------- +/// @name Managing Callback Queues +///------------------------------- + +/** + The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. + */ +@property (nonatomic, strong) dispatch_queue_t completionQueue; + +/** + The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. + */ +@property (nonatomic, strong) dispatch_group_t completionGroup; + +///--------------------------------- +/// @name Working Around System Bugs +///--------------------------------- + +/** + Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default. + + @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again. + + @see https://github.com/AFNetworking/AFNetworking/issues/1675 + */ +@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a manager for a session created with the specified configuration. This is the designated initializer. + + @param configuration The configuration used to create the managed session. + + @return A manager for a newly-created session. + */ +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration; + +/** + Invalidates the managed session, optionally canceling pending tasks. + + @param cancelPendingTasks Whether or not to cancel pending tasks. + */ +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks; + +///------------------------- +/// @name Running Data Tasks +///------------------------- + +/** + Creates an `NSURLSessionDataTask` with the specified request. + + @param request The HTTP request for the request. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +///--------------------------- +/// @name Running Upload Tasks +///--------------------------- + +/** + Creates an `NSURLSessionUploadTask` with the specified request for a local file. + + @param request The HTTP request for the request. + @param fileURL A URL to the local file to be uploaded. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + + @see `attemptsToRecreateUploadTasksForBackgroundSessions` + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. + + @param request The HTTP request for the request. + @param bodyData A data object containing the HTTP body to be uploaded. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(NSData *)bodyData + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified streaming request. + + @param request The HTTP request for the request. + @param progress A progress object monitoring the current upload progress. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + +///----------------------------- +/// @name Running Download Tasks +///----------------------------- + +/** + Creates an `NSURLSessionDownloadTask` with the specified request. + + @param request The HTTP request for the request. + @param progress A progress object monitoring the current download progress. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + + @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + +/** + Creates an `NSURLSessionDownloadTask` with the specified resume data. + + @param resumeData The data used to resume downloading. + @param progress A progress object monitoring the current download progress. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + +///--------------------------------- +/// @name Getting Progress for Tasks +///--------------------------------- + +/** + Returns the upload progress of the specified task. + + @param uploadTask The session upload task. Must not be `nil`. + + @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. + */ +- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask; + +/** + Returns the download progress of the specified task. + + @param downloadTask The session download task. Must not be `nil`. + + @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. + */ +- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask; + +///----------------------------------------- +/// @name Setting Session Delegate Callbacks +///----------------------------------------- + +/** + Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`. + + @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. + */ +- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block; + +/** + Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. + + @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. + */ +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; + +///-------------------------------------- +/// @name Setting Task Delegate Callbacks +///-------------------------------------- + +/** + Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`. + + @param block A block object to be executed when a task requires a new request body stream. + */ +- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; + +/** + Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. + + @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. + */ +- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; + +/** + Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. + + @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. + */ +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; + +/** + Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. + + @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; + +/** + Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. + + @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. + */ +- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block; + +///------------------------------------------- +/// @name Setting Data Task Delegate Callbacks +///------------------------------------------- + +/** + Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`. + + @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. + */ +- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; + +/** + Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. + + @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. + */ +- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; + +/** + Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; + +/** + Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. + + @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. + */ +- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; + +/** + Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. + + @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. + */ +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block; + +///----------------------------------------------- +/// @name Setting Download Task Delegate Callbacks +///----------------------------------------------- + +/** + Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`. + + @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. + */ +- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; + +/** + Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; + +/** + Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. + + @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. + */ +- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; + +@end + +#endif + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when a task begins executing. + + @deprecated Use `AFNetworkingTaskDidResumeNotification` instead. + */ +extern NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE; + +/** + Posted when a task resumes. + */ +extern NSString * const AFNetworkingTaskDidResumeNotification; + +/** + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. + + @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE; + +/** + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. + */ +extern NSString * const AFNetworkingTaskDidCompleteNotification; + +/** + Posted when a task suspends its execution. + */ +extern NSString * const AFNetworkingTaskDidSuspendNotification; + +/** + Posted when a session is invalidated. + */ +extern NSString * const AFURLSessionDidInvalidateNotification; + +/** + Posted when a session download task encountered an error when moving the temporary download file to a specified destination. + */ +extern NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; + +/** + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. + + @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE; + +/** + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. + */ +extern NSString * const AFNetworkingTaskDidCompleteResponseDataKey; + +/** + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. + + @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE; + +/** + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. + */ +extern NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; + +/** + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. + + @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE; + +/** + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. + */ +extern NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; + +/** + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. + + @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE; + +/** + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. + */ +extern NSString * const AFNetworkingTaskDidCompleteAssetPathKey; + +/** + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. + + @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead. + */ +extern NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE; + +/** + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. + */ +extern NSString * const AFNetworkingTaskDidCompleteErrorKey; diff --git a/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.m b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.m new file mode 100644 index 00000000..0775c4da --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/AFNetworking/AFURLSessionManager.m @@ -0,0 +1,1036 @@ +// AFURLSessionManager.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLSessionManager.h" + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +static dispatch_queue_t url_session_manager_creation_queue() { + static dispatch_queue_t af_url_session_manager_creation_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_creation_queue = dispatch_queue_create("com.alamofire.networking.session.manager.creation", DISPATCH_QUEUE_SERIAL); + }); + + return af_url_session_manager_creation_queue; +} + +static dispatch_queue_t url_session_manager_processing_queue() { + static dispatch_queue_t af_url_session_manager_processing_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_processing_queue = dispatch_queue_create("com.alamofire.networking.session.manager.processing", DISPATCH_QUEUE_CONCURRENT); + }); + + return af_url_session_manager_processing_queue; +} + +static dispatch_group_t url_session_manager_completion_group() { + static dispatch_group_t af_url_session_manager_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_completion_group = dispatch_group_create(); + }); + + return af_url_session_manager_completion_group; +} + +NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume"; +NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete"; +NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend"; +NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; +NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error"; + +NSString * const AFNetworkingTaskDidStartNotification = @"com.alamofire.networking.task.resume"; // Deprecated +NSString * const AFNetworkingTaskDidFinishNotification = @"com.alamofire.networking.task.complete"; // Deprecated + +NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; +NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; +NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; +NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error"; +NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; + +NSString * const AFNetworkingTaskDidFinishSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; // Deprecated +NSString * const AFNetworkingTaskDidFinishResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; // Deprecated +NSString * const AFNetworkingTaskDidFinishResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; // Deprecated +NSString * const AFNetworkingTaskDidFinishErrorKey = @"com.alamofire.networking.task.complete.error"; // Deprecated +NSString * const AFNetworkingTaskDidFinishAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; // Deprecated + +static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock"; + +static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3; + +static void * AFTaskStateChangedContext = &AFTaskStateChangedContext; + +typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); + +typedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); +typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session); + +typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task); +typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend); +typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error); + +typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response); +typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask); +typedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data); +typedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse); + +typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location); +typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); +typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes); + +typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error); + +#pragma mark - + +@interface AFURLSessionManagerTaskDelegate : NSObject +@property (nonatomic, weak) AFURLSessionManager *manager; +@property (nonatomic, strong) NSMutableData *mutableData; +@property (nonatomic, strong) NSProgress *progress; +@property (nonatomic, copy) NSURL *downloadFileURL; +@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler; +@end + +@implementation AFURLSessionManagerTaskDelegate + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.mutableData = [NSMutableData data]; + + self.progress = [NSProgress progressWithTotalUnitCount:0]; + + return self; +} + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(__unused NSURLSession *)session + task:(__unused NSURLSessionTask *)task + didSendBodyData:(__unused int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + self.progress.totalUnitCount = totalBytesExpectedToSend; + self.progress.completedUnitCount = totalBytesSent; +} + +- (void)URLSession:(__unused NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + __strong AFURLSessionManager *manager = self.manager; + + __block id responseObject = nil; + + __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer; + + if (self.downloadFileURL) { + userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL; + } else if (self.mutableData) { + userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = [NSData dataWithData:self.mutableData]; + } + + if (error) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = error; + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, error); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + } else { + dispatch_async(url_session_manager_processing_queue(), ^{ + NSError *serializationError = nil; + responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:[NSData dataWithData:self.mutableData] error:&serializationError]; + + if (self.downloadFileURL) { + responseObject = self.downloadFileURL; + } + + if (responseObject) { + userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject; + } + + if (serializationError) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError; + } + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, serializationError); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + }); + } +#pragma clang diagnostic pop +} + +#pragma mark - NSURLSessionDataTaskDelegate + +- (void)URLSession:(__unused NSURLSession *)session + dataTask:(__unused NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + [self.mutableData appendData:data]; +} + +#pragma mark - NSURLSessionDownloadTaskDelegate + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + NSError *fileManagerError = nil; + self.downloadFileURL = nil; + + if (self.downloadTaskDidFinishDownloading) { + self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (self.downloadFileURL) { + [[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError]; + + if (fileManagerError) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo]; + } + } + } +} + +- (void)URLSession:(__unused NSURLSession *)session + downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask + didWriteData:(__unused int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + self.progress.totalUnitCount = totalBytesExpectedToWrite; + self.progress.completedUnitCount = totalBytesWritten; +} + +- (void)URLSession:(__unused NSURLSession *)session + downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes { + self.progress.totalUnitCount = expectedTotalBytes; + self.progress.completedUnitCount = fileOffset; +} + +@end + +#pragma mark - + +@interface AFURLSessionManager () +@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration; +@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue; +@property (readwrite, nonatomic, strong) NSURLSession *session; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier; +@property (readwrite, nonatomic, strong) NSLock *lock; +@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid; +@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession; +@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume; +@end + +@implementation AFURLSessionManager + +- (instancetype)init { + return [self initWithSessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + self = [super init]; + if (!self) { + return nil; + } + + if (!configuration) { + configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + } + + self.sessionConfiguration = configuration; + + self.operationQueue = [[NSOperationQueue alloc] init]; + self.operationQueue.maxConcurrentOperationCount = 1; + + self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue]; + + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + + self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; + + self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init]; + + self.lock = [[NSLock alloc] init]; + self.lock.name = AFURLSessionManagerLockName; + + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + for (NSURLSessionDataTask *task in dataTasks) { + [self addDelegateForDataTask:task completionHandler:nil]; + } + + for (NSURLSessionUploadTask *uploadTask in uploadTasks) { + [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil]; + } + + for (NSURLSessionDownloadTask *downloadTask in downloadTasks) { + [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil]; + } + }]; + + return self; +} + +#pragma mark - + +- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + AFURLSessionManagerTaskDelegate *delegate = nil; + [self.lock lock]; + delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)]; + [self.lock unlock]; + + return delegate; +} + +- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate + forTask:(NSURLSessionTask *)task +{ + NSParameterAssert(task); + NSParameterAssert(delegate); + + [task addObserver:self forKeyPath:NSStringFromSelector(@selector(state)) options:(NSKeyValueObservingOptions)(NSKeyValueObservingOptionOld |NSKeyValueObservingOptionNew) context:AFTaskStateChangedContext]; + [self.lock lock]; + self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate; + [self.lock unlock]; +} + +- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + [self setDelegate:delegate forTask:dataTask]; +} + +- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + int64_t totalUnitCount = uploadTask.countOfBytesExpectedToSend; + if(totalUnitCount == NSURLSessionTransferSizeUnknown) { + NSString *contentLength = [uploadTask.originalRequest valueForHTTPHeaderField:@"Content-Length"]; + if(contentLength) { + totalUnitCount = (int64_t) [contentLength longLongValue]; + } + } + + delegate.progress = [NSProgress progressWithTotalUnitCount:totalUnitCount]; + delegate.progress.pausingHandler = ^{ + [uploadTask suspend]; + }; + delegate.progress.cancellationHandler = ^{ + [uploadTask cancel]; + }; + + if (progress) { + *progress = delegate.progress; + } + + [self setDelegate:delegate forTask:uploadTask]; +} + +- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + if (destination) { + delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) { + return destination(location, task.response); + }; + } + + if (progress) { + *progress = delegate.progress; + } + + [self setDelegate:delegate forTask:downloadTask]; +} + +- (void)removeDelegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(state)) context:AFTaskStateChangedContext]; + [self.lock lock]; + [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)]; + [self.lock unlock]; +} + +- (void)removeAllDelegates { + [self.lock lock]; + [self.mutableTaskDelegatesKeyedByTaskIdentifier removeAllObjects]; + [self.lock unlock]; +} + +#pragma mark - + +- (NSArray *)tasksForKeyPath:(NSString *)keyPath { + __block NSArray *tasks = nil; + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) { + tasks = dataTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) { + tasks = uploadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) { + tasks = downloadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) { + tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"]; + } + + dispatch_semaphore_signal(semaphore); + }]; + + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + return tasks; +} + +- (NSArray *)tasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)dataTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)uploadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)downloadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +#pragma mark - + +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks { + dispatch_async(dispatch_get_main_queue(), ^{ + if (cancelPendingTasks) { + [self.session invalidateAndCancel]; + } else { + [self.session finishTasksAndInvalidate]; + } + }); +} + +#pragma mark - + +- (void)setResponseSerializer:(id )responseSerializer { + NSParameterAssert(responseSerializer); + + _responseSerializer = responseSerializer; +} + +#pragma mark - + +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionDataTask *dataTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + dataTask = [self.session dataTaskWithRequest:request]; + }); + + [self addDelegateForDataTask:dataTask completionHandler:completionHandler]; + + return dataTask; +} + +#pragma mark - + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; + }); + + if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) { + for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) { + uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; + } + } + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(NSData *)bodyData + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData]; + }); + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + __block NSURLSessionUploadTask *uploadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + uploadTask = [self.session uploadTaskWithStreamedRequest:request]; + }); + + [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + + return uploadTask; +} + +#pragma mark - + +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + __block NSURLSessionDownloadTask *downloadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + downloadTask = [self.session downloadTaskWithRequest:request]; + }); + + [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(NSProgress * __autoreleasing *)progress + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + __block NSURLSessionDownloadTask *downloadTask = nil; + dispatch_sync(url_session_manager_creation_queue(), ^{ + downloadTask = [self.session downloadTaskWithResumeData:resumeData]; + }); + + [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +#pragma mark - + +- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask { + return [[self delegateForTask:uploadTask] progress]; +} + +- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask { + return [[self delegateForTask:downloadTask] progress]; +} + +#pragma mark - + +- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block { + self.sessionDidBecomeInvalid = block; +} + +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block { + self.sessionDidReceiveAuthenticationChallenge = block; +} + +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block { + self.didFinishEventsForBackgroundURLSession = block; +} + +#pragma mark - + +- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block { + self.taskNeedNewBodyStream = block; +} + +- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block { + self.taskWillPerformHTTPRedirection = block; +} + +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block { + self.taskDidReceiveAuthenticationChallenge = block; +} + +- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block { + self.taskDidSendBodyData = block; +} + +- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block { + self.taskDidComplete = block; +} + +#pragma mark - + +- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block { + self.dataTaskDidReceiveResponse = block; +} + +- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block { + self.dataTaskDidBecomeDownloadTask = block; +} + +- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block { + self.dataTaskDidReceiveData = block; +} + +- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block { + self.dataTaskWillCacheResponse = block; +} + +#pragma mark - + +- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block { + self.downloadTaskDidFinishDownloading = block; +} + +- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block { + self.downloadTaskDidWriteData = block; +} + +- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block { + self.downloadTaskDidResume = block; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, self.session, self.operationQueue]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) { + return self.taskWillPerformHTTPRedirection != nil; + } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) { + return self.dataTaskDidReceiveResponse != nil; + } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) { + return self.dataTaskWillCacheResponse != nil; + } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) { + return self.didFinishEventsForBackgroundURLSession != nil; + } + + return [[self class] instancesRespondToSelector:selector]; +} + +#pragma mark - NSKeyValueObserving + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context +{ + if (context == AFTaskStateChangedContext && [keyPath isEqualToString:@"state"]) { + if (change[NSKeyValueChangeOldKey] && change[NSKeyValueChangeNewKey] && [change[NSKeyValueChangeNewKey] isEqual:change[NSKeyValueChangeOldKey]]) { + return; + } + + NSString *notificationName = nil; + switch ([(NSURLSessionTask *)object state]) { + case NSURLSessionTaskStateRunning: + notificationName = AFNetworkingTaskDidResumeNotification; + break; + case NSURLSessionTaskStateSuspended: + notificationName = AFNetworkingTaskDidSuspendNotification; + break; + case NSURLSessionTaskStateCompleted: + // AFNetworkingTaskDidFinishNotification posted by task completion handlers + default: + break; + } + + if (notificationName) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:object]; + }); + } + } else { + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + } +} + +#pragma mark - NSURLSessionDelegate + +- (void)URLSession:(NSURLSession *)session +didBecomeInvalidWithError:(NSError *)error +{ + if (self.sessionDidBecomeInvalid) { + self.sessionDidBecomeInvalid(session, error); + } + + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + NSArray *tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"]; + for (NSURLSessionTask *task in tasks) { + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(state)) context:AFTaskStateChangedContext]; + } + + [self removeAllDelegates]; + }]; + + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session]; +} + +- (void)URLSession:(NSURLSession *)session +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling; + __block NSURLCredential *credential = nil; + + if (self.sessionDidReceiveAuthenticationChallenge) { + disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential); + } else { + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + if (credential) { + disposition = NSURLSessionAuthChallengeUseCredential; + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } else { + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest *))completionHandler +{ + NSURLRequest *redirectRequest = request; + + if (self.taskWillPerformHTTPRedirection) { + redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request); + } + + if (completionHandler) { + completionHandler(redirectRequest); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling; + __block NSURLCredential *credential = nil; + + if (self.taskDidReceiveAuthenticationChallenge) { + disposition = self.taskDidReceiveAuthenticationChallenge(session, task, challenge, &credential); + } else { + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + disposition = NSURLSessionAuthChallengeUseCredential; + credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + } else { + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } + } else { + disposition = NSURLSessionAuthChallengePerformDefaultHandling; + } + } + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler +{ + NSInputStream *inputStream = nil; + + if (self.taskNeedNewBodyStream) { + inputStream = self.taskNeedNewBodyStream(session, task); + } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { + inputStream = [task.originalRequest.HTTPBodyStream copy]; + } + + if (completionHandler) { + completionHandler(inputStream); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + + int64_t totalUnitCount = totalBytesExpectedToSend; + if(totalUnitCount == NSURLSessionTransferSizeUnknown) { + NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@"Content-Length"]; + if(contentLength) { + totalUnitCount = (int64_t) [contentLength longLongValue]; + } + } + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalUnitCount]; + + if (self.taskDidSendBodyData) { + self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + + // delegate may be nil when completing a task in the background + if (delegate) { + [delegate URLSession:session task:task didCompleteWithError:error]; + + [self removeDelegateForTask:task]; + } + + if (self.taskDidComplete) { + self.taskDidComplete(session, task, error); + } + +} + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler +{ + NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow; + + if (self.dataTaskDidReceiveResponse) { + disposition = self.dataTaskDidReceiveResponse(session, dataTask, response); + } + + if (completionHandler) { + completionHandler(disposition); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + if (delegate) { + [self removeDelegateForTask:dataTask]; + [self setDelegate:delegate forTask:downloadTask]; + } + + if (self.dataTaskDidBecomeDownloadTask) { + self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + [delegate URLSession:session dataTask:dataTask didReceiveData:data]; + + if (self.dataTaskDidReceiveData) { + self.dataTaskDidReceiveData(session, dataTask, data); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + willCacheResponse:(NSCachedURLResponse *)proposedResponse + completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler +{ + NSCachedURLResponse *cachedResponse = proposedResponse; + + if (self.dataTaskWillCacheResponse) { + cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse); + } + + if (completionHandler) { + completionHandler(cachedResponse); + } +} + +- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session { + if (self.didFinishEventsForBackgroundURLSession) { + dispatch_async(dispatch_get_main_queue(), ^{ + self.didFinishEventsForBackgroundURLSession(session); + }); + } +} + +#pragma mark - NSURLSessionDownloadDelegate + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + if (self.downloadTaskDidFinishDownloading) { + NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (fileURL) { + NSError *error = nil; + [[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]; + if (error) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo]; + } + + return; + } + } + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + if (delegate) { + [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location]; + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + + if (self.downloadTaskDidWriteData) { + self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes]; + + if (self.downloadTaskDidResume) { + self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes); + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder { + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + + self = [self initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone { + return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration]; +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/LICENSE b/src/ios/GMImagePicker/AFNetworking/LICENSE new file mode 100644 index 00000000..0616192d --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/ios/GMImagePicker/AFNetworking/README.md b/src/ios/GMImagePicker/AFNetworking/README.md new file mode 100644 index 00000000..77d285e2 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/README.md @@ -0,0 +1,383 @@ +

+ AFNetworking +

+ +[![Build Status](https://travis-ci.org/AFNetworking/AFNetworking.svg)](https://travis-ci.org/AFNetworking/AFNetworking) + +AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. + +Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. + +Choose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did! + +## How To Get Started + +- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/archive/master.zip) and try out the included Mac and iPhone example apps +- Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles on the Wiki](https://github.com/AFNetworking/AFNetworking/wiki) +- Check out the [documentation](http://cocoadocs.org/docsets/AFNetworking/2.0.0/) for a comprehensive look at all of the APIs available in AFNetworking +- Read the [AFNetworking 2.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-2.0-Migration-Guide) for an overview of the architectural changes from 1.0. + +## Communication + +- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). (Tag 'afnetworking') +- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). +- If you **found a bug**, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + +### Installation with CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the ["Getting Started" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking). + +#### Podfile + +```ruby +platform :ios, '7.0' +pod "AFNetworking", "~> 2.0" +``` + +## Requirements + +| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Notes | +|:--------------------:|:---------------------------:|:----------------------------:|:-------------------------------------------------------------------------:| +| 2.x | iOS 6 | OS X 10.8 | Xcode 5 is required. `AFHTTPSessionManager` requires iOS 7 or OS X 10.9. | +| [1.x](https://github.com/AFNetworking/AFNetworking/tree/1.x) | iOS 5 | Mac OS X 10.7 | | +| [0.10.x](https://github.com/AFNetworking/AFNetworking/tree/0.10.x) | iOS 4 | Mac OS X 10.6 | | + +(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)). + +## Architecture + +### NSURLConnection + +- `AFURLConnectionOperation` +- `AFHTTPRequestOperation` +- `AFHTTPRequestOperationManager` + +### NSURLSession _(iOS 7 / Mac OS X 10.9)_ + +- `AFURLSessionManager` +- `AFHTTPSessionManager` + +### Serialization + +* `` + - `AFHTTPRequestSerializer` + - `AFJSONRequestSerializer` + - `AFPropertyListRequestSerializer` +* `` + - `AFHTTPResponseSerializer` + - `AFJSONResponseSerializer` + - `AFXMLParserResponseSerializer` + - `AFXMLDocumentResponseSerializer` _(Mac OS X)_ + - `AFPropertyListResponseSerializer` + - `AFImageResponseSerializer` + - `AFCompoundResponseSerializer` + +### Additional Functionality + +- `AFSecurityPolicy` +- `AFNetworkReachabilityManager` + +## Usage + +### HTTP Request Operation Manager + +`AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. + +#### `GET` Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +[manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +#### `POST` URL-Form-Encoded Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +NSDictionary *parameters = @{@"foo": @"bar"}; +[manager POST:@"http://example.com/resources.json" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +#### `POST` Multi-Part Request + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +NSDictionary *parameters = @{@"foo": @"bar"}; +NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; +[manager POST:@"http://example.com/resources.json" parameters:parameters constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:filePath name:@"image" error:nil]; +} success:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"Success: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +``` + +--- + +### AFURLSessionManager + +`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + +#### Creating a Download Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/download.zip"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) { + NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; + return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; +} completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) { + NSLog(@"File downloaded to: %@", filePath); +}]; +[downloadTask resume]; +``` + +#### Creating an Upload Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; +NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithRequest:request fromFile:filePath progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"Success: %@ %@", response, responseObject); + } +}]; +[uploadTask resume]; +``` + +#### Creating an Upload Task for a Multi-Part Request, with Progress + +```objective-c +NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"file://path/to/image.jpg"] name:@"file" fileName:@"filename.jpg" mimeType:@"image/jpeg" error:nil]; + } error:nil]; + +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; +NSProgress *progress = nil; + +NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } +}]; + +[uploadTask resume]; +``` + +#### Creating a Data Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } +}]; +[dataTask resume]; +``` + +--- + +### Request Serialization + +Request serializers create requests from URL strings, encoding parameters as either a query string or HTTP body. + +```objective-c +NSString *URLString = @"http://example.com"; +NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]}; +``` + +#### Query String Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"GET" URLString:URLString parameters:parameters error:nil]; +``` + + GET http://example.com?foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### URL Form Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters]; +``` + + POST http://example.com/ + Content-Type: application/x-www-form-urlencoded + + foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### JSON Parameter Encoding + +```objective-c +[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters]; +``` + + POST http://example.com/ + Content-Type: application/json + + {"foo": "bar", "baz": [1,2,3]} + +--- + +### Network Reachability Manager + +`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + +#### Shared Network Reachability + +```objective-c +[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); +}]; +``` + +#### HTTP Manager Reachability + +```objective-c +NSURL *baseURL = [NSURL URLWithString:@"http://example.com/"]; +AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL]; + +NSOperationQueue *operationQueue = manager.operationQueue; +[manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusReachableViaWWAN: + case AFNetworkReachabilityStatusReachableViaWiFi: + [operationQueue setSuspended:NO]; + break; + case AFNetworkReachabilityStatusNotReachable: + default: + [operationQueue setSuspended:YES]; + break; + } +}]; + +[manager.reachabilityManager startMonitoring]; +``` + +--- + +### Security Policy + +`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + +Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + +#### Allowing Invalid SSL Certificates + +```objective-c +AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production +``` + +--- + +### AFHTTPRequestOperation + +`AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. + +Although `AFHTTPRequestOperationManager` is usually the best way to go about making requests, `AFHTTPRequestOperation` can be used by itself. + +#### `GET` with `AFHTTPRequestOperation` + +```objective-c +NSURL *URL = [NSURL URLWithString:@"http://example.com/resources/123.json"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; +AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; +op.responseSerializer = [AFJSONResponseSerializer serializer]; +[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + NSLog(@"JSON: %@", responseObject); +} failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"Error: %@", error); +}]; +[[NSOperationQueue mainQueue] addOperation:op]; +``` + +#### Batch of Operations + +```objective-c +NSMutableArray *mutableOperations = [NSMutableArray array]; +for (NSURL *fileURL in filesToUpload) { + NSURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:fileURL name:@"images[]" error:nil]; + }]; + + AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + + [mutableOperations addObject:operation]; +} + +NSArray *operations = [AFURLConnectionOperation batchOfRequestOperations:@[...] progressBlock:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) { + NSLog(@"%lu of %lu complete", numberOfFinishedOperations, totalNumberOfOperations); +} completionBlock:^(NSArray *operations) { + NSLog(@"All operations in batch complete"); +}]; +[[NSOperationQueue mainQueue] addOperations:operations waitUntilFinished:NO]; +``` + +## Unit Tests + +AFNetworking includes a suite of unit tests within the Tests subdirectory. In order to run the unit tests, you must install the testing dependencies via [CocoaPods](http://cocoapods.org/): + + $ cd Tests + $ pod install + +Once testing dependencies are installed, you can execute the test suite via the 'iOS Tests' and 'OS X Tests' schemes within Xcode. + +### Running Tests from the Command Line + +Tests can also be run from the command line or within a continuous integration environment. The [`xcpretty`](https://github.com/mneorr/xcpretty) utility needs to be installed before running the tests from the command line: + + $ gem install xcpretty + +Once `xcpretty` is installed, you can execute the suite via `rake test`. + +## Credits + +AFNetworking was originally created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla). + +AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/). + +And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors). + +## Contact + +Follow AFNetworking on Twitter ([@AFNetworking](https://twitter.com/AFNetworking)) + +### Maintainers + +- [Mattt Thompson](http://github.com/mattt) ([@mattt](https://twitter.com/mattt)) + +## License + +AFNetworking is available under the MIT license. See the LICENSE file for more info. diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 100644 index 00000000..312d680e --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1,76 @@ +// AFNetworkActivityIndicatorManager.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +/** + `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. + + You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: + + [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; + + By setting `isNetworkActivityIndicatorVisible` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. + + See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: + http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 + */ +@interface AFNetworkActivityIndicatorManager : NSObject + +/** + A Boolean value indicating whether the manager is enabled. + + If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. + */ +@property (nonatomic, assign, getter = isEnabled) BOOL enabled; + +/** + A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. + */ +@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; + +/** + Returns the shared network activity indicator manager object for the system. + + @return The systemwide network activity indicator manager. + */ ++ (instancetype)sharedManager; + +/** + Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. + */ +- (void)incrementActivityCount; + +/** + Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator. + */ +- (void)decrementActivityCount; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m new file mode 100644 index 00000000..c2d855a5 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m @@ -0,0 +1,171 @@ +// AFNetworkActivityIndicatorManager.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkActivityIndicatorManager.h" + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17; + +static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) { + if ([[notification object] isKindOfClass:[AFURLConnectionOperation class]]) { + return [(AFURLConnectionOperation *)[notification object] request]; + } + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 + if ([[notification object] respondsToSelector:@selector(originalRequest)]) { + return [(NSURLSessionTask *)[notification object] originalRequest]; + } +#endif + + return nil; +} + +@interface AFNetworkActivityIndicatorManager () +@property (readwrite, nonatomic, assign) NSInteger activityCount; +@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer; +@property (readonly, nonatomic, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +- (void)updateNetworkActivityIndicatorVisibility; +- (void)updateNetworkActivityIndicatorVisibilityDelayed; +@end + +@implementation AFNetworkActivityIndicatorManager +@dynamic networkActivityIndicatorVisible; + ++ (instancetype)sharedManager { + static AFNetworkActivityIndicatorManager *_sharedManager = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _sharedManager = [[self alloc] init]; + }); + + return _sharedManager; +} + ++ (NSSet *)keyPathsForValuesAffectingIsNetworkActivityIndicatorVisible { + return [NSSet setWithObject:@"activityCount"]; +} + +- (id)init { + self = [super init]; + if (!self) { + return nil; + } + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil]; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil]; +#endif + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [_activityIndicatorVisibilityTimer invalidate]; +} + +- (void)updateNetworkActivityIndicatorVisibilityDelayed { + if (self.enabled) { + // Delay hiding of activity indicator for a short interval, to avoid flickering + if (![self isNetworkActivityIndicatorVisible]) { + [self.activityIndicatorVisibilityTimer invalidate]; + self.activityIndicatorVisibilityTimer = [NSTimer timerWithTimeInterval:kAFNetworkActivityIndicatorInvisibilityDelay target:self selector:@selector(updateNetworkActivityIndicatorVisibility) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.activityIndicatorVisibilityTimer forMode:NSRunLoopCommonModes]; + } else { + [self performSelectorOnMainThread:@selector(updateNetworkActivityIndicatorVisibility) withObject:nil waitUntilDone:NO modes:@[NSRunLoopCommonModes]]; + } + } +} + +- (BOOL)isNetworkActivityIndicatorVisible { + return self.activityCount > 0; +} + +- (void)updateNetworkActivityIndicatorVisibility { + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:[self isNetworkActivityIndicatorVisible]]; +} + +- (void)setActivityCount:(NSInteger)activityCount { + @synchronized(self) { + _activityCount = activityCount; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)incrementActivityCount { + [self willChangeValueForKey:@"activityCount"]; + @synchronized(self) { + _activityCount++; + } + [self didChangeValueForKey:@"activityCount"]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)decrementActivityCount { + [self willChangeValueForKey:@"activityCount"]; + @synchronized(self) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + _activityCount = MAX(_activityCount - 1, 0); +#pragma clang diagnostic pop + } + [self didChangeValueForKey:@"activityCount"]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateNetworkActivityIndicatorVisibilityDelayed]; + }); +} + +- (void)networkRequestDidStart:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self incrementActivityCount]; + } +} + +- (void)networkRequestDidFinish:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self decrementActivityCount]; + } +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h new file mode 100644 index 00000000..1c1f8dd6 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -0,0 +1,64 @@ +// UIActivityIndicatorView+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. + */ +@interface UIActivityIndicatorView (AFNetworking) + +///---------------------------------- +/// @name Animating for Session Tasks +///---------------------------------- + +/** + Binds the animating state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; +#endif + +///--------------------------------------- +/// @name Animating for Request Operations +///--------------------------------------- + +/** + Binds the animating state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m new file mode 100644 index 00000000..6627dbb1 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m @@ -0,0 +1,97 @@ +// UIActivityIndicatorView+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIActivityIndicatorView+AFNetworking.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +@implementation UIActivityIndicatorView (AFNetworking) + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { + if (task.state != NSURLSessionTaskStateCompleted) { + if (task.state == NSURLSessionTaskStateRunning) { + [self startAnimating]; + } else { + [self stopAnimating]; + } + + [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; + } + } +} +#endif + +#pragma mark - + +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; + + if (operation) { + if (![operation isFinished]) { + if ([operation isExecuting]) { + [self startAnimating]; + } else { + [self stopAnimating]; + } + + [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation]; + } + } +} + +#pragma mark - + +- (void)af_startAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ + [self startAnimating]; + }); +} + +- (void)af_stopAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ + [self stopAnimating]; + }); +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h new file mode 100644 index 00000000..b94f1cb8 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h @@ -0,0 +1,96 @@ +// UIAlertView+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIAlertView` class. The methods in this category provide support for automatically showing an alert if a session task or request operation finishes with an error. Alert title and message are filled from the corresponding `localizedDescription` & `localizedRecoverySuggestion` or `localizedFailureReason` of the error. + */ +@interface UIAlertView (AFNetworking) + +///------------------------------------- +/// @name Showing Alert for Session Task +///------------------------------------- + +/** + Shows an alert view with the error of the specified session task, if any. + + @param task The session task. + @param delegate The alert view delegate. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate; +#endif + +/** + Shows an alert view with the error of the specified session task, if any, with a custom cancel button title and other button titles. + + @param task The session task. + @param delegate The alert view delegate. + @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. + @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; +#endif + +///------------------------------------------ +/// @name Showing Alert for Request Operation +///------------------------------------------ + +/** + Shows an alert view with the error of the specified request operation, if any. + + @param operation The request operation. + @param delegate The alert view delegate. + */ ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate; + +/** + Shows an alert view with the error of the specified request operation, if any, with a custom cancel button title and other button titles. + + @param operation The request operation. + @param delegate The alert view delegate. + @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. + @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. + */ ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m new file mode 100644 index 00000000..b7e2a26c --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m @@ -0,0 +1,111 @@ +// UIAlertView+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIAlertView+AFNetworking.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLConnectionOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static void AFGetAlertViewTitleAndMessageFromError(NSError *error, NSString * __autoreleasing *title, NSString * __autoreleasing *message) { + if (error.localizedDescription && (error.localizedRecoverySuggestion || error.localizedFailureReason)) { + *title = error.localizedDescription; + + if (error.localizedRecoverySuggestion) { + *message = error.localizedRecoverySuggestion; + } else { + *message = error.localizedFailureReason; + } + } else if (error.localizedDescription) { + *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); + *message = error.localizedDescription; + } else { + *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); + *message = [NSString stringWithFormat:NSLocalizedStringFromTable(@"%@ Error: %ld", @"AFNetworking", @"Fallback Error Failure Reason Format"), error.domain, (long)error.code]; + } +} + +@implementation UIAlertView (AFNetworking) + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate +{ + [self showAlertViewForTaskWithErrorOnCompletion:task delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlertView Cancel Button Title") otherButtonTitles:nil, nil]; +} + ++ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION +{ + __block id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingTaskDidCompleteNotification object:task queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { + + NSError *error = notification.userInfo[AFNetworkingTaskDidCompleteErrorKey]; + if (error) { + NSString *title, *message; + AFGetAlertViewTitleAndMessageFromError(error, &title, &message); + + [[[UIAlertView alloc] initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:otherButtonTitles, nil] show]; + } + + [[NSNotificationCenter defaultCenter] removeObserver:observer name:AFNetworkingTaskDidCompleteNotification object:notification.object]; + }]; +} +#endif + +#pragma mark - + ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate +{ + [self showAlertViewForRequestOperationWithErrorOnCompletion:operation delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlert View Cancel Button Title") otherButtonTitles:nil, nil]; +} + ++ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation + delegate:(id)delegate + cancelButtonTitle:(NSString *)cancelButtonTitle + otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION +{ + __block id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingOperationDidFinishNotification object:operation queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { + + if (notification.object && [notification.object isKindOfClass:[AFURLConnectionOperation class]]) { + NSError *error = [(AFURLConnectionOperation *)notification.object error]; + if (error) { + NSString *title, *message; + AFGetAlertViewTitleAndMessageFromError(error, &title, &message); + + [[[UIAlertView alloc] initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:otherButtonTitles, nil] show]; + } + } + + [[NSNotificationCenter defaultCenter] removeObserver:observer name:AFNetworkingOperationDidFinishNotification object:notification.object]; + }]; +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h new file mode 100644 index 00000000..091b8e90 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h @@ -0,0 +1,179 @@ +// UIButton+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@protocol AFURLResponseSerialization, AFImageCache; + +/** + This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL. + */ +@interface UIButton (AFNetworking) + +///---------------------------- +/// @name Accessing Image Cache +///---------------------------- + +/** + The image cache used to improve image loadiing performance on scroll views. By default, `UIButton` will use the `sharedImageCache` of `UIImageView`. + */ ++ (id )sharedImageCache; + +/** + Set the cache used for image loading. + + @param imageCache The image cache. + */ ++ (void)setSharedImageCache:(id )imageCache; + +///------------------------------------ +/// @name Accessing Response Serializer +///------------------------------------ + +/** + The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. + + @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + */ +@property (nonatomic, strong) id imageResponseSerializer; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the request and response parameters will be `nil`. + @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure; + + +///------------------------------- +/// @name Setting Background Image +///------------------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous background image request for the receiver will be cancelled. + + If the background image is cached locally, the background image is set immediately, otherwise the specified placeholder background image will be set immediately, and then the remote background image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setBackgroundImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure; + + +///------------------------------ +/// @name Canceling Image Loading +///------------------------------ + +/** + Cancels any executing image operation for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelImageRequestOperationForState:(UIControlState)state; + +/** + Cancels any executing background image operation for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m new file mode 100644 index 00000000..9fb24add --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m @@ -0,0 +1,262 @@ +// UIButton+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIButton+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLResponseSerialization.h" +#import "AFHTTPRequestOperation.h" + +#import "UIImageView+AFNetworking.h" + +@interface UIButton (_AFNetworking) +@end + +@implementation UIButton (_AFNetworking) + ++ (NSOperationQueue *)af_sharedImageRequestOperationQueue { + static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; + _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; + }); + + return _af_sharedImageRequestOperationQueue; +} + +#pragma mark - + +static const char * af_imageRequestOperationKeyForState(UIControlState state) { + return [[NSString stringWithFormat:@"af_imageRequestOperationKeyForState_%lu", (unsigned long)state] cStringUsingEncoding:NSASCIIStringEncoding]; +} + +- (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_imageRequestOperationKeyForState(state)); +} + +- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_imageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +static const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) { + return [[NSString stringWithFormat:@"af_backgroundImageRequestOperationKeyForState_%lu", (unsigned long)state] cStringUsingEncoding:NSASCIIStringEncoding]; +} + +- (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state)); +} + +- (void)af_setBackgroundImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIButton (AFNetworking) + ++ (id )sharedImageCache { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: [UIImageView sharedImageCache]; +#pragma clang diagnostic pop +} + ++ (void)setSharedImageCache:(id )imageCache { + objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (id )imageResponseSerializer { + static id _af_defaultImageResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setImageResponseSerializer:(id )serializer { + objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure +{ + [self cancelImageRequestOperationForState:state]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(nil, nil, cachedImage); + } else { + [self setImage:cachedImage forState:state]; + } + + [self af_setImageRequestOperation:nil forState:state]; + } else { + if (placeholderImage) { + [self setImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + AFHTTPRequestOperation *imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + imageRequestOperation.responseSerializer = self.imageResponseSerializer; + [imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (success) { + success(operation.request, operation.response, responseObject); + } else if (responseObject) { + [strongSelf setImage:responseObject forState:state]; + } + } + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + if ([[urlRequest URL] isEqual:[operation.response URL]]) { + if (failure) { + failure(error); + } + } + }]; + + [self af_setImageRequestOperation:imageRequestOperation forState:state]; + [[[self class] af_sharedImageRequestOperationQueue] addOperation:imageRequestOperation]; + } +} + +#pragma mark - + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setBackgroundImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setBackgroundImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSError *error))failure +{ + [self cancelBackgroundImageRequestOperationForState:state]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(nil, nil, cachedImage); + } else { + [self setBackgroundImage:cachedImage forState:state]; + } + + [self af_setBackgroundImageRequestOperation:nil forState:state]; + } else { + if (placeholderImage) { + [self setBackgroundImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + AFHTTPRequestOperation *backgroundImageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + backgroundImageRequestOperation.responseSerializer = self.imageResponseSerializer; + [backgroundImageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[operation.request URL]]) { + if (success) { + success(operation.request, operation.response, responseObject); + } else if (responseObject) { + [strongSelf setBackgroundImage:responseObject forState:state]; + } + } + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + if ([[urlRequest URL] isEqual:[operation.response URL]]) { + if (failure) { + failure(error); + } + } + }]; + + [self af_setBackgroundImageRequestOperation:backgroundImageRequestOperation forState:state]; + [[[self class] af_sharedImageRequestOperationQueue] addOperation:backgroundImageRequestOperation]; + } +} + +#pragma mark - + +- (void)cancelImageRequestOperationForState:(UIControlState)state { + [[self af_imageRequestOperationForState:state] cancel]; + [self af_setImageRequestOperation:nil forState:state]; +} + +- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state { + [[self af_backgroundImageRequestOperationForState:state] cancel]; + [self af_setBackgroundImageRequestOperation:nil forState:state]; +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h new file mode 100644 index 00000000..5d523636 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1,143 @@ +// UIImageView+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@protocol AFURLResponseSerialization, AFImageCache; + +/** + This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL. + */ +@interface UIImageView (AFNetworking) + +///---------------------------- +/// @name Accessing Image Cache +///---------------------------- + +/** + The image cache used to improve image loadiing performance on scroll views. By default, this is an `NSCache` subclass conforming to the `AFImageCache` protocol, which listens for notification warnings and evicts objects accordingly. +*/ ++ (id )sharedImageCache; + +/** + Set the cache used for image loading. + + @param imageCache The image cache. + */ ++ (void)setSharedImageCache:(id )imageCache; + +///------------------------------------ +/// @name Accessing Response Serializer +///------------------------------------ + +/** + The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. + + @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + */ +@property (nonatomic, strong) id imageResponseSerializer; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + */ +- (void)setImageWithURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + */ +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is applied. + + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the request and response parameters will be `nil`. + @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + */ +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; + +/** + Cancels any executing image operation for the receiver, if one exists. + */ +- (void)cancelImageRequestOperation; + +@end + +#pragma mark - + +/** + The `AFImageCache` protocol is adopted by an object used to cache images loaded by the AFNetworking category on `UIImageView`. + */ +@protocol AFImageCache + +/** + Returns a cached image for the specififed request, if available. + + @param request The image request. + + @return The cached image. + */ +- (UIImage *)cachedImageForRequest:(NSURLRequest *)request; + +/** + Caches a particular image for the specified request. + + @param image The image to cache. + @param request The request to be used as a cache key. + */ +- (void)cacheImage:(UIImage *)image + forRequest:(NSURLRequest *)request; +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m new file mode 100644 index 00000000..c06aa9ca --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m @@ -0,0 +1,216 @@ +// UIImageView+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIImageView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +@interface AFImageCache : NSCache +@end + +#pragma mark - + +@interface UIImageView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFHTTPRequestOperation *af_imageRequestOperation; +@end + +@implementation UIImageView (_AFNetworking) + ++ (NSOperationQueue *)af_sharedImageRequestOperationQueue { + static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; + _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; + }); + + return _af_sharedImageRequestOperationQueue; +} + +- (AFHTTPRequestOperation *)af_imageRequestOperation { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_imageRequestOperation)); +} + +- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation { + objc_setAssociatedObject(self, @selector(af_imageRequestOperation), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIImageView (AFNetworking) +@dynamic imageResponseSerializer; + ++ (id )sharedImageCache { + static AFImageCache *_af_defaultImageCache = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _af_defaultImageCache = [[AFImageCache alloc] init]; + + [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * __unused notification) { + [_af_defaultImageCache removeAllObjects]; + }]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: _af_defaultImageCache; +#pragma clang diagnostic pop +} + ++ (void)setSharedImageCache:(id )imageCache { + objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (id )imageResponseSerializer { + static id _af_defaultImageResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setImageResponseSerializer:(id )serializer { + objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageWithURL:(NSURL *)url { + [self setImageWithURL:url placeholderImage:nil]; +} + +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure +{ + [self cancelImageRequestOperation]; + + UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if (cachedImage) { + if (success) { + success(nil, nil, cachedImage); + } else { + self.image = cachedImage; + } + + self.af_imageRequestOperation = nil; + } else { + if (placeholderImage) { + self.image = placeholderImage; + } + + __weak __typeof(self)weakSelf = self; + self.af_imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; + self.af_imageRequestOperation.responseSerializer = self.imageResponseSerializer; + [self.af_imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { + if (success) { + success(urlRequest, operation.response, responseObject); + } else if (responseObject) { + strongSelf.image = responseObject; + } + + if (operation == strongSelf.af_imageRequestOperation){ + strongSelf.af_imageRequestOperation = nil; + } + } + + [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { + if (failure) { + failure(urlRequest, operation.response, error); + } + + if (operation == strongSelf.af_imageRequestOperation){ + strongSelf.af_imageRequestOperation = nil; + } + } + }]; + + [[[self class] af_sharedImageRequestOperationQueue] addOperation:self.af_imageRequestOperation]; + } +} + +- (void)cancelImageRequestOperation { + [self.af_imageRequestOperation cancel]; + self.af_imageRequestOperation = nil; +} + +@end + +#pragma mark - + +static inline NSString * AFImageCacheKeyFromURLRequest(NSURLRequest *request) { + return [[request URL] absoluteString]; +} + +@implementation AFImageCache + +- (UIImage *)cachedImageForRequest:(NSURLRequest *)request { + switch ([request cachePolicy]) { + case NSURLRequestReloadIgnoringCacheData: + case NSURLRequestReloadIgnoringLocalAndRemoteCacheData: + return nil; + default: + break; + } + + return [self objectForKey:AFImageCacheKeyFromURLRequest(request)]; +} + +- (void)cacheImage:(UIImage *)image + forRequest:(NSURLRequest *)request +{ + if (image && request) { + [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)]; + } +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h new file mode 100644 index 00000000..94082f6c --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h @@ -0,0 +1,38 @@ +// UIKit+AFNetworking.h +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#ifndef _UIKIT_AFNETWORKING_ + #define _UIKIT_AFNETWORKING_ + + #import "AFNetworkActivityIndicatorManager.h" + + #import "UIActivityIndicatorView+AFNetworking.h" + #import "UIAlertView+AFNetworking.h" + #import "UIButton+AFNetworking.h" + #import "UIImageView+AFNetworking.h" + #import "UIKit+AFNetworking.h" + #import "UIProgressView+AFNetworking.h" + #import "UIRefreshControl+AFNetworking.h" + #import "UIWebView+AFNetworking.h" +#endif /* _UIKIT_AFNETWORKING_ */ diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h new file mode 100644 index 00000000..3f1bc086 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h @@ -0,0 +1,88 @@ +// UIProgressView+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. + */ +@interface UIProgressView (AFNetworking) + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated; +#endif + +/** + Binds the progress to the download progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated; +#endif + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +/** + Binds the progress to the download progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m new file mode 100644 index 00000000..927f56d8 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m @@ -0,0 +1,183 @@ +// UIProgressView+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIProgressView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFURLConnectionOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +static void * AFTaskCountOfBytesSentContext = &AFTaskCountOfBytesSentContext; +static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedContext; + +@interface AFURLConnectionOperation (_UIProgressView) +@property (readwrite, nonatomic, copy) void (^uploadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +@property (readwrite, nonatomic, assign, setter = af_setUploadProgressAnimated:) BOOL af_uploadProgressAnimated; + +@property (readwrite, nonatomic, copy) void (^downloadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); +@property (readwrite, nonatomic, assign, setter = af_setDownloadProgressAnimated:) BOOL af_downloadProgressAnimated; +@end + +@implementation AFURLConnectionOperation (_UIProgressView) +@dynamic uploadProgress; // Implemented in AFURLConnectionOperation +@dynamic af_uploadProgressAnimated; + +@dynamic downloadProgress; // Implemented in AFURLConnectionOperation +@dynamic af_downloadProgressAnimated; +@end + +#pragma mark - + +@implementation UIProgressView (AFNetworking) + +- (BOOL)af_uploadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_uploadProgressAnimated)) boolValue]; +} + +- (void)af_setUploadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_uploadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL)af_downloadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_downloadProgressAnimated)) boolValue]; +} + +- (void)af_setDownloadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_downloadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated +{ + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + [task addObserver:self forKeyPath:@"countOfBytesSent" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + + [self af_setUploadProgressAnimated:animated]; +} + +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated +{ + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + [task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + + [self af_setDownloadProgressAnimated:animated]; +} +#endif + +#pragma mark - + +- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated +{ + __weak __typeof(self)weakSelf = self; + void (^original)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) = [operation.uploadProgress copy]; + [operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) { + if (original) { + original(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + if (totalBytesExpectedToWrite > 0) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + [strongSelf setProgress:(totalBytesWritten / (totalBytesExpectedToWrite * 1.0f)) animated:animated]; + } + }); + }]; +} + +- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated +{ + __weak __typeof(self)weakSelf = self; + void (^original)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) = [operation.downloadProgress copy]; + [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { + if (original) { + original(bytesRead, totalBytesRead, totalBytesExpectedToRead); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + if (totalBytesExpectedToRead > 0) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + [strongSelf setProgress:(totalBytesRead / (totalBytesExpectedToRead * 1.0f)) animated:animated]; + } + }); + }]; +} + +#pragma mark - NSKeyValueObserving + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(__unused NSDictionary *)change + context:(void *)context +{ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + if (context == AFTaskCountOfBytesSentContext || context == AFTaskCountOfBytesReceivedContext) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { + if ([object countOfBytesExpectedToSend] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesSent] / ([object countOfBytesExpectedToSend] * 1.0f) animated:self.af_uploadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) { + if ([object countOfBytesExpectedToReceive] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesReceived] / ([object countOfBytesExpectedToReceive] * 1.0f) animated:self.af_downloadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(state))]) { + if ([(NSURLSessionTask *)object state] == NSURLSessionTaskStateCompleted) { + @try { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(state))]; + + if (context == AFTaskCountOfBytesSentContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + } + + if (context == AFTaskCountOfBytesReceivedContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + } + } + @catch (NSException * __unused exception) {} + } + } + } +#endif +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h new file mode 100644 index 00000000..37ce772d --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h @@ -0,0 +1,64 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task. + */ +@interface UIRefreshControl (AFNetworking) + +///----------------------------------- +/// @name Refreshing for Session Tasks +///----------------------------------- + +/** + Binds the refreshing state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be diabled. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; +#endif + +///---------------------------------------- +/// @name Refreshing for Request Operations +///---------------------------------------- + +/** + Binds the refreshing state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m new file mode 100644 index 00000000..ba281573 --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m @@ -0,0 +1,95 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIRefreshControl+AFNetworking.h" + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +#import "AFURLSessionManager.h" +#endif + +@implementation UIRefreshControl (AFNetworking) + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { + if (task.state != NSURLSessionTaskStateCompleted) { + if (task.state == NSURLSessionTaskStateRunning) { + [self beginRefreshing]; + } else { + [self endRefreshing]; + } + + [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; + } + } +} +#endif + +- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; + + if (operation) { + if (![operation isFinished]) { + if ([operation isExecuting]) { + [self beginRefreshing]; + } else { + [self endRefreshing]; + } + + [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation]; + } + } +} + +#pragma mark - + +- (void)af_beginRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ + [self beginRefreshing]; + }); +} + +- (void)af_endRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ + [self endRefreshing]; + }); +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h new file mode 100644 index 00000000..202e8f4e --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h @@ -0,0 +1,83 @@ +// UIWebView+AFNetworking.h +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFHTTPRequestSerializer, AFHTTPResponseSerializer; +@protocol AFURLRequestSerialization, AFURLResponseSerialization; + +/** + This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. + + @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly. + */ +@interface UIWebView (AFNetworking) + +/** + The request serializer used to serialize requests made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPRequestSerializer`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + The response serializer used to serialize responses made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPResponseSerializer`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +/** + Asynchronously loads the specified request. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(void (^)(NSError *error))failure; + +/** + Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. + @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. + @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. + @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + MIMEType:(NSString *)MIMEType + textEncodingName:(NSString *)textEncodingName + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(void (^)(NSError *error))failure; + +@end + +#endif diff --git a/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m new file mode 100644 index 00000000..525d02ae --- /dev/null +++ b/src/ios/GMImagePicker/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m @@ -0,0 +1,151 @@ +// UIWebView+AFNetworking.m +// +// Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIWebView+AFNetworking.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import "AFHTTPRequestOperation.h" +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" + +@interface UIWebView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setHTTPRequestOperation:) AFHTTPRequestOperation *af_HTTPRequestOperation; +@end + +@implementation UIWebView (_AFNetworking) + +- (AFHTTPRequestOperation *)af_HTTPRequestOperation { + return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_HTTPRequestOperation)); +} + +- (void)af_setHTTPRequestOperation:(AFHTTPRequestOperation *)operation { + objc_setAssociatedObject(self, @selector(af_HTTPRequestOperation), operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIWebView (AFNetworking) + +- (AFHTTPRequestSerializer *)requestSerializer { + static AFHTTPRequestSerializer *_af_defaultRequestSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultRequestSerializer = [AFHTTPRequestSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(requestSerializer)) ?: _af_defaultRequestSerializer; +#pragma clang diagnostic pop +} + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + objc_setAssociatedObject(self, @selector(requestSerializer), requestSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (AFHTTPResponseSerializer *)responseSerializer { + static AFHTTPResponseSerializer *_af_defaultResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer]; + }); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer; +#pragma clang diagnostic pop +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + objc_setAssociatedObject(self, @selector(responseSerializer), responseSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)loadRequest:(NSURLRequest *)request + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(void (^)(NSError *error))failure +{ + [self loadRequest:request MIMEType:nil textEncodingName:nil progress:progress success:^NSData *(NSHTTPURLResponse *response, NSData *data) { + NSStringEncoding stringEncoding = NSUTF8StringEncoding; + if (response.textEncodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); + if (encoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); + } + } + + NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding]; + if (success) { + string = success(response, string); + } + + return [string dataUsingEncoding:stringEncoding]; + } failure:failure]; +} + +- (void)loadRequest:(NSURLRequest *)request + MIMEType:(NSString *)MIMEType + textEncodingName:(NSString *)textEncodingName + progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress + success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(void (^)(NSError *error))failure +{ + NSParameterAssert(request); + + if (self.af_HTTPRequestOperation) { + [self.af_HTTPRequestOperation cancel]; + } + + request = [self.requestSerializer requestBySerializingRequest:request withParameters:nil error:nil]; + + self.af_HTTPRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; + self.af_HTTPRequestOperation.responseSerializer = self.responseSerializer; + + __weak __typeof(self)weakSelf = self; + [self.af_HTTPRequestOperation setDownloadProgressBlock:progress]; + [self.af_HTTPRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id __unused responseObject) { + NSData *data = success ? success(operation.response, operation.responseData) : operation.responseData; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgnu" + __strong __typeof(weakSelf) strongSelf = weakSelf; + [strongSelf loadData:data MIMEType:(MIMEType ?: [operation.response MIMEType]) textEncodingName:(textEncodingName ?: [operation.response textEncodingName]) baseURL:[operation.response URL]]; +#pragma clang diagnostic pop + } failure:^(AFHTTPRequestOperation * __unused operation, NSError *error) { + if (failure) { + failure(error); + } + }]; + + [self.af_HTTPRequestOperation start]; +} + +@end + +#endif diff --git a/src/ios/GMImagePicker/Base.lproj/GMImagePicker.strings b/src/ios/GMImagePicker/Base.lproj/GMImagePicker.strings new file mode 100755 index 0000000000000000000000000000000000000000..cd03baa69f1031a7b174da3cd2e140a5031bfb9a GIT binary patch literal 1628 zcmcJP-A=+l5Jtaio}y{u4M`zh8xx5dL!v;0c+XEoq9AFDkFTC7;C8VVi5Nn5JG(RA znVp^ecyFq%K$jY7p|N7U@Ksk+HHBJghV2<^q6X_jyEtr+25+3!nEL? ztt;-%((&z6`_ATaIVPJsJ)f;g&1Y+orM*`!OS_Hb9g@*~qx@7F%*-$H{30y2!}`tf z*t+ao8l79I{In~xTq6cCucDs@SPoI~h1;+rb fOLcY2@0!_wSEH*A?}g8HD9?(1HpSo3R1 + + +@interface GMAlbumsViewCell : UITableViewCell + +@property (strong) PHFetchResult *assetsFetchResults; +@property (strong) PHAssetCollection *assetCollection; + +//The labels +@property (nonatomic, strong) UILabel *titleLabel; +@property (nonatomic, strong) UILabel *infoLabel; +//The imageView +@property (nonatomic, strong) UIImageView *imageView1; +@property (nonatomic, strong) UIImageView *imageView2; +@property (nonatomic, strong) UIImageView *imageView3; +//Video additional information +@property (nonatomic, strong) UIImageView *videoIcon; +@property (nonatomic, strong) UIImageView *slowMoIcon; +@property (nonatomic, strong) UIView* gradientView; +@property (nonatomic, strong) CAGradientLayer *gradient; +//Selection overlay + +- (void)setVideoLayout:(BOOL)isVideo; +@end diff --git a/src/ios/GMImagePicker/GMAlbumsViewCell.m b/src/ios/GMImagePicker/GMAlbumsViewCell.m new file mode 100755 index 00000000..ee1996ef --- /dev/null +++ b/src/ios/GMImagePicker/GMAlbumsViewCell.m @@ -0,0 +1,173 @@ +// +// GMAlbumsViewCell.m +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 22/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMAlbumsViewCell.h" +#import "GMAlbumsViewController.h" +#import "GMImagePickerController.h" +#import + +@implementation GMAlbumsViewCell + +- (void)awakeFromNib +{ + [super awakeFromNib]; + self.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + self.contentView.translatesAutoresizingMaskIntoConstraints = YES; +} + +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) + { + //self.opaque = YES; + //self.isAccessibilityElement = YES; + //self.textLabel.backgroundColor = self.backgroundColor; + //self.detailTextLabel.backgroundColor = self.backgroundColor; + + self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + + //Border width of 1 pixel: + float borderWidth = 1.0/[UIScreen mainScreen].scale; + + //ImageView + _imageView3 = [UIImageView new]; + _imageView3.contentMode = UIViewContentModeScaleAspectFill; + _imageView3.frame = CGRectMake(kAlbumLeftToImageSpace+4, 8, kAlbumThumbnailSize3.width, kAlbumThumbnailSize3.height ); + [_imageView3.layer setBorderColor: [[UIColor whiteColor] CGColor]]; + [_imageView3.layer setBorderWidth: borderWidth]; + _imageView3.clipsToBounds = YES; + _imageView3.translatesAutoresizingMaskIntoConstraints = YES; + _imageView3.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; + [self.contentView addSubview:_imageView3]; + + //ImageView + _imageView2 = [UIImageView new]; + _imageView2.contentMode = UIViewContentModeScaleAspectFill; + _imageView2.frame = CGRectMake(kAlbumLeftToImageSpace+2, 8+2, kAlbumThumbnailSize2.width, kAlbumThumbnailSize2.height ); + [_imageView2.layer setBorderColor: [[UIColor whiteColor] CGColor]]; + [_imageView2.layer setBorderWidth: borderWidth]; + _imageView2.clipsToBounds = YES; + _imageView2.translatesAutoresizingMaskIntoConstraints = YES; + _imageView2.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; + [self.contentView addSubview:_imageView2]; + + //ImageView + _imageView1 = [UIImageView new]; + _imageView1.contentMode = UIViewContentModeScaleAspectFill; + _imageView1.frame = CGRectMake(kAlbumLeftToImageSpace, 8+4, kAlbumThumbnailSize1.width, kAlbumThumbnailSize1.height ); + [_imageView1.layer setBorderColor: [[UIColor whiteColor] CGColor]]; + [_imageView1.layer setBorderWidth: borderWidth]; + _imageView1.clipsToBounds = YES; + _imageView1.translatesAutoresizingMaskIntoConstraints = YES; + _imageView1.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; + [self.contentView addSubview:_imageView1]; + + + // The video gradient, label & icon + UIColor *topGradient = [UIColor colorWithRed:0.00 green:0.00 blue:0.00 alpha:0.0]; + UIColor *midGradient = [UIColor colorWithRed:0.00 green:0.00 blue:0.00 alpha:0.33]; + UIColor *botGradient = [UIColor colorWithRed:0.00 green:0.00 blue:0.00 alpha:0.75]; + _gradientView = [[UIView alloc] initWithFrame: CGRectMake(0.0f, kAlbumThumbnailSize1.height-kAlbumGradientHeight, kAlbumThumbnailSize1.width, kAlbumGradientHeight)]; + _gradient = [CAGradientLayer layer]; + _gradient.frame = _gradientView.bounds; + _gradient.colors = [NSArray arrayWithObjects:(id)[topGradient CGColor], (id)[midGradient CGColor], (id)[botGradient CGColor], nil]; + _gradient.locations = @[ @0.0f, @0.5f, @1.0f ]; + [_gradientView.layer insertSublayer:_gradient atIndex:0]; + _gradientView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; + _gradientView.translatesAutoresizingMaskIntoConstraints = YES; + [self.imageView1 addSubview:_gradientView]; + _gradientView.hidden = YES; + + //VideoIcon + _videoIcon = [UIImageView new]; + _videoIcon.contentMode = UIViewContentModeScaleAspectFill; + _videoIcon.frame = CGRectMake(3,kAlbumThumbnailSize1.height - 4 - 8, 15, 8 ); + _videoIcon.image = [UIImage imageNamed:@"GMVideoIcon"]; + _videoIcon.clipsToBounds = YES; + _videoIcon.translatesAutoresizingMaskIntoConstraints = YES; + _videoIcon.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; + [self.imageView1 addSubview:_videoIcon]; + _videoIcon.hidden = NO; + + + //TextLabel + self.textLabel.font = [UIFont fontWithName:@"Helvetica" size:17.0]; + self.textLabel.numberOfLines = 1; + self.textLabel.translatesAutoresizingMaskIntoConstraints = NO; + + self.detailTextLabel.font = [UIFont fontWithName:@"Helvetica" size:14.0]; + self.detailTextLabel.numberOfLines = 1; + self.detailTextLabel.translatesAutoresizingMaskIntoConstraints = NO; + + //Set next text labels contraints : + [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[imageView1]-(offset)-[textLabel]-|" + options:0 + metrics:@{@"offset": @(kAlbumImageToTextSpace)} + views:@{@"textLabel": self.textLabel, + @"imageView1": self.imageView1}]]; + + [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[imageView1]-(offset)-[detailTextLabel]-|" + options:0 + metrics:@{@"offset": @(kAlbumImageToTextSpace)} + views:@{@"detailTextLabel": self.detailTextLabel, + @"imageView1": self.imageView1}]]; + + + [self.contentView addConstraints:@[[NSLayoutConstraint constraintWithItem:self.textLabel + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:self.textLabel.superview + attribute:NSLayoutAttributeCenterY + multiplier:1.f constant:0.f]]]; + + [self.contentView addConstraints:@[[NSLayoutConstraint constraintWithItem:self.detailTextLabel + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:self.textLabel.superview + attribute:NSLayoutAttributeCenterY + multiplier:1.f constant:+4.f]]]; + } + + + + return self; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + //TODO Reduce text font size if the name label does not fit screen. + +} + +- (void)setVideoLayout:(BOOL)isVideo +{ + //TODO : Add additional icons for slowmo, burst, etc... + if (isVideo) + { + _videoIcon.hidden = NO; + _gradientView.hidden = NO; + } + else + { + _videoIcon.hidden = YES; + _gradientView.hidden = YES; + } +} + + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/src/ios/GMImagePicker/GMAlbumsViewController.h b/src/ios/GMImagePicker/GMAlbumsViewController.h new file mode 100755 index 00000000..7bbed553 --- /dev/null +++ b/src/ios/GMImagePicker/GMAlbumsViewController.h @@ -0,0 +1,32 @@ +// +// GMAlbumsViewController.h +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import + +// Measuring IOS8 Photos APP at @2x (iPhone5s): +// The rows are 180px/90pts +// Left image border is 21px/10.5pts +// Separation between image and text is 42px/21pts (double the previouse one) +// The bigger image measures 139px/69.5pts including 1px/0.5pts white border. +// The second image measures 131px/65.6pts including 1px/0.5pts white border. Only 3px/1.5pts visible +// The third image measures 123px/61.5pts including 1px/0.5pts white border. Only 3px/1.5pts visible + +static int kAlbumRowHeight = 90; +static int kAlbumLeftToImageSpace = 10; +static int kAlbumImageToTextSpace = 21; +static float const kAlbumGradientHeight = 20.0f; +static CGSize const kAlbumThumbnailSize1 = {70.0f , 70.0f}; +static CGSize const kAlbumThumbnailSize2 = {66.0f , 66.0f}; +static CGSize const kAlbumThumbnailSize3 = {62.0f , 62.0f}; + + +@interface GMAlbumsViewController : UITableViewController + +- (id)init:(bool)allow_v; + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMAlbumsViewController.m b/src/ios/GMImagePicker/GMAlbumsViewController.m new file mode 100755 index 00000000..48bc0132 --- /dev/null +++ b/src/ios/GMImagePicker/GMAlbumsViewController.m @@ -0,0 +1,445 @@ +// +// GMAlbumsViewController.m +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMImagePickerController.h" +#import "GMAlbumsViewController.h" +#import "GMGridViewCell.h" +#import "GMGridViewController.h" +#import "GMAlbumsViewCell.h" + +#import +#import +#import +#import +#import +#import + + +@interface GMAlbumsViewController() + +@property (strong) NSArray *collectionsFetchResults; +@property (strong) NSArray *collectionsLocalizedTitles; +@property (strong) NSArray *collectionsFetchResultsAssets; +@property (strong) NSArray *collectionsFetchResultsTitles; +@property (nonatomic, weak) GMImagePickerController *picker; +@property (strong) PHCachingImageManager *imageManager; +@property (nonatomic, strong) NSMutableDictionary * dic_asset_fetches; + +@end + + +@implementation GMAlbumsViewController{ + bool allow_video; +} + +@synthesize dic_asset_fetches; + +- (id)init:(bool)allow_v +{ + if (self = [super initWithStyle:UITableViewStylePlain]) + { + self.preferredContentSize = kPopoverContentSize; + } + + dic_asset_fetches = [[NSMutableDictionary alloc] init]; + + allow_video = allow_v; + + return self; +} + +static NSString * const AllPhotosReuseIdentifier = @"AllPhotosCell"; +static NSString * const CollectionCellReuseIdentifier = @"CollectionCell"; + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + //Navigation bar customization_ + if(self.picker.customNavigationBarPrompt) + { + self.navigationItem.prompt = self.picker.customNavigationBarPrompt; + } + + self.imageManager = [[PHCachingImageManager alloc] init]; + + //Table view aspect + self.tableView.rowHeight = kAlbumRowHeight; + self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + + //Navigation bar items + //if (self.picker.showsCancelButton) + { + self.navigationItem.leftBarButtonItem = + [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"picker.navigation.cancel-button", @"GMImagePicker",@"Cancel") + style:UIBarButtonItemStylePlain + target:self.picker + action:@selector(dismiss:)]; + } + + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"picker.navigation.done-button", @"GMImagePicker",@"Done") + style:UIBarButtonItemStyleDone + target:self.picker + action:@selector(finishPickingAssets:)]; + + self.navigationItem.rightBarButtonItem.enabled = (self.picker.selectedAssets.count > 0); + + //Bottom toolbar + self.toolbarItems = self.picker.toolbarItems; + + //Title + if (!self.picker.title) + self.title = NSLocalizedStringFromTable(@"picker.navigation.title", @"GMImagePicker",@"Navigation bar default title"); + else + self.title = self.picker.title; + + + // TO-DO Customizable predicates: + // Predicate has to filter properties of the type of object returned by the PHFetchResult: + // PHCollectionList, PHAssetCollection and PHAsset require different predicates + // with limited posibilities (cannot filter a collection by mediaType for example) + + //NSPredicate *predicatePHCollectionList = [NSPredicate predicateWithFormat:@"(mediaType == %d)", PHAssetMediaTypeImage]; + //NSPredicate *predicatePHAssetCollection = [NSPredicate predicateWithFormat:@"(mediaType == %d)", PHAssetMediaTypeImage]; + //NSPredicate *predicatePHAsset = [NSPredicate predicateWithFormat:@"(mediaType == %d)", PHAssetMediaTypeImage]; + + PHFetchOptions * options = [[PHFetchOptions alloc] init]; + //NSPredicate *predicatePHAssetCollection = [NSPredicate predicateWithFormat:@"(mediaType == %d)", PHAssetMediaTypeImage]; + + //options.predicate = predicatePHAssetCollection; + options.sortDescriptors = @[ + //[NSSortDescriptor sortDescriptorWithKey:@"localizedTitle" ascending:YES], + [ NSSortDescriptor sortDescriptorWithKey:@"title" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)], + ]; + + //Fetch PHAssetCollections: + PHFetchResult *topLevelUserCollections = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAny options:options]; + //PHFetchResult *topLevelUserCollections = [PHCollectionList fetchTopLevelUserCollectionsWithOptions:nil]; + //PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil]; + PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil]; + self.collectionsFetchResults = @[topLevelUserCollections, smartAlbums]; + self.collectionsLocalizedTitles = @[NSLocalizedStringFromTable(@"picker.table.user-albums-header", @"GMImagePicker",@"Albums"), NSLocalizedStringFromTable(@"picker.table.smart-albums-header", @"GMImagePicker",@"Smart Albums")]; + + [self updateFetchResults]; + + //Register for changes + [[PHPhotoLibrary sharedPhotoLibrary] registerChangeObserver:self]; +} + +- (void)dealloc +{ + [[PHPhotoLibrary sharedPhotoLibrary] unregisterChangeObserver:self]; +} + +-(void)updateFetchResults +{ + //What I do here is fetch both the albums list and the assets of each album. + //This way I have acces to the number of items in each album, I can load the 3 + //thumbnails directly and I can pass the fetched result to the gridViewController. + + NSPredicate * predicatePHAsset = allow_video? nil : [NSPredicate predicateWithFormat:@"mediaType == %d", PHAssetMediaTypeImage]; + + PHFetchOptions *options = [[PHFetchOptions alloc] init]; + options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]]; + options.predicate = predicatePHAsset; + + self.collectionsFetchResultsAssets=nil; + self.collectionsFetchResultsTitles=nil; + + //Fetch PHAssetCollections: + PHFetchResult *topLevelUserCollections = [self.collectionsFetchResults objectAtIndex:0]; + PHFetchResult *smartAlbums = [self.collectionsFetchResults objectAtIndex:1]; + + //All album: Sorted by descending creation date. + NSMutableArray *allFetchResultArray = [[NSMutableArray alloc] init]; + NSMutableArray *allFetchResultLabel = [[NSMutableArray alloc] init]; + { + + PHFetchResult *assetsFetchResult = [PHAsset fetchAssetsWithOptions:options]; + [allFetchResultArray addObject:assetsFetchResult]; + [allFetchResultLabel addObject:NSLocalizedStringFromTable(@"picker.table.all-photos-label", @"GMImagePicker",@"All photos")]; + } + + //User albums: + NSMutableArray *userFetchResultArray = [[NSMutableArray alloc] init]; + NSMutableArray *userFetchResultLabel = [[NSMutableArray alloc] init]; + for(PHCollection *collection in topLevelUserCollections) + { + if ([collection isKindOfClass:[PHAssetCollection class]]) + { + //PHFetchOptions *options = [[PHFetchOptions alloc] init]; + //options.predicate = predicatePHAsset; + PHAssetCollection *assetCollection = (PHAssetCollection *)collection; + + //Albums collections are allways PHAssetCollectionType=1 & PHAssetCollectionSubtype=2 + + PHFetchResult *assetsFetchResult = [PHAsset fetchAssetsInAssetCollection:assetCollection options:options]; + [userFetchResultArray addObject:assetsFetchResult]; + [userFetchResultLabel addObject:collection.localizedTitle]; + } + } + + + //Smart albums: Sorted by descending creation date. + NSMutableArray *smartFetchResultArray = [[NSMutableArray alloc] init]; + NSMutableArray *smartFetchResultLabel = [[NSMutableArray alloc] init]; + for(PHCollection *collection in smartAlbums) + { + if ([collection isKindOfClass:[PHAssetCollection class]]) + { + PHAssetCollection *assetCollection = (PHAssetCollection *)collection; + + //Smart collections are PHAssetCollectionType=2; + if(self.picker.customSmartCollections && [self.picker.customSmartCollections containsObject:@(assetCollection.assetCollectionSubtype)]) + { + //PHFetchOptions *options = [[PHFetchOptions alloc] init]; + //options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]]; + //options.predicate = predicatePHAsset; + PHFetchResult *assetsFetchResult = [PHAsset fetchAssetsInAssetCollection:assetCollection options:options]; + if(assetsFetchResult.count>0) + { + [smartFetchResultArray addObject:assetsFetchResult]; + [smartFetchResultLabel addObject:collection.localizedTitle]; + } + } + } + } + + self.collectionsFetchResultsAssets= @[allFetchResultArray,userFetchResultArray,smartFetchResultArray]; + self.collectionsFetchResultsTitles= @[allFetchResultLabel,userFetchResultLabel,smartFetchResultLabel]; +} +#pragma mark - Accessors + +- (GMImagePickerController *)picker +{ + return (GMImagePickerController *)self.navigationController.parentViewController; +} + + +#pragma mark - Rotation + +- (BOOL)shouldAutorotate +{ + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + return UIInterfaceOrientationMaskAllButUpsideDown; +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return self.collectionsFetchResultsAssets.count; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + PHFetchResult *fetchResult = self.collectionsFetchResultsAssets[section]; + return fetchResult.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + + GMAlbumsViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[GMAlbumsViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + // Increment the cell's tag + NSInteger currentTag = cell.tag + 1; + cell.tag = currentTag; + + //Set the label + cell.textLabel.text = (self.collectionsFetchResultsTitles[indexPath.section])[indexPath.row]; + + //Retrieve the pre-fetched assets for this album: + PHFetchResult *assetsFetchResult = (self.collectionsFetchResultsAssets[indexPath.section])[indexPath.row]; + + //Display the number of assets + if(self.picker.displayAlbumsNumberOfAssets) + { + cell.detailTextLabel.text = [self tableCellSubtitle:assetsFetchResult]; + } + + //Set the 3 images (if exists): + if([assetsFetchResult count]>0) + { + CGFloat scale = [UIScreen mainScreen].scale; + + //Compute the thumbnail pixel size: + CGSize tableCellThumbnailSize1 = CGSizeMake(kAlbumThumbnailSize1.width*scale, kAlbumThumbnailSize1.height*scale); + PHAsset *asset = assetsFetchResult[0]; + [cell setVideoLayout:(asset.mediaType==PHAssetMediaTypeVideo)]; + [self.imageManager requestImageForAsset:asset + targetSize:tableCellThumbnailSize1 + contentMode:PHImageContentModeAspectFill + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) + { + if (cell.tag == currentTag) + { + cell.imageView1.image = result; + } + }]; + + //Second & third images: + // TO DO: Only preload the 3pixels height visible frame! + if([assetsFetchResult count]>1) + { + //Compute the thumbnail pixel size: + CGSize tableCellThumbnailSize2 = CGSizeMake(kAlbumThumbnailSize2.width*scale, kAlbumThumbnailSize2.height*scale); + PHAsset *asset = assetsFetchResult[1]; + [self.imageManager requestImageForAsset:asset + targetSize:tableCellThumbnailSize2 + contentMode:PHImageContentModeAspectFill + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) + { + if (cell.tag == currentTag) + { + cell.imageView2.image = result; + } + }]; + } + else + { + cell.imageView2.image = nil; + } + if([assetsFetchResult count]>2) + { + CGSize tableCellThumbnailSize3 = CGSizeMake(kAlbumThumbnailSize3.width*scale, kAlbumThumbnailSize3.height*scale); + PHAsset *asset = assetsFetchResult[2]; + [self.imageManager requestImageForAsset:asset + targetSize:tableCellThumbnailSize3 + contentMode:PHImageContentModeAspectFill + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) + { + if (cell.tag == currentTag) + { + cell.imageView3.image = result; + } + }]; + } + else + { + cell.imageView3.image = nil; + } + } + else + { + [cell setVideoLayout:NO]; + cell.imageView3.image = [UIImage imageNamed:@"EmptyFolder"]; + cell.imageView2.image = [UIImage imageNamed:@"EmptyFolder"]; + cell.imageView1.image = [UIImage imageNamed:@"EmptyFolder"]; + } + + return cell; +} + +#pragma mark - UITableViewDelegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; + + //Init the GMGridViewController + GMGridViewController *gridViewController = [[GMGridViewController alloc] initWithPicker:[self picker]]; + //Set the title + gridViewController.title = cell.textLabel.text; + //Use the prefetched assets! + gridViewController.assetsFetchResults = [[_collectionsFetchResultsAssets objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + gridViewController.dic_asset_fetches = dic_asset_fetches; + + //Push GMGridViewController + [self.navigationController pushViewController:gridViewController animated:YES]; +} + +#pragma mark Header + +-(void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section +{ + UITableViewHeaderFooterView *header = (UITableViewHeaderFooterView *)view; + + //Here you can customize header views! + header.textLabel.font = [UIFont systemFontOfSize:14.0f]; //Set font to "normal" style (default is bold) and to 14 pts. + //header.textLabel.font = [UIFont boldSystemFontOfSize:14.0f]; + //header.textLabel.textColor = [UIColor orangeColor]; +} + +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section +{ + //Tip: Returning nil hides the section header! + + NSString *title = nil; + if (section > 0) + { + //Only show title for non-empty sections: + PHFetchResult *fetchResult = self.collectionsFetchResultsAssets[section]; + if( fetchResult.count >0) + { + title = self.collectionsLocalizedTitles[section - 1]; + } + } + return title; +} + + +#pragma mark - PHPhotoLibraryChangeObserver + +- (void)photoLibraryDidChange:(PHChange *)changeInstance +{ + // Call might come on any background queue. Re-dispatch to the main queue to handle it. + dispatch_async(dispatch_get_main_queue(), ^{ + + NSMutableArray *updatedCollectionsFetchResults = nil; + + for (PHFetchResult *collectionsFetchResult in self.collectionsFetchResults) { + PHFetchResultChangeDetails *changeDetails = [changeInstance changeDetailsForFetchResult:collectionsFetchResult]; + if (changeDetails) { + if (!updatedCollectionsFetchResults) { + updatedCollectionsFetchResults = [self.collectionsFetchResults mutableCopy]; + } + [updatedCollectionsFetchResults replaceObjectAtIndex:[self.collectionsFetchResults indexOfObject:collectionsFetchResult] withObject:[changeDetails fetchResultAfterChanges]]; + } + } + + //This only affects to changes in albums level (add/remove/edit album) + if (updatedCollectionsFetchResults) + { + self.collectionsFetchResults = updatedCollectionsFetchResults; + } + + //However, we want to update if photos are added, so the counts of items & thumbnails are updated too. + //Maybe some checks could be done here , but for now is OKey. + [self updateFetchResults]; + [self.tableView reloadData]; + + }); +} + + + +#pragma mark - Cell Subtitle + +- (NSString *)tableCellSubtitle:(PHFetchResult*)assetsFetchResult +{ + //Just return the number of assets. Album app does this: + return [NSString stringWithFormat:@"%ld", (long)[assetsFetchResult count]]; +} + + + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMEmptyFolder@1x.png b/src/ios/GMImagePicker/GMEmptyFolder@1x.png new file mode 100755 index 0000000000000000000000000000000000000000..d2789c724a8eafd3e914c3e7fb64fc7185b6b252 GIT binary patch literal 2932 zcmY+GcRUpSAICo;dnGgD>ukc=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JH05;qK(98pXC-A9T*Po*L!pzVB5kB){#()tm%zl2D zIYV4fw^2I88f-Q3l3z*WNSv*}%*fiX7Uurwe`$zp@&Et; literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/GMEmptyFolder@2x.png b/src/ios/GMImagePicker/GMEmptyFolder@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..58848ae156213b25e444a3b1cecb0d94f757b959 GIT binary patch literal 3077 zcma)8XEYq_5`Kl~Eusq_(KoD4bau5>gB7bK`VtW&zGxw<*H4M)Ss{sDL#(V4y~hfo zt`a>6Zj_K{S8n-n&$;)U`(x%g&zUpN%sjs)_Li|O9W^I40Dummr)7453BQB#(naQb zHST@^RNi`4j{u;#`a4KK_6v3Zs7>7A@LRXsynMYLxp{f>BH(ad?}uKl?)O~)@Snz- zqmkz8tg44|`!ItT%yR=TGZso-Ggv%^IYkJYH-YfD*$DGy)T0g+N1x1cS{KG6#8Nz<$8VaS7ZK2lm2GS4RN`dz2MK0&Jf1 zv5@4Y0N$%EF_uF_EHx zEC|^5^7H$Hh%CUYvummH{YE9@8sx&MtQr-(fTDJ&4W+mbg{38wM}&Z2yTL5)aLFNC z1KJ*t#UULk%kX9IBLI0REEm`Ao%$2#D+vVoL>&EH@r@Sp^Xra|OJ^%XW!@S9Eck{D zpNUD-a$=OpF`j3y1h>iD?$G4@c^L0n!=O05qn)3OpPE`(UY^wNgxNUs zTLzz@+wZnop5Ff%qH=P0@a4mzK&Z4`s4m&jm-dhQh6UG#o>4_O&a5Wsp48KvpKy;} z??gD_Q4r=OQzoB8t?Yz7>4NLAuxFxOf+Oe7i}PZ~q-yhWp!%K~Nl=P-v7Hm?4+CLF zlyB?eAppCLUTvR6C`mDH;R{24=R4}Bx_N>CC-(9YFoDi?7$c0@8FTHSy=ZwDOeAWsnj2y-@mYggw$;=vD%G1F z+HUclUe%l7mjh*Pn@CeA6`5u)2-q? zIXx+}I3%xy9`~;5!%K?MwmJ?Ep5SL%6ajj8Hq+B!JCSb;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L09)DfFJov_gYygL*gA)#~FI3X4MAH@Kzfij6HrE3_*7~g#UH%&%JF>8Y0?o~g*MCyQc?soKbiDCKSm`S)TgvWSS z4`LMf>|08cT!28AOo7-6K0>%8xyg{ua5hINmo@t_ucx%CQnOU}vy@~XSSg=TDh|DY zUUhvuQ0@|0bJq1BzFvYSjiS$^Ho5$=l{hsHR`?ZZEiwV2s6o3}y0#3)_A92B<=zMPq9YDCxA%3#B%vY)NS%|mG^Nti07C| z*_LHSWk|D7ppi%Dowok4wmK4zO&Sa8mB`@DnTahs6O@G2e4WFuC@hy6OKe;vGm$NW z<>{ozjQ=ONb-*Y(vo@mw4F^wNyg4EhIjQ`7J0=5N2-I{2YY zl*kwqAvT8N;P}@qD({BQ<{F95LCWEG5W`2ZZx;VJy`Z` zwoZYC^>CdlSAj6Q-yHCr^?ZCRS5bAgc`wlGu|lq3|hTpmEAi zc)Oy>r0MRy#+K$3d^UPa-R5j&a%bl0y;i@xz2O<%L-NS*p|g~OBnJ59q^zWYD7vW4 z+?#5Oii_$GPuEY1;6u(sLb+^bug(T4*;pk)j>a}82*a7f`5C(zsV$yQ3Qjj#H#w?^ z-R<2xANu@dr0(qBKHh5coAKk`c|FfyviyYismQt8&$kEWpNfuCIZ{*4$w)KzPMl=K zi5LGSualmc5deXL0ARua_<4ST>j3;I3BZOu07{tvuz5YZ+ob~li6lZx6X`$wZAOzm zoR?YKR1zBh-oGOxvl^@s3=?)2X6R(U?^{iGu8s$eOnO2|1T@10^uovx$z)W|cr}^+ z7v=qrYSp`^f8(sn&95>QjTUsr2-59_Bm^;33s6vKhP^qUr>CD!Uw&Ma=H(ZXP%U7P zy}cJO8H5p3yh(YX&vY?PK<^*psQx?sy^Q + +#import + + +@interface GMFetchItem : NSObject + +@property (nonatomic, assign) bool be_progressed; +@property (nonatomic, assign) bool be_finished; +@property (nonatomic, assign) double percent; +@property (nonatomic, strong) NSString * image_fullsize; +@property (nonatomic, strong) NSString * image_thumb; + + +@property (nonatomic, assign) bool be_saving_img_thumb; +@property (nonatomic, assign) bool be_saving_img; + +@end diff --git a/src/ios/GMImagePicker/GMFetchItem.m b/src/ios/GMImagePicker/GMFetchItem.m new file mode 100644 index 00000000..30442be0 --- /dev/null +++ b/src/ios/GMImagePicker/GMFetchItem.m @@ -0,0 +1,32 @@ +// +// GMFetchItem.m +// GMPhotoPicker +// +// Created by micheladrion on 4/26/15. +// Copyright (c) 2015 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMFetchItem.h" + +@implementation GMFetchItem + +@synthesize be_progressed, be_finished, percent, image_fullsize, image_thumb, be_saving_img, be_saving_img_thumb; + +- (id)init{ + + self = [super init]; + + be_progressed = false; + be_finished = false; + percent = 0; + + image_thumb = nil; + image_fullsize = nil; + + be_saving_img = false; + be_saving_img_thumb; + + return self; +} + +@end diff --git a/src/ios/GMImagePicker/GMGridViewCell.h b/src/ios/GMImagePicker/GMGridViewCell.h new file mode 100755 index 00000000..2f99cf69 --- /dev/null +++ b/src/ios/GMImagePicker/GMGridViewCell.h @@ -0,0 +1,40 @@ +// +// GMGridViewCell.h +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "MRCircularProgressView.h" +#import + + +@interface GMGridViewCell : UICollectionViewCell + +@property (nonatomic, strong) PHAsset *asset; +//The imageView +@property (nonatomic, strong) UIImageView *imageView; +//Video additional information +@property (nonatomic, strong) UIImageView *videoIcon; +@property (nonatomic, strong) UILabel *videoDuration; +@property (nonatomic, strong) UIView* gradientView; +@property (nonatomic, strong) CAGradientLayer *gradient; +//Selection overlay +@property (nonatomic, strong) UIView* coverView; +@property (nonatomic, strong) UIButton *selectedButton; + +@property (nonatomic, assign, getter = isEnabled) BOOL enabled; + +- (void)bind:(PHAsset *)asset; + +@property (nonatomic, strong) MRCircularProgressView *circularProgressView; +-(void)show_progress; +-(void)set_progress:(float)value animated:(BOOL)animated; +-(void)hide_progress; + +@property (nonatomic, strong) UILabel *fetch; +-(void)show_fetching; +-(void)hide_fetching; + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMGridViewCell.m b/src/ios/GMImagePicker/GMGridViewCell.m new file mode 100755 index 00000000..685af2c6 --- /dev/null +++ b/src/ios/GMImagePicker/GMGridViewCell.m @@ -0,0 +1,217 @@ +// +// GMGridViewCell.m +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMGridViewCell.h" + +@interface GMGridViewCell () + + + +@end + + +@implementation GMGridViewCell + +@synthesize circularProgressView; + +static UIFont *titleFont; +static CGFloat titleHeight; +static UIImage *videoIcon; +static UIColor *titleColor; +static UIImage *checkedIcon; +static UIColor *selectedColor; +static UIColor *disabledColor; + ++ (void)initialize +{ + titleFont = [UIFont systemFontOfSize:12]; + titleHeight = 20.0f; + videoIcon = [UIImage imageNamed:@"GMImagePickerVideo"]; + titleColor = [UIColor whiteColor]; + checkedIcon = [UIImage imageNamed:@"CTAssetsPickerChecked"]; + selectedColor = [UIColor colorWithWhite:1 alpha:0.3]; + disabledColor = [UIColor colorWithWhite:1 alpha:0.9]; +} + +- (void)awakeFromNib +{ + [super awakeFromNib]; + + self.contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + self.contentView.translatesAutoresizingMaskIntoConstraints = YES; +} + +- (id)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) + { + self.opaque = NO; + self.enabled = YES; + + CGFloat cellSize = self.contentView.bounds.size.width; + + // The image view + _imageView = [UIImageView new]; + _imageView.frame = CGRectMake(0, 0, cellSize, cellSize); + _imageView.contentMode = UIViewContentModeScaleAspectFill; + /*if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + { + _imageView.contentMode = UIViewContentModeScaleAspectFit; + } + else + { + _imageView.contentMode = UIViewContentModeScaleAspectFill; + }*/ + _imageView.clipsToBounds = YES; + _imageView.translatesAutoresizingMaskIntoConstraints = NO; + _imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + [self addSubview:_imageView]; + + + // The video gradient, label & icon + float x_offset = 4.0f; + UIColor *topGradient = [UIColor colorWithRed:0.00 green:0.00 blue:0.00 alpha:0.0]; + UIColor *botGradient = [UIColor colorWithRed:0.00 green:0.00 blue:0.00 alpha:0.8]; + _gradientView = [[UIView alloc] initWithFrame: CGRectMake(0.0f, self.bounds.size.height-titleHeight, self.bounds.size.width, titleHeight)]; + _gradient = [CAGradientLayer layer]; + _gradient.frame = _gradientView.bounds; + _gradient.colors = [NSArray arrayWithObjects:(id)[topGradient CGColor], (id)[botGradient CGColor], nil]; + [_gradientView.layer insertSublayer:_gradient atIndex:0]; + _gradientView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; + _gradientView.translatesAutoresizingMaskIntoConstraints = NO; + [self addSubview:_gradientView]; + _gradientView.hidden = YES; + + _videoIcon = [UIImageView new]; + _videoIcon.frame = CGRectMake(x_offset, self.bounds.size.height-titleHeight, self.bounds.size.width-2*x_offset, titleHeight); + _videoIcon.contentMode = UIViewContentModeLeft; + _videoIcon.image = [UIImage imageNamed:@"GMVideoIcon"]; + _videoIcon.translatesAutoresizingMaskIntoConstraints = NO; + _videoIcon.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; + [self addSubview:_videoIcon]; + _videoIcon.hidden = YES; + + _videoDuration = [UILabel new]; + _videoDuration.font = titleFont; + _videoDuration.textColor = titleColor; + _videoDuration.textAlignment = NSTextAlignmentRight; + _videoDuration.frame = CGRectMake(x_offset, self.bounds.size.height-titleHeight, self.bounds.size.width-2*x_offset, titleHeight); + _videoDuration.contentMode = UIViewContentModeRight; + _videoDuration.translatesAutoresizingMaskIntoConstraints = NO; + _videoDuration.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; + [self addSubview:_videoDuration]; + _videoDuration.hidden = YES; + + // Selection overlay & icon + _coverView = [[UIView alloc] initWithFrame:self.bounds]; + _coverView.translatesAutoresizingMaskIntoConstraints = NO; + _coverView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + _coverView.backgroundColor = [UIColor colorWithRed:0.24 green:0.47 blue:0.85 alpha:0.6]; + [self addSubview:_coverView]; + _coverView.hidden = YES; + + _selectedButton = [UIButton buttonWithType:UIButtonTypeCustom]; + _selectedButton.frame = CGRectMake(2*self.bounds.size.width/3, 0*self.bounds.size.width/3, self.bounds.size.width/3, self.bounds.size.width/3); + _selectedButton.contentMode = UIViewContentModeTopRight; + _selectedButton.adjustsImageWhenHighlighted = NO; + [_selectedButton setImage:nil forState:UIControlStateNormal]; + _selectedButton.translatesAutoresizingMaskIntoConstraints = NO; + _selectedButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + [_selectedButton setImage:[UIImage imageNamed:@"GMSelected"] forState:UIControlStateSelected]; + _selectedButton.hidden = NO; + _selectedButton.userInteractionEnabled = NO; + [self addSubview:_selectedButton]; + + // circle progress + + self.circularProgressView = [[MRCircularProgressView alloc] initWithFrame:CGRectMake(self.bounds.size.width/3, self.bounds.size.height/3, self.bounds.size.width/3, self.bounds.size.height/3)]; + [self.circularProgressView.stopButton addTarget:self action:@selector(onCircularProgressViewTouchUpInside:) forControlEvents:UIControlEventTouchUpInside]; + //[self.circularProgressView setHidden:true]; + [self addSubview:self.circularProgressView]; + + + _fetch = [UILabel new]; + _fetch.font = titleFont; + _fetch.textColor = titleColor; + _fetch.textAlignment = NSTextAlignmentCenter; + _fetch.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height); + _fetch.text = @"fetching"; + [self addSubview:_fetch]; + + } + + return self; +} + +-(void)show_progress{ + [self.circularProgressView setHidden:false]; +} + +-(void)hide_progress{ + [self.circularProgressView setHidden:true]; +} + +-(void)set_progress:(float)value animated:(BOOL)animated{ + [self.circularProgressView setProgress:value animated:animated]; +} + +-(void)show_fetching{ + _fetch.hidden = false; +} + +-(void)hide_fetching{ + _fetch.hidden = true; +} + +- (void)onCircularProgressViewTouchUpInside:(id)sender { + self.circularProgressView.progress = 0; +} + +//Required to resize the CAGradientLayer because it does not support auto resizing. +- (void)layoutSubviews { + [super layoutSubviews]; + _gradient.frame = _gradientView.bounds; +} + +- (void)bind:(PHAsset *)asset +{ + self.asset = asset; + + if (self.asset.mediaType == PHAssetMediaTypeVideo) + { + _videoIcon.hidden = NO; + _videoDuration.hidden = NO; + _gradientView.hidden = NO; + _videoDuration.text = [self getDurationWithFormat:self.asset.duration]; + } + else + { + _videoIcon.hidden = YES; + _videoDuration.hidden = YES; + _gradientView.hidden = YES; + } +} + +// Override setSelected +- (void)setSelected:(BOOL)selected +{ + [super setSelected:selected]; + _coverView.hidden = !selected; + _selectedButton.selected = selected; +} + +-(NSString*)getDurationWithFormat:(NSTimeInterval)duration +{ + NSInteger ti = (NSInteger)duration; + NSInteger seconds = ti % 60; + NSInteger minutes = (ti / 60) % 60; + //NSInteger hours = (ti / 3600); + return [NSString stringWithFormat:@"%02ld:%02ld", (long)minutes, (long)seconds]; +} + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMGridViewController.h b/src/ios/GMImagePicker/GMGridViewController.h new file mode 100755 index 00000000..3265f1dc --- /dev/null +++ b/src/ios/GMImagePicker/GMGridViewController.h @@ -0,0 +1,24 @@ +// +// GMGridViewController.h +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + + +#import "GMImagePickerController.h" +#import "UIImage+fixOrientation.m" + +#import + + + +@interface GMGridViewController : UICollectionViewController + +@property (strong) PHFetchResult *assetsFetchResults; +@property (nonatomic, weak) NSMutableDictionary * dic_asset_fetches; + +-(id)initWithPicker:(GMImagePickerController *)picker; + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMGridViewController.m b/src/ios/GMImagePicker/GMGridViewController.m new file mode 100755 index 00000000..5f10e06c --- /dev/null +++ b/src/ios/GMImagePicker/GMGridViewController.m @@ -0,0 +1,764 @@ +// +// GMGridViewController.m +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMGridViewController.h" +#import "GMImagePickerController.h" +#import "GMAlbumsViewController.h" +#import "GMGridViewCell.h" +#import "GMPHAsset.h" + +//#import "PSYBlockTimer.h" +#import "GMFetchItem.h" + + + +#define CDV_PHOTO_PREFIX @"cdv_photo_" +#define CDV_THUMB_PREFIX @"cdv_thumb_" + + +//Helper methods +@implementation NSIndexSet (Convenience) +- (NSArray *)aapl_indexPathsFromIndexesWithSection:(NSUInteger)section { + NSMutableArray *indexPaths = [NSMutableArray arrayWithCapacity:self.count]; + [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { + [indexPaths addObject:[NSIndexPath indexPathForItem:idx inSection:section]]; + }]; + return indexPaths; +} +@end +@implementation UICollectionView (Convenience) +- (NSArray *)aapl_indexPathsForElementsInRect:(CGRect)rect { + NSArray *allLayoutAttributes = [self.collectionViewLayout layoutAttributesForElementsInRect:rect]; + if (allLayoutAttributes.count == 0) { return nil; } + NSMutableArray *indexPaths = [NSMutableArray arrayWithCapacity:allLayoutAttributes.count]; + for (UICollectionViewLayoutAttributes *layoutAttributes in allLayoutAttributes) { + NSIndexPath *indexPath = layoutAttributes.indexPath; + [indexPaths addObject:indexPath]; + } + return indexPaths; +} +@end + + + +@interface GMImagePickerController (){ +} + +- (void)finishPickingAssets:(id)sender; +- (NSString *)toolbarTitle; +- (UIView *)noAssetsView; + +@end + + +@interface GMGridViewController () + +@property (nonatomic, weak) GMImagePickerController *picker; +@property (strong) PHCachingImageManager *imageManager; +@property CGRect previousPreheatRect; + +@end + +static CGSize AssetGridThumbnailSize; +NSString * const GMGridViewCellIdentifier = @"GMGridViewCellIdentifier"; + +@implementation GMGridViewController +{ + CGFloat screenWidth; + CGFloat screenHeight; + UICollectionViewFlowLayout *portraitLayout; + UICollectionViewFlowLayout *landscapeLayout; + + NSFileManager* fileMgr; + NSString* docsPath; + int docCount; + int doc_thumbCount; +} + +@synthesize dic_asset_fetches; + +-(id)initWithPicker:(GMImagePickerController *)picker +{ + //Custom init. The picker contains custom information to create the FlowLayout + self.picker = picker; + + //Ipad popover is not affected by rotation! + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + { + screenWidth = CGRectGetWidth(picker.view.bounds); + screenHeight = CGRectGetHeight(picker.view.bounds); + } + else + { + if(UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) + { + screenHeight = CGRectGetWidth(picker.view.bounds); + screenWidth = CGRectGetHeight(picker.view.bounds); + } + else + { + screenWidth = CGRectGetWidth(picker.view.bounds); + screenHeight = CGRectGetHeight(picker.view.bounds); + } + } + + + UICollectionViewFlowLayout *layout = [self collectionViewFlowLayoutForOrientation:[UIApplication sharedApplication].statusBarOrientation]; + if (self = [super initWithCollectionViewLayout:layout]) + { + //Compute the thumbnail pixel size: + CGFloat scale = [UIScreen mainScreen].scale; + //NSLog(@"This is @%fx scale device", scale); + AssetGridThumbnailSize = CGSizeMake(layout.itemSize.width * scale, layout.itemSize.height * scale); + + self.collectionView.allowsMultipleSelection = YES; + + [self.collectionView registerClass:GMGridViewCell.class + forCellWithReuseIdentifier:GMGridViewCellIdentifier]; + + self.preferredContentSize = kPopoverContentSize; + } + + /// + fileMgr = [[NSFileManager alloc] init]; + //dic_asset_fetches = [[NSMutableDictionary alloc] init]; + docsPath = [NSTemporaryDirectory()stringByStandardizingPath]; + docCount = 0; + doc_thumbCount = 0; + + return self; +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + [self setupViews]; + + //Navigation bar customization_ + if(self.picker.customNavigationBarPrompt) + { + self.navigationItem.prompt = self.picker.customNavigationBarPrompt; + } + + self.imageManager = [[PHCachingImageManager alloc] init]; + [self resetCachedAssets]; + [[PHPhotoLibrary sharedPhotoLibrary] registerChangeObserver:self]; + +} + +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + [self setupButtons]; + [self setupToolbar]; +} + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + [self updateCachedAssets]; +} + +- (void)dealloc +{ + [self resetCachedAssets]; + [[PHPhotoLibrary sharedPhotoLibrary] unregisterChangeObserver:self]; +} + + + +#pragma mark - Rotation + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration +{ + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + { + return; + } + + UICollectionViewFlowLayout *layout = [self collectionViewFlowLayoutForOrientation:toInterfaceOrientation]; + + //Update the AssetGridThumbnailSize: + CGFloat scale = [UIScreen mainScreen].scale; + AssetGridThumbnailSize = CGSizeMake(layout.itemSize.width * scale, layout.itemSize.height * scale); + + [self resetCachedAssets]; + //This is optional. Reload visible thumbnails: + for (GMGridViewCell *cell in [self.collectionView visibleCells]) + { + NSInteger currentTag = cell.tag; + [self.imageManager requestImageForAsset:cell.asset + targetSize:AssetGridThumbnailSize + contentMode:PHImageContentModeAspectFill + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) + { + // Only update the thumbnail if the cell tag hasn't changed. Otherwise, the cell has been re-used. + if (cell.tag == currentTag) { + [cell.imageView setImage:result]; + } + }]; + } + + [self.collectionView setCollectionViewLayout:layout animated:YES]; +} + + + + + + +#pragma mark - Setup + +- (void)setupViews +{ + self.collectionView.backgroundColor = [UIColor whiteColor]; +} + +- (void)setupButtons +{ + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"picker.navigation.done-button", @"GMImagePicker",@"Done") + style:UIBarButtonItemStyleDone + target:self.picker + action:@selector(finishPickingAssets:)]; + + self.navigationItem.rightBarButtonItem.enabled = (self.picker.selectedAssets.count > 0); +} + +- (void)setupToolbar +{ + self.toolbarItems = self.picker.toolbarItems; +} + +#pragma mark - Collection View Layout + + +- (UICollectionViewFlowLayout *)collectionViewFlowLayoutForOrientation:(UIInterfaceOrientation)orientation +{ + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + { + if(!portraitLayout) + { + portraitLayout = [[UICollectionViewFlowLayout alloc] init]; + portraitLayout.minimumInteritemSpacing = self.picker.minimumInteritemSpacing; + int cellTotalUsableWidth = screenWidth - (self.picker.colsInPortrait-1)*self.picker.minimumInteritemSpacing; + portraitLayout.itemSize = CGSizeMake(cellTotalUsableWidth/self.picker.colsInPortrait, cellTotalUsableWidth/self.picker.colsInPortrait); + double cellTotalUsedWidth = (double)portraitLayout.itemSize.width*self.picker.colsInPortrait; + double spaceTotalWidth = (double)screenWidth-cellTotalUsedWidth; + double spaceWidth = spaceTotalWidth/(double)(self.picker.colsInPortrait-1); + portraitLayout.minimumLineSpacing = spaceWidth; + } + return portraitLayout; + } + else + { + if(UIInterfaceOrientationIsLandscape(orientation)) + { + if(!landscapeLayout) + { + landscapeLayout = [[UICollectionViewFlowLayout alloc] init]; + landscapeLayout.minimumInteritemSpacing = self.picker.minimumInteritemSpacing; + int cellTotalUsableWidth = screenHeight - (self.picker.colsInLandscape-1)*self.picker.minimumInteritemSpacing; + landscapeLayout.itemSize = CGSizeMake(cellTotalUsableWidth/self.picker.colsInLandscape, cellTotalUsableWidth/self.picker.colsInLandscape); + double cellTotalUsedWidth = (double)landscapeLayout.itemSize.width*self.picker.colsInLandscape; + double spaceTotalWidth = (double)screenHeight-cellTotalUsedWidth; + double spaceWidth = spaceTotalWidth/(double)(self.picker.colsInLandscape-1); + landscapeLayout.minimumLineSpacing = spaceWidth; + } + return landscapeLayout; + } + else + { + if(!portraitLayout) + { + portraitLayout = [[UICollectionViewFlowLayout alloc] init]; + portraitLayout.minimumInteritemSpacing = self.picker.minimumInteritemSpacing; + int cellTotalUsableWidth = screenWidth - (self.picker.colsInPortrait-1)*self.picker.minimumInteritemSpacing; + portraitLayout.itemSize = CGSizeMake(cellTotalUsableWidth/self.picker.colsInPortrait, cellTotalUsableWidth/self.picker.colsInPortrait); + double cellTotalUsedWidth = (double)portraitLayout.itemSize.width*self.picker.colsInPortrait; + double spaceTotalWidth = (double)screenWidth-cellTotalUsedWidth; + double spaceWidth = spaceTotalWidth/(double)(self.picker.colsInPortrait-1); + portraitLayout.minimumLineSpacing = spaceWidth; + } + return portraitLayout; + } + } +} + + +#pragma mark - Collection View Data Source + +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView +{ + return 1; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath +{ + GMGridViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:GMGridViewCellIdentifier + forIndexPath:indexPath]; + + // Increment the cell's tag + NSInteger currentTag = cell.tag + 1; + cell.tag = currentTag; + + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + [cell bind:asset]; + + //GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:[NSNumber numberWithLong:indexPath.item] ]; + GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:asset ]; + if ( fetch_item == nil ) { + fetch_item = [[GMFetchItem alloc] init]; + //[ dic_asset_fetches setObject:fetch_item forKey:[NSNumber numberWithLong:indexPath.item] ]; + [ dic_asset_fetches setObject:fetch_item forKey:asset ]; + } + + //Optional protocol to determine if some kind of assets can't be selected (pej long videos, etc...) + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:shouldEnableAsset:)]) + { + cell.enabled = [self.picker.delegate assetsPickerController:self.picker shouldEnableAsset:asset]; + } + else + { + cell.enabled = YES; + } + + // Setting `selected` property blocks further deselection. Have to call selectItemAtIndexPath too. ( ref: http://stackoverflow.com/a/17812116/1648333 ) + if ([self.picker.selectedAssets containsObject:asset]) + { + cell.selected = YES; + [collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; + } + else + { + cell.selected = NO; + } + + [cell set_progress:fetch_item.percent animated:false]; + + if ( fetch_item.be_finished ) { + [ cell hide_progress ]; + } + else if ( fetch_item.be_progressed ) { + [ cell show_progress ]; + [ cell set_progress:fetch_item.percent animated:false]; + }else{ + [ cell hide_progress ]; + } + + if ( fetch_item.be_saving_img ) { + [ cell show_fetching ]; + }else{ + [ cell hide_fetching ]; + } + + //NSLog( @" cell : %ld ", (long)indexPath.item ); + + /*if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + { + NSLog(@"Image manager: Requesting FIT image for iPad"); + [self.imageManager requestImageForAsset:asset + targetSize:AssetGridThumbnailSize + contentMode:PHImageContentModeAspectFit + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) { + + // Only update the thumbnail if the cell tag hasn't changed. Otherwise, the cell has been re-used. + if (cell.tag == currentTag) { + [cell.imageView setImage:result]; + } + }]; + } + else*/ + { + //NSLog(@"Image manager: Requesting FILL image for iPhone"); + [self.imageManager requestImageForAsset:asset + targetSize:AssetGridThumbnailSize + contentMode:PHImageContentModeAspectFill + options:nil + resultHandler:^(UIImage *result, NSDictionary *info) { + + // Only update the thumbnail if the cell tag hasn't changed. Otherwise, the cell has been re-used. + if (cell.tag == currentTag) { + [cell.imageView setImage:result]; + } + + if ( fetch_item.be_saving_img_thumb==false && fetch_item.image_thumb == nil && result!= nil ) { + + fetch_item.be_saving_img_thumb = true; + + NSString * filePath; + do { + filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_THUMB_PREFIX, doc_thumbCount++, @"jpg"]; + } while ([fileMgr fileExistsAtPath:filePath]); + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + + fetch_item.be_saving_img_thumb = false; + + if ( ![ UIImageJPEGRepresentation(result, 1.0f ) writeToFile:filePath atomically:YES ] ) { + return; + } + + fetch_item.image_thumb = filePath; + + }); + } + + /*GMGridViewCell *cell = (GMGridViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; + + if ( cell ) { + [cell.imageView setImage:result]; + } + NSLog( @"%d", indexPath.item );*/ + + }]; + } + + + + return cell; +} + + +#pragma mark - Collection View Delegate + +- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + //GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:[ NSNumber numberWithLong:indexPath.item ]]; + GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:asset]; + + GMGridViewCell *cell = (GMGridViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; + + if ( cell == nil || fetch_item==nil || fetch_item.be_progressed ) { + return NO; + } + + if ( fetch_item.be_saving_img == false && fetch_item.image_fullsize == nil ) { + + fetch_item.be_progressed = true; + [ cell show_progress ]; + + PHImageRequestOptions *ph_options = [[PHImageRequestOptions alloc] init]; + + [ ph_options setNetworkAccessAllowed:YES]; + + // @BVL Set Deliverymode, in order to return highest quality + [ ph_options setDeliveryMode: PHImageRequestOptionsDeliveryModeHighQualityFormat ]; // Best Quality + + [ ph_options setProgressHandler:^(double progress, NSError *error, BOOL *stop, NSDictionary *info) { + + fetch_item.percent = progress; + + GMGridViewCell *cell = (GMGridViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; + + if ( cell ) { + [ cell set_progress:progress animated:false]; + } + + }]; + + + + [ self.imageManager requestImageForAsset:asset targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeDefault options:ph_options resultHandler:^(UIImage *result, NSDictionary *info) { + + //dispatch_async(dispatch_get_main_queue(), ^{ + + GMGridViewCell *cell = (GMGridViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; + + if ( cell ) { + [cell hide_progress]; + [cell show_fetching]; + } + + fetch_item.be_progressed = false; + fetch_item.be_finished = true; + + //asset.image_fullsize = result; + + NSString * filePath; + do { + filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_PHOTO_PREFIX, docCount++, @"jpg"]; + } while ([fileMgr fileExistsAtPath:filePath]); + + fetch_item.be_saving_img = true; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + + + // @BVL: Added orientation-fix to correctly display the returned result + +// if ( ![ UIImageJPEGRepresentation(result, 1.0f ) writeToFile:filePath atomically:YES ] ) { +// return; +// } + + NSLog(@"original orientation: %ld",(UIImageOrientation)result.imageOrientation); + + UIImage *imageToDisplay = result.fixOrientation; // UIImage+fixOrientation extension + + NSLog(@"corrected orientation: %ld",(UIImageOrientation)imageToDisplay.imageOrientation); + + if ( ![ UIImageJPEGRepresentation(imageToDisplay, 1.0f ) writeToFile:filePath atomically:YES ] ) { + return; + } + + fetch_item.image_fullsize = filePath; + fetch_item.be_saving_img = false; + + dispatch_async(dispatch_get_main_queue(), ^{ + + GMGridViewCell *cell = (GMGridViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; + + if ( cell ) { + [cell hide_fetching]; + } + + //Your main thread code goes in here + [ collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone ]; + [ self collectionView:collectionView didSelectItemAtIndexPath:indexPath ]; + }); + + }); + //}); + + }]; + + + return NO; + } + + if (!cell.isEnabled) + return NO; + else if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:shouldSelectAsset:)]) + return [self.picker.delegate assetsPickerController:self.picker shouldSelectAsset:asset]; + else + return YES; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + //GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:[ NSNumber numberWithLong:indexPath.item ]]; + GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:asset]; + + [self.picker selectAsset:asset]; + [self.picker selectFetchItem:fetch_item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:didSelectAsset:)]) + [self.picker.delegate assetsPickerController:self.picker didSelectAsset:asset]; +} + +- (BOOL)collectionView:(UICollectionView *)collectionView shouldDeselectItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:shouldDeselectAsset:)]) + return [self.picker.delegate assetsPickerController:self.picker shouldDeselectAsset:asset]; + else + return YES; +} + +- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + //GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:[ NSNumber numberWithLong:indexPath.item ]]; + GMFetchItem * fetch_item = [dic_asset_fetches objectForKey:asset]; + + [self.picker deselectAsset:asset]; + [self.picker deselectFetchItem:fetch_item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:didDeselectAsset:)]) + [self.picker.delegate assetsPickerController:self.picker didDeselectAsset:asset]; +} + +- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:shouldHighlightAsset:)]) + return [self.picker.delegate assetsPickerController:self.picker shouldHighlightAsset:asset]; + else + return YES; +} + +- (void)collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:didHighlightAsset:)]) + [self.picker.delegate assetsPickerController:self.picker didHighlightAsset:asset]; +} + +- (void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath +{ + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + + if ([self.picker.delegate respondsToSelector:@selector(assetsPickerController:didUnhighlightAsset:)]) + [self.picker.delegate assetsPickerController:self.picker didUnhighlightAsset:asset]; +} + + + +#pragma mark - UICollectionViewDataSource + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section +{ + NSInteger count = self.assetsFetchResults.count; + return count; +} + + +#pragma mark - PHPhotoLibraryChangeObserver + +- (void)photoLibraryDidChange:(PHChange *)changeInstance +{ + // Call might come on any background queue. Re-dispatch to the main queue to handle it. + dispatch_async(dispatch_get_main_queue(), ^{ + + // check if there are changes to the assets (insertions, deletions, updates) + PHFetchResultChangeDetails *collectionChanges = [changeInstance changeDetailsForFetchResult:self.assetsFetchResults]; + if (collectionChanges) { + + // get the new fetch result + self.assetsFetchResults = [collectionChanges fetchResultAfterChanges]; + + //NSLog( @"reset all" ); + + UICollectionView *collectionView = self.collectionView; + + if (![collectionChanges hasIncrementalChanges] || [collectionChanges hasMoves]) { + // we need to reload all if the incremental diffs are not available + [collectionView reloadData]; + + } else { + // if we have incremental diffs, tell the collection view to animate insertions and deletions + [collectionView performBatchUpdates:^{ + NSIndexSet *removedIndexes = [collectionChanges removedIndexes]; + if ([removedIndexes count]) { + [collectionView deleteItemsAtIndexPaths:[removedIndexes aapl_indexPathsFromIndexesWithSection:0]]; + } + NSIndexSet *insertedIndexes = [collectionChanges insertedIndexes]; + if ([insertedIndexes count]) { + [collectionView insertItemsAtIndexPaths:[insertedIndexes aapl_indexPathsFromIndexesWithSection:0]]; + } + NSIndexSet *changedIndexes = [collectionChanges changedIndexes]; + if ([changedIndexes count]) { + [collectionView reloadItemsAtIndexPaths:[changedIndexes aapl_indexPathsFromIndexesWithSection:0]]; + } + } completion:NULL]; + } + + [self resetCachedAssets]; + } + }); +} + +#pragma mark - UIScrollViewDelegate + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView +{ + [self updateCachedAssets]; +} + + +#pragma mark - Asset Caching + +- (void)resetCachedAssets +{ + [self.imageManager stopCachingImagesForAllAssets]; + self.previousPreheatRect = CGRectZero; +} + +- (void)updateCachedAssets +{ + BOOL isViewVisible = [self isViewLoaded] && [[self view] window] != nil; + if (!isViewVisible) { return; } + + // The preheat window is twice the height of the visible rect + CGRect preheatRect = self.collectionView.bounds; + preheatRect = CGRectInset(preheatRect, 0.0f, -0.5f * CGRectGetHeight(preheatRect)); + + // If scrolled by a "reasonable" amount... + CGFloat delta = ABS(CGRectGetMidY(preheatRect) - CGRectGetMidY(self.previousPreheatRect)); + if (delta > CGRectGetHeight(self.collectionView.bounds) / 3.0f) { + + // Compute the assets to start caching and to stop caching. + NSMutableArray *addedIndexPaths = [NSMutableArray array]; + NSMutableArray *removedIndexPaths = [NSMutableArray array]; + + [self computeDifferenceBetweenRect:self.previousPreheatRect andRect:preheatRect removedHandler:^(CGRect removedRect) { + NSArray *indexPaths = [self.collectionView aapl_indexPathsForElementsInRect:removedRect]; + [removedIndexPaths addObjectsFromArray:indexPaths]; + } addedHandler:^(CGRect addedRect) { + NSArray *indexPaths = [self.collectionView aapl_indexPathsForElementsInRect:addedRect]; + [addedIndexPaths addObjectsFromArray:indexPaths]; + }]; + + NSArray *assetsToStartCaching = [self assetsAtIndexPaths:addedIndexPaths]; + NSArray *assetsToStopCaching = [self assetsAtIndexPaths:removedIndexPaths]; + + [self.imageManager startCachingImagesForAssets:assetsToStartCaching + targetSize:AssetGridThumbnailSize + contentMode:PHImageContentModeAspectFill + options:nil]; + [self.imageManager stopCachingImagesForAssets:assetsToStopCaching + targetSize:AssetGridThumbnailSize + contentMode:PHImageContentModeAspectFill + options:nil]; + + self.previousPreheatRect = preheatRect; + } +} + +- (void)computeDifferenceBetweenRect:(CGRect)oldRect andRect:(CGRect)newRect removedHandler:(void (^)(CGRect removedRect))removedHandler addedHandler:(void (^)(CGRect addedRect))addedHandler +{ + if (CGRectIntersectsRect(newRect, oldRect)) { + CGFloat oldMaxY = CGRectGetMaxY(oldRect); + CGFloat oldMinY = CGRectGetMinY(oldRect); + CGFloat newMaxY = CGRectGetMaxY(newRect); + CGFloat newMinY = CGRectGetMinY(newRect); + if (newMaxY > oldMaxY) { + CGRect rectToAdd = CGRectMake(newRect.origin.x, oldMaxY, newRect.size.width, (newMaxY - oldMaxY)); + addedHandler(rectToAdd); + } + if (oldMinY > newMinY) { + CGRect rectToAdd = CGRectMake(newRect.origin.x, newMinY, newRect.size.width, (oldMinY - newMinY)); + addedHandler(rectToAdd); + } + if (newMaxY < oldMaxY) { + CGRect rectToRemove = CGRectMake(newRect.origin.x, newMaxY, newRect.size.width, (oldMaxY - newMaxY)); + removedHandler(rectToRemove); + } + if (oldMinY < newMinY) { + CGRect rectToRemove = CGRectMake(newRect.origin.x, oldMinY, newRect.size.width, (newMinY - oldMinY)); + removedHandler(rectToRemove); + } + } else { + addedHandler(newRect); + removedHandler(oldRect); + } +} + +- (NSArray *)assetsAtIndexPaths:(NSArray *)indexPaths +{ + if (indexPaths.count == 0) { return nil; } + + NSMutableArray *assets = [NSMutableArray arrayWithCapacity:indexPaths.count]; + for (NSIndexPath *indexPath in indexPaths) { + PHAsset *asset = self.assetsFetchResults[indexPath.item]; + [assets addObject:asset]; + } + return assets; +} + + +@end diff --git a/src/ios/GMImagePicker/GMImagePickerController.h b/src/ios/GMImagePicker/GMImagePickerController.h new file mode 100755 index 00000000..ec62ab67 --- /dev/null +++ b/src/ios/GMImagePicker/GMImagePickerController.h @@ -0,0 +1,238 @@ +// +// GMImagePickerController.h +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + + +#import + +#import "GMFetchItem.h" + +//This is the default image picker size! +//static CGSize const kPopoverContentSize = {320, 480}; +//However, the iPad is 1024x768 so it can allow popups up to 768! +static CGSize const kPopoverContentSize = {480, 720}; + + +@protocol GMImagePickerControllerDelegate; + + +/** + * A controller that allows picking multiple photos and videos from user's photo library. + */ +@interface GMImagePickerController : UIViewController + +- (id)init:(bool)allow_v; + +/** + * The assets picker’s delegate object. + */ +@property (nonatomic, weak) id delegate; + +/** + * It contains the selected `PHAsset` objects. The order of the objects is the selection order. + * + * You can add assets before presenting the picker to show the user some preselected assets. + */ +@property (nonatomic, strong) NSMutableArray *selectedAssets; +@property (nonatomic, strong) NSMutableArray *selectedFetches; + + +/** UI Customizations **/ + +/** + * Determines whether or not the number of assets is shown in the Album list. + * The number of assets is visible by default. + */ +@property (nonatomic, strong) NSArray* customSmartCollections; + +/** + * If set, it displays a promt in the navigation bar + */ +@property (nonatomic) NSString* customNavigationBarPrompt; + +/** + * Determines whether or not a toolbar with info about user selection is shown. + * The InfoToolbar is visible by default. + */ +@property (nonatomic) BOOL displaySelectionInfoToolbar; + +/** + * Determines whether or not the number of assets is shown in the Album list. + * The number of assets is visible by default. + */ +@property (nonatomic, assign) BOOL displayAlbumsNumberOfAssets; + + +@property (nonatomic, assign) BOOL allow_video; + +/** + * Grid customizations: + * + * - colsInPortrait: Number of columns in portrait (3 by default) + * - colsInLandscape: Number of columns in landscape (5 by default) + * - minimumInteritemSpacing: Horizontal and vertical minimum space between grid cells (2.0 by default) + */ +@property (nonatomic) NSInteger colsInPortrait; +@property (nonatomic) NSInteger colsInLandscape; +@property (nonatomic) double minimumInteritemSpacing; + + +@property (nonatomic, strong) UINavigationController *navigationController; + +/** + * Managing Asset Selection + */ +- (void)selectAsset:(PHAsset *)asset; +- (void)deselectAsset:(PHAsset *)asset; + +- (void)selectFetchItem:(GMFetchItem *)asset; +- (void)deselectFetchItem:(GMFetchItem *)asset; + + +/** + * User finish Actions + */ +- (void)dismiss:(id)sender; +- (void)finishPickingAssets:(id)sender; + +@end + + + +@protocol GMImagePickerControllerDelegate + +/** + * @name Closing the Picker + */ + +/** + * Tells the delegate that the user finish picking photos or videos. + * @param picker The controller object managing the assets picker interface. + * @param assets An array containing picked PHAssets objects. + */ + +- (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)assets; + + +@optional + +/** + * Tells the delegate that the user cancelled the pick operation. + * @param picker The controller object managing the assets picker interface. + */ +- (void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker; + + +/** + * @name Enabling Assets + */ + +/** + * Ask the delegate if the specified asset should be shown. + * + * @param picker The controller object managing the assets picker interface. + * @param asset The asset to be shown. + * + * @return `YES` if the asset should be shown or `NO` if it should not. + */ + +- (BOOL)assetsPickerController:(GMImagePickerController *)picker shouldShowAsset:(PHAsset *)asset; + +/** + * Ask the delegate if the specified asset should be enabled for selection. + * + * @param picker The controller object managing the assets picker interface. + * @param asset The asset to be enabled. + * + * @return `YES` if the asset should be enabled or `NO` if it should not. + */ +- (BOOL)assetsPickerController:(GMImagePickerController *)picker shouldEnableAsset:(PHAsset *)asset; + + +/** + * @name Managing the Selected Assets + */ + +/** + * Asks the delegate if the specified asset should be selected. + * + * @param picker The controller object managing the assets picker interface. + * @param asset The asset to be selected. + * + * @return `YES` if the asset should be selected or `NO` if it should not. + * + */ +- (BOOL)assetsPickerController:(GMImagePickerController *)picker shouldSelectAsset:(PHAsset *)asset; + +/** + * Tells the delegate that the asset was selected. + * + * @param picker The controller object managing the assets picker interface. + * @param indexPath The asset that was selected. + * + */ +- (void)assetsPickerController:(GMImagePickerController *)picker didSelectAsset:(PHAsset *)asset; + +/** + * Asks the delegate if the specified asset should be deselected. + * + * @param picker The controller object managing the assets picker interface. + * @param asset The asset to be deselected. + * + * @return `YES` if the asset should be deselected or `NO` if it should not. + * + */ +- (BOOL)assetsPickerController:(GMImagePickerController *)picker shouldDeselectAsset:(PHAsset *)asset; + +/** + * Tells the delegate that the item at the specified path was deselected. + * + * @param picker The controller object managing the assets picker interface. + * @param indexPath The asset that was deselected. + * + */ +- (void)assetsPickerController:(GMImagePickerController *)picker didDeselectAsset:(PHAsset *)asset; + + + +/** + * @name Managing Asset Highlighting + */ + +/** + * Asks the delegate if the specified asset should be highlighted. + * + * @param picker The controller object managing the assets picker interface. + * @param asset The asset to be highlighted. + * + * @return `YES` if the asset should be highlighted or `NO` if it should not. + */ +- (BOOL)assetsPickerController:(GMImagePickerController *)picker shouldHighlightAsset:(PHAsset *)asset; + +/** + * Tells the delegate that asset was highlighted. + * + * @param picker The controller object managing the assets picker interface. + * @param indexPath The asset that was highlighted. + * + */ +- (void)assetsPickerController:(GMImagePickerController *)picker didHighlightAsset:(PHAsset *)asset; + + +/** + * Tells the delegate that the highlight was removed from the asset. + * + * @param picker The controller object managing the assets picker interface. + * @param indexPath The asset that had its highlight removed. + * + */ +- (void)assetsPickerController:(GMImagePickerController *)picker didUnhighlightAsset:(PHAsset *)asset; + + + + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMImagePickerController.m b/src/ios/GMImagePicker/GMImagePickerController.m new file mode 100755 index 00000000..08b5e486 --- /dev/null +++ b/src/ios/GMImagePicker/GMImagePickerController.m @@ -0,0 +1,236 @@ +// +// GMImagePickerController.m +// GMPhotoPicker +// +// Created by Guillermo Muntaner Perelló on 19/09/14. +// Copyright (c) 2014 Guillermo Muntaner Perelló. All rights reserved. +// + +#import "GMImagePickerController.h" +#import "GMAlbumsViewController.h" + + +@interface GMImagePickerController () + +@end + +@implementation GMImagePickerController + +- (id)init:(bool)allow_v +{ + if (self = [super init]) + { + _allow_video = allow_v; + + _selectedAssets = [[NSMutableArray alloc] init]; + _selectedFetches = [[NSMutableArray alloc] init]; + + //Default values: + _displaySelectionInfoToolbar = YES; + _displayAlbumsNumberOfAssets = YES; + + //Grid configuration: + _colsInPortrait = 3; + _colsInLandscape = 5; + _minimumInteritemSpacing = 2.0; + + //Sample of how to select the collections you want to display: + _customSmartCollections = @[@(PHAssetCollectionSubtypeSmartAlbumFavorites), + @(PHAssetCollectionSubtypeSmartAlbumRecentlyAdded), + @(PHAssetCollectionSubtypeSmartAlbumVideos), + @(PHAssetCollectionSubtypeSmartAlbumSlomoVideos), + @(PHAssetCollectionSubtypeSmartAlbumTimelapses), + @(PHAssetCollectionSubtypeSmartAlbumBursts), + @(PHAssetCollectionSubtypeSmartAlbumPanoramas)]; + //If you don't want to show smart collections, just put _customSmartCollections to nil; + //_customSmartCollections=nil; + + self.preferredContentSize = kPopoverContentSize; + + [self setupNavigationController]; + } + return self; +} + +- (void)dealloc +{ + +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Setup Navigation Controller + +- (void)setupNavigationController +{ + GMAlbumsViewController *albumsViewController = [[GMAlbumsViewController alloc] init:_allow_video]; + _navigationController = [[UINavigationController alloc] initWithRootViewController:albumsViewController]; + _navigationController.delegate = self; + + [_navigationController willMoveToParentViewController:self]; + [_navigationController.view setFrame:self.view.frame]; + [self.view addSubview:_navigationController.view]; + [self addChildViewController:_navigationController]; + [_navigationController didMoveToParentViewController:self]; +} + +#pragma mark - Select / Deselect Asset + +- (void)selectAsset:(PHAsset *)asset +{ + [self.selectedAssets insertObject:asset atIndex:self.selectedAssets.count]; + [self updateDoneButton]; + + if(self.displaySelectionInfoToolbar) + [self updateToolbar]; +} + +- (void)deselectAsset:(PHAsset *)asset +{ + [self.selectedAssets removeObjectAtIndex:[self.selectedAssets indexOfObject:asset]]; + if(self.selectedAssets.count == 0) + [self updateDoneButton]; + + if(self.displaySelectionInfoToolbar) + [self updateToolbar]; +} + +- (void)selectFetchItem:(GMFetchItem *)fetch_item{ + [self.selectedFetches insertObject:fetch_item atIndex:self.selectedFetches.count]; +} + +- (void)deselectFetchItem:(GMFetchItem *)fetch_item{ + [self.selectedFetches removeObjectAtIndex:[self.selectedFetches indexOfObject:fetch_item]]; +} + +- (void)updateDoneButton +{ + UINavigationController *nav = (UINavigationController *)self.childViewControllers[0]; + for (UIViewController *viewController in nav.viewControllers) + viewController.navigationItem.rightBarButtonItem.enabled = (self.selectedAssets.count > 0); +} + +- (void)updateToolbar +{ + UINavigationController *nav = (UINavigationController *)self.childViewControllers[0]; + for (UIViewController *viewController in nav.viewControllers) + { + [[viewController.toolbarItems objectAtIndex:1] setTitle:[self toolbarTitle]]; + [viewController.navigationController setToolbarHidden:(self.selectedAssets.count == 0) animated:YES]; + } +} + +#pragma mark - User finish Actions + +- (void)dismiss:(id)sender +{ + if ([self.delegate respondsToSelector:@selector(assetsPickerControllerDidCancel:)]) + [self.delegate assetsPickerControllerDidCancel:self]; + + [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; +} + + +- (void)finishPickingAssets:(id)sender +{ + if ([self.delegate respondsToSelector:@selector(assetsPickerController:didFinishPickingAssets:)]) + //[self.delegate assetsPickerController:self didFinishPickingAssets:self.selectedAssets]; + [self.delegate assetsPickerController:self didFinishPickingAssets:self.selectedFetches]; + + //[self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; +} + + +#pragma mark - Toolbar Title + +- (NSPredicate *)predicateOfAssetType:(PHAssetMediaType)type +{ + return [NSPredicate predicateWithBlock:^BOOL(PHAsset *asset, NSDictionary *bindings) { + return (asset.mediaType==type); + }]; +} + +- (NSString *)toolbarTitle +{ + if (self.selectedAssets.count == 0) + return nil; + + NSPredicate *photoPredicate = [self predicateOfAssetType:PHAssetMediaTypeImage]; + NSPredicate *videoPredicate = [self predicateOfAssetType:PHAssetMediaTypeVideo]; + + NSInteger nImages = [self.selectedAssets filteredArrayUsingPredicate:photoPredicate].count; + NSInteger nVideos = [self.selectedAssets filteredArrayUsingPredicate:videoPredicate].count; + + if (nImages>0 && nVideos>0) + { + return [NSString stringWithFormat:NSLocalizedStringFromTable(@"picker.selection.multiple-items", @"GMImagePicker", @"%@ Items Selected" ), @(nImages+nVideos)]; + } + else if (nImages>1) + { + return [NSString stringWithFormat:NSLocalizedStringFromTable(@"picker.selection.multiple-photos", @"GMImagePicker", @"%@ Photos Selected"), @(nImages)]; + } + else if (nImages==1) + { + return NSLocalizedStringFromTable(@"picker.selection.single-photo", @"GMImagePicker", @"1 Photo Selected" ); + } + else if (nVideos>1) + { + return [NSString stringWithFormat:NSLocalizedStringFromTable(@"picker.selection.multiple-videos", @"GMImagePicker", @"%@ Videos Selected"), @(nVideos)]; + } + else if (nVideos==1) + { + return NSLocalizedStringFromTable(@"picker.selection.single-video", @"GMImagePicker", @"1 Video Selected"); + } + else + { + return nil; + } +} + + +#pragma mark - Toolbar Items + +- (UIBarButtonItem *)titleButtonItem +{ + UIBarButtonItem *title = + [[UIBarButtonItem alloc] initWithTitle:self.toolbarTitle + style:UIBarButtonItemStylePlain + target:nil + action:nil]; + + NSDictionary *attributes = @{NSForegroundColorAttributeName : [UIColor blackColor]}; + + [title setTitleTextAttributes:attributes forState:UIControlStateNormal]; + [title setTitleTextAttributes:attributes forState:UIControlStateDisabled]; + [title setEnabled:NO]; + + return title; +} + +- (UIBarButtonItem *)spaceButtonItem +{ + return [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; +} + +- (NSArray *)toolbarItems +{ + UIBarButtonItem *title = [self titleButtonItem]; + UIBarButtonItem *space = [self spaceButtonItem]; + + return @[space, title, space]; +} + + + +@end diff --git a/src/ios/GMImagePicker/GMPHAsset.h b/src/ios/GMImagePicker/GMPHAsset.h new file mode 100644 index 00000000..359b833c --- /dev/null +++ b/src/ios/GMImagePicker/GMPHAsset.h @@ -0,0 +1,36 @@ +// +// GMPHAsset.h +// GMPhotoPicker +// +// Created by micheladrion on 4/24/15. +// Copyright (c) 2015 Guillermo Muntaner Perelló. All rights reserved. +// + +#define ADD_DYNAMIC_PROPERTY(PROPERTY_TYPE,PROPERTY_NAME,SETTER_NAME) \ +@dynamic PROPERTY_NAME ; \ +static char kProperty##PROPERTY_NAME; \ +- ( PROPERTY_TYPE ) PROPERTY_NAME \ +{ \ +return ( PROPERTY_TYPE ) objc_getAssociatedObject(self, &(kProperty##PROPERTY_NAME ) ); \ +} \ +\ +- (void) SETTER_NAME :( PROPERTY_TYPE ) PROPERTY_NAME \ +{ \ +objc_setAssociatedObject(self, &kProperty##PROPERTY_NAME , PROPERTY_NAME , OBJC_ASSOCIATION_RETAIN); \ +} \ + +#import + +#import + +@interface PHAsset (GMPHAsset) + + +@property (nonatomic, assign) id cell; +@property (nonatomic, assign) NSNumber *be_progressed; +@property (nonatomic, assign) NSNumber *be_finished; +@property (nonatomic, assign) NSNumber *percent; +@property (nonatomic, strong) UIImage * image_fullsize; +@property (nonatomic, strong) UIImage * image_thumb; + +@end diff --git a/src/ios/GMImagePicker/GMPHAsset.m b/src/ios/GMImagePicker/GMPHAsset.m new file mode 100644 index 00000000..23393e50 --- /dev/null +++ b/src/ios/GMImagePicker/GMPHAsset.m @@ -0,0 +1,21 @@ +// +// GMPHAsset.m +// GMPhotoPicker +// +// Created by micheladrion on 4/24/15. +// Copyright (c) 2015 Guillermo Muntaner Perelló. All rights reserved. +// + + +#import "GMPHAsset.h" + +@implementation PHAsset (GMPHAsset) + +ADD_DYNAMIC_PROPERTY(NSNumber *,cell,setCell); +ADD_DYNAMIC_PROPERTY(NSNumber *,be_progressed,setBe_progressed); +ADD_DYNAMIC_PROPERTY(NSNumber *,be_finished,setBe_finished); +ADD_DYNAMIC_PROPERTY(NSNumber *,percent,setPercent); +ADD_DYNAMIC_PROPERTY(UIImage *,image_fullsize,setImage_fullsize); +ADD_DYNAMIC_PROPERTY(UIImage *,image_thumb,setImage_thumb); + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/GMSelected.png b/src/ios/GMImagePicker/GMSelected.png new file mode 100755 index 0000000000000000000000000000000000000000..b251b6cd3d7866b3f60ffbb9c0581eb47c9f74a2 GIT binary patch literal 2141 zcmbVNX;f2Z8ct;?2GJ>?2r`gHkVQf^5|TiGkgx;^(1Zf6&2}Lf$U<@@0TC>MvRG-w z0#&GJRjMG1g9{P}ivo%)l?o^oup*Q>fEEoPo+ERk;>-`HKjxl$@ArN0ectEY&&`Pl z3o?V-z+o_$88eu{hE{w1V`8j-S8X6ei!~S!19D`spo*seU^JnO4Mh%ap&nV?rMn~(uTpjebsWFARYh_d>~FNr6Qj-Xpso9kcx~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D<7X5Z}cqcNW6Z1tP%(e3OW^-Y*62l!6^fM*EwEs3Nv$S z?dzU(~d}crxqspI~@o%uac-{a2 literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/GMSelected@2x.png b/src/ios/GMImagePicker/GMSelected@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..5a8f6f8cc5eed008a21ec03dcfa710bdc05ef579 GIT binary patch literal 3543 zcmbVPXIN8Nw+_84NJrEV1`#PC0Rn^?2u%qBA|Pirg#2^Z$GPIr*s!1hoGAdn zhbOpsGCWa^a14c{gWlKCVUnm^Gyq^~!K9)wL>vQn3Fl8Bn}OJE?I0ilYXw#8kUf$$6l6%Gc6hKA~d>giBu{$Pl)vGG0!6spbD(58ox8EB?9nXdYS z0g0nyXap*QKp_M78PS(0!3;AH*VDg3AW>1Me~8KSzZ1nx8JLNtf+0G(U=nFRu0OTu z3|HL$xbd&rbhj`n4(y7fQ-Wz2?tb{G{s41x_n!^zD{{SopP>=Bn}QBRQZT_J9GT&O zGy`$J=wJz0I6~jX#?aUpYGnY`g&9F0Mo=gMfz(GLjF7fS7}EF$$G>4AFe__>fq^a5 zSPuq)*ytgkdPdd;wlE|VVSq5OGWdaYAk!IWG6wg-IK#KNsS+50D!1~ z0}|oJoLcb~b9Nh7+-1+;LeI-dhQ$5Xp*rCJO-YByZ1}tMf@}KO`We!ZKv}*{d!hk8 zpwb=QIKl|b)fLIM*AxhfS4e>KINa>H(o@$v9{#k8kX2kmTVR5z1X^UgjMYn(7H+uk$*a$NTX) zn#`DhV>Pds#4{e;GLq}i&v0gzj5tn)NI*+L$F*pi1}^%Pl};vjZh z0+Dc44sk1Tw9qV#GTr=9jCUb*G7xstOkH}badBxlFL6SCgRp8c1kZU6Z~Ox;&y(i1 zH5616+qe|e!P^mnb;S1b)fn`y=RYLUvyN@*w*x@);X7L6WzekZXc=1Ah8**C>W%-~V! z?h$rECtX912h>_LzcN|(3Pzgx3>M;C5$m|KY05hybZgRMb#;|^{o1utBEML_+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>oSoZg?^ZmEjXYMRjELJ}#7iRZG7gMyE=DL)Y`(0_Ip}4sCKyzKWAB*aozm7#9U1Wyy48i4bM&H05 z!x_w0y(6Pn;^qHpn4&It6tlCl)1H!% zp&imo@@Q21z8}B7tm|3f*S|09FQsqRn z$mdCSd$5`c^4BebwK$bqjC=>PuyZWCp;1&NmNT=kEfC#AnbqmTytw;t$BWf36g|Z& zBP&}$qtSjZrHgqu_<#MK$F~0XT%ETTup&80SVKZgCg<9SY|y3SS~v^u6z&-U?qyxo z-y|w3`t4%UDfo<9W*V~=ATJj5P|9t7qKacTl1Y8wJg;_VZj zKX%a;6dZWH+K^2eA0LmQu{z=q9L(g#p4gWtz(J1e79pukjN`nk@N;G6y`j;2rsw%X v`?haycNVloS=3w9e#Q;Ox=()hh~)w3Kk(Of;*F8pKWaJHI3a7SF2?^iGr%Ar literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/GMVideoIcon.png b/src/ios/GMImagePicker/GMVideoIcon.png new file mode 100755 index 0000000000000000000000000000000000000000..865e68d2eeb4ba5c4c6334690d6dfc76eb75b46f GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^{6NgX!2%?EZsk@2sZ>uF$B+ufbP0 Hl+XkKIl?&q literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/GMVideoIcon@2x.png b/src/ios/GMImagePicker/GMVideoIcon@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..4ed325c52650489c19833dae4c126b763790342b GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^azHG=!3HE5tuUp7)A^qT+89bj(ZoRzAZ^qjCH8Ysw z{9adaa=lSL^xacv%HikyA5;GGfR3P#)(5(iqO546laAhSI};UT9Vm$q?F r!ulc=DLbof!C + + +@interface NSTimer (PSYBlockTimer) ++ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock; ++ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock; +@end diff --git a/src/ios/GMImagePicker/PSYBlockTimer.m b/src/ios/GMImagePicker/PSYBlockTimer.m new file mode 100644 index 00000000..65f178ab --- /dev/null +++ b/src/ios/GMImagePicker/PSYBlockTimer.m @@ -0,0 +1,57 @@ +/* + Copyright (c) 2009 Remy Demarest + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "PSYBlockTimer.h" + +typedef void (^PSYTimerBlock)(NSTimer *); + +@interface NSTimer (PSYBlockTimer_private) ++ (void)PSYBlockTimer_executeBlockWithTimer:(NSTimer *)timer; +@end + + +@implementation NSTimer (PSYBlockTimer) ++ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock +{ + return [self scheduledTimerWithTimeInterval:seconds target:self selector:@selector(PSYBlockTimer_executeBlockWithTimer:) userInfo:[fireBlock copy] repeats:repeats]; +} + ++ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock +{ + return [self timerWithTimeInterval:seconds target:self selector:@selector(PSYBlockTimer_executeBlockWithTimer:) userInfo:[fireBlock copy] repeats:repeats]; +} +@end + + +@implementation NSTimer (PSYBlockTimer_private) ++ (void)PSYBlockTimer_executeBlockWithTimer:(NSTimer *)timer +{ + if([timer isValid]) + { + PSYTimerBlock block = [timer userInfo]; + block(timer); + } +} +@end diff --git a/src/ios/GMImagePicker/UIImage+fixOrientation.h b/src/ios/GMImagePicker/UIImage+fixOrientation.h new file mode 100644 index 00000000..34d4036d --- /dev/null +++ b/src/ios/GMImagePicker/UIImage+fixOrientation.h @@ -0,0 +1,5 @@ +@interface UIImage(fixOrientation) + +- (UIImage *)fixOrientation; + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/UIImage+fixOrientation.m b/src/ios/GMImagePicker/UIImage+fixOrientation.m new file mode 100644 index 00000000..cb5d66ea --- /dev/null +++ b/src/ios/GMImagePicker/UIImage+fixOrientation.m @@ -0,0 +1,15 @@ +#import "UIImage+fixOrientation.h" + +@implementation UIImage (fixOrientation) + +- (UIImage *)fixOrientation { + if (self.imageOrientation == UIImageOrientationUp) return self; + + UIGraphicsBeginImageContextWithOptions(self.size, NO, self.scale); + [self drawInRect:(CGRect){0, 0, self.size}]; + UIImage *normalizedImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return normalizedImage; +} + +@end \ No newline at end of file diff --git a/src/ios/GMImagePicker/ca.lproj/GMImagePicker.strings b/src/ios/GMImagePicker/ca.lproj/GMImagePicker.strings new file mode 100755 index 0000000000000000000000000000000000000000..b33a4deb834414e2bedd550f67ea14e00c0fe266 GIT binary patch literal 1682 zcmcIk!A`b(-|w`9^lM~*Ay)Kd z#^*EBB_F?(eM5u+^ZB?SMvX{clm`B-Kerz*7ZfCw{YpD*l@ zOxaDz5txed%*rjt+*+8LYqaaNbUm%8naB0;!cIunPtSH?<+k}Yab|QHTgWcX(or|- zXVxX&|6ncmq{wZvmd>uR-TORpD|&lK=O*J+<-bitN^Wz`U_K41uksYMLRUA#m{VMy zT8U9bPsvcVEHhLc-5jeo|C$xccGHSwTHQA(V|_!TP{@q`1OVaf! za^KwgCG8%Bg>1?EX8(+y?qdVPq=*f8FA`b=PqwM<+Ai*~;d9Hq+u|PSqQea$8>NFM dT61rNHqT<|S2}qt!qGgOJflPhT?Cl3`k3|ltX$|@R^${HL=K3XFgoRWz?E)4P;;N& zOT5|9f3h< YOZz=-xu-nEhjNoClmCVNnEi(T0dxKkm;e9( literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/en.lproj/GMImagePicker.strings b/src/ios/GMImagePicker/en.lproj/GMImagePicker.strings new file mode 100755 index 0000000000000000000000000000000000000000..cd03baa69f1031a7b174da3cd2e140a5031bfb9a GIT binary patch literal 1628 zcmcJP-A=+l5Jtaio}y{u4M`zh8xx5dL!v;0c+XEoq9AFDkFTC7;C8VVi5Nn5JG(RA znVp^ecyFq%K$jY7p|N7U@Ksk+HHBJghV2<^q6X_jyEtr+25+3!nEL? ztt;-%((&z6`_ATaIVPJsJ)f;g&1Y+orM*`!OS_Hb9g@*~qx@7F%*-$H{30y2!}`tf z*t+ao8l79I{In~xTq6cCucDs@SPoI~h1;+rb fOLcY2@0!_wSEH*A?}g8HD9?(1HpSo3R1q4DWx7l;gsiu{ zZBI{c`}r|I9~Op~VT%PKyz$h>06o~)VNKmDwJ}`UXV_D-;y2~@of?;R^>i>tMq6rZ zHX~j0Z&#wv7|X^Ll1%3FUy2U|1MkNKJEZlG44RGn->AYxYrM zIHsaJvSQ0~9!fbimRn;mzdOYXxtAWFAK|VPyN+>L%G!qUnYBts{{y4UKoPr+agW2v zW|5zwdvzu+*-7Q`Z+%XPXUmtB_gEQJY?7^DuML$lcTQBwSrwJ?^%JgJ)+T#NYm=AP zJP9eMY;L%4DT$v`@pGt=8`2rYBKt4qFEVpboyx#WZcK{>K_WXYpU!p!$;sC-XbNA4 z?>wSL-jVD>-IPAYxaY5QXR3rwD=G2vK@n3Kc6Nv??gQ_b0VdO~u5%b6%qDH@itU36UyVM6x@x zGw00No%#N1OH(}Q%1k0zNGKb2O=(L*eA&qw+dJ01wD8a56U&Nk!uJD93%`pDWG)AM ziShYly65jphm#SWjmhN89oZXTDDtB@8=i@}%%YAVP7Tr)mXV||C?XDP>hNGbqe@Sf zM82|Cwh4Q!G%?K2)5XO(9s2St1KE;&1VBH}U}T0Njw%G3yB{Rc~QzODy$w z6c^6rH?+-aS#zJ7BQO=&%#NGIOgWK)8KPTakYn~avdyT9#uZI%^jO}w7rp)KbKVtl zS6LT*9@uq^!y}wuP($zhKR9c*6HY_NRMDLM zxU%Kft5HtXYjSjYmN_~tPvzL5YMpehI(@PAJ(bX}bE8s=mBt07xB!cu&<=IH#%8}k z<3%?4$|_CF9N5z>o+ulgoVM5hW)c6!28K}{8_**m7JYO30++6gcq|)8z@;lIL%HR@qxmrKksT~Ud literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/it.lproj/GMImagePicker.strings b/src/ios/GMImagePicker/it.lproj/GMImagePicker.strings new file mode 100755 index 0000000000000000000000000000000000000000..f6946b3287fcb4fff69e401a4d4a11ebf6d1fd8a GIT binary patch literal 1656 zcmcIk%TB^T6g_Lcq9M8=DTK8#vB5`35C|9-?g|tnLLqH&;m51z&a_Ua86=Gu0?gdG zk8{s`e0_G%f`=YL#F!((hPM_vXrPHb)|9>NpOE(}dT%g>M7~wJQO&4}-0E1wd*X|U+m1DKWZ)5V$oxDksK4Y{ zaAv$qjv3E&u^BtVzylu9$Cln#^f#vGf>#^iC2knG&$tn_Q=X?h35L0nEhuqUCoSm} zwb|ymtXWC%;j4_aXM;`0)KRw7idE(wqifj*t)$kv>Mp!vyi!A|etyLJlJ7F+E-n;T z%RI6hZ?yw-uFuR!s{J2$WkL$yWxP^X^X5jouJmh{Hip~3^+HNqF}qLqfnn8PlxV-R zS)E<6FkGG!pJB?zXXI`McNGQ$<|`Y`nmJ^tK literal 0 HcmV?d00001 diff --git a/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.h b/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.h new file mode 100755 index 00000000..d25ac2c1 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.h @@ -0,0 +1,23 @@ +// +// MRBlurView.h +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + Blur implementation, which displays a blurred image screenshot of the window cropped to its absolute frame. + Hides it superview on redraw, temporarily. + */ +@interface MRBlurView : UIImageView + +/** + Force redraw + */ +- (void)redraw; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.m b/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.m new file mode 100755 index 00000000..5b72b6d4 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Blur/MRBlurView.m @@ -0,0 +1,196 @@ +// +// MRBlurView.m +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import +#import "MRBlurView.h" +#import "UIImage+MRImageEffects.h" +#import "MRProgressHelper.h" + + +@interface MRBlurView () + +@property (nonatomic, assign) BOOL redrawOnFrameChange; + +@end + + +@implementation MRBlurView + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + [self setPlaceholder]; + self.clipsToBounds = YES; + [self registerForNotificationCenter]; +} + +- (void)dealloc { + [self unregisterFromNotificationCenter]; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + if (self.redrawOnFrameChange) { + self.redrawOnFrameChange = NO; + dispatch_async(dispatch_get_main_queue(), ^{ + [self redraw]; + }); + } +} + +- (void)didMoveToSuperview { + [super didMoveToSuperview]; + // See `didMoveToWindow` + if (self.window) { + [self redraw]; + } +} + +- (void)didMoveToWindow { + [super didMoveToWindow]; + // As the documentation states: The window property may be nil by the time that this method is called + if (self.window) { + // This is needed e.g. for the push animation of UINavigationController. + CFTimeInterval timeInterval = CATransaction.animationDuration > 0 ? CATransaction.animationDuration : 0.25; + dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(timeInterval * NSEC_PER_SEC)); + dispatch_after(time, dispatch_get_main_queue(), ^{ + [self redraw]; + }); + } +} + + +#pragma mark - Notifications + +- (void)registerForNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center addObserver:self + selector:@selector(statusBarOrientationDidChange:) + name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +} + +- (void)unregisterFromNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center removeObserver:self]; +} + +- (void)statusBarOrientationDidChange:(NSNotification *)notification { + self.redrawOnFrameChange = YES; +} + + +#pragma mark - Redraw + +- (void)setPlaceholder { + self.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.96]; +} + +- (void)clearPlaceholder { + self.backgroundColor = UIColor.clearColor; +} + +- (void)redraw { + #if DEBUG + if (!NSThread.isMainThread) { + NSLog(@"** WARNING - %@ -%@ should be always called on the main thread!", + NSStringFromClass(self.class), + NSStringFromSelector(_cmd)); + } + #endif + + // This has to happen on the main queue, as the view hierachy will be redrawn. + __block UIImage *image = self.snapshot; + + if (!self.image) { + [self setPlaceholder]; + } + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + image = [image mr_applyBlurWithRadius:30.0 tintColor:[UIColor colorWithWhite:0.97 alpha:0.82] saturationDeltaFactor:1.0 maskImage:nil]; + dispatch_async(dispatch_get_main_queue(), ^{ + // Fade on content's change, dependent if there was already an image. + CATransition *transition = [CATransition new]; + transition.duration = self.image ? 0.3 : 0.1; + transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + transition.type = kCATransitionFade; + [self.layer addAnimation:transition forKey:nil]; + + if (self.image) { + [self clearPlaceholder]; + } + + self.image = image; + }); + }); +} + + +#pragma mark - Snapshot helper + +- (UIImage *)snapshot { + BOOL wasHidden = self.superview.hidden; + self.superview.hidden = YES; + + UIWindow *window = UIApplication.sharedApplication.delegate.window; + + // Absolute origin of receiver + CGPoint origin = self.bounds.origin; + if (UIInterfaceOrientationIsLandscape(UIApplication.sharedApplication.statusBarOrientation)) { + origin = CGPointMake(origin.y, origin.x); + } + origin = [self convertPoint:origin toView:window]; + CGSize size = self.frame.size; + + // Begin context (with device scale) + UIGraphicsBeginImageContextWithOptions(size, NO, 0); + const CGContextRef context = UIGraphicsGetCurrentContext(); + + // Apply window tranforms + // Author: NSElvis + // Source: http://stackoverflow.com/a/8017292 + CGContextTranslateCTM(context, window.center.x, window.center.y); + CGContextConcatCTM(context, window.transform); + CGContextTranslateCTM(context, -window.bounds.size.width * window.layer.anchorPoint.x, + -window.bounds.size.height * window.layer.anchorPoint.y); + + // Rotate according to device orientation + if(!MRSystemVersionGreaterThanOrEqualTo8()) { + CGContextRotateCTM(context, 2*M_PI - MRRotationForStatusBarOrientation()); + } + + // Translate to draw at the absolute origin of the receiver + CGContextTranslateCTM(context, -origin.x, -origin.y); + + // Draw the window + [window.layer renderInContext:context]; + + // Capture the image and exit context + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + self.superview.hidden = wasHidden; + + return image; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.h b/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.h new file mode 100755 index 00000000..735b4a6b --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.h @@ -0,0 +1,124 @@ +// +// UIImage+MRImageEffects.m +// MRProgress +// +// Modified by Marius Rackwitz on 22.10.13. +// based on: +// https://developer.apple.com/downloads/download.action?path=wwdc_2013/wwdc_2013_sample_code/ios_uiimageeffects.zip +// +/* + File: UIImage+ImageEffects.h + Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. + Version: 1.0 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple + Inc. ("Apple") in consideration of your agreement to the following + terms, and your use, installation, modification or redistribution of + this Apple software constitutes acceptance of these terms. If you do + not agree with these terms, please do not use, install, modify or + redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and + subject to these terms, Apple grants you a personal, non-exclusive + license, under Apple's copyrights in this original Apple software (the + "Apple Software"), to use, reproduce, modify and redistribute the Apple + Software, with or without modifications, in source and/or binary forms; + provided that if you redistribute the Apple Software in its entirety and + without modifications, you must retain this notice and the following + text and disclaimers in all such redistributions of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may + be used to endorse or promote products derived from the Apple Software + without specific prior written permission from Apple. Except as + expressly stated in this notice, no other rights or licenses, express or + implied, are granted by Apple herein, including but not limited to any + patent rights that may be infringed by your derivative works or by other + works in which the Apple Software may be incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE + MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION + THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND + OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, + MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED + AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), + STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2013 Apple Inc. All Rights Reserved. + + + Copyright © 2013 Apple Inc. All rights reserved. + WWDC 2013 License + + NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 + Session. Please refer to the applicable WWDC 2013 Session for further + information. + + IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and + your use, installation, modification or redistribution of this Apple + software constitutes acceptance of these terms. If you do not agree with + these terms, please do not use, install, modify or redistribute this + Apple software. + + In consideration of your agreement to abide by the following terms, and + subject to these terms, Apple grants you a non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple + Software"), to use, reproduce, modify and redistribute the Apple + Software, with or without modifications, in source and/or binary forms; + provided that if you redistribute the Apple Software in its entirety and + without modifications, you must retain this notice and the following + text and disclaimers in all such redistributions of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may + be used to endorse or promote products derived from the Apple Software + without specific prior written permission from Apple. Except as + expressly stated in this notice, no other rights or licenses, express or + implied, are granted by Apple herein, including but not limited to any + patent rights that may be infringed by your derivative works or by other + works in which the Apple Software may be incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES + NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE + IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND + OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, + MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED + AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), + STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + EA1002 + 5/3/2013 + */ + +#import + + +/** + Helper to apply effects to images. + */ +@interface UIImage (MRImageEffects) + +/** + Blur, tint and change saturation of CGImage-backed receiver + + @param blurRadius The Gaussian radius which specifies the blur intensity. No blur is applied, if you specify 0 as + value. + @param tintColor The tint color to apply in last step to the result image. (optional) + @param saturationDeltaFactor A value above 0.0 and below 1.0 desaturate the result image, which means the colorfulness + will be reduced. A value above 1.0 increase the saturation. Specify 1.0 to do not apply a saturation change. + @param maskImage CGImage-backed mask that specify which part of the result image should not be blured. (optional) + */ +- (UIImage *)mr_applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.m b/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.m new file mode 100755 index 00000000..04868921 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Blur/UIImage+MRImageEffects.m @@ -0,0 +1,238 @@ +// +// UIImage+MRImageEffects.m +// MRProgress +// +// Modified by Marius Rackwitz on 22.10.13. +// based on: +// https://developer.apple.com/downloads/download.action?path=wwdc_2013/wwdc_2013_sample_code/ios_uiimageeffects.zip +// +/* + File: UIImage+ImageEffects.m + Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. + Version: 1.0 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple + Inc. ("Apple") in consideration of your agreement to the following + terms, and your use, installation, modification or redistribution of + this Apple software constitutes acceptance of these terms. If you do + not agree with these terms, please do not use, install, modify or + redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and + subject to these terms, Apple grants you a personal, non-exclusive + license, under Apple's copyrights in this original Apple software (the + "Apple Software"), to use, reproduce, modify and redistribute the Apple + Software, with or without modifications, in source and/or binary forms; + provided that if you redistribute the Apple Software in its entirety and + without modifications, you must retain this notice and the following + text and disclaimers in all such redistributions of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may + be used to endorse or promote products derived from the Apple Software + without specific prior written permission from Apple. Except as + expressly stated in this notice, no other rights or licenses, express or + implied, are granted by Apple herein, including but not limited to any + patent rights that may be infringed by your derivative works or by other + works in which the Apple Software may be incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE + MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION + THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND + OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, + MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED + AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), + STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2013 Apple Inc. All Rights Reserved. + + + Copyright © 2013 Apple Inc. All rights reserved. + WWDC 2013 License + + NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 + Session. Please refer to the applicable WWDC 2013 Session for further + information. + + IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and + your use, installation, modification or redistribution of this Apple + software constitutes acceptance of these terms. If you do not agree with + these terms, please do not use, install, modify or redistribute this + Apple software. + + In consideration of your agreement to abide by the following terms, and + subject to these terms, Apple grants you a non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple + Software"), to use, reproduce, modify and redistribute the Apple + Software, with or without modifications, in source and/or binary forms; + provided that if you redistribute the Apple Software in its entirety and + without modifications, you must retain this notice and the following + text and disclaimers in all such redistributions of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may + be used to endorse or promote products derived from the Apple Software + without specific prior written permission from Apple. Except as + expressly stated in this notice, no other rights or licenses, express or + implied, are granted by Apple herein, including but not limited to any + patent rights that may be infringed by your derivative works or by other + works in which the Apple Software may be incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES + NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE + IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND + OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, + MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED + AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), + STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + EA1002 + 5/3/2013 + */ + +#import "UIImage+MRImageEffects.h" +#import +#import + + +vImage_Buffer vImageBuffer_InitWithCGContext(CGContextRef contextRef) { + return (vImage_Buffer){ + .width = CGBitmapContextGetWidth(contextRef), + .height = CGBitmapContextGetHeight(contextRef), + .rowBytes = CGBitmapContextGetBytesPerRow(contextRef), + .data = CGBitmapContextGetData(contextRef), + }; +} + + +@implementation UIImage (MRImageEffects) + +- (UIImage *)mr_applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage { + NSAssert(self.size.width > 0 && self.size.height > 0, @"Size must be positive: Both dimensions msut be >= 1."); + NSAssert(self.CGImage != nil, @"image must be backed by a CGImage."); + NSAssert(!maskImage || maskImage.CGImage, @"maskImage, if given, must be backed by a CGImage."); + + UIImage *image = self; + const CGRect rect = {CGPointZero, image.size}; + const CGFloat scale = UIScreen.mainScreen.scale; + + const BOOL hasBlur = blurRadius > __FLT_EPSILON__; + const BOOL hasSaturationChange = fabs(saturationDeltaFactor - 1.) > __FLT_EPSILON__; + + if (hasBlur || hasSaturationChange) { + UIGraphicsBeginImageContextWithOptions(rect.size, NO, scale); + CGContextRef inputContext = UIGraphicsGetCurrentContext(); + [image drawAtPoint:CGPointZero]; + + vImage_Buffer inputBuffer = vImageBuffer_InitWithCGContext(inputContext); + + UIGraphicsBeginImageContextWithOptions(rect.size, NO, scale); + vImage_Buffer outputBuffer = vImageBuffer_InitWithCGContext(UIGraphicsGetCurrentContext()); + + if (hasBlur) { + // A description of how to compute the box kernel width from the Gaussian + // radius (aka standard deviation) appears in the SVG spec: + // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement + // + // For larger values of 's' (s >= 2.0), an approximation can be used: Three + // successive box-blurs build a piece-wise quadratic convolution kernel, which + // approximates the Gaussian kernel to within roughly 3%. + // + // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) + // + // ... if d is odd, use three box-blurs of size 'd', centered on the output pixel. + // + CGFloat inputRadius = blurRadius * 1; + uint32_t radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5); + if (radius % 2 != 1) { + radius += 1; // force radius to be odd so that the three box-blur methodology works. + } + + vImageBoxConvolve_ARGB8888(&inputBuffer, &outputBuffer, NULL, 0, 0, radius, radius, 0, kvImageEdgeExtend); + vImageBoxConvolve_ARGB8888(&outputBuffer, &inputBuffer, NULL, 0, 0, radius, radius, 0, kvImageEdgeExtend); + vImageBoxConvolve_ARGB8888(&inputBuffer, &outputBuffer, NULL, 0, 0, radius, radius, 0, kvImageEdgeExtend); + + // Swap input & output + vImage_Buffer tempBuffer = inputBuffer; + inputBuffer = outputBuffer; + outputBuffer = tempBuffer; + } + + if (hasSaturationChange) { + CGFloat s = saturationDeltaFactor; + CGFloat floatingPointSaturationMatrix[] = { + 0.0722 + 0.9278 * s, 0.0722 - 0.0722 * s, 0.0722 - 0.0722 * s, 0, + 0.7152 - 0.7152 * s, 0.7152 + 0.2848 * s, 0.7152 - 0.7152 * s, 0, + 0.2126 - 0.2126 * s, 0.2126 - 0.2126 * s, 0.2126 + 0.7873 * s, 0, + 0, 0, 0, 1, + }; + + const int32_t divisor = 256; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wbad-function-cast" +#pragma clang diagnostic ignored "-Wvla" + // Convert saturation matrix from float to int + NSUInteger matrixSize = sizeof(floatingPointSaturationMatrix)/sizeof(floatingPointSaturationMatrix[0]); + int16_t saturationMatrix[matrixSize]; + for (NSUInteger i = 0; i < matrixSize; ++i) { + saturationMatrix[i] = (int16_t)roundf(floatingPointSaturationMatrix[i] * divisor); + } +#pragma clang diagnostic pop + vImageMatrixMultiply_ARGB8888(&inputBuffer, &outputBuffer, saturationMatrix, divisor, NULL, NULL, kvImageNoFlags); + } + + if (!hasBlur) { + image = UIGraphicsGetImageFromCurrentImageContext(); + } + UIGraphicsEndImageContext(); + + if (hasBlur) { + image = UIGraphicsGetImageFromCurrentImageContext(); + } + UIGraphicsEndImageContext(); + } + + // Set up output context. + UIGraphicsBeginImageContextWithOptions(rect.size, NO, scale); + CGContextRef outputContext = UIGraphicsGetCurrentContext(); + + // Draw base image. + [self drawAtPoint:rect.origin]; + + // Draw effect image. + if (hasBlur) { + CGContextSaveGState(outputContext); + if (maskImage) { + CGContextClipToMask(outputContext, rect, maskImage.CGImage); + } + [image drawAtPoint:rect.origin]; + CGContextRestoreGState(outputContext); + } + + // Add in color tint. + if (tintColor) { + CGContextSaveGState(outputContext); + CGContextSetFillColorWithColor(outputContext, tintColor.CGColor); + CGContextFillRect(outputContext, rect); + CGContextRestoreGState(outputContext); + } + + // Output image is ready. + image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return image; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.h b/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.h new file mode 100755 index 00000000..59de56d0 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.h @@ -0,0 +1,64 @@ +// +// MRActivityIndicatorView.h +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import "MRStopableView.h" + + +/** + Use an activity indicator to show that a task is in progress. An activity indicator appears as a circle slice that is + either spinning or stopped. + */ +@interface MRActivityIndicatorView : UIView { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" +@package + BOOL _animating; +#pragma clang diagnostic pop +} + +/** + A float value to indicate how thick the line of the activivity indicator is. + + The default value is 2.f. + */ +@property (nonatomic) CGFloat lineWidth UI_APPEARANCE_SELECTOR; + +/** + A Boolean value that controls whether the receiver is hidden when the animation is stopped. + + If the value of this property is YES (the default), the receiver sets its hidden property (UIView) to YES when receiver + is not animating. If the hidesWhenStopped property is NO, the receiver is not hidden when animation stops. You stop an + animating progress indicator with the stopAnimating method. + */ +@property(nonatomic) BOOL hidesWhenStopped; + +/** + Starts the animation of the progress indicator. + + When the progress indicator is animated, the gear spins to indicate indeterminate progress. The indicator is animated + until stopAnimating is called. + */ +- (void)startAnimating; + +/** + Stops the animation of the progress indicator. + + Call this method to stop the animation of the progress indicator started with a call to startAnimating. When animating + is stopped, the indicator is hidden, unless hidesWhenStopped is NO. + */ +- (void)stopAnimating; + +/** + Returns whether the receiver is animating. + + @return YES if the receiver is animating, otherwise NO. + */ +- (BOOL)isAnimating; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.m b/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.m new file mode 100755 index 00000000..8e972dfc --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRActivityIndicatorView.m @@ -0,0 +1,217 @@ +// +// MRActivityIndicatorView.m +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import "MRActivityIndicatorView.h" +#import "MRStopButton.h" + + +static NSString *const MRActivityIndicatorViewSpinAnimationKey = @"MRActivityIndicatorViewSpinAnimationKey"; + + +@interface MRActivityIndicatorView () + +@property (nonatomic, weak) CAShapeLayer *shapeLayer; +@property (nonatomic, weak, readwrite) MRStopButton *stopButton; + +@end + + +@implementation MRActivityIndicatorView + +@synthesize stopButton = _stopButton; + ++ (void)load { + [self.appearance setLineWidth:2.0]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.isAccessibilityElement = YES; + self.accessibilityLabel = NSLocalizedString(@"Indeterminate Progress", @"Accessibility label for activity indicator view"); + + self.hidesWhenStopped = YES; + + CAShapeLayer *shapeLayer = [CAShapeLayer new]; + shapeLayer.borderWidth = 0; + shapeLayer.fillColor = UIColor.clearColor.CGColor; + [self.layer addSublayer:shapeLayer]; + self.shapeLayer = shapeLayer; + + MRStopButton *stopButton = [MRStopButton new]; + [self addSubview:stopButton]; + self.stopButton = stopButton; + + self.mayStop = NO; + + [self tintColorDidChange]; +} + +- (void)dealloc { + [self unregisterFromNotificationCenter]; +} + + +#pragma mark - Notifications + +- (void)registerForNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; + [center addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; +} + +- (void)unregisterFromNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center removeObserver:self]; +} + +- (void)applicationDidEnterBackground:(NSNotification *)note { + [self removeAnimation]; +} + +- (void)applicationWillEnterForeground:(NSNotification *)note { + if (self.isAnimating) { + [self addAnimation]; + } +} + + +#pragma mark - Layout + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect frame = self.bounds; + if (ABS(frame.size.width - frame.size.height) < CGFLOAT_MIN) { + // Ensure that we have a square frame + CGFloat s = MIN(frame.size.width, frame.size.height); + frame.size.width = s; + frame.size.height = s; + } + self.shapeLayer.frame = frame; + + self.shapeLayer.path = [self layoutPath].CGPath; + + self.stopButton.frame = [self.stopButton frameThatFits:self.bounds]; +} + +- (UIBezierPath *)layoutPath { + const double TWO_M_PI = 2.0*M_PI; + double startAngle = 0.75 * TWO_M_PI; + double endAngle = startAngle + TWO_M_PI * 0.9; + + CGFloat width = self.bounds.size.width; + return [UIBezierPath bezierPathWithArcCenter:CGPointMake(width/2.0f, width/2.0f) + radius:width/2.2f + startAngle:startAngle + endAngle:endAngle + clockwise:YES]; +} + + +#pragma mark - Hook tintColor + +- (void)tintColorDidChange { + [super tintColorDidChange]; + self.shapeLayer.strokeColor = self.tintColor.CGColor; + self.stopButton.tintColor = self.tintColor; +} + + +#pragma mark - Line width + +- (void)setLineWidth:(CGFloat)width { + self.shapeLayer.lineWidth = width; +} + +- (CGFloat)lineWidth { + return self.shapeLayer.lineWidth; +} + + +#pragma mark - MRStopableView's implementation + +- (void)setMayStop:(BOOL)mayStop { + self.stopButton.hidden = !mayStop; +} + +- (BOOL)mayStop { + return !self.stopButton.hidden; +} + + +#pragma mark - Control animation + +- (void)startAnimating { + if (_animating) { + return; + } + + _animating = YES; + + [self registerForNotificationCenter]; + + [self addAnimation]; + + if (self.hidesWhenStopped) { + self.hidden = NO; + } +} + +- (void)stopAnimating { + if (!_animating) { + return; + } + + _animating = NO; + + [self unregisterFromNotificationCenter]; + + [self removeAnimation]; + + if (self.hidesWhenStopped) { + self.hidden = YES; + } +} + +- (BOOL)isAnimating { + return _animating; +} + + +#pragma mark - Add and remove animation + +- (void)addAnimation { + CABasicAnimation *spinAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; + spinAnimation.toValue = @(1*2*M_PI); + spinAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; + spinAnimation.duration = 1.0; + spinAnimation.repeatCount = INFINITY; + [self.shapeLayer addAnimation:spinAnimation forKey:MRActivityIndicatorViewSpinAnimationKey]; +} + +- (void)removeAnimation { + [self.shapeLayer removeAnimationForKey:MRActivityIndicatorViewSpinAnimationKey]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.h b/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.h new file mode 100755 index 00000000..c8506221 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.h @@ -0,0 +1,65 @@ +// +// MRCircularProgressView.h +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import "MRProgressView.h" +#import "MRStopableView.h" + + +/** + You use the MRCircularProgressView class to depict the progress of a task over time. + */ +@interface MRCircularProgressView : MRProgressView + +/** + Value label. + + The label where the current progress is displayed, if the receiver's property mayStop has the value NO. + */ +@property (nonatomic, weak, readonly) UILabel *valueLabel; + +/** + Current progress. + + Use associated setter for non animated changes. Otherwises use setProgress:animated:. + */ +@property (nonatomic, assign) float progress; + +/** + Duration of an animated progress change. + + Default is 0.3s. Must be larger than zero. + */ +@property (nonatomic, assign) CFTimeInterval animationDuration UI_APPEARANCE_SELECTOR; + +/** + The line width of the outer circle + + Default is 2.0. Must be larger than zero. + */ +@property (nonatomic, assign) CGFloat borderWidth UI_APPEARANCE_SELECTOR; + +/** + The line width of the inner circle + + Default is 2.0. Must be larger than zero. + */ +@property (nonatomic, assign) CGFloat lineWidth UI_APPEARANCE_SELECTOR; + +/** + Change progress animated. + + The animation will be always linear. + + @param progress The new progress value. + + @param animated Specify YES to animate the change or NO if you do not want the change to be animated. + */ +- (void)setProgress:(float)progress animated:(BOOL)animated; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.m b/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.m new file mode 100755 index 00000000..f07b8c7a --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRCircularProgressView.m @@ -0,0 +1,272 @@ +// +// MRCircularProgressView.m +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import "MRCircularProgressView.h" +#import "MRProgressHelper.h" +#import "MRStopButton.h" + + +static NSString *const MRCircularProgressViewProgressAnimationKey = @"MRCircularProgressViewProgressAnimationKey"; + + +@interface MRCircularProgressView () + +@property (nonatomic, strong, readwrite) NSNumberFormatter *numberFormatter; +@property (nonatomic, strong, readwrite) NSTimer *valueLabelUpdateTimer; + +@property (nonatomic, weak, readwrite) UILabel *valueLabel; +@property (nonatomic, weak, readwrite) MRStopButton *stopButton; + +@end + + +@implementation MRCircularProgressView { + int _valueLabelProgressPercentDifference; +} +@dynamic progress; + +@synthesize stopButton = _stopButton; + ++ (void)load { + [self.appearance setAnimationDuration:0.3]; + [self.appearance setBorderWidth:1.0]; + [self.appearance setLineWidth:1.0]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + ++ (Class)layerClass { + return CAShapeLayer.class; +} + +- (CAShapeLayer *)shapeLayer { + return (CAShapeLayer *)self.layer; +} + +- (void)commonInit { + self.isAccessibilityElement = YES; + self.accessibilityLabel = NSLocalizedString(@"Determinate Progress", @"Accessibility label for circular progress view"); + self.accessibilityTraits = UIAccessibilityTraitUpdatesFrequently; + + NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; + self.numberFormatter = numberFormatter; + numberFormatter.numberStyle = NSNumberFormatterPercentStyle; + numberFormatter.locale = NSLocale.currentLocale; + + self.shapeLayer.fillColor = UIColor.clearColor.CGColor; + + UILabel *valueLabel = [UILabel new]; + self.valueLabel = valueLabel; + valueLabel.font = [ [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] fontWithSize:12.0f]; + + valueLabel.textColor = UIColor.blackColor; + valueLabel.textAlignment = NSTextAlignmentCenter; + [self addSubview:valueLabel]; + + MRStopButton *stopButton = [MRStopButton new]; + [self addSubview:stopButton]; + self.stopButton = stopButton; + + self.mayStop = NO; + + self.progress = 0; + + [self tintColorDidChange]; +} + + +#pragma mark - Properties + +- (CGFloat)borderWidth { + return self.shapeLayer.borderWidth; +} + +- (void)setBorderWidth:(CGFloat)borderWidth { + self.shapeLayer.borderWidth = borderWidth; +} + +- (CGFloat)lineWidth { + return self.shapeLayer.lineWidth; +} + +- (void)setLineWidth:(CGFloat)lineWidth { + self.shapeLayer.lineWidth = lineWidth; +} + + +#pragma mark - Layout + +- (void)layoutSubviews { + [super layoutSubviews]; + + const CGFloat offset = 4; + CGRect valueLabelRect = self.bounds; + valueLabelRect.origin.x += offset; + valueLabelRect.size.width -= 2*offset; + self.valueLabel.frame = valueLabelRect; + + self.layer.cornerRadius = self.frame.size.width / 2.0f; + self.shapeLayer.path = [self layoutPath].CGPath; + + self.stopButton.frame = [self.stopButton frameThatFits:self.bounds]; +} + +- (UIBezierPath *)layoutPath { + const double TWO_M_PI = 2.0 * M_PI; + const double startAngle = 0.75 * TWO_M_PI; + const double endAngle = startAngle + TWO_M_PI; + + CGFloat width = self.frame.size.width; + CGFloat borderWidth = self.borderWidth; + CGFloat lineWidth = self.lineWidth; + return [UIBezierPath bezierPathWithArcCenter:CGPointMake(width/2.0f, width/2.0f) + radius:(width - lineWidth - borderWidth)/2.0f + startAngle:startAngle + endAngle:endAngle + clockwise:YES]; +} + + +#pragma mark - Hook tintColor + +- (void)tintColorDidChange { + [super tintColorDidChange]; + UIColor *tintColor = self.tintColor; + self.shapeLayer.strokeColor = tintColor.CGColor; + self.layer.borderColor = tintColor.CGColor; + self.valueLabel.textColor = tintColor; + self.stopButton.tintColor = tintColor; +} + + +#pragma mark - MRStopableView's implementation + +- (void)setMayStop:(BOOL)mayStop { + self.stopButton.hidden = !mayStop; + self.valueLabel.hidden = mayStop; +} + +- (BOOL)mayStop { + return !self.stopButton.hidden; +} + + +#pragma mark - Control progress + +- (void)setProgress:(float)progress { + assert(progress >= 0 && progress <= 1); + + [self stopAnimation]; + + _progress = progress; + + [self updateProgress]; + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self); +} + +- (void)updateProgress { + [self updatePath]; + [self updateLabel:self.progress]; +} + +- (void)updatePath { + self.shapeLayer.strokeEnd = self.progress; +} + +- (void)updateLabel:(float)progress { + self.valueLabel.text = [self.numberFormatter stringFromNumber:@(progress)]; + self.accessibilityValue = self.valueLabel.text; +} + +- (void)setProgress:(float)progress animated:(BOOL)animated { + if (animated) { + if (ABS(self.progress - progress) < CGFLOAT_MIN) { + return; + } + + [self animateToProgress:progress]; + } else { + self.progress = progress; + } + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self); +} + +- (void)setAnimationDuration:(CFTimeInterval)animationDuration { + assert(animationDuration > 0); + _animationDuration = animationDuration; +} + +- (void)animateToProgress:(float)progress { + [self stopAnimation]; + + // Add shape animation + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; + animation.duration = self.animationDuration; + animation.fromValue = @(self.progress); + animation.toValue = @(progress); + animation.delegate = self; + animation.removedOnCompletion = NO; + animation.fillMode = kCAFillModeForwards; + [self.shapeLayer addAnimation:animation forKey:MRCircularProgressViewProgressAnimationKey]; + + // Add timer to update valueLabel + _valueLabelProgressPercentDifference = (progress - self.progress) * 100; + CFTimeInterval timerInterval = self.animationDuration / ABS(_valueLabelProgressPercentDifference); + self.valueLabelUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:timerInterval + target:self + selector:@selector(onValueLabelUpdateTimer:) + userInfo:nil + repeats:YES]; + + + _progress = progress; +} + +- (void)stopAnimation { + // Stop running animation + [self.layer removeAnimationForKey:MRCircularProgressViewProgressAnimationKey]; + + // Stop timer + [self.valueLabelUpdateTimer invalidate]; + self.valueLabelUpdateTimer = nil; +} + +- (void)onValueLabelUpdateTimer:(NSTimer *)timer { + if (_valueLabelProgressPercentDifference > 0) { + _valueLabelProgressPercentDifference--; + } else { + _valueLabelProgressPercentDifference++; + } + + [self updateLabel:self.progress - (_valueLabelProgressPercentDifference / 100.0f)]; +} + + +#pragma mark - CAAnimationDelegate + +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { + [self updateProgress]; + [self stopAnimation]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRIconView.h b/src/ios/GMImagePicker/mrprogress/Components/MRIconView.h new file mode 100755 index 00000000..78622732 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRIconView.h @@ -0,0 +1,53 @@ +// +// MRIconView.h +// MRProgress +// +// Created by Marius Rackwitz on 22.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + Base class for icons which are given by an UIBezierPath and drawn with a CAShapeLayer. + Their circular outer border and their line is colored in their tintColor. + */ +@interface MRIconView : UIView + +/** + Inner path. + */ +- (UIBezierPath *)path; + +/** + The line Width of circle + + Default is 1.0. Must be larger than zero. + */ +@property (nonatomic) CGFloat borderWidth UI_APPEARANCE_SELECTOR; + +/** + The line width of icon + + Default is 1.0. Must be larger than zero. + */ +@property (nonatomic) CGFloat lineWidth UI_APPEARANCE_SELECTOR; + +@end + + +/** + Draws a checkmark. + */ +@interface MRCheckmarkIconView : MRIconView + +@end + + +/** + Draws a cross. + */ +@interface MRCrossIconView : MRIconView + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRIconView.m b/src/ios/GMImagePicker/mrprogress/Components/MRIconView.m new file mode 100755 index 00000000..061d0390 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRIconView.m @@ -0,0 +1,140 @@ +// +// MRIconView.m +// MRProgress +// +// Created by Marius Rackwitz on 22.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import "MRIconView.h" +#import + + +@implementation MRIconView + ++ (void)load { + [self.appearance setBorderWidth:1.0]; + [self.appearance setLineWidth:1.0]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (UIBezierPath *)path { + return nil; +} + ++ (Class)layerClass { + return CAShapeLayer.class; +} + +- (CAShapeLayer *)shapeLayer { + return (CAShapeLayer *)self.layer; +} + +- (void)commonInit { + self.isAccessibilityElement = YES; + + self.shapeLayer.fillColor = UIColor.clearColor.CGColor; + + [self tintColorDidChange]; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + self.shapeLayer.path = self.path.CGPath; +} + +- (void)tintColorDidChange { + [super tintColorDidChange]; + UIColor *const tintColor = self.tintColor; + self.layer.borderColor = tintColor.CGColor; + self.shapeLayer.strokeColor = tintColor.CGColor; +} + +- (void)setFrame:(CGRect)frame { + super.frame = frame; + self.layer.cornerRadius = frame.size.width / 2.0f; +} + +#pragma mark - Properties + +- (CGFloat)borderWidth { + return self.layer.borderWidth; +} + +- (void)setBorderWidth:(CGFloat)borderWidth { + self.layer.borderWidth = borderWidth; +} + +- (CGFloat)lineWidth { + return self.shapeLayer.lineWidth; +} + +- (void)setLineWidth:(CGFloat)lineWidth { + self.shapeLayer.lineWidth = lineWidth; +} + + +@end + + +@implementation MRCheckmarkIconView + +- (void)commonInit { + [super commonInit]; + + self.accessibilityLabel = NSLocalizedString(@"Checkmark", @"Accessibility label for custom rendered checkmark icon"); +} + +- (UIBezierPath *)path { + UIBezierPath *path = [UIBezierPath new]; + + CGRect bounds = self.bounds; + [path moveToPoint:CGPointMake(bounds.size.width * 0.2f, bounds.size.height * 0.55f)]; + [path addLineToPoint:CGPointMake(bounds.size.width * 0.325f, bounds.size.height * 0.7f)]; + [path addLineToPoint:CGPointMake(bounds.size.width * 0.75f, bounds.size.height * 0.3f)]; + + return path; +} + +@end + + +@implementation MRCrossIconView + +- (void)commonInit { + [super commonInit]; + + self.accessibilityLabel = NSLocalizedString(@"Cross", @"Accessibility label for custom rendered cross icon"); +} + +- (UIBezierPath *)path { + UIBezierPath *path = [UIBezierPath new]; + + const double relativePadding = 0.25; + CGSize size = self.bounds.size; + double min = relativePadding; + double max = 1 - relativePadding; + [path moveToPoint:CGPointMake(size.width * min, size.height * min)]; + [path addLineToPoint:CGPointMake(size.width * max, size.height * max)]; + [path moveToPoint:CGPointMake(size.width * min, size.height * max)]; + [path addLineToPoint:CGPointMake(size.width * max, size.height * min)]; + + return path; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.h b/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.h new file mode 100755 index 00000000..5b382bef --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.h @@ -0,0 +1,65 @@ +// +// MRNavigationBarProgressView.h +// MRProgress +// +// Created by Marius Rackwitz on 09.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import "MRProgressView.h" + + +/** + A custom progress view which can be displayed at the bottom edge of the navigation bar like in Messages app + or at the top edge of the toolbar like in Safari. + */ +@interface MRNavigationBarProgressView : MRProgressView + +/** + Tint color of progress bar. + */ +@property (nonatomic, retain) UIColor *progressTintColor; + +/** + Current progress. Use associated setter for non animated changes. Otherwises use setProgress:aniamted:. + */ +@property (nonatomic, assign) float progress; + +/** + Change progress animated. + + If you set a lower value than the current progess then the animation bounces. + If you set a higher value than the current progress then the animation eases out. + + The progress bar will be hidden, if you set the progress to 1.0, automatically. + + @param progress The new progress value. + + @param animated Specify YES to animate the change or NO if you do not want the change to be animated. + */ +- (void)setProgress:(float)progress animated:(BOOL)animated; + +/** + Get current progress view or initialize a new for given navigation controller. + + @param navigationController The navigationBar of the navigationController will be used to initialize the progress + views frame and progressTintColor. The navigationController's delegate will be intercepted to automatically to remove + the progress bar on push or pop. You can destroy the current instance by using removeFromSuperview, manually. + */ ++ (instancetype)progressViewForNavigationController:(UINavigationController *)navigationController; + +@end + + +/** + Helper to access MRNavigationBarProgressView from view controllers. + */ +@interface UINavigationController (NavigationBarProgressView) + +/** + Access an already initialized progressView. + */ +@property (nonatomic, readonly) MRNavigationBarProgressView *progressView; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.m b/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.m new file mode 100755 index 00000000..248975a2 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRNavigationBarProgressView.m @@ -0,0 +1,254 @@ +// +// MRNavigationBarProgressView.m +// MRNavigationBarProgressView +// +// Created by Marius Rackwitz on 09.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import "MRNavigationBarProgressView.h" +#import + + + +static NSString *const MR_UINavigationControllerDidShowViewControllerNotification = @"UINavigationControllerDidShowViewControllerNotification"; +static NSString *const MR_UINavigationControllerLastVisibleViewController = @"UINavigationControllerLastVisibleViewController"; + + + +@interface UINavigationController (NavigationBarProgressView_Private) + +@property (nonatomic, weak) MRNavigationBarProgressView *progressView; + +@end + + +@implementation UINavigationController (NavigationBarProgressView_Private) + +- (void)setProgressView:(MRNavigationBarProgressView *)progressView { + objc_setAssociatedObject(self, @selector(progressView), progressView, OBJC_ASSOCIATION_ASSIGN); +} + +- (MRNavigationBarProgressView *)progressView { + return objc_getAssociatedObject(self, @selector(progressView)); +} + +@end + + + +@interface MRNavigationBarProgressView () + +@property (nonatomic, weak, readwrite) UIView *progressView; +@property (nonatomic, weak, readwrite) UIViewController *viewController; +@property (nonatomic, weak, readwrite) UIView *barView; + +@end + + +@implementation MRNavigationBarProgressView +@dynamic progress; + +static NSNumberFormatter *progressNumberFormatter; + ++ (void)initialize { + NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; + numberFormatter.numberStyle = NSNumberFormatterPercentStyle; + numberFormatter.locale = NSLocale.currentLocale; + progressNumberFormatter = numberFormatter; +} + ++ (instancetype)progressViewForNavigationController:(UINavigationController *)navigationController { + // Try to get existing bar + MRNavigationBarProgressView *progressView = navigationController.progressView; + if (progressView) { + return progressView; + } + + // Create new bar + UINavigationBar *navigationBar = navigationController.navigationBar; + progressView = [MRNavigationBarProgressView new]; + progressView.barView = navigationBar; + + progressView.progressTintColor = navigationBar.tintColor + ? navigationBar.tintColor : UIApplication.sharedApplication.delegate.window.tintColor; + + // Store bar and add to view hierachy + navigationController.progressView = progressView; + [navigationController.navigationBar addSubview:progressView]; + + // Observe topItem + progressView.viewController = navigationController.topViewController; + [progressView registerObserverForNavigationController:navigationController]; + + return progressView; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + ++ (BOOL)requiresConstraintBasedLayout { + return YES; +} + +- (void)commonInit { + self.isAccessibilityElement = YES; + self.accessibilityLabel = NSLocalizedString(@"Determinate Progress", @"Accessibility label for navigation bar progress view"); + self.accessibilityTraits = UIAccessibilityTraitUpdatesFrequently; + + self.autoresizingMask = UIViewAutoresizingFlexibleWidth; + self.opaque = NO; + + UIView *progressView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, self.bounds.size.height)]; + progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin; + progressView.backgroundColor = self.tintColor; + [self addSubview:progressView]; + self.progressView = progressView; + + self.progress = 0; + + [self tintColorDidChange]; +} + +- (void)registerObserverForNavigationController:(UINavigationController *)navigationController { + [NSNotificationCenter.defaultCenter addObserver:self + selector:@selector(navigationControllerDidShowViewController:) + name:MR_UINavigationControllerDidShowViewControllerNotification + object:navigationController]; +} + +- (void)unregisterObserverForNavigationController:(UINavigationController *)navigationController { + [NSNotificationCenter.defaultCenter removeObserver:self]; +} + +- (void)navigationControllerDidShowViewController:(NSNotification *)notification { + UINavigationController *navigationController = notification.object; + UIViewController *lastVisibleVC = notification.userInfo[MR_UINavigationControllerLastVisibleViewController]; + + // Check if our controller will be still the topViewController or was popped + if (lastVisibleVC == self.viewController) { + // Unregister observer + [self unregisterObserverForNavigationController:navigationController]; + + // Remove reference + navigationController.progressView = nil; + + // Remove receiver from view hierachy + [self removeFromSuperview]; + } +} + +- (void) dealloc { + [NSNotificationCenter.defaultCenter removeObserver:self]; +} + +- (void)setBarView:(UIView *)barView { + _barView = barView; + [self layoutSubviews]; +} + + +#pragma mark - Layout + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect barFrame = self.barView.frame; + const CGFloat progressBarHeight = 2; + + CGRect frame = CGRectMake(barFrame.origin.x, + 0, + barFrame.size.width, + progressBarHeight); + + if ([self.barView isKindOfClass:UINavigationBar.class]) { + const CGFloat barBorderHeight = 0.5; + frame.origin.y = barFrame.size.height - progressBarHeight + barBorderHeight; + } + + if (!CGRectEqualToRect(self.frame, frame)) { + self.frame = frame; + } + + [self layoutProgressView]; +} + +- (void)layoutProgressView { + self.progressView.frame = CGRectMake(0, 0, self.frame.size.width * self.progress, self.frame.size.height); +} + + +#pragma mark - Getter and setter for progress tint color + +- (void)setProgressTintColor:(UIColor *)tintColor { + self.progressView.backgroundColor = tintColor; +} + +- (UIColor *)progressTintColor { + return self.progressView.backgroundColor; +} + + +#pragma mark - Control progress + +- (void)setProgress:(float)progress { + assert(progress >= 0 && progress <= 1); + [self _setProgress:progress]; +} + +- (void)_setProgress:(float)progress { + _progress = progress; + [self progressDidChange]; +} + +- (void)progressDidChange { + self.progressView.alpha = self.progress >= 1 ? 0 : 1; + [self layoutProgressView]; + + self.accessibilityValue = [progressNumberFormatter stringFromNumber:@(self.progress)]; + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self); +} + +- (void)setProgress:(float)progress animated:(BOOL)animated { + if (animated) { + if (progress > 0 && progress < 1.0 && self.progressView.alpha <= CGFLOAT_MIN) { + // progressView was hidden. Make it visible first. + self.progressView.alpha = 1; + } + + void(^completion)(BOOL) = ^(BOOL finished){ + [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ + self.progressView.alpha = self.progress >= 1 ? 0 : 1; + } completion:nil]; + }; + + if (progress > self.progress || self.progress >= 1) { + // Progress increased: ease out. + [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ + [self _setProgress:progress]; + } completion:completion]; + } else { + // Progress decreased: bounce. + [UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:0 options:0 animations:^{ + [self _setProgress:progress]; + } completion:completion]; + } + } else { + self.progress = progress; + } +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.h b/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.h new file mode 100755 index 00000000..578dc3d8 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.h @@ -0,0 +1,242 @@ +// +// MRProgressOverlayView.h +// MRProgress +// +// Created by Marius Rackwitz on 09.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +@class MRProgressOverlayView; + + +/** (MRProgressOverlayViewStopBlock) */ +typedef void(^MRProgressOverlayViewStopBlock)(MRProgressOverlayView *progressOverlayView); + +/** (MRProgressOverlayViewMode) */ +typedef NS_ENUM(NSUInteger, MRProgressOverlayViewMode){ + /** Progress is shown using a large round activity indicator view. (MRActivityIndicatorView) This is the default. */ + MRProgressOverlayViewModeIndeterminate, + /** Progress is shown using a round, pie-chart like, progress view. (MRCircularProgressView) */ + MRProgressOverlayViewModeDeterminateCircular, + /** Progress is shown using a horizontal progress bar. (UIProgressView) */ + MRProgressOverlayViewModeDeterminateHorizontalBar, + /** Shows primarily a label. Progress is shown using a small activity indicator. (MRActivityIndicatorView) */ + MRProgressOverlayViewModeIndeterminateSmall, + /** Shows primarily a label. Progress is shown using a small activity indicator. (UIActivityIndicatorView in UIActivityIndicatorViewStyleGray) */ + MRProgressOverlayViewModeIndeterminateSmallDefault, + /** Shows a checkmark. (MRCheckmarkIconView) */ + MRProgressOverlayViewModeCheckmark, + /** Shows a cross. (MRCrossIconView) */ + MRProgressOverlayViewModeCross, + /** Shows a custom view. (UIView) */ + MRProgressOverlayViewModeCustom, +}; + + +/** + Progress HUD to be shown over a whole view controller's view or window. + Similar look to UIAlertView. + */ +@interface MRProgressOverlayView : UIView + +/** + Creates a new overlay, adds it to provided view and shows it. The counterpart to this method is dismissOverlayForView:animated. + + @param view The view that the overlay will be added to + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @return A reference to the created overlay. + */ ++ (instancetype)showOverlayAddedTo:(UIView *)view animated:(BOOL)animated; + +/** + Creates a new overlay, adds it to provided view and shows it. The counterpart to this method is dismissOverlayForView:animated. + + @param view The view that the overlay will be added to + @param title Title label text + @param mode Visualization mode + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @return A reference to the created overlay. + */ ++ (instancetype)showOverlayAddedTo:(UIView *)view title:(NSString *)title mode:(MRProgressOverlayViewMode)mode animated:(BOOL)animated; + +/** + Creates a new overlay, adds it to provided view and shows it. The counterpart to this method is dismissOverlayForView:animated. + + @param view The view that the overlay will be added to + @param title Title label text + @param mode Visualization mode + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @param stopBlock Block, which will be called when stop button is tapped. + @return A reference to the created overlay. + */ ++ (instancetype)showOverlayAddedTo:(UIView *)view title:(NSString *)title mode:(MRProgressOverlayViewMode)mode animated:(BOOL)animated stopBlock:(MRProgressOverlayViewStopBlock)stopBlock; + +/** + Finds the top-most overlay subview and hides it. The counterpart to this method is showOverlayAddedTo:animated:. + + @param view The view that is going to be searched for a overlay subview. + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @return YES if a overlay was found and removed, NO otherwise. + */ ++ (BOOL)dismissOverlayForView:(UIView *)view animated:(BOOL)animated; + +/** + Finds the top-most overlay subview and hides it. The counterpart to this method is showOverlayAddedTo:animated:. + + @param view The view that is going to be searched for a overlay subview. + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @param completionBlock block will be called, when the animation has finished. + @return YES if a overlay was found and removed, NO otherwise. + */ ++ (BOOL)dismissOverlayForView:(UIView *)view animated:(BOOL)animated completion:(void(^)())completionBlock; + +/** + Finds all the overlay subviews and hides them. + + @param view The view that is going to be searched for overlay subviews. + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @return the number of overlays found and removed. + */ ++ (NSUInteger)dismissAllOverlaysForView:(UIView *)view animated:(BOOL)animated; + +/** + Finds all the overlay subviews and hides them. + + @param view The view that is going to be searched for overlay subviews. + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @param completionBlock block will be called, when the animation has finished. + @return the number of overlays found and removed. + */ ++ (NSUInteger)dismissAllOverlaysForView:(UIView *)view animated:(BOOL)animated completion:(void(^)())completionBlock; + +/** + Finds the top-most overlay subview and returns it. + + @param view The view that is going to be searched. + @return A reference to the last overlay subview discovered. + */ ++ (instancetype)overlayForView:(UIView *)view; + +/** + Finds all overlay subviews and returns them. + + @param view The view that is going to be searched. + @return All found overlay views (array of MBProgressOverlayView objects). + */ ++ (NSArray *)allOverlaysForView:(UIView *)view; + +/** + Allows customization of blur effect. + + If you override this method, you are responsible for adding the view to hierachy. + The view will not be retained. + The cornerRadius of the layer of the returnValue will be initialized. + */ +- (UIView *)createBlurView; + +/** + Visualisation mode. + + How the progress should be visualised. + */ +@property (nonatomic, assign) MRProgressOverlayViewMode mode; + +/** + Current progress. + + Use associated setter for non animated changes. Otherwises use setProgress:aniamted:. + */ +@property (nonatomic, assign) float progress; + +/** + Title label text. + + By default "Loading ...". + This will automatically call setTitleLabelAttributedText: with current string attributes. + */ +@property (nonatomic, strong) NSString *titleLabelText UI_APPEARANCE_SELECTOR; + +/** + Title label attributed text. + */ +@property (nonatomic, strong) NSAttributedString *titleLabelAttributedText; + +/** + Title label. + + Use this reference to customize titleLabel appearance. + If you want to customize the titleLabel's text attributes, use setTitleLabelText:. + Attention: + Never set titleLabel.text manually. This would unset titleLabel.attributedText where the layout relies on. + */ +@property (readonly, weak) UILabel *titleLabel; + +/** + Mode view. + + Should only be customized when in MRProgressOverlayViewModeCustom. In other modes you will get the documented + components. When mode is changed to MRProgressOverlayViewModeCustom from another, this property will be initialized + with a new UIView instance. You should make sure to call setMode: first. You are responsible to set the frame size. + */ +@property (nonatomic, strong) UIView *modeView; + +/** + Block, which will be called when stop button is tapped. + + Use this to set a block, which is callend when UIControlEventTouchUpInside is fired on the mode view's stop button, + if available. The receiver will not be hidden or dismissed, automatically. + */ +@property (nonatomic, copy) MRProgressOverlayViewStopBlock stopBlock; + +/** + Change the tint color of the mode views. + + Redeclared to document usage, internally tintColorDidChange is used. + + @param tintColor The new tint color + */ +- (void)setTintColor:(UIColor *)tintColor; + +/** + Change progress animated. + + The animation will be always linear. + + @param progress The new progress value. + @param animated Specify YES to animate the change or NO if you do not want the change to be animated. + */ +- (void)setProgress:(float)progress animated:(BOOL)animated; + +/** + Show the progress view. + + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + */ +- (void)show:(BOOL)animated; + +/** + Hide the progress view. + + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + */ +- (void)hide:(BOOL)animated; + +/** + Hide the progress view and remove on animation completion from the view hierachy. + + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + */ +- (void)dismiss:(BOOL)animated; + +/** + Hide the progress view and remove on animation completion from the view hierachy. + + @param animated Specify YES to animate the transition or NO if you do not want the transition to be animated. + @param completionBlock block will be called, when the animation has finished. + */ +- (void)dismiss:(BOOL)animated completion:(void(^)())completionBlock; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.m b/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.m new file mode 100755 index 00000000..d8bf014d --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRProgressOverlayView.m @@ -0,0 +1,837 @@ +// +// MRProgressOverlayView.m +// MRProgress +// +// Created by Marius Rackwitz on 09.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +//#define MRProgress_EnableUIVisualEffectView +#if defined(MRProgress_EnableUIVisualEffectView) + #define MR_UIEffectViewIsEnabled 1 +#else + #define MR_UIEffectViewIsEnabled 0 +#endif +#define MR_UIEffectViewIsAllowed (MR_UIEffectViewIsEnabled && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) +#define MR_UIEffectViewIsAvailable (MR_UIEffectViewIsAllowed && NSClassFromString(@"UIVisualEffectView") != nil) + +#import +#import +#import "MRProgressOverlayView.h" +#import "MRActivityIndicatorView.h" +#import "MRBlurView.h" +#import "MRCircularProgressView.h" +#import "MRIconView.h" +#import "MRProgressHelper.h" + + +static const CGFloat MRProgressOverlayViewCornerRadius = 7; +static const CGFloat MRProgressOverlayViewMotionEffectExtent = 10; + + +@interface MRProgressOverlayView () { + NSDictionary *_savedAttributes; +} + +@property (nonatomic, weak, readwrite) UIView *dialogView; +@property (nonatomic, weak, readwrite) UIView *blurView; +@property (nonatomic, strong, readwrite) UIView *blurMaskView; +@property (nonatomic, weak, readwrite) UILabel *titleLabel; + +- (UIView *)createModeView; +- (UIView *)createViewForMode:(MRProgressOverlayViewMode)mode; + +- (MRActivityIndicatorView *)createActivityIndicatorView; +- (MRActivityIndicatorView *)createSmallActivityIndicatorView; +- (UIActivityIndicatorView *)createSmallDefaultActivityIndicatorView; +- (MRCircularProgressView *)createCircularProgressView; +- (UIProgressView *)createHorizontalBarProgressView; +- (MRIconView *)createCheckmarkIconView; +- (MRIconView *)createCrossIconView; +- (UIView *)createCustomView; + +- (void)showModeView:(UIView *)modeView; +- (void)hideModeView:(UIView *)modeView; + +- (BOOL)mayStop; + +- (void)setSubviewTransform:(CGAffineTransform)transform alpha:(CGFloat)alpha; + +- (void)registerForNotificationCenter; +- (void)unregisterFromNotificationCenter; +- (void)deviceOrientationDidChange:(NSNotification *)notification; + +- (void)registerForKVO; +- (void)unregisterFromKVO; +- (NSArray *)observableKeypaths; + +- (CGAffineTransform)transformForOrientation; + +- (NSDictionary *)titleTextAttributesToCopy; + +@end + + +@implementation MRProgressOverlayView + +static void *MRProgressOverlayViewObservationContext = &MRProgressOverlayViewObservationContext; + +#pragma mark - Static helper methods + ++ (instancetype)showOverlayAddedTo:(UIView *)view animated:(BOOL)animated { + MRProgressOverlayView *overlayView = [self new]; + [view addSubview:overlayView]; + [overlayView show:animated]; + return overlayView; +} + ++ (instancetype)showOverlayAddedTo:(UIView *)view title:(NSString *)title mode:(MRProgressOverlayViewMode)mode animated:(BOOL)animated { + MRProgressOverlayView *overlayView = [self new]; + overlayView.mode = mode; + overlayView.titleLabelText = title; + [view addSubview:overlayView]; + [overlayView show:animated]; + return overlayView; +} + ++ (instancetype)showOverlayAddedTo:(UIView *)view title:(NSString *)title mode:(MRProgressOverlayViewMode)mode animated:(BOOL)animated stopBlock:(MRProgressOverlayViewStopBlock)stopBlock { + MRProgressOverlayView *overlayView = [self new]; + overlayView.mode = mode; + overlayView.titleLabelText = title; + overlayView.stopBlock = stopBlock; + [view addSubview:overlayView]; + [overlayView show:animated]; + return overlayView; +} + ++ (BOOL)dismissOverlayForView:(UIView *)view animated:(BOOL)animated { + return [self dismissOverlayForView:view animated:animated completion:nil]; +} + ++ (BOOL)dismissOverlayForView:(UIView *)view animated:(BOOL)animated completion:(void(^)())completionBlock { + MRProgressOverlayView *overlayView = [self overlayForView:view]; + if (overlayView) { + [overlayView dismiss:animated completion:completionBlock]; + return YES; + } + return NO; +} + ++ (NSUInteger)dismissAllOverlaysForView:(UIView *)view animated:(BOOL)animated { + return [self dismissAllOverlaysForView:view animated:animated completion:nil]; +} + ++ (NSUInteger)dismissAllOverlaysForView:(UIView *)view animated:(BOOL)animated completion:(void(^)())completionBlock { + NSArray *views = [self allOverlaysForView:view]; + for (MRProgressOverlayView *overlayView in views) { + [overlayView dismiss:animated completion:completionBlock]; + } + return views.count; +} + ++ (instancetype)overlayForView:(UIView *)view { + NSEnumerator *subviewsEnum = view.subviews.reverseObjectEnumerator; + for (UIView *subview in subviewsEnum) { + if ([subview isKindOfClass:self]) { + return (MRProgressOverlayView *)subview; + } + } + return nil; +} + ++ (NSArray *)allOverlaysForView:(UIView *)view { + NSMutableArray *overlays = [NSMutableArray new]; + NSArray *subviews = view.subviews; + for (UIView *view in subviews) { + if ([view isKindOfClass:self]) { + [overlays addObject:view]; + } + } + return overlays; +} + + +#pragma mark - Initialization + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.accessibilityViewIsModal = YES; + + self.hidden = YES; + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + + const CGFloat cornerRadius = MRProgressOverlayViewCornerRadius; + + // Create blurView + self.blurView = [self createBlurView]; + + // Create container with contents + UIView *dialogView = [UIView new]; + [self addSubview:dialogView]; + self.dialogView = dialogView; + [self applyMotionEffects]; + + // Style the dialog to match the iOS7 UIAlertView + dialogView.backgroundColor = UIColor.clearColor; + dialogView.layer.cornerRadius = cornerRadius; + dialogView.layer.shadowRadius = cornerRadius + 5; + dialogView.layer.shadowOpacity = 0.1f; + dialogView.layer.shadowOffset = CGSizeMake(-(cornerRadius+5)/2.0f, -(cornerRadius+5)/2.0f); + + // Create titleLabel + UILabel *titleLabel = [UILabel new]; + self.titleLabel = titleLabel; + self.titleLabel.attributedText = [[NSAttributedString alloc] initWithString:@"Loading ..." attributes:@{ + NSForegroundColorAttributeName: UIColor.blackColor, + NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], + NSKernAttributeName: NSNull.null, // turn on auto-kerning + }]; + titleLabel.accessibilityTraits = UIAccessibilityTraitHeader; + titleLabel.textAlignment = NSTextAlignmentCenter; + titleLabel.numberOfLines = 0; + titleLabel.lineBreakMode = NSLineBreakByWordWrapping; + [dialogView addSubview:titleLabel]; + + // Create modeView + [self createModeView]; + + // Observe key paths and notification center + [self registerForKVO]; + [self registerForNotificationCenter]; + + [self tintColorDidChange]; +} + + +#pragma mark - Clean up + +- (void)dealloc { + [self unregisterFromKVO]; + [self unregisterFromNotificationCenter]; +} + + +#pragma mark - Notifications + +- (void)registerForNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center addObserver:self selector:@selector(deviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil]; +} + +- (void)unregisterFromNotificationCenter { + NSNotificationCenter *center = NSNotificationCenter.defaultCenter; + [center removeObserver:self]; +} + +- (void)deviceOrientationDidChange:(NSNotification *)notification { + if ([self.superview isKindOfClass:UIWindow.class]) { + [UIView animateWithDuration:0.3 animations:^{ + [self manualLayoutSubviews]; + }]; + } else { + [self manualLayoutSubviews]; + } +} + + +#pragma mark - Key-Value-Observing + +- (void)registerForKVO { + for (NSString *keyPath in self.observableKeypaths) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionPrior context:MRProgressOverlayViewObservationContext]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in self.observableKeypaths) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return @[@"titleLabel.text"]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (context == MRProgressOverlayViewObservationContext) { + if ([keyPath isEqualToString:@"titleLabel.text"]) { + if ([change[NSKeyValueChangeNotificationIsPriorKey] boolValue]) { + _savedAttributes = self.titleTextAttributesToCopy; + return; + } else { + if (!_savedAttributes) { + self.titleLabelText = self.titleLabel.text; + #if DEBUG + NSLog(@"** WARNING - Instance of %@ used automatically setTitleLabelText: internally, instead of titleLabel.text, but some text attributes may been lost.", + NSStringFromClass(self.class)); + #endif + } else { + self.titleLabelText = (id)[[NSAttributedString alloc] initWithString:self.titleLabel.text attributes:_savedAttributes]; + _savedAttributes = nil; + } + } + } + [self manualLayoutSubviews]; + return; + } + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; +} + + +#pragma mark - Create subviews + +- (UIView *)createBlurView { + const CGFloat cornerRadius = MRProgressOverlayViewCornerRadius; + + if (MR_UIEffectViewIsAvailable) { + #if MR_UIEffectViewIsAllowed + UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]]; + [self addSubview:effectView]; + + // Setup mask view + UIView *maskView = [UIView new]; + maskView.backgroundColor = UIColor.whiteColor; + maskView.layer.cornerRadius = cornerRadius; + self.blurMaskView = maskView; // Memorize for layout changes + + effectView.maskView = maskView; + + return effectView; + #endif + } else { + UIView *blurView = [MRBlurView new]; + blurView.alpha = 0.98; + blurView.layer.cornerRadius = cornerRadius; + [self addSubview:blurView]; + return blurView; + } +} + +- (UIView *)createModeView { + UIView *modeView = [self createViewForMode:self.mode]; + self.modeView = modeView; + modeView.tintColor = self.tintColor; + + if ([modeView conformsToProtocol:@protocol(MRStopableView)] + && [modeView respondsToSelector:@selector(stopButton)]) { + UIButton *stopButton = [((id)modeView) stopButton]; + [stopButton addTarget:self action:@selector(modeViewStopButtonTouchUpInside) forControlEvents:UIControlEventTouchUpInside]; + } + + return modeView; +} + +- (void)setModeView:(UIView *)modeView { + _modeView = modeView; + [self.dialogView addSubview:modeView]; +} + +- (UIView *)createViewForMode:(MRProgressOverlayViewMode)mode { + switch (mode) { + case MRProgressOverlayViewModeIndeterminate: + return [self createActivityIndicatorView]; + + case MRProgressOverlayViewModeIndeterminateSmall: + return [self createSmallActivityIndicatorView]; + + case MRProgressOverlayViewModeIndeterminateSmallDefault: + return [self createSmallDefaultActivityIndicatorView]; + + case MRProgressOverlayViewModeDeterminateCircular: + return [self createCircularProgressView]; + + case MRProgressOverlayViewModeDeterminateHorizontalBar: + return [self createHorizontalBarProgressView]; + + case MRProgressOverlayViewModeCheckmark: + return [self createCheckmarkIconView]; + + case MRProgressOverlayViewModeCross: + return [self createCrossIconView]; + + case MRProgressOverlayViewModeCustom: + return [self createCustomView]; + } + return nil; +} + + +#pragma mark - Mode view factory methods + +- (MRActivityIndicatorView *)createActivityIndicatorView { + // Create activity indicator for indeterminate mode + MRActivityIndicatorView *activityIndicatorView = [MRActivityIndicatorView new]; + return activityIndicatorView; +} + +- (MRActivityIndicatorView *)createSmallActivityIndicatorView { + // Create small activity indicator for text mode + MRActivityIndicatorView *smallActivityIndicatorView = [MRActivityIndicatorView new]; + smallActivityIndicatorView.hidesWhenStopped = YES; + return smallActivityIndicatorView; +} + +- (UIActivityIndicatorView *)createSmallDefaultActivityIndicatorView { + // Create small default activity indicator for text mode + UIActivityIndicatorView *smallDefaultActivityIndicatorView = [UIActivityIndicatorView new]; + smallDefaultActivityIndicatorView.hidesWhenStopped = YES; + smallDefaultActivityIndicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; + return smallDefaultActivityIndicatorView; +} + +- (MRCircularProgressView *)createCircularProgressView { + // Create circular progress view for determinate circular mode + MRCircularProgressView *circularProgressView = [MRCircularProgressView new]; + return circularProgressView; +} + +- (UIProgressView *)createHorizontalBarProgressView { + // Create horizontal progress bar for determinate horizontal bar mode + UIProgressView *horizontalBarProgressView = [UIProgressView new]; + return horizontalBarProgressView; +} + +- (MRIconView *)createCheckmarkIconView { + // Create checkmark icon view for checkmark mode + MRCheckmarkIconView *checkmarkIconView = [MRCheckmarkIconView new]; + return checkmarkIconView; +} + +- (MRIconView *)createCrossIconView { + // Create cross icon view for cross mode + MRCrossIconView *crossIconView = [MRCrossIconView new]; + return crossIconView; +} + +- (UIView *)createCustomView { + // Create custom base view + return [UIView new]; +} + + +#pragma mark - Title label text + +- (NSDictionary *)titleTextAttributesToCopy { + if (self.titleLabel.text.length > 0) { + return [self.titleLabel.attributedText attributesAtIndex:0 effectiveRange:NULL]; + } else { + return @{}; + } +} + +- (void)setTitleLabelText:(NSString *)titleLabelText { + self.titleLabelAttributedText = [[NSAttributedString alloc] initWithString:titleLabelText attributes:self.titleTextAttributesToCopy]; + [self manualLayoutSubviews]; +} + +- (NSString *)titleLabelText { + return self.titleLabel.text; +} + +- (void)setTitleLabelAttributedText:(NSAttributedString *)titleLabelAttributedText { + self.titleLabel.attributedText = titleLabelAttributedText; + [self manualLayoutSubviews]; +} + +- (NSAttributedString *)titleLabelAttributedText { + return self.titleLabel.attributedText; +} + + +#pragma mark - Tint color + +- (void)setTintColor:(UIColor *)tintColor { + // Implemented to silent warning + super.tintColor = tintColor; +} + +- (void)tintColorDidChange { + [super tintColorDidChange]; + self.modeView.tintColor = self.tintColor; +} + + +#pragma mark - Mode + +- (void)setMode:(MRProgressOverlayViewMode)mode { + [self hideModeView:self.modeView]; + + _mode = mode; + + [self showModeView:[self createModeView]]; + [self updateModeViewMayStop]; + + if (!self.hidden) { + [self manualLayoutSubviews]; + } +} + +- (void)showModeView:(UIView *)modeView { + modeView.hidden = NO; + if ([modeView respondsToSelector:@selector(startAnimating)]) { + [modeView performSelector:@selector(startAnimating)]; + } +} + +- (void)hideModeView:(UIView *)modeView { + modeView.hidden = YES; + if ([modeView respondsToSelector:@selector(stopAnimating)]) { + [modeView performSelector:@selector(stopAnimating)]; + } +} + + +#pragma mark - Stop button + +- (void)setStopBlock:(MRProgressOverlayViewStopBlock)stopBlock { + _stopBlock = stopBlock; + + if (![self updateModeViewMayStop]) { + #if DEBUG + NSLog(@"** WARNING - %@: %@ is only valid to call when the mode view supports %@ declared in %@!", + NSStringFromClass(self.class), + NSStringFromSelector(_cmd), + NSStringFromSelector(@selector(setMayStop:)), + NSStringFromProtocol(@protocol(MRStopableView))); + #endif + } +} + +- (BOOL)mayStop { + return _stopBlock != nil; +} + +- (BOOL)updateModeViewMayStop { + if ([self.modeView conformsToProtocol:@protocol(MRStopableView)] + && [self.modeView respondsToSelector:@selector(setMayStop:)]) { + [((id)self.modeView) setMayStop:self.mayStop]; + return YES; + } + return NO; +} + +- (void)modeViewStopButtonTouchUpInside { + if (self.stopBlock) { + self.stopBlock(self); + } +} + + +#pragma mark - A11y + +- (BOOL)accessibilityPerformEscape { + if (self.mayStop) { + [self modeViewStopButtonTouchUpInside]; + return YES; + } else { + return NO; + } +} + + +#pragma mark - Transitions + +- (void)setSubviewTransform:(CGAffineTransform)transform alpha:(CGFloat)alpha { + self.blurView.transform = transform; + self.dialogView.transform = transform; + self.alpha = alpha; +} + +- (void)show:(BOOL)animated { + [self showModeView:self.modeView]; + + [self manualLayoutSubviews]; + + if (animated) { + [self setSubviewTransform:CGAffineTransformMakeScale(1.3f, 1.3f) alpha:0.5f]; + self.backgroundColor = UIColor.clearColor; + } + + self.hidden = NO; + + void(^animBlock)() = ^{ + [self setSubviewTransform:CGAffineTransformIdentity alpha:1.0f]; + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4f]; + }; + + if (animated) { + [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut + animations:animBlock + completion:nil]; + } else { + animBlock(); + } + + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); + UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, self.titleLabelText); +} + +- (void)dismiss:(BOOL)animated { + [self dismiss:animated completion:nil]; +} + +- (void)dismiss:(BOOL)animated completion:(void(^)())completionBlock { + [self hide:animated completion:^{ + [self removeFromSuperview]; + if (completionBlock) { + completionBlock(); + } + }]; +} + +- (void)hide:(BOOL)animated { + [self hide:animated completion:nil]; +} + +- (void)hide:(BOOL)animated completion:(void(^)())completionBlock { + [self setSubviewTransform:CGAffineTransformIdentity alpha:1.0f]; + + void(^animBlock)() = ^{ + [self setSubviewTransform:CGAffineTransformMakeScale(0.6f, 0.6f) alpha:0.0f]; + self.backgroundColor = UIColor.clearColor; + }; + + void(^animCompletionBlock)(BOOL) = ^(BOOL finished) { + self.hidden = YES; + [self hideModeView:self.modeView]; + + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); + + if (completionBlock) { + completionBlock(); + } + }; + + if (animated) { + [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut + animations:animBlock + completion:animCompletionBlock]; + } else { + animBlock(); + animCompletionBlock(YES); + } +} + + +#pragma mark - Layout + +- (CGAffineTransform)transformForOrientation { + if ([self.superview isKindOfClass:UIWindow.class]) { + return CGAffineTransformMakeRotation(MRRotationForStatusBarOrientation()); + } + return CGAffineTransformIdentity; +} + +// Don't overwrite layoutSubviews here. This would cause issues with animation. +- (void)manualLayoutSubviews { + if (!MRSystemVersionGreaterThanOrEqualTo8()) { + self.transform = self.transformForOrientation; + } + + CGRect bounds = self.superview.bounds; + UIEdgeInsets insets = UIEdgeInsetsZero; + + if ([self.superview isKindOfClass:[UIScrollView class]]) { + UIScrollView *scrollView = (UIScrollView *)self.superview; + insets = scrollView.contentInset; + } + + self.center = CGPointMake((bounds.size.width - insets.left - insets.right) / 2.0f, + (bounds.size.height - insets.top - insets.bottom) / 2.0f); + + if (MRSystemVersionGreaterThanOrEqualTo8()) { + self.bounds = (CGRect){CGPointZero, bounds.size}; + } else { + if ([self.superview isKindOfClass:UIWindow.class] && UIInterfaceOrientationIsLandscape(UIApplication.sharedApplication.statusBarOrientation)) { + // Swap width and height + self.bounds = (CGRect){CGPointZero, {bounds.size.height, bounds.size.width}}; + } else { + self.bounds = (CGRect){CGPointZero, bounds.size}; + } + } + + const CGFloat dialogPadding = 15; + const CGFloat modePadding = 30; + const CGFloat dialogMargin = 10; + const CGFloat dialogMinWidth = 150; + + const BOOL hasSmallIndicator = self.mode == MRProgressOverlayViewModeIndeterminateSmall + || self.mode == MRProgressOverlayViewModeIndeterminateSmallDefault; + const BOOL isTextNonEmpty = self.titleLabel.text.length > 0; + + CGFloat dialogWidth = hasSmallIndicator ? CGRectGetWidth(bounds) - dialogMargin * 2 : dialogMinWidth; + if (self.mode == MRProgressOverlayViewModeCustom) { + dialogWidth = self.modeView.frame.size.width + 2*modePadding; + } + + CGFloat y = (isTextNonEmpty || hasSmallIndicator) ? 7 : modePadding; + + CGSize modeViewSize; + if (hasSmallIndicator) { + modeViewSize = CGSizeMake(20, 20); + } + + if (!self.titleLabel.hidden && isTextNonEmpty) { + const CGFloat innerViewWidth = dialogWidth - 2*dialogPadding; + + CGFloat titleLabelMinX = dialogPadding; + CGFloat titleLabelMaxWidth = innerViewWidth; + CGFloat offset = 0; + + if (hasSmallIndicator) { + offset = modeViewSize.width + 7; + } + + titleLabelMinX += offset; + titleLabelMaxWidth -= offset; + + y += 3; + + CGSize titleLabelMaxSize = CGSizeMake(titleLabelMaxWidth, self.bounds.size.height); + CGRect boundingRect = [self.titleLabel.attributedText boundingRectWithSize:titleLabelMaxSize + options:NSStringDrawingUsesLineFragmentOrigin + context:nil]; + CGSize titleLabelSize = CGSizeMake(MRCGFloatCeil(boundingRect.size.width), + MRCGFloatCeil(boundingRect.size.height)); + CGPoint titleLabelOrigin; + if (hasSmallIndicator) { + CGFloat titleLabelMinWidth = dialogMinWidth - 2*dialogPadding - offset; + if (titleLabelSize.width > titleLabelMinWidth) { + dialogWidth = titleLabelSize.width + offset + 2*dialogPadding; + titleLabelOrigin = CGPointMake(titleLabelMinX, y); + } else { + dialogWidth = dialogMinWidth; + titleLabelOrigin = CGPointMake(titleLabelMinX + (titleLabelMinWidth - titleLabelSize.width) / 2.0f, y); + } + + CGPoint modeViewOrigin = CGPointMake(titleLabelOrigin.x - offset, + y + (titleLabelSize.height - modeViewSize.height) / 2.0f); + CGRect modeViewFrame = {modeViewOrigin, modeViewSize}; + self.modeView.frame = modeViewFrame; + } else { + titleLabelOrigin = CGPointMake(titleLabelMinX + (titleLabelMaxWidth - titleLabelSize.width) / 2.0f, y); + } + + CGRect titleLabelFrame = {titleLabelOrigin, titleLabelSize}; + self.titleLabel.frame = titleLabelFrame; + + y += CGRectGetMaxY(titleLabelFrame); + } else if (hasSmallIndicator) { + dialogWidth = modeViewSize.width + 2*y; + + CGPoint modeViewOrigin = CGPointMake(y, y); + CGRect modeViewFrame = {modeViewOrigin, modeViewSize}; + self.modeView.frame = modeViewFrame; + + y += CGRectGetMaxY(modeViewFrame); + } + + if (!hasSmallIndicator) { + const CGFloat innerViewWidth = dialogWidth - 2*modePadding; + + CGRect modeViewFrame; + CGFloat paddingBottom = 0; + + if (self.mode != MRProgressOverlayViewModeDeterminateHorizontalBar) { + modeViewFrame = CGRectMake(modePadding, y, innerViewWidth, innerViewWidth); + paddingBottom = isTextNonEmpty ? 20 : modePadding; + } else { + modeViewFrame = CGRectMake(10, y, dialogWidth-20, 5); + paddingBottom = 15; + } + + self.modeView.frame = modeViewFrame; + y += modeViewFrame.size.height + paddingBottom; + } + + { + self.dialogView.frame = MRCenterCGSizeInCGRect(CGSizeMake(dialogWidth, y), self.bounds); + + if (!CGRectEqualToRect(self.blurView.frame, self.dialogView.frame)) { + self.blurView.frame = self.dialogView.frame; + + if (MR_UIEffectViewIsAvailable) { + #if MR_UIEffectViewIsAllowed + // As the blurMaskView will be copied internally by UIKit, we have to re-assign + // it to the blurView, after we change its layout + self.blurMaskView.frame = self.dialogView.bounds; + self.blurView.maskView = self.blurMaskView; + #endif + } + } + } +} + + +#pragma mark - Control progress + +- (void)setProgress:(float)progress { + [self setProgress:progress animated:NO]; +} + +- (void)setProgress:(float)progress animated:(BOOL)animated { + assert(progress >= 0 && progress <= 1); + _progress = progress; + [self applyProgressAnimated:(BOOL)animated]; +} + +- (void)applyProgressAnimated:(BOOL)animated { + if ([self.modeView respondsToSelector:@selector(setProgress:animated:)]) { + [((id)self.modeView) setProgress:self.progress animated:animated]; + } else if ([self.modeView respondsToSelector:@selector(setProgress:)]) { + if (animated) { + #if DEBUG + NSLog(@"** WARNING - %@: %@ is only valid to call when receiver is in a determinate mode or custom view supports %@!", + NSStringFromClass(self.class), + NSStringFromSelector(_cmd), + NSStringFromSelector(@selector(setProgress:animated:))); + #endif + } + [((id)self.modeView) setProgress:self.progress]; + } else { + NSAssert(self.mode == MRProgressOverlayViewModeDeterminateCircular + || self.mode == MRProgressOverlayViewModeDeterminateHorizontalBar, + @"Mode must support %@, but doesnot!", NSStringFromSelector(@selector(setProgress:animated:))); + #if DEBUG + NSLog(@"** ERROR - %@: %@ or %@ are only valid to call when receiver is in a determinate mode!", + NSStringFromClass(self.class), + NSStringFromSelector(@selector(setProgress:)), + NSStringFromSelector(_cmd)); + #endif + } +} + + +#pragma mark - Helper to create UIMotionEffects + +- (UIInterpolatingMotionEffect *)motionEffectWithKeyPath:(NSString *)keyPath type:(UIInterpolatingMotionEffectType)type { + UIInterpolatingMotionEffect *effect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:keyPath type:type]; + effect.minimumRelativeValue = @(-MRProgressOverlayViewMotionEffectExtent); + effect.maximumRelativeValue = @(MRProgressOverlayViewMotionEffectExtent); + return effect; +} + +- (void)applyMotionEffects { + UIMotionEffectGroup *motionEffectGroup = [[UIMotionEffectGroup alloc] init]; + motionEffectGroup.motionEffects = @[[self motionEffectWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis], + [self motionEffectWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]]; + [self.dialogView addMotionEffect:motionEffectGroup]; + [self.blurView addMotionEffect:motionEffectGroup]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.h b/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.h new file mode 100755 index 00000000..d07e26d3 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.h @@ -0,0 +1,44 @@ +// +// MRProgressView.h +// MRProgress +// +// Created by Marius Rackwitz on 31.05.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + This class is only a intermediate step between the concrete custom progress view + implementation provided in this library and UIKit's base class UIView and declaring + the common interface of those custom views, which is similar to UIProgressView. + This has the advantage that we can define an usual category on this class to extend + the functionality of all other custom progress view subclasses provided by this library. + */ +@interface MRProgressView : UIView { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" +@protected + float _progress; +} +#pragma clang diagnostic pop + +/** + Current progress. Use associated setter for non animated changes. Otherwises use setProgress:aniamted:. + */ +@property (nonatomic, assign) float progress; + +/** + Change progress animated. + + The animation will be always linear. + + @note See this as declared abstract. This MUST be overriden in subclasses. + + @param progress The new progress value. + @param animated Specify YES to animate the change or NO if you do not want the change to be animated. + */ +- (void)setProgress:(float)progress animated:(BOOL)animated; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.m b/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.m new file mode 100755 index 00000000..a6678148 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRProgressView.m @@ -0,0 +1,21 @@ +// +// MRProgressView.m +// MRProgress +// +// Created by Marius Rackwitz on 31.05.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import "MRProgressView.h" + + +@implementation MRProgressView + +- (void) __attribute__((noreturn)) setProgress:(float)progress animated:(BOOL)animated { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:[NSString stringWithFormat:@"You must override selector '%@' in %@ or a intermediate class!", + NSStringFromSelector(_cmd), NSStringFromClass(self.class)] + userInfo:nil]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.h b/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.h new file mode 100755 index 00000000..bd0eda54 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.h @@ -0,0 +1,47 @@ +// +// MRStopButton.h +// MRProgress +// +// Created by Marius Rackwitz on 27.12.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + Stop button used by progress views to stop the related and visualised running task. + */ +@interface MRStopButton : UIButton + +/** + Size ratio in comparision to the parent view + + The ratio by which the size of the click area will be resized in comparision to the parent size in default state. + A positive value means that the stop button is smaller than the parent view. + A negative value means that the stop button is bigger than the parent view. + By default it has the value 0.3. + + The method frameThatFits: will ensure that this property is applied. It has to be called by the parent view in the + layoutSubviews by class contract. + */ +@property (nonatomic, assign) CGFloat sizeRatio; + +/** + Highlighted size ratio in comparision to the default state + + The ratio by which the size of the click area will be resized, while touch is tracked inside. + A positive value means that the stop button will be shrinked. + A negative value means that the stop button will be enlarged. + By default it has the value 0.9. + */ +@property (nonatomic, assign) CGFloat highlightedSizeRatio; + +/** + Asks the view to calculate and return the frame to be displayed in its parent. + + @param parentSize size of the parent node in the view hierachy + */ +- (CGRect)frameThatFits:(CGRect)parentSize; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.m b/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.m new file mode 100755 index 00000000..4eb604c6 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRStopButton.m @@ -0,0 +1,111 @@ +// +// MRStopButton.m +// MRProgress +// +// Created by Marius Rackwitz on 27.12.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import "MRStopButton.h" +#import "MRProgressHelper.h" + + +static CGFloat const MRStopButtonMinSize = 44.0; + + +@interface MRStopButton () + +@property (nonatomic, weak, readwrite) CAShapeLayer *shapeLayer; + +@end + + +@implementation MRStopButton + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.accessibilityLabel = NSLocalizedString(@"Stop", @"Accessibility label for stop button"); + self.accessibilityHint = NSLocalizedString(@"Stop the activity", @"Accessibility hint for stop button"); + self.accessibilityTraits = UIAccessibilityTraitButton; + + self.sizeRatio = 0.3; + self.highlightedSizeRatio = 0.9; + + CAShapeLayer *shapeLayer = [CAShapeLayer new]; + [self.layer addSublayer:shapeLayer]; + self.shapeLayer= shapeLayer; + + [self addTarget:self action:@selector(didTouchDown) forControlEvents:UIControlEventTouchDown]; + [self addTarget:self action:@selector(didTouchUpInside) forControlEvents:UIControlEventTouchUpInside]; + + [self tintColorDidChange]; +} + +- (CGRect)frameThatFits:(CGRect)parentBounds { + CGFloat sizeValue = MIN(parentBounds.size.width, parentBounds.size.height); + CGSize viewSize = CGSizeMake(sizeValue, sizeValue); + const CGFloat insetSizeRatio = (1 - self.sizeRatio) / 2.0; + return CGRectInset(MRCenterCGSizeInCGRect(viewSize, parentBounds), + sizeValue * insetSizeRatio, + sizeValue * insetSizeRatio); +} + +- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { + if (self.frame.size.width >= MRStopButtonMinSize || self.frame.size.height >= MRStopButtonMinSize) { + return [super pointInside:point withEvent:event]; + } else { + CGFloat maxOffsetX = MAX(0, (MRStopButtonMinSize - self.frame.size.width) / 2.0); + CGFloat maxOffsetY = MAX(0, (MRStopButtonMinSize - self.frame.size.height) / 2.0); + CGRect hitRect = CGRectInset(self.bounds, -maxOffsetX, -maxOffsetY); + return CGRectContainsPoint(hitRect, point); + } +} + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect frame = self.bounds; + + if (self.tracking && self .touchInside) { + const CGFloat insetSizeRatio = (1 - self.highlightedSizeRatio) / 2.0; + frame = CGRectInset(frame, + frame.size.width * insetSizeRatio, + frame.size.height * insetSizeRatio); + } + + self.shapeLayer.frame = frame; +} + +- (void)tintColorDidChange { + [super tintColorDidChange]; + self.shapeLayer.backgroundColor = self.tintColor.CGColor; +} + +- (void)didTouchDown { + [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ + [self layoutSubviews]; + } completion:nil]; +} + +- (void)didTouchUpInside { + [UIView animateWithDuration:0.2 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ + [self layoutSubviews]; + } completion:nil]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Components/MRStopableView.h b/src/ios/GMImagePicker/mrprogress/Components/MRStopableView.h new file mode 100755 index 00000000..bc6c99d8 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Components/MRStopableView.h @@ -0,0 +1,34 @@ +// +// MRStopableView.h +// MRProgress +// +// Created by Marius Rackwitz on 11.01.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + This protocol can be implemented by progress views, which supports a stop button, to stop the related and visualised + running task. + */ +@protocol MRStopableView + +/** + A Boolean value that controls whether the receiver shows a stop button. + + If the value of this property is NO (the default), the receiver doesnot show a stop button. If the mayStop property is + YES a stop button will be shown. You can catch the events, which will be fired by the stop button by registering + targets and actions for particular events on the property stopButton with addTarget:action:forControlEvents:. + */ +@property (nonatomic, assign) BOOL mayStop; + +/** + A button, which should only be shown if mayStop is equal to YES. + + The button is in the middle of the control. + */ +@property (nonatomic, readonly, weak) UIButton *stopButton; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/MRProgress.h b/src/ios/GMImagePicker/mrprogress/MRProgress.h new file mode 100755 index 00000000..862de246 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/MRProgress.h @@ -0,0 +1,52 @@ +// +// MRProgress.h +// MRProgress +// +// Created by Marius Rackwitz on 20.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_ActivityIndicator +#import "MRActivityIndicatorView.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_Blur +#import "MRBlurView.h" +#import "UIImage+MRImageEffects.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_Circular +#import "MRCircularProgressView.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_Icons +#import "MRIconView.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_MessageInterceptor +#import "MRMessageInterceptor.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_NavigationBarProgress +#import "MRNavigationBarProgressView.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_Overlay +#import "MRProgressOverlayView.h" +#endif + +#ifdef COCOAPODS_POD_AVAILABLE_MRProgress_WeakProxy +#import "MRWeakProxy.h" +#endif + +#else + +#import "MRActivityIndicatorView.h" +#import "MRCircularProgressView.h" +#import "MRIconView.h" +#import "MRNavigationBarProgressView.h" +#import "MRProgressOverlayView.h" + +#endif diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.h b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.h new file mode 100755 index 00000000..9d247530 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.h @@ -0,0 +1,71 @@ +// +// MRActivityIndicatorView+AFNetworking.h +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// +// This implementation is based on AFNetworking's UIKit additions. +// So the following copyright notice and permission notice must be included: +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "MRActivityIndicatorView.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the MRProgress library's `MRActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. + */ +@interface MRActivityIndicatorView (AFNetworking) + +///---------------------------------- +/// @name Animating for Session Tasks +///---------------------------------- + +/** + Binds the animating state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; +#endif + +///--------------------------------------- +/// @name Animating for Request Operations +///--------------------------------------- + +/** + Binds the animating state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; + +@end + +#endif diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.m b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.m new file mode 100755 index 00000000..58256ee4 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRActivityIndicatorView+AFNetworking.m @@ -0,0 +1,51 @@ +// +// MRActivityIndicatorView+AFNetworking.m +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// +// This implementation is based on AFNetworking's UIKit additions. +// So the following copyright notice and permission notice must be included: +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "MRActivityIndicatorView+AFNetworking.h" +#import "MRMethodCopier.h" + +#pragma clang diagnostic ignored "-Wincomplete-implementation" + +@implementation MRActivityIndicatorView (AFNetworking) + ++ (void)load { + MRMethodCopier *copier = [MRMethodCopier copierFromClass:UIActivityIndicatorView.class toClass:self]; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [copier copyInstanceMethod:@selector(setAnimatingWithStateOfTask:)]; +#endif + + [copier copyInstanceMethod:@selector(setAnimatingWithStateOfOperation:)]; + + // Internal methods + [copier copyInstanceMethod:NSSelectorFromString(@"af_startAnimating")]; + [copier copyInstanceMethod:NSSelectorFromString(@"af_stopAnimating")]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.h b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.h new file mode 100755 index 00000000..c3351837 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.h @@ -0,0 +1,65 @@ +// +// MRProgressOverlayView+AFNetworking.h +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import "MRProgressOverlayView.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the MRProgress library's `MRProgressOverlayView` class. The methods in this category provide support for automatically dismissing, setting the mode and the progresss depending on the loading state of a request operation or session task. + */ +@interface MRProgressOverlayView (AFNetworking) + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + +///---------------------------------- +/// @name Animating for Session Tasks +///---------------------------------- + +/** + Binds the animating state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setModeAndProgressWithStateOfTask:(NSURLSessionTask *)task; +/** + Sets the `stopBlock` of the receiver, so that it will stop the specified task. + + @param task The task. If `nil`, it clears the `stopBlock`. + */ +- (void)setStopBlockForTask:(NSURLSessionTask *)task; + +#endif + +///--------------------------------------- +/// @name Animating for Request Operations +///--------------------------------------- + +/** + Binds the animating state to the execution state of the specified operation. + + @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setModeAndProgressWithStateOfOperation:(AFURLConnectionOperation *)operation; + +/** + Sets the `stopBlock` of the receiver, so that it will stop the specified operation. + + @param operation The operation. If `nil`, it clears the `stopBlock`. + */ +- (void)setStopBlockForOperation:(AFURLConnectionOperation *)operation; + +@end + +#endif diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.m b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.m new file mode 100755 index 00000000..92397f61 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressOverlayView+AFNetworking.m @@ -0,0 +1,315 @@ +// +// MRProgressOverlayView+AFNetworking.m +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import "MRProgressOverlayView+AFNetworking.h" +#import "AFNetworking.h" +#import +#import "MRActivityIndicatorView+AFNetworking.h" +#import "MRProgressView+AFNetworking.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #import "AFURLSessionManager.h" +#endif + + +static void * MRTaskCountOfBytesSentContext = &MRTaskCountOfBytesSentContext; +static void * MRTaskCountOfBytesReceivedContext = &MRTaskCountOfBytesReceivedContext; + +@interface AFURLConnectionOperation (_UIProgressView) +// Implemented in AFURLConnectionOperation +@property (readwrite, nonatomic, copy) void (^uploadProgress)(NSUInteger bytes, NSInteger totalBytes, NSInteger totalBytesExpected); +@property (readwrite, nonatomic, copy) void (^downloadProgress)(NSUInteger bytes, NSInteger totalBytes, NSInteger totalBytesExpected); +@end + + +@interface MRProgressOverlayView (_AFNetworking) + +@property (readwrite, nonatomic, retain) NSURLSessionTask *sessionTask; +@property (readwrite, nonatomic, retain) AFURLConnectionOperation *operation; + +@end + + +@implementation MRProgressOverlayView (AFNetworking) + ++ (void)load { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + SEL originalSelector = @selector(observeValueForKeyPath:ofObject:change:context:); + SEL swizzledSelector = @selector(mr_observeValueForKeyPath:ofObject:change:context:); + + Method originalMethod = class_getInstanceMethod(self, originalSelector); + Method swizzledMethod = class_getInstanceMethod(self, swizzledSelector); + + BOOL didAddMethod = class_addMethod(self, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod)); + if (didAddMethod) { + class_replaceMethod(self, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } + }); +} + +#pragma mark - + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + +- (void)setModeAndProgressWithStateOfTask:(NSURLSessionTask *)task { + self.sessionTask = task; + + [self mr_unregisterObserver]; + + if (task) { + if (task.state != NSURLSessionTaskStateCompleted) { + if (task.state == NSURLSessionTaskStateRunning) { + if (self.isHidden) { + [self show:YES]; + } + } else { + [self dismiss:YES]; + } + + // Observe state + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter addObserver:self selector:@selector(mr_show:) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(mr_hide:) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(mr_hide:) name:AFNetworkingTaskDidSuspendNotification object:task]; + + // Observe progress +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wassign-enum" + [task addObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent)) options:0 context:MRTaskCountOfBytesSentContext]; + [task addObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived)) options:0 context:MRTaskCountOfBytesReceivedContext]; +#pragma clang diagnostic pop + } else { + [self dismiss:YES]; + } + } +} + +- (void)setStopBlockForTask:(__weak NSURLSessionTask *)task { + if (task) { + self.stopBlock = ^(MRProgressOverlayView *self){ + [self mr_unregisterObserver]; + + [self dismiss:YES]; + [task cancel]; + }; + } else { + self.stopBlock = nil; + } +} + +#endif + +#pragma mark - + +- (void)setModeAndProgressWithStateOfOperation:(AFURLConnectionOperation *)operation { + self.operation = operation; + + [self mr_unregisterObserver]; + + if (operation) { + if (![operation isFinished]) { + if ([operation isExecuting]) { + if (self.isHidden) { + [self show:YES]; + } + } else { + [self dismiss:YES]; + } + + // Observe state + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter addObserver:self selector:@selector(mr_show:) name:AFNetworkingOperationDidStartNotification object:operation]; + [notificationCenter addObserver:self selector:@selector(mr_hide:) name:AFNetworkingOperationDidFinishNotification object:operation]; + + // Observe progress + __weak __typeof(self)weakSelf = self; + + void (^originalUploadProgressBlock)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) = [operation.uploadProgress copy]; + [operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) { + if (originalUploadProgressBlock) { + originalUploadProgressBlock(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + + // Set mode + [weakSelf mr_showUploading]; + + // Unregister + [weakSelf.operation setUploadProgressBlock:originalUploadProgressBlock]; + }]; + + void (^originalDownloadProgressBlock)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) = [operation.downloadProgress copy]; + [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { + if (originalDownloadProgressBlock) { + originalDownloadProgressBlock(bytesRead, totalBytesRead, totalBytesExpectedToRead); + } + + // Set mode + [weakSelf mr_showDownloading]; + + // Unregister + [weakSelf.operation setDownloadProgressBlock:originalDownloadProgressBlock]; + }]; + } else { + [self dismiss:YES]; + } + } +} + +- (void)setStopBlockForOperation:(__weak AFURLConnectionOperation *)operation { + if (operation) { + self.stopBlock = ^(MRProgressOverlayView *self){ + [self mr_unregisterObserver]; + + [self dismiss:YES]; + [operation cancel]; + }; + } else { + self.stopBlock = nil; + } +} + + +#pragma mark - Getter and setter for Configuration + +- (void)setSessionTask:(NSURLSessionTask *)sessionTask { + objc_setAssociatedObject(self, @selector(sessionTask), sessionTask, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (NSURLSessionTask *)sessionTask { + return objc_getAssociatedObject(self, @selector(sessionTask)); +} + +- (void)setOperation:(AFURLConnectionOperation *)operation { + objc_setAssociatedObject(self, @selector(operation), operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (AFURLConnectionOperation *)operation { + return objc_getAssociatedObject(self, @selector(operation)); +} + + +#pragma mark - Helper methods to dispatch UI changes on main queue + +- (void)mr_show:(NSNotification *)note { + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.hidden) { + [self show:YES]; + } + }); +} + +- (void)mr_hide:(NSNotification *)note { + dispatch_async(dispatch_get_main_queue(), ^{ + [self mr_unregisterObserver]; + + if (self.sessionTask.error || self.operation.error || note.userInfo[AFNetworkingTaskDidCompleteErrorKey]) { + self.titleLabelText = NSLocalizedString(@"Error", @"Progress overlay view text when network operation fails"); + self.mode = MRProgressOverlayViewModeCross; + } else { + self.titleLabelText = NSLocalizedString(@"Success", @"Progress overlay view text when network operation succeeds"); + self.mode = MRProgressOverlayViewModeCheckmark; + } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self dismiss:YES]; + }); + }); +} + +- (void)mr_unregisterObserver { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + // Unregister observer for NSURLSessionTask-based interface + #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + @try { + [self.sessionTask removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + [self.sessionTask removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + } + @catch (NSException * __unused exception) {} + #endif + + // Unregister observer for AFURLConnectionOperation-based interface + [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; +} + +- (void)mr_showUploading { + dispatch_async(dispatch_get_main_queue(), ^{ + // Set mode to upload + self.titleLabelText = NSLocalizedString(@"Uploading …", @"Progress overlay view text when upload progress happens"); + self.mode = MRProgressOverlayViewModeDeterminateCircular; + if (self.sessionTask) { + #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [(MRProgressView *)self.modeView setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)self.sessionTask animated:YES]; +#endif + } else if (self.operation) { + [(MRProgressView *)self.modeView setProgressWithUploadProgressOfOperation:self.operation animated:YES]; + } + }); +} + +- (void)mr_showDownloading { + dispatch_async(dispatch_get_main_queue(), ^{ + // Set mode to download + self.titleLabelText = NSLocalizedString(@"Loading …", @"Progress overlay view text when download progess happens"); + self.mode = MRProgressOverlayViewModeDeterminateCircular; + if (self.sessionTask) { + #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [(MRProgressView *)self.modeView setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)self.sessionTask animated:YES]; +#endif + } else if (self.operation) { + [(MRProgressView *)self.modeView setProgressWithDownloadProgressOfOperation:self.operation animated:YES]; + } + }); +} + + +#pragma mark - NSKeyValueObserving + +- (void)mr_observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context +{ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + if (context == MRTaskCountOfBytesSentContext || context == MRTaskCountOfBytesReceivedContext) { + // Set mode + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { + if ([object countOfBytesExpectedToSend] > 0) { + [self mr_showUploading]; + + // Unregister + @try { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + } + @catch (NSException * __unused exception) {} + } + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) { + if ([object countOfBytesExpectedToReceive] > 0) { + [self mr_showDownloading]; + + // Unregister + @try { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + } + @catch (NSException * __unused exception) {} + } + } + return; + } +#endif + [self mr_observeValueForKeyPath:keyPath ofObject:object change:change context:context]; // Call original method +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.h b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.h new file mode 100755 index 00000000..054f68dd --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.h @@ -0,0 +1,95 @@ +// +// MRProgressView+AFNetworking.h +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// +// This implementation is based on AFNetworking's UIKit additions. +// So the following copyright notice and permission notice must be included: +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "MRProgressView.h" + +#import + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + +#import + +@class AFURLConnectionOperation; + +/** + This category adds methods to the UIKit framework's `MRProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. + */ +@interface MRProgressView (AFNetworking) + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated; +#endif + +/** + Binds the progress to the download progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated; +#endif + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +/** + Binds the progress to the download progress of the specified request operation. + + @param operation The request operation. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation + animated:(BOOL)animated; + +@end + +#endif diff --git a/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.m b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.m new file mode 100755 index 00000000..5cd41fdf --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Support/AFNetworking/MRProgressView+AFNetworking.m @@ -0,0 +1,56 @@ +// +// MRProgressView+AFNetworking.m +// MRProgress +// +// Created by Marius Rackwitz on 12.03.14. +// +// This implementation is based on AFNetworking's UIKit additions. +// So the following copyright notice and permission notice must be included: +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "MRProgressView+AFNetworking.h" +#import "MRMethodCopier.h" + +#pragma clang diagnostic ignored "-Wincomplete-implementation" + +@implementation MRProgressView (AFNetworking) + ++ (void)load { + MRMethodCopier *copier = [MRMethodCopier copierFromClass:UIProgressView.class toClass:self]; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + [copier copyInstanceMethod:@selector(setProgressWithUploadProgressOfTask:animated:)]; + [copier copyInstanceMethod:@selector(setProgressWithDownloadProgressOfTask:animated:)]; +#endif + + [copier copyInstanceMethod:@selector(setProgressWithUploadProgressOfOperation:animated:)]; + [copier copyInstanceMethod:@selector(setProgressWithDownloadProgressOfOperation:animated:)]; + + // Internal methods + [copier copyInstanceMethod:NSSelectorFromString(@"af_uploadProgressAnimated")]; + [copier copyInstanceMethod:NSSelectorFromString(@"af_setUploadProgressAnimated:")]; + [copier copyInstanceMethod:NSSelectorFromString(@"af_downloadProgressAnimated")]; + [copier copyInstanceMethod:NSSelectorFromString(@"af_setDownloadProgressAnimated:")]; + [copier copyInstanceMethod:@selector(observeValueForKeyPath:ofObject:change:context:)]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.h b/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.h new file mode 100755 index 00000000..69bb092b --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.h @@ -0,0 +1,38 @@ +// +// MRMessageInterceptor.h +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + A message interceptor can be used if you want to intercept an existent delegate. + You can set your intercepting delegate as middleMan and the original delegate as receiver. + The new delegate will be the MRMessageInterceptor instance. + You have to forwad manually intercepted messages to the receiver. + */ +@interface MRMessageInterceptor : NSObject + +/** + Middle man is the instance which should intercept calls on receiver. + */ +@property (nonatomic, weak) id middleMan; + +/** + Receiver is the instance which should receive all calls, which are not intercepted or which should be forwared manually + after interception by the middleMan. + */ +@property (nonatomic, weak) id receiver; + +/** + Init a new instance with given middle man. + + @param middleMan Favored forward target for all received selectors. + */ +- (id)initWithMiddleMan:(id)middleMan; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.m b/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.m new file mode 100755 index 00000000..391f1ff2 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRMessageInterceptor.m @@ -0,0 +1,42 @@ +// +// MRMessageInterceptor.m +// MRProgress +// +// Created by Marius Rackwitz on 10.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import "MRMessageInterceptor.h" + + +@implementation MRMessageInterceptor + +- (id)initWithMiddleMan:(id)middleMan { + self = [super init]; + if (self) { + self.middleMan = middleMan; + } + return self; +} + +- (id)forwardingTargetForSelector:(SEL)aSelector { + if ([self.middleMan respondsToSelector:aSelector]) { + return self.middleMan; + } + if ([self.receiver respondsToSelector:aSelector]) { + return self.receiver; + } + return [super forwardingTargetForSelector:aSelector]; +} + +- (BOOL)respondsToSelector:(SEL)aSelector { + if ([self.middleMan respondsToSelector:aSelector]) { + return YES; + } + if ([self.receiver respondsToSelector:aSelector]) { + return YES; + } + return [super respondsToSelector:aSelector]; +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.h b/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.h new file mode 100755 index 00000000..5be6c36c --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.h @@ -0,0 +1,44 @@ +// +// MRMethodCopier.h +// MRProgress +// +// Created by Marius Rackwitz on 31.05.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + Copy dynamically methods from one class to another + */ +@interface MRMethodCopier : NSObject + +/** + The origin class, where method type encondings and implementations will be taken from. + */ +@property (nonatomic, assign) Class originClass; + +/** + The target class, where methods should be added to. + */ +@property (nonatomic, assign) Class targetClass; + +/** + Instantiate a new method copier + + @param originClass origin class, where implementation will be linked to + @param targetClass target class, where the new methods will be added + + @return MRMethodCopier + */ ++ (instancetype)copierFromClass:(Class)originClass toClass:(Class)targetClass; + +/** + Copy an instance method from the receivers originClass to targetClass + + @param selector the given selector where the method is found and will be found + */ +- (void)copyInstanceMethod:(SEL)selector; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.m b/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.m new file mode 100755 index 00000000..d0b981f7 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRMethodCopier.m @@ -0,0 +1,36 @@ +// +// MRMethodCopier.m +// MRProgress +// +// Created by Marius Rackwitz on 31.05.14. +// Copyright (c) 2014 Marius Rackwitz. All rights reserved. +// + +#import "MRMethodCopier.h" +#import + + +@implementation MRMethodCopier + ++ (instancetype)copierFromClass:(Class)originClass toClass:(Class)targetClass { + MRMethodCopier *copier = [self new]; + copier.originClass = originClass; + copier.targetClass = targetClass; + return copier; +} + +- (void)copyInstanceMethod:(SEL)selector { + Method originMethod = class_getInstanceMethod(self.originClass, selector); + IMP originImplementation = method_getImplementation(originMethod); + NSAssert(originImplementation != NULL, @"Didn't found method %@ on origin class %@.", NSStringFromSelector(selector), self.originClass); + const char *methodTypes = method_getTypeEncoding(originMethod); +#if defined(NS_BLOCK_ASSERTIONS) + __attribute__((__unused__)) BOOL success; +#else + BOOL success; +#endif + success = class_addMethod(self.targetClass, selector, originImplementation, methodTypes); + NSAssert(success, @"Failed to copy method %@ from origin class %@ to target class %@.", NSStringFromSelector(selector), self.originClass, self.targetClass); +} + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRProgressHelper.h b/src/ios/GMImagePicker/mrprogress/Utils/MRProgressHelper.h new file mode 100755 index 00000000..02131706 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRProgressHelper.h @@ -0,0 +1,50 @@ +// +// MRProgressHelper.h +// MRProgress +// +// Created by Marius Rackwitz on 14.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import +#import + + +static inline CGFloat MRCGFloatCeil(CGFloat); + +#if defined(__LP64__) && __LP64__ + static inline CGFloat MRCGFloatCeil(CGFloat x) { + return ceil(x); + } +#else + static inline CGFloat MRCGFloatCeil(CGFloat x) { + return ceilf(x); + } +#endif + + +static inline BOOL MRSystemVersionGreaterThanOrEqualTo8() { + return [NSProcessInfo.processInfo respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)]; +} + + +static inline CGRect MRCenterCGSizeInCGRect(CGSize innerRectSize, CGRect outerRect) { + CGRect innerRect; + innerRect.size = innerRectSize; + innerRect.origin.x = outerRect.origin.x + (outerRect.size.width - innerRectSize.width) / 2.0f; + innerRect.origin.y = outerRect.origin.y + (outerRect.size.height - innerRectSize.height) / 2.0f; + return innerRect; +} + + +static inline CGFloat MRRotationForStatusBarOrientation() { + UIInterfaceOrientation orientation = UIApplication.sharedApplication.statusBarOrientation; + if (orientation == UIInterfaceOrientationLandscapeLeft) { + return -M_PI_2; + } else if (orientation == UIInterfaceOrientationLandscapeRight) { + return M_PI_2; + } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) { + return M_PI; + } + return 0; +} diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.h b/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.h new file mode 100755 index 00000000..61d6d3d7 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.h @@ -0,0 +1,31 @@ +// +// MRWeakProxy.h +// MRProgress +// +// Created by Marius Rackwitz on 22.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import + + +/** + Weak proxy to use in places where parameters will be retained, but should not. + */ +@interface MRWeakProxy : NSProxy + +/** + Target object. + + All selectors called on receiver will be redirected to this instance. + */ +@property (nonatomic, weak) id target; + +/** + Return a new weak proxy with given target. + + @param target The target object + */ ++ (instancetype)weakProxyWithTarget:(id)target; + +@end diff --git a/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.m b/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.m new file mode 100755 index 00000000..0dab7b13 --- /dev/null +++ b/src/ios/GMImagePicker/mrprogress/Utils/MRWeakProxy.m @@ -0,0 +1,32 @@ +// +// MRWeakProxy.m +// MRProgress +// +// Created by Marius Rackwitz on 22.10.13. +// Copyright (c) 2013 Marius Rackwitz. All rights reserved. +// + +#import "MRWeakProxy.h" + + +@implementation MRWeakProxy + ++ (instancetype)weakProxyWithTarget:(id)target { + MRWeakProxy *proxy = [self alloc]; + proxy.target = target; + return proxy; +} + +- (BOOL)respondsToSelector:(SEL)sel { + return [_target respondsToSelector:sel] || [super respondsToSelector:sel]; +} + +- (id)forwardingTargetForSelector:(SEL)sel { + return _target; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel { + return [_target methodSignatureForSelector:sel]; +} + +@end diff --git a/src/ios/GMImagePicker/pt.lproj/GMImagePicker.strings b/src/ios/GMImagePicker/pt.lproj/GMImagePicker.strings new file mode 100755 index 0000000000000000000000000000000000000000..2f3caedc52aff22f63d39f060d64a1ca00c41e68 GIT binary patch literal 1586 zcmb_c+fKqj5IxU)1!?q!q!6BsiAD_}A`okQUrIqDx7flj`UU=g@BV^%X18^=q{N^+ zv^zU9JLk-0_v^ET2I{zi!4feN%(-izg&G2^F{AF8+7~owH`r1$<(hF_QPZSdPlgy_ zLtAET0VAFB3rf)qV+A;4{2EaN``UUZ2jY(NQ~NLnxZT0&SMaZsu`sG*%q%CAH>^O$ zy=0hCK9rZ9)BHQQLl+B1pEBOit7^Ftr??<;m$(VNQ_2w~;SgKhn40R|q@G{VnMIz< zjD3_Cq0PueR&EZ{p)BaNB+`o5Rm_HXqRrWl&28<)_Sv;@VymJV#`)|S_RQ>I`bZz? zsAO_%rg8_0*gjL~-4-97&7bl%ty;hTaZ1Tx$yst;)ygRwL7U{gnsUAkcQgLWT@^2_ z)G;|}jmn&~K4m7C%tc-v%|-fFJ?k0s7}?yLl;m7kIu}wS9x~I4e$Q&m`N>T;{Kt5= zH&SX-<`U(4c?E=*ylL(>{>~@;IU8DT#o3V4olqllBk!NSj05y=!x!=uZ(Ji Date: Wed, 19 Aug 2015 22:45:00 +0200 Subject: [PATCH 05/10] Changed usage of ELC=>GM as dependency --- src/ios/SOSPicker.h | 5 +- src/ios/SOSPicker.m | 226 +++++++++++++++++++------------------------- 2 files changed, 98 insertions(+), 133 deletions(-) diff --git a/src/ios/SOSPicker.h b/src/ios/SOSPicker.h index 71081eca..49594e36 100644 --- a/src/ios/SOSPicker.h +++ b/src/ios/SOSPicker.h @@ -7,10 +7,9 @@ // #import -#import "ELCAlbumPickerController.h" -#import "ELCImagePickerController.h" -@interface SOSPicker : CDVPlugin + +@interface SOSPicker : CDVPlugin < UINavigationControllerDelegate, UIScrollViewDelegate> @property (copy) NSString* callbackId; diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index da08db24..106d5eaa 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -7,157 +7,123 @@ // #import "SOSPicker.h" -#import "ELCAlbumPickerController.h" -#import "ELCImagePickerController.h" -#import "ELCAssetTablePicker.h" + + +#import "GMImagePickerController.h" +#import "GMFetchItem.h" #define CDV_PHOTO_PREFIX @"cdv_photo_" -@implementation SOSPicker + +@interface SOSPicker () +@end + +@implementation SOSPicker @synthesize callbackId; - (void) getPictures:(CDVInvokedUrlCommand *)command { - NSDictionary *options = [command.arguments objectAtIndex: 0]; - - NSInteger maximumImagesCount = [[options objectForKey:@"maximumImagesCount"] integerValue]; - self.width = [[options objectForKey:@"width"] integerValue]; - self.height = [[options objectForKey:@"height"] integerValue]; - self.quality = [[options objectForKey:@"quality"] integerValue]; - - // Create the an album controller and image picker - ELCAlbumPickerController *albumController = [[ELCAlbumPickerController alloc] init]; - - if (maximumImagesCount == 1) { - albumController.immediateReturn = true; - albumController.singleSelection = true; - } else { - albumController.immediateReturn = false; - albumController.singleSelection = false; - } - - ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] initWithRootViewController:albumController]; - imagePicker.maximumImagesCount = maximumImagesCount; - imagePicker.returnsOriginalImage = 1; - imagePicker.imagePickerDelegate = self; - - albumController.parent = imagePicker; - self.callbackId = command.callbackId; - // Present modally - [self.viewController presentViewController:imagePicker - animated:YES - completion:nil]; + + NSArray * args = [ command arguments ]; + + BOOL allow_video = [ [ args[0] objectForKey:@"allow_video" ] boolValue ]; + NSString * title = [args[0] objectForKey:@"title"]; + NSString * message = [args[0] objectForKey:@"message"]; + + self.callbackId = command.callbackId; + [self launchGMImagePicker:allow_video title:title message:message]; } +- (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(NSString *)message +{ + GMImagePickerController *picker = [[GMImagePickerController alloc] init:allow_video]; + picker.delegate = self; + picker.title = title; + picker.customNavigationBarPrompt = message; + picker.colsInPortrait = 4; + picker.colsInLandscape = 6; + picker.minimumInteritemSpacing = 2.0; + picker.modalPresentationStyle = UIModalPresentationPopover; + + UIPopoverPresentationController *popPC = picker.popoverPresentationController; + popPC.permittedArrowDirections = UIPopoverArrowDirectionAny; + popPC.sourceView = picker.view; + //popPC.sourceRect = nil; + + [self.viewController showViewController:picker sender:nil]; +} -- (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info { - CDVPluginResult* result = nil; - NSMutableArray *resultStrings = [[NSMutableArray alloc] init]; - NSData* data = nil; - NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath]; - NSError* err = nil; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - NSString* filePath; - ALAsset* asset = nil; - UIImageOrientation orientation = UIImageOrientationUp;; - CGSize targetSize = CGSizeMake(self.width, self.height); - for (NSDictionary *dict in info) { - asset = [dict objectForKey:@"ALAsset"]; - // From ELCImagePickerController.m - - int i = 1; - do { - filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_PHOTO_PREFIX, i++, @"jpg"]; - } while ([fileMgr fileExistsAtPath:filePath]); - - @autoreleasepool { - ALAssetRepresentation *assetRep = [asset defaultRepresentation]; - CGImageRef imgRef = NULL; - - //defaultRepresentation returns image as it appears in photo picker, rotated and sized, - //so use UIImageOrientationUp when creating our image below. - if (picker.returnsOriginalImage) { - imgRef = [assetRep fullResolutionImage]; - orientation = [assetRep orientation]; - } else { - imgRef = [assetRep fullScreenImage]; - } - - UIImage* image = [UIImage imageWithCGImage:imgRef scale:1.0f orientation:orientation]; - if (self.width == 0 && self.height == 0) { - data = UIImageJPEGRepresentation(image, self.quality/100.0f); - } else { - UIImage* scaledImage = [self imageByScalingNotCroppingForSize:image toSize:targetSize]; - data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f); - } - - if (![data writeToFile:filePath options:NSAtomicWrite error:&err]) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]]; - break; - } else { - [resultStrings addObject:[[NSURL fileURLWithPath:filePath] absoluteString]]; - } - } - } - - if (nil == result) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:resultStrings]; - } +- (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize +{ + return nil; +} + + +#pragma mark - UIImagePickerControllerDelegate + - [self.viewController dismissViewControllerAnimated:YES completion:nil]; - [self.commandDelegate sendPluginResult:result callbackId:self.callbackId]; +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info +{ + + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + NSLog(@"UIImagePickerController: User ended picking assets"); + + } -- (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker { - [self.viewController dismissViewControllerAnimated:YES completion:nil]; - CDVPluginResult* pluginResult = nil; - NSArray* emptyArray = [NSArray array]; - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:emptyArray]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; +- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker +{ + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + NSLog(@"UIImagePickerController: User pressed cancel button"); } -- (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize +#pragma mark - GMImagePickerControllerDelegate + +- (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)fetchArray { - UIImage* sourceImage = anImage; - UIImage* newImage = nil; - CGSize imageSize = sourceImage.size; - CGFloat width = imageSize.width; - CGFloat height = imageSize.height; - CGFloat targetWidth = frameSize.width; - CGFloat targetHeight = frameSize.height; - CGFloat scaleFactor = 0.0; - CGSize scaledSize = frameSize; - - if (CGSizeEqualToSize(imageSize, frameSize) == NO) { - CGFloat widthFactor = targetWidth / width; - CGFloat heightFactor = targetHeight / height; - - // opposite comparison to imageByScalingAndCroppingForSize in order to contain the image within the given bounds - if (widthFactor == 0.0) { - scaleFactor = heightFactor; - } else if (heightFactor == 0.0) { - scaleFactor = widthFactor; - } else if (widthFactor > heightFactor) { - scaleFactor = heightFactor; // scale to fit height - } else { - scaleFactor = widthFactor; // scale to fit width + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + + NSLog(@"GMImagePicker: User ended picking assets. Number of selected items is: %lu", (unsigned long)fetchArray.count); + + CDVPluginResult* result = nil; + //NSMutableDictionary * result_all = [[NSMutableDictionary alloc] init]; + + NSMutableArray * result_all = [[NSMutableArray alloc] init]; + + for (GMFetchItem *item in fetchArray) { + + if ( !item.image_fullsize || !item.image_thumb ) { + continue; } - scaledSize = CGSizeMake(width * scaleFactor, height * scaleFactor); + + NSMutableDictionary * result_item = [[NSMutableDictionary alloc] init]; + + [ result_item setValue:item.image_fullsize forKey:@"original" ]; + [ result_item setValue:item.image_thumb forKey:@"thumb" ]; + + [ result_all addObject:result_item ]; } - - UIGraphicsBeginImageContext(scaledSize); // this will resize - - [sourceImage drawInRect:CGRectMake(0, 0, scaledSize.width, scaledSize.height)]; - - newImage = UIGraphicsGetImageFromCurrentImageContext(); - if (newImage == nil) { - NSLog(@"could not scale image"); + + //[ result_all setObject:result_fullsize forKey:@"actual" ]; + //[ result_all setObject:result_thumbnail forKey:@"thumb" ]; + + result = nil; + if (nil == result) { + //result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:resultStrings]; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:result_all]; } + + [self.viewController dismissViewControllerAnimated:YES completion:nil]; + [self.commandDelegate sendPluginResult:result callbackId:self.callbackId]; + +} - // pop the context to get back to the default - UIGraphicsEndImageContext(); - return newImage; +//Optional implementation: +-(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker +{ + NSLog(@"GMImagePicker: User pressed cancel button"); } + @end From 2aab5cd4b7c36082ee8c8e92793f168180a4c338 Mon Sep 17 00:00:00 2001 From: hanssens Date: Wed, 19 Aug 2015 22:48:21 +0200 Subject: [PATCH 06/10] Android plugin now supports thumbnails as well --- src/android/Library/libs/commons-io-2.4.jar | Bin 0 -> 185140 bytes src/android/Library/libs/gson-2.3.1.jar | Bin 0 -> 210856 bytes src/android/Library/src/FileNameItem.java | 65 +++++++++ src/android/Library/src/ImageFetcher.java | 127 +++++++++++++++++- .../src/MultiImageChooserActivity.java | 98 +++++++++++--- .../synconset/ImagePicker/ImagePicker.java | 50 ++++++- 6 files changed, 315 insertions(+), 25 deletions(-) create mode 100644 src/android/Library/libs/commons-io-2.4.jar create mode 100644 src/android/Library/libs/gson-2.3.1.jar create mode 100644 src/android/Library/src/FileNameItem.java diff --git a/src/android/Library/libs/commons-io-2.4.jar b/src/android/Library/libs/commons-io-2.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..90035a4fe068e65d42edf621a0ffc78b4b020cdc GIT binary patch literal 185140 zcmbTdbC6`=vOPL&+wPvWZQHh4ZQGi*ZQHhO+nlyBZM-=@o_pUtH_m$%v8(Ej%*Y+P zGQV7FWtM_82q^TAf4p21rUd@Sm;dz!_4iX&R7H?hQcjFs;eVMy{&4wg=Gj|8{|orX zj{xu=KT!YKOjb}%QcP4?g-%v1S;f$7b-eI;D8UZx=|#eA#N&AZh(Mgq_(gjfpZP4(kn+3q=Zi$Vq1tySrEl=dJGrCX$d) zN*rDqOFv*xHGv|XQ%JW*EvrBM#5tSKcSeiAze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Om6-8 z5dM9`QT^e&#=<$;e}5@)Cfd@7?$BmqE5>zgZZNEY0`Lv3EB;fVkUMRPrEfATP+Q@+ zr#Yu}Zd%tyx$|Q0h1$UYH zY6R?9gFy2X-?j3ZLO(&G9!kOeUrklXNc!GXti!c7&>lYv~EGyT0L zP)LmJbMp&*;jfRd6U>*cFFJV5M<>OlaqUizY-%tJ4|Z<_?C^xQ@N!4xz7Tk%7!InB zq~OzScOM<(+T(rA;z^GF_J@=FKSfE*#xj$C#5vqo2Yp0Fx&>W#SyZcYNLtmxk1=Q* zth;sT9~__qiw0Md(L$cf&D+;90m^Ck3iD<#H)nQ5dx08_6Gdy9F~xkRQzU3mW=4j| z>Zs`(k-KL`c)cY*Aq~O>#ps4AMb?SCcDOUjNi5s;EjkX90#GM9ab~?V)H8`3^Z59> z$sri{RK%8_HTm&6n4_(B;{;Q**=$Q?&m7dlK=Y?!c8>%42LgKQL4K0*PVSe34hO-k+pbao)lduG@u1$1ILdUnNoJNp4S60zjV*TK==qswF3JZ^u9 z1rw3!44T?qKWDBrNyM&cSz|4$a~V|^70UH<=8mlPSU@4sG0~hcq^UeYSv8Gzq1d4F! z+SX;!b1=f+5q7@17cU|(v#k!}%O2wXWJ#=FE?`dsHiR?&)qD{)!DgMvIadF5rdJ|D zH#4u=kVHJV@eS|6iP91_xLKVdjQRpHt1CBh`%kbORYK7}GE_T};T6moA*hpOM&uO{(h-Q@HFR_*}p z$9(t+ybW)>xj!pu#;W=JlDqxd&zJC+bINovb$qJ5kd-(7^d4PIz5ZhDb)NisDeV*q zs&})iyC<}FX7Zz+@ta7%7Q&k2C2AgMudm}b4W}cw-9zRMN?g9_K633PKYXE$hAw#^ zkxw=4ohW>%m{To*yw_n!IYN6iKzmLXoR@V0<>S-7O3#T9}i-0cD*;vYoX8w_jl OZ$92#YJ45aW%wUD7hlN$ literal 0 HcmV?d00001 diff --git a/src/android/Library/src/FileNameItem.java b/src/android/Library/src/FileNameItem.java new file mode 100644 index 00000000..ea31b05e --- /dev/null +++ b/src/android/Library/src/FileNameItem.java @@ -0,0 +1,65 @@ +package com.synconset; + +import org.json.JSONException; +import org.json.JSONObject; + +import android.os.Parcel; +import android.os.Parcelable; + +public class FileNameItem implements Parcelable{ + public String thumb; + public String original; + public Integer rotation; + + public FileNameItem(){ + super(); + } + + public FileNameItem(Parcel in) { + super(); + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public FileNameItem createFromParcel(Parcel in) { + return new FileNameItem(in); + } + + public FileNameItem[] newArray(int size) { + + return new FileNameItem[size]; + } + + }; + + public void readFromParcel(Parcel in) { + thumb = in.readString(); + original = in.readString(); + rotation = in.readInt(); + } + + @Override + public int describeContents() { + // TODO Auto-generated method stub + return 0; + } + @Override + public void writeToParcel(Parcel dest, int flags ) { + // TODO Auto-generated method stub + dest.writeString(thumb); + dest.writeString(original); + dest.writeInt(rotation); + } + + /*public JSONObject getJSONObject() { + JSONObject obj = new JSONObject(); + try { + obj.put("thumb", thumb); + obj.put("original", orginal); + obj.put("rotation", rotation); + } catch (JSONException e) { + //trace("DefaultListItem.toString JSONException: "+e.getMessage()); + } + return obj; + }*/ +} diff --git a/src/android/Library/src/ImageFetcher.java b/src/android/Library/src/ImageFetcher.java index 88255bd8..9564df26 100644 --- a/src/android/Library/src/ImageFetcher.java +++ b/src/android/Library/src/ImageFetcher.java @@ -16,23 +16,32 @@ package com.synconset; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; import java.lang.ref.SoftReference; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.LinkedHashMap; +import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; +import org.apache.commons.io.FileUtils; + import android.content.Context; import android.graphics.Bitmap; +import android.graphics.Bitmap.CompressFormat; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.Matrix; import android.os.AsyncTask; import android.os.Build; +import android.os.Environment; import android.os.Handler; import android.provider.MediaStore; import android.util.Log; @@ -54,13 +63,43 @@ * performance. */ public class ImageFetcher { - + private int colWidth; private long origId; private ExecutorService executor; - public ImageFetcher() { + File dir_thumb; + private Context context; + private Map thumbnails = new HashMap(); + + public ImageFetcher( Context ct ) { + context = ct; executor = Executors.newCachedThreadPool(); + + dir_thumb = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES),"thumb"); + if( !dir_thumb.isDirectory() && !dir_thumb.mkdir() ){ + // failed + } + + try { + FileUtils.cleanDirectory(dir_thumb); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + /** + * Get Thumb URL + * @param id + * @return + */ + public String getThumbFilePath( Integer id ){ + + String url = thumbnails.get(id); + + return url; } public void fetch(Integer id, ImageView imageView, int colWidth, int rotate) { @@ -230,6 +269,10 @@ protected void onPostExecute(Bitmap bitmap) { if (isCancelled()) { bitmap = null; } + + // store bitmap to private storage + storeBitmapToPrivate(position, bitmap); + addBitmapToCache(position, bitmap); if (imageViewReference != null) { ImageView imageView = imageViewReference.get(); @@ -245,6 +288,86 @@ protected void onPostExecute(Bitmap bitmap) { } } } + + /** + * Save Thumbnail to private storage. + */ + boolean storeBitmapToPrivate( Integer position, Bitmap bitmap ){ + + if( thumbnails.containsKey(position) ){ + return true; + } + + /*String state = Environment.getExternalStorageState(); + if ( !Environment.MEDIA_MOUNTED.equals(state)) { + return false; + } + */ + + if( !dir_thumb.isDirectory() ){ + return false; + } + + String state = Environment.getExternalStorageState(); + if ( !Environment.MEDIA_MOUNTED.equals(state)) { + return false; + } + + File file_thumb; + + try { + file_thumb = File.createTempFile("thumb", null, dir_thumb ); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return false; + } + + String url_thumb = file_thumb.getAbsolutePath(); + + if( !saveBitmapToFileCache(bitmap, file_thumb) ){ + file_thumb.delete(); + return false; + } + + thumbnails.put( position, url_thumb ); + + return true; + } + + private boolean saveBitmapToFileCache(Bitmap bitmap, File file_thumb ) { + + //File fileCacheItem = new File(strFilePath); + OutputStream out = null; + + boolean result = false; + + try + { + //result= fileCacheItem.createNewFile(); + out = new FileOutputStream(file_thumb); + + bitmap.compress(CompressFormat.JPEG, 100, out); + } + catch (Exception e) + { + e.printStackTrace(); + } + finally + { + try + { + out.close(); + result = true; + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + return result; + } /** * A fake Drawable that will be attached to the imageView while the download diff --git a/src/android/Library/src/MultiImageChooserActivity.java b/src/android/Library/src/MultiImageChooserActivity.java index fb163853..278c54fb 100644 --- a/src/android/Library/src/MultiImageChooserActivity.java +++ b/src/android/Library/src/MultiImageChooserActivity.java @@ -96,7 +96,10 @@ public class MultiImageChooserActivity extends Activity implements OnItemClickLi private static final int CURSORLOADER_THUMBS = 0; private static final int CURSORLOADER_REAL = 1; + private Map fileNameGroup = new HashMap(); + private Map fileNames = new HashMap(); + ArrayList thumbFileNames = new ArrayList(); private SparseBooleanArray checkStatus = new SparseBooleanArray(); @@ -109,7 +112,7 @@ public class MultiImageChooserActivity extends Activity implements OnItemClickLi private GridView gridView; - private final ImageFetcher fetcher = new ImageFetcher(); + private ImageFetcher fetcher; private int selectedColor = 0xff32b2e1; private boolean shouldRequestThumb = true; @@ -121,6 +124,9 @@ public class MultiImageChooserActivity extends Activity implements OnItemClickLi @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + fetcher = new ImageFetcher( getApplicationContext() ); + fakeR = new FakeR(this); setContentView(fakeR.getId("layout", "multiselectorgrid")); fileNames.clear(); @@ -179,12 +185,18 @@ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCoun @Override public void onItemClick(AdapterView arg0, View view, int position, long id) { - String name = getImageName(position); + + String name = getImageName(position); + String name_thumb = getImageThumbName(position); + int rotation = getImageRotation(position); - if (name == null) { + if (name == null || name_thumb == null ) { return; } + + boolean be_in_group = fileNameGroup.containsKey( position ); + boolean isChecked = !isChecked(position); if (maxImages == 0 && isChecked) { isChecked = false; @@ -199,7 +211,20 @@ public void onClick(DialogInterface dialog, int which) { AlertDialog alert = builder.create(); alert.show(); } else if (isChecked) { + + if( !be_in_group ){ + + FileNameItem fileNameItem = new FileNameItem(); + fileNameItem.original = name; + fileNameItem.thumb = name_thumb; + fileNameItem.rotation = rotation; + + fileNameGroup.put( position, fileNameItem ); + } + fileNames.put(name, new Integer(rotation)); + thumbFileNames.add( name_thumb ); + if (maxImageCount == 1) { this.selectClicked(null); } else { @@ -213,7 +238,13 @@ public void onClick(DialogInterface dialog, int which) { view.setBackgroundColor(selectedColor); } } else { + + if( be_in_group ){ + fileNameGroup.remove(position); + } fileNames.remove(name); + thumbFileNames.remove(name_thumb); + maxImages++; ImageView imageView = (ImageView)view; if (android.os.Build.VERSION.SDK_INT>=16) { @@ -296,12 +327,14 @@ public void selectClicked(View ignored) { getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done")).setEnabled(false); progress.show(); Intent data = new Intent(); - if (fileNames.isEmpty()) { + /*if (fileNames.isEmpty()) {*/ + if (fileNameGroup.isEmpty()) { this.setResult(RESULT_CANCELED); progress.dismiss(); finish(); } else { - new ResizeImagesTask().execute(fileNames.entrySet()); + /*new ResizeImagesTask().execute(fileNames.entrySet());*/ + new ResizeImagesTask().execute(fileNameGroup.entrySet()); } } @@ -310,9 +343,13 @@ public void selectClicked(View ignored) { * Helper Methods ********************/ private void updateAcceptButton() { + /*((TextView) getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done_textview"))) + .setEnabled(fileNames.size() != 0);*/ ((TextView) getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done_textview"))) - .setEnabled(fileNames.size() != 0); - getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done")).setEnabled(fileNames.size() != 0); + .setEnabled(fileNameGroup.size() != 0); + + /*getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done")).setEnabled(fileNames.size() != 0);*/ + getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done")).setEnabled(fileNameGroup.size() != 0); } private void setupHeader() { @@ -371,6 +408,16 @@ private String getImageName(int position) { return name; } + private String getImageThumbName( int position ){ + + imagecursor.moveToPosition(position); + int id = imagecursor.getInt(image_column_index); + + String name = fetcher.getThumbFilePath(id); + + return name; + } + private int getImageRotation(int position) { actualimagecursor.moveToPosition(position); int rotation = 0; @@ -480,20 +527,21 @@ public View getView(int pos, View convertView, ViewGroup parent) { } - private class ResizeImagesTask extends AsyncTask>, Void, ArrayList> { + /*private class ResizeImagesTask extends AsyncTask>, Void, ArrayList> {*/ + private class ResizeImagesTask extends AsyncTask>, Void, ArrayList> { private Exception asyncTaskError = null; @Override - protected ArrayList doInBackground(Set>... fileSets) { - Set> fileNames = fileSets[0]; - ArrayList al = new ArrayList(); + protected ArrayList doInBackground(Set>... fileSets) { + Set> fileNames = fileSets[0]; + ArrayList al = new ArrayList(); try { - Iterator> i = fileNames.iterator(); + Iterator> i = fileNames.iterator(); Bitmap bmp; while(i.hasNext()) { - Entry imageInfo = i.next(); - File file = new File(imageInfo.getKey()); - int rotate = imageInfo.getValue().intValue(); + Entry imageInfo = i.next(); + File file = new File(imageInfo.getValue().original); + int rotate = imageInfo.getValue().rotation; BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 1; options.inJustDecodeBounds = true; @@ -538,27 +586,33 @@ protected ArrayList doInBackground(Set>... fileSe } file = this.storeImage(bmp, file.getName()); - al.add(Uri.fromFile(file).toString()); + //al.add(Uri.fromFile(file).toString()); + FileNameItem filenameitem = new FileNameItem(); + filenameitem.original = Uri.fromFile(file).toString(); + filenameitem.thumb = imageInfo.getValue().thumb; + filenameitem.rotation = imageInfo.getValue().rotation; + al.add(filenameitem); + fileNameGroup.get( imageInfo.getKey()).original = Uri.fromFile(file).toString(); } return al; } catch(IOException e) { try { asyncTaskError = e; for (int i = 0; i < al.size(); i++) { - URI uri = new URI(al.get(i)); + URI uri = new URI(al.get(i).original); File file = new File(uri); file.delete(); } } catch(Exception exception) { // the finally does what we want to do } finally { - return new ArrayList(); + return new ArrayList(); } } } @Override - protected void onPostExecute(ArrayList al) { + protected void onPostExecute(ArrayList al) { Intent data = new Intent(); if (asyncTaskError != null) { @@ -568,7 +622,9 @@ protected void onPostExecute(ArrayList al) { setResult(RESULT_CANCELED, data); } else if (al.size() > 0) { Bundle res = new Bundle(); - res.putStringArrayList("MULTIPLEFILENAMES", al); + res.putParcelableArrayList("MULTIPLEFILENAMES", al); + /*res.putStringArrayList("MULTIPLEFILENAMES", al); + res.putStringArrayList("MULTIPLEFILETHUMBNAMES", thumbFileNames );*/ if (imagecursor != null) { res.putInt("TOTALFILES", imagecursor.getCount()); } @@ -617,7 +673,7 @@ private File storeImage(Bitmap bmp, String fileName) throws IOException { int index = fileName.lastIndexOf('.'); String name = fileName.substring(0, index); String ext = fileName.substring(index); - File file = File.createTempFile(name, ext); + File file = File.createTempFile( "_"+name+"_", ext); OutputStream outStream = new FileOutputStream(file); if (ext.compareToIgnoreCase(".png") == 0) { bmp.compress(Bitmap.CompressFormat.PNG, quality, outStream); diff --git a/src/android/com/synconset/ImagePicker/ImagePicker.java b/src/android/com/synconset/ImagePicker/ImagePicker.java index 2f4939af..c2ec8662 100644 --- a/src/android/com/synconset/ImagePicker/ImagePicker.java +++ b/src/android/com/synconset/ImagePicker/ImagePicker.java @@ -3,17 +3,24 @@ */ package com.synconset; +import org.apache.commons.io.output.FileWriterWithEncoding; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaPlugin; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.json.JSONStringer; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; import java.util.ArrayList; +import java.util.HashMap; import android.app.Activity; import android.content.Intent; +import android.os.Bundle; import android.util.Log; public class ImagePicker extends CordovaPlugin { @@ -56,8 +63,47 @@ public boolean execute(String action, final JSONArray args, final CallbackContex public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == Activity.RESULT_OK && data != null) { - ArrayList fileNames = data.getStringArrayListExtra("MULTIPLEFILENAMES"); - JSONArray res = new JSONArray(fileNames); + + //HashMap result = new HashMap(); + + //ArrayList fileNames = data.getStringArrayListExtra("MULTIPLEFILENAMES"); + //ArrayList fileThumbNames = data.getStringArrayListExtra("MULTIPLEFILETHUMBNAMES"); + + ArrayList fileNameList = new ArrayList(); + + Bundle bundle = data.getExtras(); + if( bundle != null ){ + fileNameList = bundle.getParcelableArrayList("MULTIPLEFILENAMES"); + } + + Gson gson = new Gson(); + String str_json = gson.toJson(fileNameList); + JSONArray res; + try { + res = new JSONArray(str_json); + } catch (JSONException e) { + // TODO Auto-generated catch block + String error = "error"; + this.callbackContext.error(error); + return; + } + //JsonArray res = gson.toJsonTree(fileNameList).getAsJsonArray(); + + //result.put( "actual", fileNames ); + //result.put("thumb", fileThumbNames ); + + //JSONObject res_object = new JSONObject(result); + //JSONArray res = new JSONArray(fileNameList); + + //JSONArray res = new JSONArray(fileNames); + /*JSONArray res = new JSONArray(); + try { + res = new JSONArray( "[" + res_object.toString() + "]" ); + } catch (JSONException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + this.callbackContext.success(res); } else if (resultCode == Activity.RESULT_CANCELED && data != null) { String error = data.getStringExtra("ERRORMESSAGE"); From a2ec5ca8f00bdd725d16823ebf5f045ad6fe515e Mon Sep 17 00:00:00 2001 From: hanssens Date: Thu, 20 Aug 2015 21:06:10 +0200 Subject: [PATCH 07/10] Give new options/parameters a default value - New option "allow_video": which enables or disables selection of video's - New option "title": provide a custom title in the header of the selection screen - New option "message": provide a custom subtitle in the header of the selection screen --- www/imagepicker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/imagepicker.js b/www/imagepicker.js index 843dbda6..ba78d60f 100644 --- a/www/imagepicker.js +++ b/www/imagepicker.js @@ -30,7 +30,10 @@ ImagePicker.prototype.getPictures = function(success, fail, options) { maximumImagesCount: options.maximumImagesCount ? options.maximumImagesCount : 15, width: options.width ? options.width : 0, height: options.height ? options.height : 0, - quality: options.quality ? options.quality : 100 + quality: options.quality ? options.quality : 100, + allow_video: options.allow_video ? options.allow_video : false, + title: options.title ? options.title : 'Custom Title', + message: options.message ? options.message : 'Custom helper message', }; return cordova.exec(success, fail, "ImagePicker", "getPictures", [params]); From 54444b9c7e1636d5bc1fb177e002ff7b9b60ec78 Mon Sep 17 00:00:00 2001 From: hanssens Date: Thu, 20 Aug 2015 21:15:44 +0200 Subject: [PATCH 08/10] Updated references to GMImagePicker - Updated header and source files to reflect GMImagePicker - Suggested version increment to to v2.0.0 --- plugin.xml | 179 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 161 insertions(+), 18 deletions(-) diff --git a/plugin.xml b/plugin.xml index 7fc9ffbb..14f35973 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.0.0"> ImagePicker @@ -30,30 +30,169 @@ + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - @@ -78,6 +217,7 @@ + @@ -106,5 +246,8 @@ + + + From b4cee77d668f1d08dd59a141143a805a8552d706 Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Wed, 28 Oct 2015 18:34:02 +0100 Subject: [PATCH 09/10] #4 The name of my app on android is now ImagePicker --- plugin.xml | 12 +++--------- src/android/Library/res/values-de/strings.xml | 7 ------- src/android/Library/res/values-es/strings.xml | 7 ------- src/android/Library/res/values-fr/strings.xml | 7 ------- src/android/Library/res/values-hu/strings.xml | 7 ------- src/android/Library/res/values-ja/strings.xml | 7 ------- src/android/Library/res/values-ko/strings.xml | 7 ------- src/android/ignorelinterrors.gradle | 5 +++++ 8 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 src/android/Library/res/values-de/strings.xml delete mode 100644 src/android/Library/res/values-es/strings.xml delete mode 100644 src/android/Library/res/values-fr/strings.xml delete mode 100644 src/android/Library/res/values-hu/strings.xml delete mode 100644 src/android/Library/res/values-ja/strings.xml delete mode 100644 src/android/Library/res/values-ko/strings.xml create mode 100644 src/android/ignorelinterrors.gradle diff --git a/plugin.xml b/plugin.xml index b1b3201b..f8fffdfa 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.0.8"> ImagePicker @@ -79,7 +79,7 @@ - + @@ -107,12 +107,6 @@ - - - - - - - + diff --git a/src/android/Library/res/values-de/strings.xml b/src/android/Library/res/values-de/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-de/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/Library/res/values-es/strings.xml b/src/android/Library/res/values-es/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-es/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/Library/res/values-fr/strings.xml b/src/android/Library/res/values-fr/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-fr/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/Library/res/values-hu/strings.xml b/src/android/Library/res/values-hu/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-hu/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/Library/res/values-ja/strings.xml b/src/android/Library/res/values-ja/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-ja/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/Library/res/values-ko/strings.xml b/src/android/Library/res/values-ko/strings.xml deleted file mode 100644 index 6741b2ed..00000000 --- a/src/android/Library/res/values-ko/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - ImagePicker - ignore - https://app.icenium.com/appbuilder - icenium: - diff --git a/src/android/ignorelinterrors.gradle b/src/android/ignorelinterrors.gradle new file mode 100644 index 00000000..c1d8e4bc --- /dev/null +++ b/src/android/ignorelinterrors.gradle @@ -0,0 +1,5 @@ +android { + lintOptions { + checkReleaseBuilds false + } +} \ No newline at end of file From 3900d47c4e7c8b196492fc7f8a1ef584837a7dac Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Thu, 29 Oct 2015 22:04:55 +0100 Subject: [PATCH 10/10] #2 Support for iCloud photos on iOS - modifications --- demo/index.html | 53 ++++ plugin.xml | 25 +- .../src/MultiImageChooserActivity.java | 72 +++--- src/ios/GMImagePicker/GMGridViewCell.m | 2 +- src/ios/GMImagePicker/GMGridViewController.m | 3 +- src/ios/SOSPicker.m | 243 ++++++++++-------- www/imagepicker.js | 4 +- 7 files changed, 245 insertions(+), 157 deletions(-) diff --git a/demo/index.html b/demo/index.html index e69de29b..39d1f2c6 100644 --- a/demo/index.html +++ b/demo/index.html @@ -0,0 +1,53 @@ + + + + + + + + ImagePicker demo + + +
+

ImagePicker demo

+ + +
+ + + + +
+
+ + + \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index 36ac9f0a..a0f941c3 100644 --- a/plugin.xml +++ b/plugin.xml @@ -13,7 +13,7 @@ MIT - + @@ -31,8 +31,8 @@ - - + + @@ -76,6 +76,9 @@ + + @@ -187,11 +190,11 @@ - - - - - + + + + + @@ -217,8 +220,7 @@ - - + @@ -248,8 +250,5 @@ - - - diff --git a/src/android/Library/src/MultiImageChooserActivity.java b/src/android/Library/src/MultiImageChooserActivity.java index be98b34c..c275422c 100644 --- a/src/android/Library/src/MultiImageChooserActivity.java +++ b/src/android/Library/src/MultiImageChooserActivity.java @@ -64,7 +64,6 @@ import android.os.Bundle; import android.provider.MediaStore; import android.util.Base64; -import android.util.Log; import android.util.SparseBooleanArray; import android.view.Display; import android.view.LayoutInflater; @@ -105,7 +104,7 @@ public class MultiImageChooserActivity extends Activity implements OnItemClickLi private int maxImages; private int maxImageCount; - + private int desiredWidth; private int desiredHeight; private int quality; @@ -117,9 +116,9 @@ public class MultiImageChooserActivity extends Activity implements OnItemClickLi private int selectedColor = 0xff32b2e1; private boolean shouldRequestThumb = true; - + private FakeR fakeR; - + private ProgressDialog progress; @Override @@ -138,7 +137,7 @@ public void onCreate(Bundle savedInstanceState) { Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); - + colWidth = width / 4; gridView = (GridView) findViewById(fakeR.getId("id", "gridview")); @@ -181,7 +180,7 @@ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCoun progress.setTitle("Processing Images"); progress.setMessage("This may take a few moments"); } - + @Override public void onItemClick(AdapterView arg0, View view, int position, long id) { String name = getImageName(position); @@ -197,7 +196,7 @@ public void onItemClick(AdapterView arg0, View view, int position, long id) { builder.setTitle("Maximum " + maxImageCount + " Photos"); builder.setMessage("You can only select " + maxImageCount + " photos at a time."); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { + public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); @@ -290,7 +289,7 @@ public void onLoaderReset(Loader loader) { actualimagecursor = null; } } - + public void cancelClicked(View ignored) { setResult(RESULT_CANCELED); finish(); @@ -309,8 +308,8 @@ public void selectClicked(View ignored) { new ResizeImagesTask().execute(fileNames.entrySet()); } } - - + + /********************* * Helper Methods ********************/ @@ -375,7 +374,7 @@ private String getImageName(int position) { } return name; } - + private int getImageRotation(int position) { actualimagecursor.moveToPosition(position); int rotation = 0; @@ -387,13 +386,13 @@ private int getImageRotation(int position) { } return rotation; } - + public boolean isChecked(int position) { boolean ret = checkStatus.get(position); return ret; } - + /********************* * Nested Classes ********************/ @@ -407,8 +406,8 @@ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, widthMeasureSpec); } } - - + + private class ImageAdapter extends BaseAdapter { private final Bitmap mPlaceHolderBitmap; @@ -465,14 +464,14 @@ public View getView(int pos, View convertView, ViewGroup parent) { if (android.os.Build.VERSION.SDK_INT>=16) { imageView.setImageAlpha(128); } else { - imageView.setAlpha(128); + imageView.setAlpha(128); } imageView.setBackgroundColor(selectedColor); } else { if (android.os.Build.VERSION.SDK_INT>=16) { imageView.setImageAlpha(255); } else { - imageView.setAlpha(255); + imageView.setAlpha(255); } imageView.setBackgroundColor(Color.TRANSPARENT); } @@ -483,8 +482,8 @@ public View getView(int pos, View convertView, ViewGroup parent) { return imageView; } } - - + + private class ResizeImagesTask extends AsyncTask>, Void, ArrayList> { private Exception asyncTaskError = null; @@ -544,7 +543,7 @@ protected ArrayList doInBackground(Set>... fileSe if(outputType == OutputType.FILE_URI) { file = this.storeImage(bmp, file.getName()); - al.add(Uri.fromFile(file).toString()); + al.add(Uri.fromFile(file).toString()); } else if (outputType == OutputType.BASE64_STRING){ al.add(getBase64OfImage(bmp)); } @@ -558,14 +557,12 @@ protected ArrayList doInBackground(Set>... fileSe File file = new File(uri); file.delete(); } - } catch(Exception exception) { - // the finally does what we want to do - } finally { - return new ArrayList(); + } catch(Exception ignore) { } + return new ArrayList(); } } - + @Override protected void onPostExecute(ArrayList al) { Intent data = new Intent(); @@ -612,11 +609,11 @@ private Bitmap tryToGetBitmap(File file, BitmapFactory.Options options, int rota } return bmp; } - + /* * The following functions are originally from * https://github.com/raananw/PhoneGap-Image-Resizer - * + * * They have been modified by Andrew Stephan for Sync OnSet * * The software is open source, MIT Licensed. @@ -637,7 +634,7 @@ private File storeImage(Bitmap bmp, String fileName) throws IOException { outStream.close(); return file; } - + private Bitmap getResizedBitmap(Bitmap bm, float factor) { int width = bm.getWidth(); int height = bm.getHeight(); @@ -646,35 +643,34 @@ private Bitmap getResizedBitmap(Bitmap bm, float factor) { // resize the bit map matrix.postScale(factor, factor); // recreate the new Bitmap - Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); - return resizedBitmap; + return Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); } private String getBase64OfImage(Bitmap bm) { - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - bm.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + bm.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream); byte[] byteArray = byteArrayOutputStream .toByteArray(); return Base64.encodeToString(byteArray, Base64.DEFAULT); } } - + private int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { // Raw height and width of image final int height = options.outHeight; final int width = options.outWidth; int inSampleSize = 1; - + if (height > reqHeight || width > reqWidth) { final int halfHeight = height / 2; final int halfWidth = width / 2; - + // Calculate the largest inSampleSize value that is a power of 2 and keeps both // height and width larger than the requested height and width. while ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) { inSampleSize *= 2; } } - + return inSampleSize; } @@ -682,7 +678,7 @@ private int calculateNextSampleSize(int sampleSize) { double logBaseTwo = (int)(Math.log(sampleSize) / Math.log(2)); return (int)Math.pow(logBaseTwo + 1, 2); } - + private float calculateScale(int width, int height) { float widthScale = 1.0f; float heightScale = 1.0f; @@ -706,7 +702,7 @@ private float calculateScale(int width, int height) { } } } - + return scale; } diff --git a/src/ios/GMImagePicker/GMGridViewCell.m b/src/ios/GMImagePicker/GMGridViewCell.m index 685af2c6..7b44d88c 100755 --- a/src/ios/GMImagePicker/GMGridViewCell.m +++ b/src/ios/GMImagePicker/GMGridViewCell.m @@ -140,7 +140,7 @@ - (id)initWithFrame:(CGRect)frame _fetch.textColor = titleColor; _fetch.textAlignment = NSTextAlignmentCenter; _fetch.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height); - _fetch.text = @"fetching"; + _fetch.text = @""; // removed 'fetching' [self addSubview:_fetch]; } diff --git a/src/ios/GMImagePicker/GMGridViewController.m b/src/ios/GMImagePicker/GMGridViewController.m index 5f10e06c..cc20f872 100755 --- a/src/ios/GMImagePicker/GMGridViewController.m +++ b/src/ios/GMImagePicker/GMGridViewController.m @@ -403,7 +403,8 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ fetch_item.be_saving_img_thumb = false; - + + // TODO pass in quality if ( ![ UIImageJPEGRepresentation(result, 1.0f ) writeToFile:filePath atomically:YES ] ) { return; } diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index 1f017af7..0f1bc010 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -7,9 +7,10 @@ // #import "SOSPicker.h" -#import "ELCAlbumPickerController.h" -#import "ELCImagePickerController.h" -#import "ELCAssetTablePicker.h" + + +#import "GMImagePickerController.h" +#import "GMFetchItem.h" #define CDV_PHOTO_PREFIX @"cdv_photo_" @@ -18,114 +19,51 @@ BASE64_STRING = 1 } SOSPickerOutputType; -@implementation SOSPicker +@interface SOSPicker () +@end + +@implementation SOSPicker @synthesize callbackId; - (void) getPictures:(CDVInvokedUrlCommand *)command { - NSDictionary *options = [command.arguments objectAtIndex: 0]; - - NSInteger maximumImagesCount = [[options objectForKey:@"maximumImagesCount"] integerValue]; - self.width = [[options objectForKey:@"width"] integerValue]; - self.height = [[options objectForKey:@"height"] integerValue]; - self.quality = [[options objectForKey:@"quality"] integerValue]; + + NSDictionary *options = [command.arguments objectAtIndex: 0]; + self.outputType = [[options objectForKey:@"outputType"] integerValue]; + BOOL allow_video = [[options objectForKey:@"allow_video" ] boolValue ]; + NSString * title = [options objectForKey:@"title"]; + NSString * message = [options objectForKey:@"message"]; + if (message == (id)[NSNull null]) { + message = nil; + } + self.width = [[options objectForKey:@"width"] integerValue]; + self.height = [[options objectForKey:@"height"] integerValue]; + self.quality = [[options objectForKey:@"quality"] integerValue]; - // Create the an album controller and image picker - ELCAlbumPickerController *albumController = [[ELCAlbumPickerController alloc] init]; - - if (maximumImagesCount == 1) { - albumController.immediateReturn = true; - albumController.singleSelection = true; - } else { - albumController.immediateReturn = false; - albumController.singleSelection = false; - } - - ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] initWithRootViewController:albumController]; - imagePicker.maximumImagesCount = maximumImagesCount; - imagePicker.returnsOriginalImage = 1; - imagePicker.imagePickerDelegate = self; - - albumController.parent = imagePicker; - self.callbackId = command.callbackId; - // Present modally - [self.viewController presentViewController:imagePicker - animated:YES - completion:nil]; + self.callbackId = command.callbackId; + [self launchGMImagePicker:allow_video title:title message:message]; } - -- (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info { - CDVPluginResult* result = nil; - NSMutableArray *resultStrings = [[NSMutableArray alloc] init]; - NSData* data = nil; - NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath]; - NSError* err = nil; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - NSString* filePath; - ALAsset* asset = nil; - UIImageOrientation orientation = UIImageOrientationUp;; - CGSize targetSize = CGSizeMake(self.width, self.height); - for (NSDictionary *dict in info) { - asset = [dict objectForKey:@"ALAsset"]; - // From ELCImagePickerController.m - - int i = 1; - do { - filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_PHOTO_PREFIX, i++, @"jpg"]; - } while ([fileMgr fileExistsAtPath:filePath]); - - @autoreleasepool { - ALAssetRepresentation *assetRep = [asset defaultRepresentation]; - CGImageRef imgRef = NULL; - - //defaultRepresentation returns image as it appears in photo picker, rotated and sized, - //so use UIImageOrientationUp when creating our image below. - if (picker.returnsOriginalImage) { - imgRef = [assetRep fullResolutionImage]; - orientation = [assetRep orientation]; - } else { - imgRef = [assetRep fullScreenImage]; - } - - UIImage* image = [UIImage imageWithCGImage:imgRef scale:1.0f orientation:orientation]; - if (self.width == 0 && self.height == 0) { - data = UIImageJPEGRepresentation(image, self.quality/100.0f); - } else { - UIImage* scaledImage = [self imageByScalingNotCroppingForSize:image toSize:targetSize]; - data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f); - } - - if (![data writeToFile:filePath options:NSAtomicWrite error:&err]) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]]; - break; - } else { - if(self.outputType == BASE64_STRING){ - [resultStrings addObject:[data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]]; - } else { - [resultStrings addObject:[[NSURL fileURLWithPath:filePath] absoluteString]]; - } - } - } - - } - - if (nil == result) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:resultStrings]; - } - - [self.viewController dismissViewControllerAnimated:YES completion:nil]; - [self.commandDelegate sendPluginResult:result callbackId:self.callbackId]; +- (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(NSString *)message +{ + GMImagePickerController *picker = [[GMImagePickerController alloc] init:allow_video]; + picker.delegate = self; + picker.title = title; + picker.customNavigationBarPrompt = message; + picker.colsInPortrait = 4; + picker.colsInLandscape = 6; + picker.minimumInteritemSpacing = 2.0; + picker.modalPresentationStyle = UIModalPresentationPopover; + + UIPopoverPresentationController *popPC = picker.popoverPresentationController; + popPC.permittedArrowDirections = UIPopoverArrowDirectionAny; + popPC.sourceView = picker.view; + //popPC.sourceRect = nil; + + [self.viewController showViewController:picker sender:nil]; } -- (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker { - [self.viewController dismissViewControllerAnimated:YES completion:nil]; - CDVPluginResult* pluginResult = nil; - NSArray* emptyArray = [NSArray array]; - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:emptyArray]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; -} - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize { @@ -170,4 +108,105 @@ - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)fr return newImage; } -@end + +#pragma mark - UIImagePickerControllerDelegate + + +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info +{ + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + NSLog(@"UIImagePickerController: User finished picking assets"); +} + +- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker +{ + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + NSLog(@"UIImagePickerController: User pressed cancel button"); +} + +#pragma mark - GMImagePickerControllerDelegate + +- (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)fetchArray +{ + [picker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + + NSLog(@"GMImagePicker: User finished picking assets. Number of selected items is: %lu", (unsigned long)fetchArray.count); + + NSMutableArray * result_all = [[NSMutableArray alloc] init]; + CGSize targetSize = CGSizeMake(self.width, self.height); + NSFileManager* fileMgr = [[NSFileManager alloc] init]; + NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath]; + + NSError* err = nil; + int i = 1; + NSString* filePath; + CDVPluginResult* result = nil; + + for (GMFetchItem *item in fetchArray) { + + if ( !item.image_fullsize ) { + continue; + } + + do { + filePath = [NSString stringWithFormat:@"%@/%@%03d.%@", docsPath, CDV_PHOTO_PREFIX, i++, @"jpg"]; + } while ([fileMgr fileExistsAtPath:filePath]); + + NSData* data = nil; + if (self.width == 0 && self.height == 0) { + // no scaling required + if (self.outputType == BASE64_STRING){ + UIImage* image = [UIImage imageNamed:item.image_fullsize]; + [result_all addObject:[UIImageJPEGRepresentation(image, self.quality/100.0f) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]]; + } else { + if (self.quality == 100) { + // no scaling, no downsampling, this is the fastest option + [result_all addObject:item.image_fullsize]; + } else { + // resample first + UIImage* image = [UIImage imageNamed:item.image_fullsize]; + data = UIImageJPEGRepresentation(image, self.quality/100.0f); + if (![data writeToFile:filePath options:NSAtomicWrite error:&err]) { + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]]; + break; + } else { + [result_all addObject:[[NSURL fileURLWithPath:filePath] absoluteString]]; + } + } + } + } else { + // scale + UIImage* image = [UIImage imageNamed:item.image_fullsize]; + UIImage* scaledImage = [self imageByScalingNotCroppingForSize:image toSize:targetSize]; + data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f); + + if (![data writeToFile:filePath options:NSAtomicWrite error:&err]) { + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]]; + break; + } else { + if(self.outputType == BASE64_STRING){ + [result_all addObject:[data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]]; + } else { + [result_all addObject:[[NSURL fileURLWithPath:filePath] absoluteString]]; + } + } + } + } + + if (result == nil) { + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:result_all]; + } + + [self.viewController dismissViewControllerAnimated:YES completion:nil]; + [self.commandDelegate sendPluginResult:result callbackId:self.callbackId]; + +} + +//Optional implementation: +-(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker +{ + NSLog(@"GMImagePicker: User pressed cancel button"); +} + + +@end \ No newline at end of file diff --git a/www/imagepicker.js b/www/imagepicker.js index 1ac60531..ce7b99f9 100644 --- a/www/imagepicker.js +++ b/www/imagepicker.js @@ -51,8 +51,8 @@ ImagePicker.prototype.getPictures = function(success, fail, options) { height: options.height ? options.height : 0, quality: options.quality ? options.quality : 100, allow_video: options.allow_video ? options.allow_video : false, - title: options.title ? options.title : 'Custom Title', - message: options.message ? options.message : 'Custom helper message', + title: options.title ? options.title : 'Select an Album', // the default is the message of the old plugin impl + message: options.message ? options.message : null, // the old plugin impl didn't have it, so passing null by default outputType: options.outputType ? options.outputType : this.OutputType.FILE_URI };