Giter VIP home page Giter VIP logo

grabkit's Introduction

GrabKit

GrabKit for iOS offers a ready-to-use component to easily import photos from social networks.

GrabKit allows you to retrieve photos from :

  • Facebook
  • FlickR
  • Picasa
  • Instagram
  • iPhone/iPad
  • ... and more to come

Abstract

In your iPhone/iPad applications, you may want to let your users access their photo albums hosted on various social networks like Facebook or FlickR, or stored in the device. Unfortunately, the websites hosting these images offer different APIs and different libraries to authentify a user, grab its photo albums, etc.

GrabKit is made to wrap these differences into :

  • a simple library : GrabKitLib
  • a simple ready-to-use component : GrabKitPicker, based on GrabKitLib

GrabKitPicker is Developer-friendly :

  • Compatible with iOS 5.1 and higher, for both iPhone and iPad, the GrabKitPicker is already compatible with your project.
  • Once you've installed and configured it, all you have to do is to present it "modally" on iPhone, or through a popover on iPad.
  • Easy to use, GrabKitPicker offers two main classes : GRKPickerViewController, and its delegate GRKPickerViewControllerDelegate.
  • Through its delegation protocol, you can easily handle the user's interactions.
  • Easy to customize, it will fit to the design of your applications.
  • Of course, GrabKitPicker uses ARC, and is full of documentation and comments.

GrabKitPicker is also User-friendly :

  • Translated in French and English so far, but soon translated in other languages. Feel free to help ! :)
  • The default interface is simple and easy to use, though heavily tested to offer the best user-experience possible.

screenshot of the demo application
Watch this demo on YouTube : http://www.youtube.com/watch?v=6sOgy_3P4Ws

Demo application

The best way to discover how powerful GrabKit is, is to run the Demo application. Only a few steps are needed to run it, just follow the detailled instructions in the wiki

How to use Grabkit in your app

Installation

To install and setup GrabKit in your project, follow the detailled instructions in the wiki

Configuration

In order to grab content from each service, you need to register your app and get an API key from each service.

Please follow the detailled instructions in the wiki

Add the GrabKitPicker in your code

From any UIViewController in your app, all you have to do is similar to this :

// Retrieve the singleton of GrabKitPicker
GRKPickerViewController * grabkitPickerViewController = [GRKPickerViewController sharedInstance];

// Set the picker's delegate. 
// Don't forget to add GRKPickerViewControllerDelegate in the list of protocols implemented by your controller.
grabkitPickerViewController.pickerDelegate = self;

 // We allow the selection 
grabkitPickerViewController.allowsSelection = YES;
grabkitPickerViewController.allowsMultipleSelection = YES;

[self presentViewController:grabkitPickerViewController animated:YES completion:^{
	// GrabKitPicker is now displayed        
}];

On iPad, you can simply call this method on the picker, to present it from a UIPopover :

[grabkitPickerViewController presentInPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

Then, implement in your controller the delegate method you need. The delegate method called when the picker is dismissed, passing the array of the photos the user selected, is :

-(void)picker:(GRKPickerViewController*)picker didDismissWithSelectedPhotos:(NSArray*)selectedPhotos {
	
	// selectedPhotos is an NSArray of GRKPhoto objects. Check the "Model" section below for more details.
		
}

Model

  • A GRKAlbum represents a photo album. This object has the following properties :

    • albumId : id of the album, as returned by the service.
    • count : total number of photos for the album, according to the service.
    • name : name of the album.
    • coverPhoto : an instance of a GRKPhoto representing the cover photo of the album
  • A GRKPhoto represents a photo. It has a name (title of the photo), a caption(its description). A GRKPhoto has several images which represent the photo in different sizes.

  • an image is an instance of GRKImage. it has a width, a height, an URL, and a flag (isOriginal) set at YES if this image is the original image uploaded by the user.

Coming soon

  • More tests and examples
  • More services
  • More content to grab

Feel free to help and contribute :)

GrabKit v1.3 changes

FAQ

All your questions have answers.

Applications using GrabKit

Several top-rated applications use GrabKit, as :

  • XnSketch : Turn your photos into drawing, cartoons or sketch images in one click to create instant works of art.
  • 1sleeve : 1sleeve is a cool and innovative iPad app to design, customize, personalize and buy your own sleeve for iPad, iPad mini and macbookAir 11" and 13".
  • Printzel : Create an elegant photo book in minutes!

