hit fox framework v1.1

13
HitFox SDK v1.1 iOS Integration Guide Page 1. Prepared by the HitFox App Discovery GmbH. Engineering Team © 2012 - 2013 HitFox, GmbH. | All rights reserved

Upload: csongor-nagy

Post on 18-Jan-2015

327 views

Category:

Technology


2 download

DESCRIPTION

The HitFox iOS SDK for Apple iOS provides integration of the HitFox Game Finder game browsing functionality. The iOS SDK is provided in the form of a framework that you may simply include in your iOS project. Our SDK is compatible with iPhone®, iPad® and iPod Touch® devices.

TRANSCRIPT

Page 1: Hit fox framework v1.1

HitFox SDK v1.1iOS Integration Guide

Page 1.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 2: Hit fox framework v1.1

Introduction & Table of Contents

iOS SDK v1.1The HitFox iOS SDK for Apple iOS provides integration of the HitFox Game Finder game browsing functionality. The iOS SDK is provided in the form of a framework that you may simply include in your iOS project. Our SDK is compatible with iPhone®, iPad® and iPod Touch® devices.

Introduction & Table of Contents

1. Compatibility

2. Download iOS SDK v1.1

3. Quick start

Page 2.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 3: Hit fox framework v1.1

1. CompatibilityThe iOS SDK is compatible with iOS 5.0 and above using Xcode 4.5. The SDK is compatible with ARC and non-ARC projects.

2. Download iOS SDK v1.1There is one download option for developers using the iOS SDK:

Projects with target of iOS 5.0+ may use the:

HitFoxFramework.embeddedframework

Once you’ve downloaded the iOS SDK that is compatible with your mobile apps, decompress the .zip file and copy the files to your development computer.

3. Quick start

Page 3.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 4: Hit fox framework v1.1

In Xcode, Build Phases -->Link Binary with Libraries, link the following files:

A. Add the HitFoxFramework.embeddedframework/HitFoxFramework.framework. Tip: be sure to choose the plus to “add” the file to your project. This will create the necessary linking for a static library in Xcode. Additionally, you can drag and drop the framework file into the list of libraries you want to link.

Page 4.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 5: Hit fox framework v1.1

Page 5.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 6: Hit fox framework v1.1

B. Add the following Binary Libraries to your project:Page 6.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 7: Hit fox framework v1.1

C. Link the Resources folderPage 7.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 8: Hit fox framework v1.1

Page 8.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 9: Hit fox framework v1.1

D. Import GameList/DailyGift from the SDK#import <HitFoxFramework/GamesList.h>#import <HitFoxFramework/DailyGift.h>

E. Initialize the GamesList/DailyGift classGamesList *gameList = [[GamesList alloc] ! ! ! ! !!! ! ! ! initWithSecret:@"app_secret" appId:@"app_id"!! ! ! ! ! andParams:nil];

DailyGift *gift = [[DailyGift alloc]!! ! ! ! initWithSecret:@"app_secret"!! ! ! ! ! appId:@"app_id"!! ! ! ! ! andParams:nil];

Use your App Secret and App ID provided

Page 9.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 10: Hit fox framework v1.1

F1. Get the Game List ControllerUIViewController *viewController = [gameList getList];UINavigationController *navController = [[UINavigationController alloc] !! ! ! ! ! ! ! ! initWithRootViewController:viewController];

F2. Get the DailyGift ViewUIView *giftView = [gift getGiftWithFrame:CGRectMake(0, 96, 320, 362)];

! ViewController *viewController = [[ViewController alloc] initWithNibName:@"ViewController" ! ! ! ! ! ! ! ! ! ! ! ! ! ! bundle:nil]; [self.viewController.view addSubview:giftView];

G. In your Target Build Settings

Page 10.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 11: Hit fox framework v1.1

H. Customize the colorsThe library is configurable with the following colors:

UIColor *gameListBackground;UIColor *gameListGameTitleLabel;UIColor *gameListFirstGameTitleLabel;UIColor *gameListFirstGamePriceLabel;UIColor *gameListFirstGamePriceDropLabel;UIColor *gameListGameAgoLabel;UIColor *gameListGamePriceLabel;UIColor *gameListGamePriceDropLabel;UIColor *gameListFilterLabel;UIColor *gameListFilterSelectedLabel;UIColor *gameDetailBackground;UIColor *gameDetailTitleLabel;UIColor *gameDetailPriceLabel;UIColor *gameDetailPriceDropLabel;UIColor *gameDetailImageSliderBackground;UIColor *gameDetailImageSliderBorder;UIColor *gameDetailInfoBackground;UIColor *gameDetailInfoTitleLabel;UIColor *gameDetailInfoValueLabel;UIColor *gameDetailInformationBackground;UIColor *gameDetailInformationTitleLabel;UIColor *gameDetailInformationValueLabel;UIColor *gameDetailReviewBackground;

Page 11.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 12: Hit fox framework v1.1

UIColor *gameDetailReviewTitleLabel;UIColor *gameDetailReviewValueLabel;UIColor *gameDetailSummaryBackground;UIColor *gameDetailSummaryTitleLabel;UIColor *gameDetailSummaryText;UIColor *gameDetailPosNegBackground;UIColor *gameDetailPosNegText;UIColor *gameDetailRatingBackground;UIColor *gameDetailRatingTitleLabel;UIColor *gameDetailRatingText;UIColor *gameOfTheDayBackground;UIColor *gameOfTheDayNavigationTitle;UIColor *gameOfTheDayTitleLabel;UIColor *gameOfTheDayPriceLabel;UIColor *gameOfTheDayPriceDropLabel;UIColor *gameOfTheDayToTheGameButtonLabel;UIColor *gameOfTheDayToTheStoreButtonLabel;UIColor *colorForCategoryGreen;UIColor *colorForCategoryRed;UIColor *colorForCategoryViolet;UIColor *colorForCategoryBlue;UIColor *colorForCategoryYellow;UIColor *colorForCategoryTurquoise;

Page 12.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved

Page 13: Hit fox framework v1.1

For example, create a NSMutableDictionary with the desired key/value combinations and pass it to the library initialization method:

NSMutableDictionary *params = [[NSMutableDictionary alloc] init];[params setObject:[UIColor greenColor] forKey:@"colorForCategoryGreen"];[params setObject:[UIColor redColor] forKey:@"colorForCategoryRed"];[params setObject:[UIColor purpleColor] forKey:@"colorForCategoryViolet"];[params setObject:[UIColor blueColor] forKey:@"colorForCategoryBlue"];[params setObject:[UIColor yellowColor] forKey:@"colorForCategoryYellow"];[params setObject:[UIColor grayColor] forKey:@"colorForCategoryTurquoise"];

then call:

GamesList *gameList = [[GamesList alloc] initWithSecret:@"app_secret" appId:@"app_id" andParams:params];

or

DailyGift *gift = [[DailyGift alloc] initWithSecret:@"app_secret"!! ! ! ! ! !! ! ! appId:@"app_id"!! ! ! ! ! ! ! ! andParams:params];

Page 13.

Prepared by the

HitFox App Discovery GmbH. Engineering Team© 2012 - 2013 HitFox, GmbH. | All rights reserved