-
Notifications
You must be signed in to change notification settings - Fork 89
How to install GrabKit
This document explains how to use GrabKit in your own project.
Drag'n'drop GrabKit's xcodeproj in your own project
/grabKit/doc/installation/01.png
In your target settings, go to Build Phase -> Target Dependencies -> click on +
/grabKit/doc/installation/02.png
Under the "GrabKit" sub project, select "GrabKitLib" and "GrabKitBundle". /grabKit/doc/installation/03.png
In your target settings, go to Build Phase -> link binary with libraries -> click on + /grabKit/doc/installation/04.png
Under the workspace section, select "GrabKitLib.a". Also add the following frameworks :
- AssetsLibrary.framework (for the Device Grabber)
- CFNetwork.framework (for the FlickR Lib)
- Security.framework (for the Picasa Lib)
- SystemConfiguration.framework (for the Picasa Lib)
/grabKit/doc/installation/05.png
In your project explorer, find "grabKitBundle.bundle" and drag it to your Target settings -> Build Phase -> Copy Bundle Resources /grabKit/doc/installation/06.png
In your Target settings -> Build Settings, search for "Other linker flags", and add the following values : -all_load -ObjC -lxml2 -lsqlite3.0
/grabKit/doc/installation/07.png
_ Still in "Build Settings", search for "header search path" and add the following values : $(TARGET_BUILD_DIR)/include/GrabKitLib /usr/include/libxml2
/grabKit/doc/installation/08.png
Import the FB SDK in your project You can either download it and follow the included informations : https://github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.0.5.b.pkg Or you can copy the version already included in the project.
/grabKit/doc/installation/09.png
In your own appDelegate, add this import :
#import "GrabKit.h"
Try to build. If you have some errors, check this procedure again. If you don't have errors : Congratulations ! Only a few steps left before you can configure your project :)
First, copy the class myGrabKitConfigurator from the demo application to your own project. ( The configuration process will guide you through the customization of this file )
In your AppDelegate, in the AppDelegate:didFinishLaunching: method, add the following :
[GRKConfiguration initializeWithConfiguratorClassName:@"myGrabKitConfigurator"];
// You can also initialize GRKConfiguration with an instance of your configurator :
// [GRKConfiguration initializeWithConfigurator:[[GRKDemoConfigurator alloc] init]];
Still in your AppDelegate, add the following method :
- (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;
}
You're done ! :) your project is now ready to be configured !