Donations

GrabKit is *100% free* . However, developing and supporting this project is hard work and costs real money. Please help support the development of GrabKit !

10% of your donations is donated to the Free Software Foundation.

donation

License

This project is under MIT License, please feel free to contribute and use it.

The GrabKitPicker uses :

The Facebook Grabber uses :

The FlickR Grabber uses the ObjectiveFlickR project : https://github.com/lukhnos/objectiveflickr

The Picasa Grabber uses "Google Data APIs Objective-C Client Library" : https://code.google.com/p/gdata-objectivec-client/

Special thanks to the talented Laurence Vagner for the use of her photo album 'Foodporn' in the demo video.

Check her FlickR page for more pictures under Creative Commons licence.

The demo video has been made with CaptureRecord. https://github.com/gabriel/CaptureRecord

Contact

Are you using GrabKit in your project ? Do you have a suggestion ? Any question ?

Pierre-Olivier Simonard

[email protected]

www.twitter.com/pierrotsmnrd

www.linkedin.com/in/pierreoliviersimonard

grabkit's People

Contributors

pierrotsmnrd avatar sey avatar sromanuk avatar zrxq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grabkit's Issues

"GTMOAuth2ViewTouch.xib"

"Interface Builder could not open the document "GTMOAuth2ViewTouch.xib" because it does not exist."

Linker Errors

I get the following linker error when I add [GRKConfiguration initializeWithConfiguratorClassName:@"myGrabKitConfigurator"]; in my AppDelegate, in the AppDelegate:didFinishLaunching: method. I have already copied myGrabKitConfigurator files to my project.

Undefined symbols for architecture i386:
"OBJC_CLASS$_GRKConfiguration", referenced from:
objc-class-ref in AppDelegate.o

I also get the following linker error when I add

  • (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {

    BOOL urlHasBeenHandledByDispatcher = [[GRKConnectorsDispatcher sharedInstance] dispatchURLToConnectingServiceConnector:url];

    if ( urlHasBeenHandledByDispatcher ) return YES;

    // If you have specific URL schemes to handle for you application,
    // the GRKConnectorDispatcher won't handle the URL.
    // Then, you can handle here your own URL schemes.

    return NO;
    }

to my AppDelegate.

Linker Error
"OBJC_CLASS$_GRKConnectorsDispatcher", referenced from:
objc-class-ref in AppDelegate.o

FacebookSDK mismatch

Looks like your FacebookSDK.framework is out of date?

There was a recent pull request that updated GRKFacebookConnector.m to use FBSession::openActiveSessionWithReadPermissions instead of the outdated FBSession::openActiveSessionWithPermissions.

However, the FacebookSDK.framework you have in the repository is using that outdated FBSession::openActiveSessionWithPermissions.

What would it take to add GEO-tag info to GRKPhoto?

What would it take to add GEO-tag info to GRKPhoto?

Do the individual SDKs bring this information back in the results? Or do we have to search by location first?

In the former case, we could contribute this feature.

[_NSArayM insertObject:atIndex:]: object cannot be nil

I'm having a problem retrieving images from Picasa (all the other services work fine), where I get some of the urls I selected, but one of the urls is null, which creates the error above and throws an exception. Is there a fix?

Picasa grabber: Could be faster ?

I have made some tests and my feeling is that getting photos from Picasa can take some time... 16s on my iPad3 for 1000 photos

  1. Is it due to the huge quantitie of info returned by the server
  2. Is it due to XML parsing ? (I think picasa API is using XML not JSON)
  3. Is it possible to use json and improve speed ?

AssetsLibrary.framework needs to be added when installed from cocoapods

Hi there, i get those errors on my project when i add grabkit from cocoapods. i got the following error, which i solved by adding AssetsLibrary.framework to the project.

Undefined symbols for architecture i386:
"_ALAssetPropertyDate", referenced from:
-[GRKDeviceGrabber photoFromALAsset:atIndex:] in libPods.a(GRKDeviceGrabber.o)
"_ALAssetPropertyRepresentations", referenced from:
-[GRKDeviceGrabber photoFromALAsset:atIndex:] in libPods.a(GRKDeviceGrabber.o)
"_ALAssetsGroupPropertyName", referenced from:
___108-[GRKDeviceGrabber albumsOfCurrentUserAtPageIndex:withNumberOfAlbumsPerPage:andCompleteBlock:andErrorBlock:]_block_invoke in libPods.a(GRKDeviceGrabber.o)
"_ALAssetsGroupPropertyPersistentID", referenced from:
___108-[GRKDeviceGrabber albumsOfCurrentUserAtPageIndex:withNumberOfAlbumsPerPage:andCompleteBlock:andErrorBlock:]_block_invoke in libPods.a(GRKDeviceGrabber.o)
"_ALAssetsGroupPropertyType", referenced from:
-[GRKDeviceGrabber fillCoverPhotoOfAlbum:andCompleteBlock:andErrorBlock:] in libPods.a(GRKDeviceGrabber.o)
"OBJC_CLASS$_ALAssetsFilter", referenced from:
objc-class-ref in libPods.a(GRKDeviceGrabber.o)
"OBJC_CLASS$_ALAssetsLibrary", referenced from:
objc-class-ref in libPods.a(GrabKitDemoHomeViewController.o)
objc-class-ref in libPods.a(GRKPickerThumbnailManager.o)
objc-class-ref in libPods.a(GRKDeviceGrabber.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Photo.Comments & Search

I am working on application which must have the search option (search by tag, global search, not the user photos) and which also should do the retrieving comments for the photos.
Any plans on adding those features to the grabKit?

Great library, thank you for doing this.

Authentication in a modal dialog webview

Can you please explain or improve the current framework to allow authentication in a modal dialog view ? (I'm not a big fan of launching a separate browser...).

Tx

libxml/tree.h not found

i got this annoying problem when i create a new project and add grabkit from cocoapods..

it says there is a problem with gData, tried everything but no luck...

issue with XCode 4.5 DP4

grabKit/grabKitSources/serviceGrabbers/flickrGrabber/GRKFlickrQuery.h:36:39: Cannot find protocol declaration for 'OFFlickrAPIRequestDelegate'

Linker error

I get linker error when I compile the app for the App Store.

Facebook Access to Albums Not Working

Hi,

On the simulator I was able to login to Facebook and load the albums, but on the device, it tries to connect through to Facebook via iOS, a message asking for permission shows, you tap on OK and the navigation controller goes back to the service table view. You tap on Facebook again, and you're asked to login again. If I go to the Settings Menu on the device, than Facebook, my app shows as allowed, but the grabkit controller somehow doesn't get that it is allowed.

I'm I missing something?

DropBox grabber

Our project needs a dropbox grabber . . . I've started implementing one.

Externalize Constants

This library looks very promising. It would be great if we could externalize the constants for the various service's information, like application ids, keys, etc. This way no modifications to the actual source need to be made to get the application running.

Maybe create a configuration class which we can subclass which returns the various values, and then we instantiate the base with that instance.

Just a thought.

iOS 7 crash

Hi,

The app crash on iOS 7 while trying to connect to Facebook or presenting the picker.

Can you please help? is it fully compatible with iOS 7 ?

Thanks

FBiOSSDK/FBRequest.h not found

I have followed all of the steps it the project refuses to compile. Please help!!! I have tried everything but cant get it to work.

It is showing about 18 warnings and the above mentioned error.... I need this very urgently.

UPDATE: I fixed the above error by linking to the framework in the build phases(wasn't in the instructions), but now I get an error from GRKPicasaSingleton.h - "Unknown type name 'GDataServiceGooglePhotos'; did you mean 'GDataServiceGoogle'?"

Thanks,
Virindh Borra

Grabkit.h not found when Archive

I''ve followed all the steps in order to add Grabkit in my project and when I Archive the project to post is to the App Store I get the following issue: "Grabkit.h not found". What can I do to fix it? I need it!!!

Crash when assetsURLString is nil (deviceGrabber)

When someone share you a photo stream, and you have not finish downloading some of the photos, in GRKDeviceGrabber.m photoIdFromAsset: line: NSString * assetsURLString = [[[asset defaultRepresentation] url] absoluteString];

assetsURLString can be nil, so the string returned will be nil. When add a GRKPhoto with nil photoId, you will throw a exception in NSMutableArray+setObjectAtPosition.m setObject:atIndex:fillWithObject: line: if ( objectToAdd == nil ) @throw NSInvalidArgumentException;

Version tag

Could you please create a version tag in the repo? Like, v1.2 or 1.2.0 or whatever. That would help me to create a clean cocoapod for the library.

Thanks!

No albums (in sim) causes uncaught exception

I get this in the simulator, not sure if it can happen on a device if there are no albums present.
In fillCoverPhotoOfAlbum:andCompleteBlock:andErrorBlock it crashes doing this line:
[groupForThisAlbum enumerateAssetsAtIndexes:indexSetOfAssetToRetrieve
options:0
usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop)

album.count is 0, and I've changed the code to make sure in this case it uses:
indexSetOfAssetToRetrieve = [NSIndexSet indexSetWithIndex:0];
instead of indexSetOfAssetToRetrieve = [NSIndexSet indexSetWithIndex:album.count-1];
but anyway it still does:
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'indexSet count or lastIndex must not exceed -numberOfAssets'

Allows Editing

It would be really cool to have an allows editing property like Apple's from their photo picker. Allowing the user to crop the photo selected from a service into a square. It could be easily written. I am pretty swamped right now, but if I can find some time I will tackle it.

use with the sharekit problem

when i use the grabkit and sharekit, the flickr auth is different way with sharekit, please fix it to make it work fine for both. ths.

Getting UIImage from GRKPhoto

When I use the method: CGImageRef imgRef = [[asset defaultRepresentation] fullResolutionImage]; in order to get a UIImage I receive an error: CALayer nan. What can I do?

Getting assertion failure on all sources

Hi there! Thank you for your great component!

I having a problem implementing it. I already installed the component via CocoaPods and configured it following the detailed instructions on the wiki, but I'm getting a Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:].

I set a breakpoint on GRKPickerAlbumList.m:827 and there the cell variable is null, as tableView fails to dequeue a cell with the cell identifier AlbumCell.

Any hint?

There's no handler for applicationDidBecomeActive during OAuth

If an authentication session gets cancelled (e.g., the user closes Safari) there is no way to tell the active connector to reset it's own or underlying client library's state.

For example, Facebook iOS SDK has [FBSession handleDidBecomeActive]. I believe it would be a good idea to provide a method in, say, GRKConnectorsDispatcher for that.

Submodules install bash file doesn't work

When I run the bash file in order to download all the missing files in the project, the terminals shows a lot of logs and stuf, but then no file has been added, files still in red. What's the problem? I have write permission in the folder so I don't really understand what it's happening.

The bundle does not work correctly for CocoaPods

define GRK_BUNDLE [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"GrabKitBundle" ofType:@"bundle"]]

Doesn't exist when using CocoaPods, instead resources are copied to [NSBundle mainBundle]

facebook grab photos number problem

hi,guy,i have a problem when use grabkit demo.
when i post more than one photo to the facebook one time, the album list display the righ photo number ,but grab the photos list is less ,Why?

Can't build demo app

I have tried to build the demo app following the instructions but can not seem to get it to work. I cloned the repo, I am on the latest Xcode/iOS. Is it still working or is it just me?

Turkish Localization

hi there, just added turkish localization file to the grabkitpicker. how can i upload the modified file? heres the string contents:

"GRK_ALBUMS_LIST_NEED_TO_CONNECT" = "%serviceName% servisine giriş yapmanız gerekmektedir.";

"GRK_ALBUMS_LIST_CONNECT_BUTTON" = "Giriş";

"GRK_ALBUMS_LIST_ERROR_RETRY" = "Bir hata oluştu, lütfen tekrar deneyin.";

"GRK_ALBUMS_LIST_HUD_LOADING" = "Yükleniyor ...";

"GRK_ALBUMS_LIST_ALL_ALBUMS_LOADED" = "Bütün albümler yüklendi.";

"GRK_USER_VIEW_LOGOUT" = "Çıkış";

"GRK_LOAD_MORE_CELL_ERROR_RETRY" = "Bir hata oluştu, lütfen tekrar deneyin.";

"GRK_LOAD_MORE_CELL_LOAD_MORE" = "Daha...";

"GRK_SERVICES_LIST_TITLE" = "Sosyal Ağlar";

"GRK_FACEBOOK_TAGGED_PHOTOS" = "İşaretlenmiş Fotoğraflar";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.