diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerView.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerView.h new file mode 100644 index 000000000..feefd294a --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerView.h @@ -0,0 +1,108 @@ +// +// GADBannerView.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import "GADRequest.h" +#import "GADRequestError.h" +#import "GADBannerViewDelegate.h" + +#pragma mark - +#pragma mark Ad Sizes + +// iPhone and iPod Touch ad size. +#define GAD_SIZE_320x50 CGSizeMake(320, 50) + +// Medium Rectangle size for the iPad (especially in a UISplitView's left pane). +#define GAD_SIZE_300x250 CGSizeMake(300, 250) + +// Full Banner size for the iPad (especially in a UIPopoverController or in +// UIModalPresentationFormSheet). +#define GAD_SIZE_468x60 CGSizeMake(468, 60) + +// Leaderboard size for the iPad. +#define GAD_SIZE_728x90 CGSizeMake(728, 90) + +#pragma mark - +#pragma mark Banner Ad View + +// The view that displays banner ads. A minimum implementation to get an ad +// from within a UIViewController class is: +// +// // Place an ad at the top of the screen of an iPhone/iPod Touch. +// CGRect adFrame = CGRectZero; +// adFrame.size = GAD_SIZE_320x50; +// +// // Create and setup the ad view. +// GADBannerView *adView = [[GADBannerView alloc] initWithFrame:adFrame]; +// adView.rootViewController = self; +// adView.adUnitID = @"ID created when registering my app"; +// +// // Place the ad view onto the screen. +// [self.view addSubview:adView]; +// [adView release]; +// +// // Request an ad without any additional targeting information. +// [adView loadRequest:nil]; +// +@interface GADBannerView : UIView + +#pragma mark Pre-Request + +// Required value created in the AdSense website. Create a new ad unit for +// every unique placement of an ad in your application. Set this to the ID +// assigned for this placement. Ad units are important for targeting and stats. +// Example values for different request types: +// AdMob: a0123456789ABCD +// DFP: /0123/ca-pub-0123456789012345/my-ad-identifier +// AdSense: ca-mb-app-pub-0123456789012345/my-ad-identifier +// Mediation: AB123456789ABCDE +@property (nonatomic, copy) NSString *adUnitID; + +// Required reference to the current root view controller. For example the root +// view controller in tab-based application would be the UITabViewController. +@property (nonatomic, assign) UIViewController *rootViewController; + +// Optional delegate object that receives state change notifications from this +// GADBannerView. Typically this is a UIViewController, however, if you are +// unfamiliar with the delegate pattern it is recommended you subclass this +// GADBannerView and make it the delegate. That avoids any chance of your +// application crashing if you forget to nil out the delegate. For example: +// +// @interface MyAdView : GADBannerView +// @end +// +// @implementation MyAdView +// - (id)initWithFrame:(CGRect)frame { +// if ((self = [super initWithFrame:frame])) { +// self.delegate = self; +// } +// return self; +// } +// +// - (void)dealloc { +// self.delegate = nil; +// [super dealloc]; +// } +// +// @end +// +@property (nonatomic, assign) NSObject *delegate; + +#pragma mark Making an Ad Request + +// Makes an ad request. Additional targeting options can be supplied with a +// request object. Refresh the ad by calling this method again. +- (void)loadRequest:(GADRequest *)request; + +#pragma mark Ad Request + +// YES, if the currently displayed ad (or most recent failure) was a result of +// auto refreshing as specified on server. This will be set to NO after each +// loadRequest: method. +@property (nonatomic, readonly) BOOL hasAutoRefreshed; + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerViewDelegate.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerViewDelegate.h new file mode 100644 index 000000000..4a7f3079a --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADBannerViewDelegate.h @@ -0,0 +1,61 @@ +// +// GADBannerViewDelegate.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +@class GADRequestError; +@class GADBannerView; + +// Delegate for receiving state change messages from a GADBannerView such as ad +// requests succeeding/failing or when an ad has been clicked. +@protocol GADBannerViewDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +// Sent when an ad request loaded an ad. This is a good opportunity to add this +// view to the hierarchy if it has not yet been added. If the ad was received +// as a part of the server-side auto refreshing, you can examine the +// hasAutoRefreshed property of the view. +- (void)adViewDidReceiveAd:(GADBannerView *)view; + +// Sent when an ad request failed. Normally this is because no network +// connection was available or no ads were available (i.e. no fill). If the +// error was received as a part of the server-side auto refreshing, you can +// examine the hasAutoRefreshed property of the view. +- (void)adView:(GADBannerView *)view + didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Click-Time Lifecycle Notifications + +// Sent just before presenting the user a full screen view, such as a browser, +// in response to clicking on an ad. Use this opportunity to stop animations, +// time sensitive interactions, etc. +// +// Normally the user looks at the ad, dismisses it, and control returns to your +// application by calling adViewDidDismissScreen:. However if the user hits the +// Home button or clicks on an App Store link your application will end. On iOS +// 4.0+ the next method called will be applicationWillResignActive: of your +// UIViewController (UIApplicationWillResignActiveNotification). Immediately +// after that adViewWillLeaveApplication: is called. +- (void)adViewWillPresentScreen:(GADBannerView *)adView; + +// Sent just before dismissing a full screen view. +- (void)adViewWillDismissScreen:(GADBannerView *)adView; + +// Sent just after dismissing a full screen view. Use this opportunity to +// restart anything you may have stopped as part of adViewWillPresentScreen:. +- (void)adViewDidDismissScreen:(GADBannerView *)adView; + +// Sent just before the application will background or terminate because the +// user clicked on an ad that will launch another application (such as the App +// Store). The normal UIApplicationDelegate methods, like +// applicationDidEnterBackground:, will be called immediately before this. +- (void)adViewWillLeaveApplication:(GADBannerView *)adView; + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitial.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitial.h new file mode 100644 index 000000000..ea8f848cf --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitial.h @@ -0,0 +1,80 @@ +// +// GADInterstitial.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +#import "GADInterstitialDelegate.h" +#import "GADRequest.h" +#import "GADRequestError.h" + +// An interstitial ad. This is a full-screen advertisement shown at natural +// transition points in your application such as between game levels or news +// stories. +// +// Interstitials are shown sparingly. Expect low to no fill. +@interface GADInterstitial : NSObject + +#pragma mark Pre-Request + +// Required value created in the AdSense website. Create a new ad unit for +// every unique placement of an ad in your application. Set this to the ID +// assigned for this placement. Ad units are important for targeting and stats. +// Example values for different request types: +// AdMob: a0123456789ABCD +// DFP: /0123/ca-pub-0123456789012345/my-ad-identifier +// AdSense: ca-mb-app-pub-0123456789012345/my-ad-identifier +@property (nonatomic, copy) NSString *adUnitID; + +// Optional delegate object that receives state change notifications from this +// GADInterstitalAd. Remember to nil the delegate before deallocating this +// object. +@property (nonatomic, assign) NSObject *delegate; + +#pragma mark Making an Ad Request + +// Makes an interstitial ad request. Additional targeting options can be +// supplied with a request object. Only one interstitial request is allowed at +// a time. +// +// This is best to do several seconds before the interstitial is needed to +// preload its content. Then when transitioning between view controllers show +// the interstital with presentFromViewController. +- (void)loadRequest:(GADRequest *)request; + +#pragma mark Request at Application Launch + +// The |window| will be shown with the |image| displayed until either the +// |request| interstitial is shown or a timeout occurs. The delegate will +// receive an interstitialDidDismissScreen: callback to indicate that your app +// should continue when the interstitial has finished. +- (void)loadAndDisplayRequest:(GADRequest *)request + usingWindow:(UIWindow *)window + initialImage:(UIImage *)image; + +#pragma mark Post-Request + +// Returns YES if the interstitial is ready to be displayed. The delegate's +// interstitialAdDidReceiveAd: will be called when this switches from NO to YES. +@property (nonatomic, readonly) BOOL isReady; + +// Returns YES if the interstitial object has already shown an interstitial. +// Note that an interstitial object can only be used once even with different +// requests. +@property (nonatomic, readonly) BOOL hasBeenUsed; + +// Presents the interstitial ad which takes over the entire screen until the +// user dismisses it. This has no effect unless isReady returns YES and/or the +// delegate's interstitialDidReceiveAd: has been received. +// +// Set rootViewController to the current view controller at the time this method +// is called. If your application does not use view controllers pass in nil and +// your views will be removed from the window to show the interstitial and +// restored when done. After the interstitial has been removed, the delegate's +// interstitialDidDismissScreen: will be called. +- (void)presentFromRootViewController:(UIViewController *)rootViewController; + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitialDelegate.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitialDelegate.h new file mode 100644 index 000000000..7cea09ebf --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADInterstitialDelegate.h @@ -0,0 +1,53 @@ +// +// GADInterstitialDelegate.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +@class GADInterstitial; +@class GADRequestError; + +// Delegate for receiving state change messages from a GADInterstitial such as +// interstitial ad requests succeeding/failing. +@protocol GADInterstitialDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +// Sent when an interstitial ad request succeeded. Show it at the next +// transition point in your application such as when transitioning between view +// controllers. +- (void)interstitialDidReceiveAd:(GADInterstitial *)ad; + +// Sent when an interstitial ad request completed without an interstitial to +// show. This is common since interstitials are shown sparingly to users. +- (void)interstitial:(GADInterstitial *)ad + didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Display-Time Lifecycle Notifications + +// Sent just before presenting an interstitial. After this method finishes the +// interstitial will animate onto the screen. Use this opportunity to stop +// animations and save the state of your application in case the user leaves +// while the interstitial is on screen (e.g. to visit the App Store from a link +// on the interstitial). +- (void)interstitialWillPresentScreen:(GADInterstitial *)ad; + +// Sent before the interstitial is to be animated off the screen. +- (void)interstitialWillDismissScreen:(GADInterstitial *)ad; + +// Sent just after dismissing an interstitial and it has animated off the +// screen. +- (void)interstitialDidDismissScreen:(GADInterstitial *)ad; + +// Sent just before the application will background or terminate because the +// user clicked on an ad that will launch another application (such as the App +// Store). The normal UIApplicationDelegate methods, like +// applicationDidEnterBackground:, will be called immediately before this. +- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad; + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequest.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequest.h new file mode 100644 index 000000000..a475a37e7 --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequest.h @@ -0,0 +1,128 @@ +// +// GADRequest.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import + +// Constant for getting test ads on the simulator using the testDevices method. +#define GAD_SIMULATOR_ID @"Simulator" + +// Genders to help deliver more relevant ads. +typedef enum { + kGADGenderUnknown, + kGADGenderMale, + kGADGenderFemale +} GADGender; + +// Specifies optional parameters for ad requests. +@interface GADRequest : NSObject + +// Creates an autoreleased GADRequest. ++ (GADRequest *)request; + +// Passes extra details in ad requests. +// +// One case is for Ad Network Mediation. Some Ad Networks may ask for additional +// information about the ad request. Consult with the individual Ad Network +// on what to send. Place the information in a dictionary and put that in +// another dictionary under the key "mediation". An example might be: +// +// additionalParameters = { +// mediation: { +// MyAdNetwork: { +// market_segment: "abc", +// some_info: "xyz", +// some_num: 1000 +// }, +// AdNetworkX: { +// key1: "val1", +// key2: "val2" +// } +// } +// } +// +// To create such a dictionary, do the following: +// +// NSDictionary *myAdNetwork = [NSDictionary dictionaryWithObjectsAndKeys: +// @"abc", @"market_segment", +// @"xyz", @"some_info", +// [NSNumber numberWithInt:1000], @"some_num", +// nil]; +// NSDictionary *adNetwokX = [NSDictionary dictionaryWithObjectsAndKeys: +// @"val1", @"key1", +// @"val2", @"key2", +// nil]; +// NSDictionary *mediation = [NSDictionary dictionaryWithObjectsAndKeys: +// myAdNetwork, @"MyAdNetwork", +// adNetwokX, @"AdNetworkX", +// nil]; +// NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: +// mediation, @"mediation", +// nil]; +// gadRequest.additionalParameters = params; +@property (nonatomic, retain) NSDictionary *additionalParameters; + +#pragma mark Collecting SDK Information + +// Returns the version of the SDK. ++ (NSString *)sdkVersion; + +#pragma mark Testing + +// Test ads are returned to these devices. Device identifiers are the same used +// to register as a development device with Apple. To obtain a value open the +// Organizer (Window -> Organizer from Xcode), control-click or right-click on +// the device's name, and choose "Copy Device Identifier". Alternatively you +// can obtain it through code using [[UIDevice currentDevice] uniqueIdentifier]. +// +// For example: +// request.testDevices = [NSArray arrayWithObjects: +// GAD_SIMULATOR_ID, // Simulator +// //@"28ab37c3902621dd572509110745071f0101b124", // Test iPhone 3G 3.0.1 +// @"8cf09e81ef3ec5418c3450f7954e0e95db8ab200", // Test iPod 4.3.1 +// nil]; +@property (nonatomic, retain) NSArray *testDevices; + +#pragma mark User Information + +// The user's gender may be used to deliver more relevant ads. +@property (nonatomic, assign) GADGender gender; + +// The user's birthday may be used to deliver more relevant ads. +@property (nonatomic, retain) NSDate *birthday; +- (void)setBirthdayWithMonth:(NSInteger)m day:(NSInteger)d year:(NSInteger)y; + +// The user's current location may be used to deliver more relevant ads. +// However do not use Core Location just for advertising, make sure it is used +// for more beneficial reasons as well. It is both a good idea and part of +// Apple's guidelines. +- (void)setLocationWithLatitude:(CGFloat)latitude longitude:(CGFloat)longitude + accuracy:(CGFloat)accuracyInMeters; + +// When Core Location isn't available but the user's location is known supplying +// it here may deliver more relevant ads. It can be any free-form text such as +// @"Champs-Elysees Paris" or @"94041 US". +- (void)setLocationWithDescription:(NSString *)locationDescription; + +#pragma mark Contextual Information + +// A keyword is a word or phrase describing the current activity of the user +// such as @"Sports Scores". Each keyword is an NSString in the NSArray. To +// clear the keywords set this to nil. +@property (nonatomic, retain) NSMutableArray *keywords; + +// Convenience method for adding keywords one at a time such as @"Sports Scores" +// and then @"Football". +- (void)addKeyword:(NSString *)keyword; + +#pragma mark - +#pragma mark Deprecated Methods + +// Please use testDevices instead. +@property (nonatomic, getter=isTesting) BOOL testing; + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequestError.h b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequestError.h new file mode 100644 index 000000000..e8cbd272f --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/GADRequestError.h @@ -0,0 +1,48 @@ +// +// GADRequestError.h +// Google AdMob Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import + +@class GADRequest; + +extern NSString *kGADErrorDomain; + +// NSError codes for GAD error domain. +typedef enum { + // The ad request is invalid. The localizedFailureReason error description + // will have more details. Typically this is because the ad did not have the + // ad unit ID or root view controller set. + kGADErrorInvalidRequest, + + // The ad request was successful, but no ad was returned. + kGADErrorNoFill, + + // There was an error loading data from the network. + kGADErrorNetworkError, + + // The ad server experienced a failure processing the request. + kGADErrorServerError, + + // The current device's OS is below the minimum required version. + kGADErrorOSVersionTooLow, + + // The request was unable to be loaded before being timed out. + kGADErrorTimeout, + + // Will not send request because the interstitial object has already been + // used. + kGADErrorInterstitialAlreadyUsed, + + // The mediation request encountered an error. + kGADMediationError, + +} GADErrorCode; + +// This class represents the error generated due to invalid request parameters. +@interface GADRequestError : NSError + +@end diff --git a/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/README.txt b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/README.txt new file mode 100644 index 000000000..e2748ed4b --- /dev/null +++ b/admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5/README.txt @@ -0,0 +1,13 @@ +============================ +Google AdMob Ads SDK for iOS +============================ + +This is the Google AdMob Ads SDK for iOS. + +Requirements: +- An AdMob site ID, AdSense client ID, or DoubleClick for Publishers account +- Xcode 4.2 or later. +- Runtime of iOS 3.0 or later. + +The latest documentation and code samples are available at: +http://code.google.com/mobile/ads/docs/ios diff --git a/admobsdk/iOS/__MACOSX/._GoogleAdMobAdsSDKiOS-5.0.5 b/admobsdk/iOS/__MACOSX/._GoogleAdMobAdsSDKiOS-5.0.5 new file mode 100644 index 000000000..8e79089d9 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/._GoogleAdMobAdsSDKiOS-5.0.5 differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerView.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerView.h new file mode 100644 index 000000000..d410426d0 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerView.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerViewDelegate.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerViewDelegate.h new file mode 100644 index 000000000..e56050777 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADBannerViewDelegate.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitial.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitial.h new file mode 100644 index 000000000..2178bec07 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitial.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitialDelegate.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitialDelegate.h new file mode 100644 index 000000000..e1119f429 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADInterstitialDelegate.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequest.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequest.h new file mode 100644 index 000000000..acb1b7133 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequest.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequestError.h b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequestError.h new file mode 100644 index 000000000..674bd58eb Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._GADRequestError.h differ diff --git a/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._README.txt b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._README.txt new file mode 100644 index 000000000..be4f8a142 Binary files /dev/null and b/admobsdk/iOS/__MACOSX/GoogleAdMobAdsSDKiOS-5.0.5/._README.txt differ diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdNetworkLibs/README b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdNetworkLibs/README new file mode 100644 index 000000000..4d20cf88d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdNetworkLibs/README @@ -0,0 +1,2 @@ +You can put ad network libraries in this directory. The sample .xcodeproj references to files here. +DO NOT PUSH ANY AD NETWORK LIBRARIES TO GOOGLE CODE. diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlDelegateProtocol.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlDelegateProtocol.h new file mode 100644 index 000000000..cf961c1d9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlDelegateProtocol.h @@ -0,0 +1,344 @@ +/* + + AdWhirlDelegateProtocol.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import + +@class AdWhirlView; + +@protocol AdWhirlDelegate + +@required + +- (NSString *)adWhirlApplicationKey; + +/** + * The view controller with which the ad network will display a modal view + * (web view, canvas), such as when the user clicks on the ad. You must + * supply a view controller. You should return the root view controller + * of your application, such as the root UINavigationController, or + * any controllers that are pushed/added directly to the root view controller. + * For example, if your app delegate has a pointer to the root view controller: + * + * return [(MyAppDelegate *)[[UIApplication sharedApplication] delegate] rootViewController] + * + * will suffice. + */ +- (UIViewController *)viewControllerForPresentingModalView; + +@optional + +#pragma mark server endpoints +/** + * If you are running your own AdWhirl server instance, make sure you + * implement the following to return the URL that points to the endpoints + * on your server. + */ +- (NSURL *)adWhirlConfigURL; +- (NSURL *)adWhirlImpMetricURL; +- (NSURL *)adWhirlClickMetricURL; +- (NSURL *)adWhirlCustomAdURL; + + +#pragma mark notifications +/** + * You can listen to callbacks from AdWhirl via these methods. When AdWhirl is + * notified that an ad request is fulfilled, it will notify you immediately. + * Thus, when notified that an ad request succeeded, you can choose to add the + * AdWhirlView object as a subview to your view. This view contains the ad. + * When you are notified that an ad request failed, you are also informed if the + * AdWhirlView is fetching a backup ad. The backup fetching order is specified + * by you in adwhirl.com or your own server instance. When all backup sources + * are attempted and the last ad request still fails, the usingBackup parameter + * will be set to NO. You can use this notification to try again and perhaps + * request another AdWhirlView via [AdWhirlView requestAdWhirlViewWithDelegate:] + */ +- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView; +- (void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo; + +/** + * You can get notified when the transition animation to a new ad is completed + * so you can make necessary adjustments to the size of the adWhirlView and + * surrounding views after the animation. + */ +- (void)adWhirlDidAnimateToNewAdIn:(AdWhirlView *)adWhirlView; + +/** + * This function is your integration point for Generic Notifications. You can + * control when this notification occurs via the developers member section. You + * can allocate a percentage of your ad requests to initiate this callback. When + * you receive this notification, you can execute any code block that you own. + * For example, you can replace the ad in AdWhirlView after getting this callback + * by calling replaceBannerViewWith: . Note that the ad refresh cycle is still + * alive, so your view could be replaced by other ads when it's time for an + * ad refresh. + */ +- (void)adWhirlReceivedRequestForDeveloperToFufill:(AdWhirlView *)adWhirlView; + +/** + * In the event that ads are OFF, you can listen to this callback method to + * determine that ads have been turned off. + */ +- (void)adWhirlReceivedNotificationAdsAreOff:(AdWhirlView *)adWhirlView; + +/** + * These notifications will let you know when a user is being shown a full screen + * webview canvas with an ad because they tapped on an ad. You should listen to + * these notifications to determine when to pause/resume your game--if you're + * building a game app. + */ +- (void)adWhirlWillPresentFullScreenModal; +- (void)adWhirlDidDismissFullScreenModal; + +/** + * An ad request is a two step process: first the SDK must go to the AdWhirl + * server to retrieve configuration information. Then, based on the configuration + * information, it chooses an ad network and fetch an ad. The following call + * is for users to get notified when the first step is complete. The + * adWhirlView passed could be null if you had called the AdWhirlView class + * method +startPreFetchingConfigurationDataWithDelegate . + */ +- (void)adWhirlDidReceiveConfig:(AdWhirlView *)adWhirlView; + + +#pragma mark behavior configurations + +/** + * Request test ads for APIs that supports it. Make sure you turn it to OFF + * or remove the function before you submit your app to the app store. + */ +- (BOOL)adWhirlTestMode; + +/** + * Returns the device's current orientation for ad networks that relys on + * it. If you don't implement this function, [UIDevice currentDevice].orientation + * is used to get the current orientation. + */ +- (UIDeviceOrientation)adWhirlCurrentOrientation; + +#pragma mark appearance configurations +- (UIColor *)adWhirlAdBackgroundColor; +- (UIColor *)adWhirlTextColor; +- (UIColor *)adWhirlSecondaryTextColor; +- (UIColor *)backgroundColor DEPRECATED_ATTRIBUTE; // use the one with adWhirl prefix +- (UIColor *)textColor DEPRECATED_ATTRIBUTE; // use the one with adWhirl prefix + + +#pragma mark hard-coded application keys +- (NSString *)admobPublisherID; // your Publisher ID from Admob. +- (NSDictionary *)quattroWirelessDictionary; // key-value pairs for the keys "publisherID" and "siteID" provided by Quattro Wireless. Set NSString values for these two keys. +- (NSString *)pinchApplicationKey; // your Application Code from Pinch Media. +- (NSDictionary *)videoEggConfigDictionary; // key-value pairs for the keys "publisher" and "area" information from Video Egg. Set NSString values for these two keys. +- (NSString *)millennialMediaApIDString; // your ApID string from Millennial Media. +- (NSString *)MdotMApplicationKey; // your Application Code from MdotM +- (NSString *)googleAdSenseClientID; // your publisher ID from Google AdSense +- (NSString *)zestADZClientID; // your clientID from ZestADZ +- (NSString *)brightRollAppId; // your BrightRoll App ID +- (NSString *)inMobiAppID; // your inMobi app ID +- (NSString *)oneRiotAppID; +- (NSDictionary *) nexageDictionary; // your nexage dcn and position + + +#pragma mark demographic information optional delegate methods +- (CLLocation *)locationInfo; // user's current location +- (NSString *)postalCode; // user's postal code, e.g. "94401" +- (NSString *)areaCode; // user's area code, e.g. "415" +- (NSDate *)dateOfBirth; // user's date of birth +- (NSString *)gender; // user's gender (e.g. @"m" or @"f") +- (NSString *)keywords; // keywords the user has provided or that are contextually relevant, e.g. @"twitter client iPhone" +- (NSString *)searchString; // a search string the user has provided, e.g. @"Jasmine Tea House San Francisco" +- (NSUInteger)incomeLevel; // return actual annual income + + +#pragma mark QuattroWireless-specific optional delegate methods +/** + * Return the ad type desired for Quattro + * QWAdTypeBanner = 0, + * QWAdTypeText=2, + */ +- (NSUInteger)quattroWirelessAdType; + +/** + * Return a value for the education level if you have access to this info. This + * information will be relayed to Quattro Wireless if provided. + * QWEducationNoCollege = 0 + * QWEducationCollegeGraduate = 1 + * QWEducationGraduateSchool = 2 + * QWEducationUnknown = 3 + */ +- (NSUInteger)quattroWirelessEducationLevel; + +/** + * Return a value for the ethnicity if you have access to this info. This + * information will be relayed to Quattro Wireless if provided. + * QWEthnicGroupAfrican_American = 0 + * QWEthnicGroupAsian = 1 + * QWEthnicGroupHispanic = 2 + * QWEthnicGroupWhite = 3 + * QWEthnicGroupOther = 4 + */ +- (NSUInteger)quattroWirelessEthnicity; + + +#pragma mark MillennialMedia-specific optional delegate methods +/** + * Return the ad type desired for Millennial Media, depending on your ad position + * MMBannerAdTop = 1, + * MMBannerAdBottom = 2, + */ +- (NSUInteger)millennialMediaAdType; + +/** + * Return a value for the education level if you have access to this info. This + * information will be relayed to Millennial Media if provided + * MMEducationUnknown = 0, + * MMEducationHishSchool = 1, + * MMEducationSomeCollege = 2, + * MMEducationInCollege = 3, + * MMEducationBachelorsDegree = 4, + * MMEducationMastersDegree = 5, + * MMEducationPhD = 6 + */ +- (NSUInteger)millennialMediaEducationLevel; + +/** + * Return a value for ethnicity if you have access to this info. This + * information will be relayed to Millennial Media if provided. + * MMEthnicityUnknown = 0, + * MMEthnicityAfricanAmerican = 1, + * MMEthnicityAsian = 2, + * MMEthnicityCaucasian = 3, + * MMEthnicityHispanic = 4, + * MMEthnicityNativeAmerican = 5, + * MMEthnicityMixed = 6 + */ +- (NSUInteger)millennialMediaEthnicity; + +- (NSUInteger)millennialMediaAge DEPRECATED_ATTRIBUTE; // use dateOfBirth + + +#pragma mark Jumptap-specific optional delegate methods +/** + * optional site and spot id as provided by Jumptap. + */ +- (NSString *)jumptapSiteId; +- (NSString *)jumptapSpotId; + +/** + * Find a list of valid categories at https://support.jumptap.com/index.php/Valid_Categories + */ +- (NSString *)jumptapCategory; + +/** + * Whether adult content is allowed. + * AdultContentAllowed = 0, + * AdultContentNotAllowed = 1, + * AdultContentOnly = 2 + */ +- (NSUInteger)jumptapAdultContent; + +/** + * The transition to use when moving from, say, a banner to full-screen. + * TransitionHorizontalSlide = 0, + * TransitionVerticalSlide = 1, + * TransitionCurl = 2, + * TransitionFlip = 3 + */ +- (NSUInteger)jumptapTransitionType; + + +#pragma mark Google AdSense-specific delegate methods +/** + These are *REQUIRED* for googleAdSense. If you don't implement these methods, + your app will crash as the AdSense adapter looks for these methods. + */ +- (NSString *)googleAdSenseCompanyName; +- (NSString *)googleAdSenseAppName; +- (NSString *)googleAdSenseApplicationAppleID; + +/** + The following are optional and correspond to the optional kGADAdSense* ad attributes. + For documentation, see GADAdSenseParameters.h . + */ +- (NSString *)googleAdSenseKeywords; +- (NSURL *)googleAdSenseAppWebContentURL; +- (NSArray *)googleAdSenseChannelIDs; +- (NSString *)googleAdSenseAdType; +- (NSString *)googleAdSenseHostID; +//- (UIColor *)googleAdSenseAdBackgroundColor; // implement adWhirlAdBackgroundColor or set in server +- (UIColor *)googleAdSenseAdTopBackgroundColor; +- (UIColor *)googleAdSenseAdBorderColor; +- (UIColor *)googleAdSenseAdLinkColor; +//- (UIColor *)googleAdSenseAdTextColor; // implement adWhirlTextColor or set in server +- (UIColor *)googleAdSenseAdURLColor; +- (UIColor *)googleAdSenseAlternateAdColor; +- (NSURL *)googleAdSenseAlternateAdURL; +- (NSNumber *)googleAdSenseAllowAdsafeMedium; + + +#pragma mark InMobi-specific optional delegate methods +/** + * Education level for InMobi + * Edu_None = 0 + * Edu_HighSchool = 1 + * Edu_SomeCollege = 2 + * Edu_InCollege = 3 + * Edu_BachelorsDegree = 4 + * Edu_MastersDegree = 5 + * Edu_DoctoralDegree = 6 + * Edu_Other = 7 + */ +- (NSUInteger)inMobiEducation; + +/** + Eth_None = 0, + Eth_Mixed = 1, + Eth_Asian = 2, + Eth_Black = 3, + Eth_Hispanic = 4, + Eth_NativeAmerican = 5, + Eth_White = 6, + Eth_Other = 7 + */ +- (NSUInteger)inMobiEthnicity; + +/** + * See inMobi's documentation for valid values + */ +- (NSString *)inMobiInterests; + +- (NSString *)iAdAdvertisingSection; + +- (NSDictionary *)inMobiParamsDictionary; + +#pragma mark OneRiot-specific optional delegate methods + +/** Returns an array of NSStrings containing all optional context parameters + */ +- (NSArray *)oneRiotContextParameters; + +#pragma mark Nexage-specific optional delegate methods +-(NSString *)nexageCity; +-(NSString *)nexageDesignatedMarketArea; +-(NSString *)nexageCountry; +-(NSString *)nexageEthnicity; +-(NSString *)nexageMaritalStatus; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlView.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlView.h new file mode 100644 index 000000000..7799fbdc6 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/AdWhirlView.h @@ -0,0 +1,231 @@ +/* + + AdWhirlView.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import "AdWhirlDelegateProtocol.h" +#import "AWNetworkReachabilityWrapper.h" +#import "AdWhirlConfig.h" + +#define kAdWhirlAppVer 310 + +#define kAdWhirlViewWidth 320 +#define kAdWhirlViewHeight 50 +#define kAdWhirlViewDefaultSize \ + (CGSizeMake(kAdWhirlViewWidth, kAdWhirlViewHeight)) +#define kAdWhirlViewDefaultFrame \ + (CGRectMake(0,0,kAdWhirlViewWidth, kAdWhirlViewHeight)) + +#define kAdWhirlDefaultConfigURL @"http://mob.adwhirl.com/getInfo.php" +#define kAdWhirlDefaultImpMetricURL @"http://met.adwhirl.com/exmet.php" +#define kAdWhirlDefaultClickMetricURL @"http://met.adwhirl.com/exclick.php" +#define kAdWhirlDefaultCustomAdURL @"http://mob.adwhirl.com/custom.php" +#define kAWMinimumTimeBetweenFreshAdRequests 4.9f +#define kAdWhirlAdRequestTimeout 10 + + +@class AdWhirlAdNetworkConfig; +@class AdWhirlAdNetworkAdapter; +@class AdWhirlConfigStore; +@class AWNetworkReachabilityWrapper; + + +@interface AdWhirlView : UIView { + id delegate; + AdWhirlConfig *config; + + NSMutableArray *prioritizedAdNetCfgs; + double totalPercent; + + BOOL ignoreAutoRefreshTimer; + BOOL ignoreNewAdRequests; + BOOL appInactive; + BOOL showingModalView; + + BOOL requesting; + AdWhirlAdNetworkAdapter *currAdapter; + AdWhirlAdNetworkAdapter *lastAdapter; + NSDate *lastRequestTime; + NSMutableDictionary *pendingAdapters; + + NSTimer *refreshTimer; + + // remember which adapter we last sent click stats for so we don't send twice + id lastNotifyAdapter; + + NSError *lastError; + + AdWhirlConfigStore *configStore; + + AWNetworkReachabilityWrapper *rollOverReachability; + + NSUInteger configFetchAttempts; + + NSArray *testDarts; + NSUInteger testDartIndex; +} + +/** + * Call this method to get a view object that you can add to your own view. You + * must also provide a delegate. The delegate provides AdWhirl's application + * key and can listen for important messages. You can configure the view's + * settings and specific ad network information on AdWhirl.com or your own + * AdWhirl server instance. + */ ++ (AdWhirlView *)requestAdWhirlViewWithDelegate:(id)delegate; + +/** + * Starts pre-fetching ad network configurations from an AdWhirl server. If the + * configuration has been fetched when you are ready to request an ad, you save + * a round-trip to the network and hence your ad may show up faster. You + * typically call this in the applicationDidFinishLaunching: method of your + * app delegate. The request is non-blocking. You only need to call this + * at most once per run of your application. Subsequent calls to this function + * will be ignored. + */ ++ (void)startPreFetchingConfigurationDataWithDelegate:(id)d; + +/** + * Call this method to request a new configuration from the AdWhirl servers. + * This can be useful to support iOS 4.0 backgrounding. + */ ++ (void)updateAdWhirlConfigWithDelegate:(id)delegate; + +/** + * Call this method to request a new configuration from the AdWhirl servers. + */ +- (void)updateAdWhirlConfig; + +/** + * Call this method to get another ad to display. You can also specify under + * "app settings" on adwhirl.com to automatically get new ads periodically. + */ +- (void)requestFreshAd; + +/** + * Call this method if you prefer a rollover instead of a getNextAd call. This + * is offered primarily for developers who want to use generic notifications and + * then execute a rollover when an ad network fails to serve an ad. + */ +- (void)rollOver; + +/** + * The delegate is informed asynchronously whether an ad succeeds or fails to + * load. If you prefer to poll for this information, you can do so using this + * method. + * + */ +- (BOOL)adExists; + +/** + * Different ad networks may return different ad sizes. You may adjust the size + * of the AdWhirlView and your UI to avoid unsightly borders or chopping off + * pixels from ads. Call this method when you receive the adWhirlDidReceiveAd + * delegate method to get the size of the underlying ad network ad. + */ +- (CGSize)actualAdSize; + +/** + * Some ad networks may offer different banner sizes for different orientations. + * Call this function when the orientation of your UI changes so the underlying + * ad may handle the orientation change properly. You may also want to + * call the actualAdSize method right after calling this to get the size of + * the ad after the orientation change. + */ +- (void)rotateToOrientation:(UIInterfaceOrientation)orientation; + +/** + * Call this method to get the name of the most recent ad network that an ad + * request was made to. + */ +- (NSString *)mostRecentNetworkName; + +/** + * Call this method to ignore the automatic refresh timer. + * + * Note that the refresh timer is NOT invalidated when you call + * ignoreAutoRefreshTimer. + * This will simply ignore the refresh events that are called by the automatic + * refresh timer (if the refresh timer is enabled via adwhirl.com). So, for + * example, let's say you have a refresh cycle of 60 seconds. If you call + * ignoreAutoRefreshTimer at 30 seconds, and call resumeRefreshTimer at 90 sec, + * then the first refresh event is ignored, but the second refresh event at 120 + * sec will run. + */ +- (void)ignoreAutoRefreshTimer; +- (void)doNotIgnoreAutoRefreshTimer; +- (BOOL)isIgnoringAutoRefreshTimer; + +/** + * Call this method to ignore automatic refreshes AND manual refreshes entirely. + * + * This is provided for developers who asked to disable refreshing entirely, + * whether automatic or manual. + * If you call ignoreNewAdRequests, the AdWhirl will: + * 1) Ignore any Automatic refresh events (via the refresh timer) AND + * 2) Ignore any manual refresh calls (via requestFreshAd and rollOver) + */ +- (void)ignoreNewAdRequests; +- (void)doNotIgnoreNewAdRequests; +- (BOOL)isIgnoringNewAdRequests; + +/** + * Call this to replace the content of this AdWhirlView with the view. + */ +- (void)replaceBannerViewWith:(UIView*)bannerView; + +/** + * You can set the delegate to nil or another object. + * Make sure you set the delegate to nil when you release an AdWhirlView + * instance to avoid the AdWhirlView from calling to a non-existent delegate. + * If you set the delegate to another object, note that if the new delegate + * returns a different value for adWhirlApplicationKey, it will not overwrite + * the application key provided by the delegate you supplied for + * +requestAdWhirlViewWithDelegate . + */ +@property (nonatomic, assign) IBOutlet id delegate; + +/** + * Use this to retrieve more information after your delegate received a + * adWhirlDidFailToReceiveAd message. + */ +@property (nonatomic, readonly) NSError *lastError; + + +#pragma mark For ad network adapters use only + +/** + * Called by Adapters when there's a new ad view. + */ +- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter + didReceiveAdView:(UIView *)view; + +/** + * Called by Adapters when ad view failed. + */ +- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter didFailAd:(NSError *)error; + +/** + * Called by Adapters when the ad request is finished, but the ad view is + * furnished elsewhere. e.g. Generic Notification + */ +- (void)adapterDidFinishAdRequest:(AdWhirlAdNetworkAdapter *)adapter; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdNetworkAdapter.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdNetworkAdapter.h new file mode 100644 index 000000000..a217d72e2 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdNetworkAdapter.h @@ -0,0 +1,128 @@ +/* + + AdWhirlAdNetworkAdapter.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlDelegateProtocol.h" +#import "AdWhirlConfig.h" + +typedef enum { + AdWhirlAdNetworkTypeAdMob = 1, + AdWhirlAdNetworkTypeJumpTap = 2, + AdWhirlAdNetworkTypeVideoEgg = 3, + AdWhirlAdNetworkTypeMedialets = 4, + AdWhirlAdNetworkTypeLiveRail = 5, + AdWhirlAdNetworkTypeMillennial = 6, + AdWhirlAdNetworkTypeGreyStripe = 7, + AdWhirlAdNetworkTypeQuattro = 8, + AdWhirlAdNetworkTypeCustom = 9, + AdWhirlAdNetworkTypeAdWhirl10 = 10, + AdWhirlAdNetworkTypeMobClix = 11, + AdWhirlAdNetworkTypeMdotM = 12, + AdWhirlAdNetworkTypeAdWhirl13 = 13, + AdWhirlAdNetworkTypeGoogleAdSense = 14, + AdWhirlAdNetworkTypeGoogleDoubleClick = 15, + AdWhirlAdNetworkTypeGeneric = 16, + AdWhirlAdNetworkTypeEvent = 17, + AdWhirlAdNetworkTypeInMobi = 18, + AdWhirlAdNetworkTypeIAd = 19, + AdWhirlAdNetworkTypeZestADZ = 20, + AdWhirlAdNetworkTypeBrightRoll = 21, + AdWhirlAdNetworkTypeTapAd = 22, + AdWhirlAdNetworkTypeOneRiot = 23, + AdWhirlAdNetworkTypeNexage = 24 +} AdWhirlAdNetworkType; + +@class AdWhirlView; +@class AdWhirlConfig; +@class AdWhirlAdNetworkConfig; + +@interface AdWhirlAdNetworkAdapter : NSObject { + id adWhirlDelegate; + AdWhirlView *adWhirlView; + AdWhirlConfig *adWhirlConfig; + AdWhirlAdNetworkConfig *networkConfig; + UIView *adNetworkView; +} + +/** + * Subclasses must implement +networkType to return an AdWhirlAdNetworkType enum. + */ +//+ (AdWhirlAdNetworkType)networkType; + +/** + * Subclasses must add itself to the AdWhirlAdNetworkRegistry. One way + * to do so is to implement the +load function and register there. + */ +//+ (void)load; + +/** + * Default initializer. Subclasses do not need to override this method unless + * they need to perform additional initialization. In which case, this + * method must be called via the super keyword. + */ +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf; + +/** + * Ask the adapter to get an ad. This must be implemented by subclasses. + */ +- (void)getAd; + +/** + * When called, the adapter must remove itself as a delegate or notification + * observer from the underlying ad network SDK. Subclasses must implement this + * method, even if the underlying SDK doesn't have a way of removing delegate + * (in which case, you should contact the ad network). Note that this method + * will be called in dealloc at AdWhirlAdNetworkAdapter, before adNetworkView + * is released. Care must be taken if you also keep a reference of your ad view + * in a separate instance variable, as you may have released that variable + * before this gets called in AdWhirlAdNetworkAdapter's dealloc. Use + * adNetworkView, defined in this class, instead of your own instance variable. + * This function should also be idempotent, i.e. get called multiple times and + * not crash. + */ +- (void)stopBeingDelegate; + +/** + * Subclasses return YES to ask AdWhirlView to send metric requests to the + * AdWhirl server for ad impressions. Default is YES. + */ +- (BOOL)shouldSendExMetric; + +/** + * Tell the adapter that the interface orientation changed or is about to change + */ +- (void)rotateToOrientation:(UIInterfaceOrientation)orientation; + +/** + * Some ad transition types may cause issues with particular ad networks. The + * adapter should know whether the given animation type is OK. Defaults to + * YES. + */ +- (BOOL)isBannerAnimationOK:(AWBannerAnimationType)animType; + +@property (nonatomic,assign) id adWhirlDelegate; +@property (nonatomic,assign) AdWhirlView *adWhirlView; +@property (nonatomic,retain) AdWhirlConfig *adWhirlConfig; +@property (nonatomic,retain) AdWhirlAdNetworkConfig *networkConfig; +@property (nonatomic,retain) UIView *adNetworkView; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.h new file mode 100644 index 000000000..ad8353501 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.h @@ -0,0 +1,36 @@ +/* + AdWhirlAdapterBrightRoll.h + + Copyright 2010 BrightRoll, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "BRBannerAd.h" +#import "BRBannerAdDelegate.h" +#import "BRFullScreenAd.h" +#import "BRFullScreenAdDelegate.h" + +@interface AdWhirlAdapterBrightRoll : AdWhirlAdNetworkAdapter +{ + BRBannerAd *brBannerAd; +} + +@property (nonatomic, retain) BRBannerAd *brBannerAd; + ++ (AdWhirlAdNetworkType)networkType; +- (void)brBannerAdFetched:(BRBannerAd *)brBannerAd; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.m new file mode 100644 index 000000000..390c8e61e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterBrightRoll.m @@ -0,0 +1,137 @@ +/* + + AdWhirlAdapterBrightRoll.m + + Copyright 2009 BrightRoll, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterBrightRoll.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlView.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkConfig.h" + +@implementation AdWhirlAdapterBrightRoll + +@synthesize brBannerAd; + ++ (AdWhirlAdNetworkType)networkType +{ + return AdWhirlAdNetworkTypeBrightRoll; +} + ++ (void)load +{ + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)stopObserving +{ + [[NSNotificationCenter defaultCenter] + removeObserver:self + name:@"AdWhirlViewWillAnimateToNewAd" + object:self.adWhirlView]; +} + +- (void)stopBeingDelegate +{ + [self stopObserving]; + self.brBannerAd.delegate = nil; + self.brBannerAd = nil; +} + +- (void)getAd +{ + self.brBannerAd = [BRBannerAd fetchWithDelegate:self]; +} + +#pragma mark BRBannerAdDelegate required methods + +- (NSString *)brBannerAdAppId:(BRBannerAd *)theBrBannerAd +{ + if ([adWhirlDelegate respondsToSelector:@selector(brightRollAppId)]) + { + return [adWhirlDelegate brightRollAppId]; + } + return networkConfig.pubId; +} + +- (void)brBannerAdFetched:(BRBannerAd *)theBrBannerAd +{ + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(adWhirlWillAnimateToNewAdIn:) + name:@"AdWhirlViewWillAnimateToNewAd" + object:self.adWhirlView]; + + brBannerAd.fullScreenAd.delegate = self; + self.adNetworkView = brBannerAd.view; + [self.adWhirlView adapter:self didReceiveAdView:brBannerAd.view]; +} + +- (void)brBannerAdFetchFailed:(BRBannerAd *)bannerAd +{ + [adWhirlView + adapter:self + didFailAd:[NSError + errorWithDomain:@"com.brightroll.BrightRoll_iPhone_SDK" + code:404 + userInfo:[NSDictionary dictionary]]]; +} + +- (void)brBannerAdWillShowFullScreenAd:(BRBannerAd *)bannerAd +{ + [self helperNotifyDelegateOfFullScreenModal]; +} + +#pragma mark AdWhirlView notification methods + +- (void)adWhirlWillAnimateToNewAdIn:(NSNotification *)notification +{ + if ([self.adWhirlView performSelector:@selector(currAdapter)] == self) + { + [self stopObserving]; + [self helperNotifyDelegateOfFullScreenModal]; + [brBannerAd.fullScreenAd show]; + } +} + +#pragma mark BRFullScreenAdDelegate required methods + +- (UIViewController *)brFullScreenAdControllerParent +{ + return [self.adWhirlDelegate viewControllerForPresentingModalView]; +} + +- (void)brFullScreenAdDismissed:(BRFullScreenAd *)brFullScreenAd +{ + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +- (NSString *)brightRollAppId +{ + NSString *appId = [self.networkConfig.credentials objectForKey:@"pubid"]; + + if (!appId) + { + appId = [self.adWhirlDelegate brightRollAppId]; + } + + return appId; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.h new file mode 100644 index 000000000..245e367ba --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.h @@ -0,0 +1,32 @@ +/* + + AdWhirlAdapterGoogleAdMobAds.h + Copyright 2011 Google, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdNetworkAdapter.h" +#import "GADBannerViewDelegate.h" + +@interface AdWhirlAdapterGoogleAdMobAds : AdWhirlAdNetworkAdapter + { +} + +- (SEL)delegatePublisherIdSelector; +- (NSString *)hexStringFromUIColor:(UIColor *)color; ++ (AdWhirlAdNetworkType)networkType; +- (NSString *)publisherId; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.m new file mode 100644 index 000000000..bcff47e72 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdMobAds.m @@ -0,0 +1,199 @@ +/* + + AdWhirlAdapterGoogleAdMobAds.m + Copyright 2011 Google, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterGoogleAdMobAds.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlView.h" +#import "GADBannerView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterGoogleAdMobAds + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeAdMob; +} + +// converts UIColor to hex string, ignoring alpha. +- (NSString *)hexStringFromUIColor:(UIColor *)color { + CGColorSpaceModel colorSpaceModel = + CGColorSpaceGetModel(CGColorGetColorSpace(color.CGColor)); + if (colorSpaceModel == kCGColorSpaceModelRGB + || colorSpaceModel == kCGColorSpaceModelMonochrome) { + const CGFloat *colors = CGColorGetComponents(color.CGColor); + CGFloat red = 0.0, green = 0.0, blue = 0.0; + if (colorSpaceModel == kCGColorSpaceModelRGB) { + red = colors[0]; + green = colors[1]; + blue = colors[2]; + // we ignore alpha here. + } else if (colorSpaceModel == kCGColorSpaceModelMonochrome) { + red = green = blue = colors[0]; + } + return [NSString stringWithFormat:@"%02X%02X%02X", + (int)(red * 255), (int)(green * 255), (int)(blue * 255)]; + } + return nil; +} + +- (NSObject *)delegateValueForSelector:(SEL)selector { + return ([adWhirlDelegate respondsToSelector:selector]) ? + [adWhirlDelegate performSelector:selector] : nil; +} + +- (void)getAd { + GADRequest *request = [GADRequest request]; + NSObject *value; + + NSMutableDictionary *additional = [NSMutableDictionary dictionary]; + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)] + && [adWhirlDelegate adWhirlTestMode]) { + [additional setObject:@"on" forKey:@"adtest"]; + } + + if ((value = [self delegateValueForSelector: + @selector(adWhirlAdBackgroundColor)])) { + [additional setObject:[self hexStringFromUIColor:(UIColor *)value] + forKey:@"color_bg"]; + } + + if ((value = [self delegateValueForSelector: + @selector(adWhirlAdBackgroundColor)])) { + [additional setObject:[self hexStringFromUIColor:(UIColor *)value] + forKey:@"color_text"]; + } + + // deliberately don't allow other color specifications. + + if ([additional count] > 0) { + request.additionalParameters = additional; + } + + CLLocation *location = + (CLLocation *)[self delegateValueForSelector:@selector(locationInfo)]; + + if ((adWhirlConfig.locationOn) && (location)) { + [request setLocationWithLatitude:location.coordinate.latitude + longitude:location.coordinate.longitude + accuracy:location.horizontalAccuracy]; + } + + NSString *string = + (NSString *)[self delegateValueForSelector:@selector(gender)]; + + if ([string isEqualToString:@"m"]) { + request.gender = kGADGenderMale; + } else if ([string isEqualToString:@"f"]) { + request.gender = kGADGenderFemale; + } else { + request.gender = kGADGenderUnknown; + } + + if ((value = [self delegateValueForSelector:@selector(dateOfBirth)])) { + request.birthday = (NSDate *)value; + } + + if ((value = [self delegateValueForSelector:@selector(keywords)])) { + NSArray *keywordArray = + [(NSString *)value componentsSeparatedByString:@" "]; + request.keywords = [NSMutableArray arrayWithArray:keywordArray]; + } + + // Set the frame for this view to match the bounds of the parent adWhirlView. + GADBannerView *view = + [[GADBannerView alloc] initWithFrame:adWhirlView.bounds]; + + view.adUnitID = [self publisherId]; + view.delegate = self; + view.rootViewController = + [adWhirlDelegate viewControllerForPresentingModalView]; + + self.adNetworkView = [view autorelease]; + + [view loadRequest:request]; +} + +- (void)stopBeingDelegate { + if (self.adNetworkView != nil + && [self.adNetworkView respondsToSelector:@selector(setDelegate:)]) { + [self.adNetworkView performSelector:@selector(setDelegate:) + withObject:nil]; + } +} + +#pragma mark Ad Request Lifecycle Notifications + +// Sent when an ad request loaded an ad. This is a good opportunity to add +// this view to the hierarchy if it has not yet been added. +- (void)adViewDidReceiveAd:(GADBannerView *)adView { + [adWhirlView adapter:self didReceiveAdView:adView]; +} + +// Sent when an ad request failed. Normally this is because no network +// connection was available or no ads were available (i.e. no fill). +- (void)adView:(GADBannerView *)adView + didFailToReceiveAdWithError:(GADRequestError *)error { + [adWhirlView adapter:self didFailAd:error]; +} + +#pragma mark Click-Time Lifecycle Notifications + +// Sent just before presenting the user a full screen view, such as a browser, +// in response to clicking on an ad. Use this opportunity to stop animations, +// time sensitive interactions, etc. +// +// Normally the user looks at the ad, dismisses it, and control returns to your +// application by calling adViewDidDismissScreen:. However if the user hits +// the Home button or clicks on an App Store link your application will end. +// On iOS 4.0+ the next method called will be applicationWillResignActive: of +// your UIViewController (UIApplicationWillResignActiveNotification). +// Immediately after that adViewWillLeaveApplication: is called. +- (void)adViewWillPresentScreen:(GADBannerView *)adView { + [self helperNotifyDelegateOfFullScreenModal]; +} + +// Sent just after dismissing a full screen view. Use this opportunity to +// restart anything you may have stopped as part of adViewWillPresentScreen:. +- (void)adViewDidDismissScreen:(GADBannerView *)adView { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +#pragma mark parameter gathering methods + +- (SEL)delegatePublisherIdSelector { + return @selector(admobPublisherID); +} + +- (NSString *)publisherId { + SEL delegateSelector = [self delegatePublisherIdSelector]; + + if ((delegateSelector) && + ([adWhirlDelegate respondsToSelector:delegateSelector])) { + return [adWhirlDelegate performSelector:delegateSelector]; + } + + return networkConfig.pubId; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.h new file mode 100644 index 000000000..46f28462d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.h @@ -0,0 +1,42 @@ +/* + + AdWhirlAdapterGoogleAdSense.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "GADAdViewController.h" +#import "GADAdSenseParameters.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlView.h" + +@interface AdWhirlAdapterGoogleAdSense : AdWhirlAdNetworkAdapter { + GADAdViewController *adViewController; +} + +@property (retain) GADAdViewController *adViewController; + ++ (NSInteger)networkType; + +- (NSString *)publisherId; +- (NSString *)companyName; +- (NSString *)appName; +- (NSString *)applicationAppleID; +- (NSNumber *)testMode; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.m new file mode 100644 index 000000000..aebd520f9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGoogleAdSense.m @@ -0,0 +1,189 @@ +/* + + AdWhirlAdapterGoogleAdSense.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdapterGoogleAdSense.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlConfig.h" +#import "AdWhirlLog.h" + +static NSDictionary *GASParamNameToSel; + +@implementation AdWhirlAdapterGoogleAdSense + +@synthesize adViewController; + ++ (NSInteger)networkType { + return AdWhirlAdNetworkTypeGoogleAdSense; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; + GASParamNameToSel = [[NSDictionary alloc] initWithObjectsAndKeys: + @"googleAdSenseKeywords", kGADAdSenseKeywords, + @"googleAdSenseAppWebContentURL", kGADAdSenseAppWebContentURL, + @"googleAdSenseChannelIDs", kGADAdSenseChannelIDs, + @"googleAdSenseAdType", kGADAdSenseAdType, + @"googleAdSenseHostID", kGADAdSenseHostID, + @"adWhirlAdBackgroundColor", kGADAdSenseAdBackgroundColor, + @"googleAdSenseAdTopBackgroundColor", kGADAdSenseAdTopBackgroundColor, + @"googleAdSenseAdBorderColor", kGADAdSenseAdBorderColor, + @"googleAdSenseAdLinkColor", kGADAdSenseAdLinkColor, + @"adWhirlTextColor", kGADAdSenseAdTextColor, + @"googleAdSenseAdURLColor", kGADAdSenseAdURLColor, + @"googleAdSenseAlternateAdColor", kGADAdSenseAlternateAdColor, + @"googleAdSenseAlternateAdURL", kGADAdSenseAlternateAdURL, + @"googleAdSenseAllowAdsafeMedium", kGADAdSenseAllowAdsafeMedium, + nil]; +} + +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf { + self = [super initWithAdWhirlDelegate:delegate + view:view + config:config + networkConfig:netConf]; + if (self != nil) { + // Check that the required methods are implemented. + if (![delegate respondsToSelector:@selector(googleAdSenseCompanyName)]) { + [NSException raise:NSInvalidArgumentException format: + @"You must implement googleAdSenseCompanyName in your AdwhirlDelegate in order to use Google AdSense"]; + } + if (![delegate respondsToSelector:@selector(googleAdSenseAppName)]) { + [NSException raise:NSInvalidArgumentException format: + @"You must implement googleAdSenseAppName in your AdwhirlDelegate in order to use Google AdSense"]; + } + if (![delegate respondsToSelector:@selector(googleAdSenseApplicationAppleID)]) { + [NSException raise:NSInvalidArgumentException format: + @"You must implement googleAdSenseApplicationAppleID in your AdwhirlDelegate in order to use Google AdSense"]; + } + } + return self; +} + +- (void)getAd { + adViewController = [[GADAdViewController alloc] initWithDelegate:self]; + + NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [self publisherId], kGADAdSenseClientID, + [self companyName], kGADAdSenseCompanyName, + [self appName], kGADAdSenseAppName, + [self applicationAppleID], kGADAdSenseApplicationAppleID, + [self testMode], kGADAdSenseIsTestAdRequest, + nil]; + + // optional params + for (NSString *paramName in GASParamNameToSel) { + SEL sel = NSSelectorFromString((NSString *)[GASParamNameToSel objectForKey:paramName]); + if ([adWhirlDelegate respondsToSelector:sel]) { + NSObject *val = [adWhirlDelegate performSelector:sel]; + if (val != nil) { + [attributes setObject:val forKey:paramName]; + } + } + } + + AWLogDebug(@"Google AdSense attributes: %@", attributes); + // load the ad + adViewController.adSize = kGADAdSize320x50; + [adViewController loadGoogleAd:attributes]; + adViewController.view.frame = kAdWhirlViewDefaultFrame; + self.adNetworkView = adViewController.view; +} + +- (void)stopBeingDelegate { + if (adViewController != nil) { + adViewController.delegate = nil; + } +} + +- (void)dealloc { + // need to call here cos adViewController will be nil when super dealloc runs + [self stopBeingDelegate]; + [adViewController release], adViewController = nil; + [super dealloc]; +} + +#pragma mark parameter gathering methods + +- (NSString *)publisherId { + if ([adWhirlDelegate respondsToSelector:@selector(googleAdSenseClientID)]) { + return [adWhirlDelegate googleAdSenseClientID]; + } + + return networkConfig.pubId; +} + +- (NSString *)companyName { + return [adWhirlDelegate googleAdSenseCompanyName]; +} + +- (NSString *)appName { + return [adWhirlDelegate googleAdSenseAppName]; +} + +- (NSString *)applicationAppleID { + return [adWhirlDelegate googleAdSenseApplicationAppleID]; +} + +- (NSNumber *)testMode { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)] + && [adWhirlDelegate adWhirlTestMode]) { + return [NSNumber numberWithInt:1]; + } + return [NSNumber numberWithInt:0]; +} + +#pragma mark GADAdViewControllerDelegate required methods + +- (UIViewController *)viewControllerForModalPresentation:(GADAdViewController *)adController { + return [adWhirlDelegate viewControllerForPresentingModalView]; +} + +#pragma mark GADAdViewControllerDelegate notification methods + +- (void)loadSucceeded:(GADAdViewController *)adController withResults:(NSDictionary *)results { + [adWhirlView adapter:self didReceiveAdView:[adController view]]; +} + +- (void)loadFailed:(GADAdViewController *)adController withError:(NSError *) error { + [adWhirlView adapter:self didFailAd:error]; +} + +- (GADAdClickAction)adControllerActionModelForAdClick:(GADAdViewController *)adController { + [self helperNotifyDelegateOfFullScreenModal]; + return GAD_ACTION_DISPLAY_INTERNAL_WEBSITE_VIEW; // full screen web view +} + +- (void)adControllerDidCloseWebsiteView:(GADAdViewController *)adController { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +- (void)adControllerDidExpandAd:(GADAdViewController *)controller { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)adControllerDidCollapseAd:(GADAdViewController *)controller { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.h new file mode 100644 index 000000000..744c6fc0e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.h @@ -0,0 +1,49 @@ +/* + + AdWhirlAdapterGreystripe.m + + Copyright 2010 Greystripe, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdNetworkAdapter.h" +#import "GreystripeDelegate.h" + +/** + * Banner slot name used to identify the banner ad slot within the Greystripe + * SDK. + */ +extern NSString * const kGSBannerSlotName; + +/** + * Full-screen slot name used to identify the full-screen ad slot within the + * Greystripe SDK. Use this slot name to display full-screen ads as follows: + * + * [GSAdEngine displayFullScreenAdForSlotNamed:kGSFullScreenSlotName]; + * + * If you need to check whether an ad is available for this slot, simply use: + * + * [GSAdEngine isAdReadyForSlotNamed:kGSFullScreenSlotName]; + */ +extern NSString * const kGSFullScreenSlotName; + +@class GSAdView; + +@interface AdWhirlAdapterGreystripe : AdWhirlAdNetworkAdapter { + UIView *innerContainer; + UIView *outerContainer; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.m new file mode 100644 index 000000000..71a415217 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterGreystripe.m @@ -0,0 +1,191 @@ +/* + + AdWhirlAdapterGreystripe.m + + Copyright 2010 Greystripe, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterGreystripe.h" + +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlLog.h" +#import "AdWhirlView.h" +#import "GSAdView.h" +#import "GSAdEngine.h" + +// constants +NSString * const kGSBannerSlotName = @"gsBanner"; +NSString * const kGSFullScreenSlotName = @"gsFullScreen"; + +// static globals +static BOOL g_didStartUpGreystripe; +static NSTimeInterval g_lastAdReadyTime; + +@interface AdWhirlAdapterGreystripe () +- (void)bannerAdReady; +@end + +@implementation AdWhirlAdapterGreystripe + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeGreyStripe; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +/** + * Initialize the Greystripe adapter. The GSAdEngine will be started up the + * first time this method is called, using the ID provided by the AdWhirl + * server. Two slots will be registered with the GSAdEngine: one banner and one + * full-screen. See the note in AdWhirlAdapterGreystripe.h on how to make use + * of the full-screen slot. + */ +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf { + if(self = [super initWithAdWhirlDelegate:delegate view:view config:config networkConfig:netConf]) { + if(!g_didStartUpGreystripe) { + @try { + GSAdSlotDescription * bannerSlot = [GSAdSlotDescription descriptionWithSize:kGSAdSizeBanner name:kGSBannerSlotName]; + GSAdSlotDescription * fullScreenSlot = [GSAdSlotDescription descriptionWithSize:kGSAdSizeIPhoneFullScreen name:kGSFullScreenSlotName]; + [GSAdEngine startupWithAppID:netConf.pubId adSlotDescriptions:[NSArray arrayWithObjects:bannerSlot,fullScreenSlot, nil]]; + g_didStartUpGreystripe = YES; + } + @catch (NSException *e) { + // This exception is thrown when Greystripe is initialized twice. We + // ignore it because if the host app is using Greystripe directly for + // full-screen ads, it may have already initialized Greystripe before + // AdWhirl tried to do the same. + if([e.name isEqualToString:NSInternalInconsistencyException]){ + g_didStartUpGreystripe = YES; + } + else { + @throw e; + } + } + } + } + return self; +} + + +/** + * Fetch a banner ad from Greystripe. This method only fetches banners as all + * full-screen ad fetching is performed implicitly by the GSAdEngine. + */ +- (void)getAd { + GSAdView *gsAdView = [GSAdView adViewForSlotNamed:kGSBannerSlotName delegate:self]; + + // Use default frame, slightly bigger, to be the parent view of gsAdView, so + // when the GSAdView finds its containing view it stops at the inner Container + // and will set the alpha of innerContainer, not the AdWhirlView + innerContainer = [[UIView alloc] initWithFrame:kAdWhirlViewDefaultFrame]; + innerContainer.backgroundColor = [UIColor clearColor]; + [innerContainer addSubview:gsAdView]; + + // Set the outer container to be the size of the gsAdView so there are no unsightly + // borders around the ad + outerContainer = [[UIView alloc] initWithFrame:gsAdView.frame]; + outerContainer.backgroundColor = [UIColor clearColor]; + [outerContainer addSubview:innerContainer]; + self.adNetworkView = outerContainer; + + NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; + NSTimeInterval delta = now - g_lastAdReadyTime; + if(delta > kGSMinimumRefreshInterval) { + // For the initial ad display we will get an ad ready notification + // automatically because the ad is automatically rendered + // regardless of its refresh interval (0 here). For all other + // displays we must force it. + if(g_lastAdReadyTime > 0) { + if([GSAdEngine isNextAdDownloadedForSlotNamed:kGSBannerSlotName]) { + [gsAdView refresh]; + [self bannerAdReady]; + } + else { + AWLogDebug(@"Failing Greystripe banner ad request because the next "\ + "banner ad has not yet been downloaded."); + [adWhirlView adapter:self didFailAd:nil]; + } + } + } + else { + AWLogDebug(@"Failing Greystripe ad request because Greystripe's " + "minimum refresh interval of %f has not elapsed since the "\ + "previous banner display.", kGSMinimumRefreshInterval); + [adWhirlView adapter:self didFailAd:nil]; + } +} + +/** + * Stop being the delegate for banner ads. In order to change the delegate for + * full-screen Greystripe ads, see GSAdEngine's + * setFullScreenDelegate:forSlotNamed: method. + */ +- (void)stopBeingDelegate { + [GSAdView adViewForSlotNamed:kGSBannerSlotName delegate:nil]; +} + +- (void)dealloc { + [innerContainer release]; + [outerContainer release]; + [super dealloc]; +} + +#pragma mark - +#pragma mark GreystripeDelegate notification methods + +/** + * Delegate notification received when Greystripe has a banner ad ready. + */ +- (void)greystripeAdReadyForSlotNamed:(NSString *)a_name { + if ([a_name isEqualToString:kGSBannerSlotName] && g_lastAdReadyTime == 0) { + // Only forward on this notification for the initial notification as + // all other notifications will be sent explicitly after checking + // ad readiness (see getAd). + [self bannerAdReady]; + } +} + +- (void)greystripeFullScreenDisplayWillOpen { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)greystripeFullScreenDisplayWillClose { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +#pragma mark - +#pragma mark Internal methods + +/** + * Notify the host app that Greystripe has received an ad. This only applies + * banner ads that the Greystripe SDK has fetched, as readiness of full-screen + * ads can be always be checked directly via + * [GSAdEngine isAdReadyForSlotNamed:kGSFullScreenSlotName]. + */ +- (void)bannerAdReady { + AWLogDebug(@"Greystripe received banner ad."); + g_lastAdReadyTime = [[NSDate date] timeIntervalSince1970]; + [adWhirlView adapter:self didReceiveAdView:self.adNetworkView]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.h new file mode 100644 index 000000000..f83113ec7 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.h @@ -0,0 +1,31 @@ +/* + + AdWhirlAdapterIAd.h + + Copyright 2010 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdNetworkAdapter.h" +#import + +@interface AdWhirlAdapterIAd : AdWhirlAdNetworkAdapter { + NSString *kADBannerContentSizeIdentifierPortrait; + NSString *kADBannerContentSizeIdentifierLandscape; +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.m new file mode 100644 index 000000000..3f826feb1 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterIAd.m @@ -0,0 +1,135 @@ +/* + + AdWhirlAdapterIAd.m + + Copyright 2010 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdapterIAd.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterIAd + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeIAd; +} + ++ (void)load { + if(NSClassFromString(@"ADBannerView") != nil) { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; + } +} + +- (void)getAd { + ADBannerView *iAdView = [[ADBannerView alloc] initWithFrame:CGRectZero]; + kADBannerContentSizeIdentifierPortrait = + &ADBannerContentSizeIdentifierPortrait != nil ? + ADBannerContentSizeIdentifierPortrait : + ADBannerContentSizeIdentifier320x50; + kADBannerContentSizeIdentifierLandscape = + &ADBannerContentSizeIdentifierLandscape != nil ? + ADBannerContentSizeIdentifierLandscape : + ADBannerContentSizeIdentifier480x32; + iAdView.requiredContentSizeIdentifiers = [NSSet setWithObjects: + kADBannerContentSizeIdentifierPortrait, + kADBannerContentSizeIdentifierLandscape, + nil]; + UIDeviceOrientation orientation; + if ([self.adWhirlDelegate respondsToSelector:@selector(adWhirlCurrentOrientation)]) { + orientation = [self.adWhirlDelegate adWhirlCurrentOrientation]; + } + else { + orientation = [UIDevice currentDevice].orientation; + } + + if (UIDeviceOrientationIsLandscape(orientation)) { + iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierLandscape; + } + else { + iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierPortrait; + } + [iAdView setDelegate:self]; + + self.adNetworkView = iAdView; + [iAdView release]; +} + +- (void)stopBeingDelegate { + ADBannerView *iAdView = (ADBannerView *)self.adNetworkView; + if (iAdView != nil) { + iAdView.delegate = nil; + } +} + +- (void)rotateToOrientation:(UIInterfaceOrientation)orientation { + ADBannerView *iAdView = (ADBannerView *)self.adNetworkView; + if (iAdView == nil) return; + if (UIInterfaceOrientationIsLandscape(orientation)) { + iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierLandscape; + } + else { + iAdView.currentContentSizeIdentifier = kADBannerContentSizeIdentifierPortrait; + } + // ADBanner positions itself in the center of the super view, which we do not + // want, since we rely on publishers to resize the container view. + // position back to 0,0 + CGRect newFrame = iAdView.frame; + newFrame.origin.x = newFrame.origin.y = 0; + iAdView.frame = newFrame; +} + +- (BOOL)isBannerAnimationOK:(AWBannerAnimationType)animType { + if (animType == AWBannerAnimationTypeFadeIn) { + return NO; + } + return YES; +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark IAdDelegate methods + +- (void)bannerViewDidLoadAd:(ADBannerView *)banner { + // ADBanner positions itself in the center of the super view, which we do not + // want, since we rely on publishers to resize the container view. + // position back to 0,0 + CGRect newFrame = banner.frame; + newFrame.origin.x = newFrame.origin.y = 0; + banner.frame = newFrame; + + [adWhirlView adapter:self didReceiveAdView:banner]; +} + +- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error { + [adWhirlView adapter:self didFailAd:error]; +} + +- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave { + [self helperNotifyDelegateOfFullScreenModal]; + return YES; +} + +- (void)bannerViewActionDidFinish:(ADBannerView *)banner { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.h new file mode 100644 index 000000000..d1ab24388 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.h @@ -0,0 +1,37 @@ +/* + + AdWhirlAdapterInMobi.h + + Copyright 2010 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "IMAdDelegate.h" +#import "IMAdRequest.h" + +@class InMobiAdView; + +@interface AdWhirlAdapterInMobi : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; +- (NSString *)siteId; +- (UIViewController *)rootViewControllerForAd; +- (BOOL)testMode; +- (Gender)gender; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.m new file mode 100644 index 000000000..b3846fa60 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterInMobi.m @@ -0,0 +1,173 @@ +/* + + AdWhirlAdapterInMobi.m + + Copyright 2010 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterInMobi.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlView.h" +#import "IMAdView.h" +#import "IMAdRequest.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterInMobi + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeInMobi; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + IMAdView *inMobiView = [[IMAdView alloc] + initWithFrame:kAdWhirlViewDefaultFrame + imAppId:[self siteId] + imAdUnit:IM_UNIT_320x50 + rootViewController:[self rootViewControllerForAd]]; + [inMobiView autorelease]; + inMobiView.refreshInterval = REFRESH_INTERVAL_OFF; + inMobiView.delegate = self; + self.adNetworkView = inMobiView; + + IMAdRequest *request = [IMAdRequest request]; + + if ([self testMode]) { + request.testMode = true; + } + if ([adWhirlDelegate respondsToSelector:@selector(postalCode)]) { + request.postalCode = [adWhirlDelegate postalCode]; + } + if ([adWhirlDelegate respondsToSelector:@selector(areaCode)]) { + request.areaCode = [adWhirlDelegate areaCode]; + } + if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) { + NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; + [formatter setDateFormat:@"dd-MM-yyyy"]; + request.dateOfBirth = [formatter + stringFromDate:[adWhirlDelegate dateOfBirth]]; + } + if ([adWhirlDelegate respondsToSelector:@selector(gender)]) { + if ([adWhirlDelegate gender] == @"m") { + request.gender = G_M; + } else if ([adWhirlDelegate gender] == @"f") { + request.gender = G_F; + } else { + request.gender = G_None; + } + } + if ([adWhirlDelegate respondsToSelector:@selector(keywords)]) { + request.keywords = [adWhirlDelegate keywords]; + } + if ([adWhirlDelegate respondsToSelector:@selector(searchString)]) { + request.searchString = [adWhirlDelegate searchString]; + } + if ([adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) { + request.income = [adWhirlDelegate incomeLevel]; + } + if ([adWhirlDelegate respondsToSelector:@selector(inMobiEducation)]) { + request.education = [adWhirlDelegate inMobiEducation]; + } + if ([adWhirlDelegate respondsToSelector:@selector(inMobiEthnicity)]) { + request.ethnicity = [adWhirlDelegate inMobiEthnicity]; + } + if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) { + request.age = [self helperCalculateAge]; + } + if ([adWhirlDelegate respondsToSelector:@selector(inMobiInterests)]) { + request.interests = [adWhirlDelegate inMobiInterests]; + } + if ([adWhirlDelegate respondsToSelector:@selector(inMobiParamsDictionary)]) { + request.paramsDictionary = [adWhirlDelegate inMobiParamsDictionary]; + } + if (!adWhirlConfig.locationOn) { + request.isLocationEnquiryAllowed = false; + } + + [inMobiView loadIMAdRequest:request]; +} + +- (void)stopBeingDelegate { + InMobiAdView *inMobiView = (InMobiAdView *)self.adNetworkView; + if (inMobiView != nil) { + [inMobiView setDelegate:nil]; + } +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark IMAdView helper methods + +- (NSString *)siteId { + if ([adWhirlDelegate respondsToSelector:@selector(inMobiAppId)]) { + return [adWhirlDelegate inMobiAppID]; + } + return networkConfig.pubId; +} + +- (UIViewController *)rootViewControllerForAd { + return [adWhirlDelegate viewControllerForPresentingModalView]; +} + +- (BOOL)testMode { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]) + return [adWhirlDelegate adWhirlTestMode]; + return NO; +} + +- (Gender)gender { + if ([adWhirlDelegate respondsToSelector:@selector(gender)]) { + NSString *genderStr = [adWhirlDelegate gender]; + if ([genderStr isEqualToString:@"f"]) { + return G_F; + } else if ([genderStr isEqualToString:@"m"]) { + return G_M; + } + } + return G_None; +} + +#pragma mark IMAdDelegate methods + +- (void)adViewDidFinishRequest:(IMAdView *)adView { + [adWhirlView adapter:self didReceiveAdView:adView]; +} + +- (void)adView:(IMAdView *)view didFailRequestWithError:(IMAdError *)error { + NSLog(@"Error %@", error); + [adWhirlView adapter:self didFailAd:nil]; +} + +- (void)adViewWillPresentScreen:(IMAdView *)adView { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)adViewWillDismissScreen:(IMAdView *)adView { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +- (void)adViewWillLeaveApplication:(IMAdView *)adView { + [self helperNotifyDelegateOfFullScreenModal]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.h new file mode 100644 index 000000000..a2d129301 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.h @@ -0,0 +1,30 @@ +/* + + AdWhirlAdapterJumpTap.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "JTAdWidget.h" + +@interface AdWhirlAdapterJumpTap : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.m new file mode 100644 index 000000000..7622366e0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterJumpTap.m @@ -0,0 +1,238 @@ +/* + + AdWhirlAdapterJumpTap.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterJumpTap.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + + +@implementation AdWhirlAdapterJumpTap + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeJumpTap; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + JTAdWidget *widget = [[JTAdWidget alloc] initWithDelegate:self + shouldStartLoading:YES]; + widget.frame = kAdWhirlViewDefaultFrame; + widget.refreshInterval = 0; // do not self-refresh + self.adNetworkView = widget; + + if ([adWhirlDelegate respondsToSelector:@selector(jumptapTransitionType)]) { + widget.transition = [adWhirlDelegate jumptapTransitionType]; + } + [widget release]; +} + +- (void)stopBeingDelegate { + // no way to set JTAdWidget's delegate to nil +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark JTAdWidgetDelegate methods + +- (NSString *)publisherId:(id)theWidget { + NSString *pubId = networkConfig.pubId; + if (pubId == nil) { + NSDictionary *cred = networkConfig.credentials; + if (cred != nil) { + pubId = [cred objectForKey:@"publisherID"]; + } + } + return pubId; +} + +- (NSString *)site:(id)theWidget { + NSString *siteId = nil; + if ([adWhirlDelegate respondsToSelector:@selector(jumptapSiteId)]) { + siteId = [adWhirlDelegate jumptapSiteId]; + } + if (siteId == nil) { + NSDictionary *cred = networkConfig.credentials; + if (cred != nil) { + siteId = [cred objectForKey:@"siteID"]; + } + } + return siteId; +} + +- (NSString *)adSpot:(id)theWidget { + NSString *spotId = nil; + if ([adWhirlDelegate respondsToSelector:@selector(jumptapSpotId)]) { + spotId = [adWhirlDelegate jumptapSpotId]; + } + if (spotId == nil) { + NSDictionary *cred = networkConfig.credentials; + if (cred != nil) { + spotId = [cred objectForKey:@"spotID"]; + } + } + return spotId; +} + +- (BOOL)shouldRenderAd:(id)theWidget { + [adWhirlView adapter:self didReceiveAdView:theWidget]; + return YES; +} + +- (void)beginAdInteraction:(id)theWidget { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)endAdInteraction:(id)theWidget { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +- (void)adWidget:(id)theWidget didFailToShowAd:(NSError *)error { + [adWhirlView adapter:self didFailAd:error]; +} + +- (void)adWidget:(id)theWidget didFailToRequestAd:(NSError *)error { + [adWhirlView adapter:self didFailAd:error]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(location:) + && ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return NO; + } + else if (selector == @selector(query:) + && ![adWhirlDelegate respondsToSelector:@selector(keywords)]) { + return NO; + } + else if (selector == @selector(category:) + && ![adWhirlDelegate respondsToSelector:@selector(jumptapCategory)]) { + return NO; + } + else if (selector == @selector(adultContent:) + && ![adWhirlDelegate respondsToSelector:@selector(jumptapAdultContent)]) { + return NO; + } + return [super respondsToSelector:selector]; +} + +#pragma mark JTAdWidgetDelegate methods -Targeting + +- (NSString *)query:(id)theWidget { + return [adWhirlDelegate keywords]; +} + +- (NSString *)category:(id)theWidget { + return [adWhirlDelegate jumptapCategory]; +} + +- (AdultContent)adultContent:(id)theWidget { + return [adWhirlDelegate jumptapAdultContent]; +} + +#pragma mark JTAdWidgetDelegate methods -General Configuration + +- (NSDictionary*)extraParameters:(id)theWidget { + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:10]; + if ([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) { + NSInteger age = [self helperCalculateAge]; + if (age >= 0) + [dict setObject:[NSString stringWithFormat:@"%d",age] forKey:@"mt-age"]; + } + if ([adWhirlDelegate respondsToSelector:@selector(gender)]) { + NSString *gender = [adWhirlDelegate gender]; + if (gender != nil) + [dict setObject:gender forKey:@"mt-gender"]; + } + if ([adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) { + NSUInteger income = [adWhirlDelegate incomeLevel]; + NSString *level = nil; + if (income < 15000) { + level = @"000_015"; + } + else if (income < 20000) { + level = @"015_020"; + } + else if (income < 30000) { + level = @"020_030"; + } + else if (income < 40000) { + level = @"030_040"; + } + else if (income < 50000) { + level = @"040_050"; + } + else if (income < 75000) { + level = @"050_075"; + } + else if (income < 100000) { + level = @"075_100"; + } + else if (income < 125000) { + level = @"100_125"; + } + else if (income < 150000) { + level = @"125_150"; + } + else { + level = @"150_OVER"; + } + [dict setObject:level forKey:@"mt-hhi"]; + } + return dict; +} + +- (UIColor *)adBackgroundColor:(id)theWidget { + return [self helperBackgroundColorToUse]; +} + +- (UIColor *)adForegroundColor:(id)theWidget { + return [self helperTextColorToUse]; +} + +#pragma mark JTAdWidgetDelegate methods -Location Configuration + +- (BOOL)allowLocationUse:(id)theWidget { + return adWhirlConfig.locationOn; +} + +- (CLLocation*)location:(id)theWidget { + if (![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return nil; + } + return [adWhirlDelegate locationInfo]; +} + +#pragma mark JTAdWidgetDelegate methods -Ad Display and User Interaction +// The ad orientation changed +//- (void)adWidget:(id)theWidget orientationHasChangedTo:(UIInterfaceOrientation)interfaceOrientation; + +// Language methods +//- (NSString*)getPlayVideoPrompt:(id)theWidget; +//- (NSString*)getBackButtonPrompt:(id)theWidget isInterstitial:(BOOL)isInterstitial; +//- (NSString*)getSafariButtonPrompt:(id)theWidget; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.h new file mode 100644 index 000000000..5c8080b3d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.h @@ -0,0 +1,38 @@ +/* + + AdWhirlAdapterMdotM.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlCustomAdView.h" +#import "AdWhirlWebBrowserController.h" + +@interface AdWhirlAdapterMdotM : AdWhirlAdNetworkAdapter { + BOOL requesting; + CLLocationManager *locationManager; + NSURLConnection *adConnection; + NSMutableData *adData; + NSURLConnection *imageConnection; + NSMutableData *imageData; + AdWhirlCustomAdView *adView; + AdWhirlWebBrowserController *webBrowserController; +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.m new file mode 100644 index 000000000..574a9c698 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMdotM.m @@ -0,0 +1,423 @@ +/* + + AdWhirlAdapterMdotM.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterMdotM.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlDelegateProtocol.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlAdapterCustom.h" +#import "AdWhirlError.h" +#import "CJSONDeserializer.h" +#import "AdWhirlCustomAdView.h" + + +@interface AdWhirlAdapterMdotM () + +- (BOOL)parseAdData:(NSData *)data error:(NSError **)error; + +@property (nonatomic,readonly) CLLocationManager *locationManager; +@property (nonatomic,retain) NSURLConnection *adConnection; +@property (nonatomic,retain) NSURLConnection *imageConnection; +@property (nonatomic,retain) AdWhirlCustomAdView *adView; +@property (nonatomic,retain) AdWhirlWebBrowserController *webBrowserController; + +@end + + +@implementation AdWhirlAdapterMdotM + +@synthesize adConnection; +@synthesize imageConnection; +@synthesize adView; +@synthesize webBrowserController; + + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeMdotM; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (BOOL)useTestAd { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)]) + return [adWhirlDelegate adWhirlTestMode]; + return NO; +} + + +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf { + self = [super initWithAdWhirlDelegate:delegate + view:view + config:config + networkConfig:netConf]; + if (self != nil) { + adData = [[NSMutableData alloc] init]; + imageData = [[NSMutableData alloc] init]; + } + return self; +} + +- (NSMutableString *)appendUserContextDic:(NSDictionary *)dic withUrl:(NSString *)sUrl { + NSArray *keyArray = [dic allKeys]; + NSMutableString *str = [NSMutableString stringWithString:sUrl]; + + //Iterate over the context disctionary and for each kay-value pair create a string of the format &key=value + for (int i = 0; i < [keyArray count]; i++) { + [str appendFormat:@"&%@=%@",[keyArray objectAtIndex:i], [dic objectForKey:[keyArray objectAtIndex:i]]]; + } + return str; +} + + +- (void)getAd { + @synchronized(self) { + if (requesting) return; + requesting = YES; + } + + NSString *appKey = networkConfig.pubId; + + if ([adWhirlDelegate respondsToSelector:@selector(MdotMApplicationKey)] ) { + appKey = [adWhirlDelegate MdotMApplicationKey]; + } + + UIDevice *device = [UIDevice currentDevice]; + NSBundle *bundle = [NSBundle mainBundle]; + NSLocale *locale = [NSLocale currentLocale]; + NSString *userAgent = [NSString stringWithFormat:@"%@ %@ (%@; %@ %@; %@)", + [bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"], + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + [device model], + [device systemName], [device systemVersion], + [locale localeIdentifier]]; + int test; + if ( [self useTestAd] ) { + test = 1; + } else + test = 0; + + NSString *str = [NSString stringWithFormat: + @"http://ads.mdotm.com/ads/feed.php?appver=%d&v=%@&apikey=mdotm&appkey=%@&deviceid=%@&width=320&height=50&fmt=json&ua=%@&test=%d", + kAdWhirlAppVer, [[UIDevice currentDevice] systemVersion], + appKey, [[UIDevice currentDevice] uniqueIdentifier], userAgent, test]; + + NSMutableDictionary *userContextDic = [[NSMutableDictionary alloc] initWithCapacity:2]; + if ( [userContextDic count] > 0 ) { + str = [self appendUserContextDic:userContextDic withUrl:str]; + } + + NSString *urlString = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + + NSURL *adRequestURL = [[NSURL alloc] initWithString:urlString]; + AWLogDebug(@"Requesting MdotM ad (%@) %@", str, adRequestURL); + NSURLRequest *adRequest = [NSURLRequest requestWithURL:adRequestURL]; + + + NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:adRequest + delegate:self]; + self.adConnection = conn; + [conn release]; + [adRequestURL release]; + [userContextDic release]; +} + + + + +#pragma mark MdotMDelegate optional methods + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(location) + && ![adWhirlDelegate respondsToSelector:@selector(location)]) { + return NO; + } + else if (selector == @selector(userContext) + && ![adWhirlDelegate respondsToSelector:@selector(userContext)]) { + return NO; + } return [super respondsToSelector:selector]; +} + + +- (CLLocationManager *)locationManager { + if (locationManager == nil) { + locationManager = [[CLLocationManager alloc] init]; + } + return locationManager; +} + +- (BOOL)parseEnums:(int *)val + adInfo:(NSDictionary*)info + minVal:(int)min + maxVal:(int)max + fieldName:(NSString *)name + error:(NSError **)error { + NSString *str = [info objectForKey:name]; + if (str == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:[NSString stringWithFormat: + @"MdotM ad data has no '%@' field", name]]; + return NO; + } + int intVal = [str intValue]; + if (intVal <= min || intVal >= max) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:[NSString stringWithFormat: + @"MdotM ad data: Invalid value for %@ - %d", name, intVal]]; + return NO; + } + *val = intVal; + return YES; +} + +- (BOOL)parseAdData:(NSData *)data error:(NSError **)error { + NSError *jsonError = nil; + id parsed = [[CJSONDeserializer deserializer] deserialize:data error:&jsonError]; + if (parsed == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdParseError + description:@"Error parsing MdotM ad JSON from server" + underlyingError:jsonError]; + return NO; + } + if ([parsed isKindOfClass:[NSArray class]]) { + NSArray *ads = parsed; + NSDictionary *adInfo = nil; + if ( [ads count] == 0 ) { + return(NO); + } else { + id parsed0 =[ads objectAtIndex:0]; + if ( [parsed0 isKindOfClass:[NSDictionary class]] ) { + adInfo = parsed0; + + // gather up and validate ad info + NSString *text = [adInfo objectForKey:@"ad_text"]; + NSString *redirectURLStr = [adInfo objectForKey:@"landing_url"]; + + int adTypeInt; + if (![self parseEnums:&adTypeInt + adInfo:adInfo + minVal:AWCustomAdTypeMIN + maxVal:AWCustomAdTypeMAX + fieldName:@"ad_type" + error:error]) { + return NO; + } + AWCustomAdType adType = adTypeInt; + + int launchTypeInt; + if (![self parseEnums:&launchTypeInt + adInfo:adInfo + minVal:AWCustomAdLaunchTypeMIN + maxVal:AWCustomAdLaunchTypeMAX + fieldName:@"launch_type" + error:error]) { + return NO; + } + AWCustomAdLaunchType launchType = launchTypeInt; + AWCustomAdWebViewAnimType animType = AWCustomAdWebViewAnimTypeCurlDown; + + NSURL *redirectURL = nil; + if (redirectURLStr == nil) { + AWLogWarn(@"No redirect URL for MdotM ad"); + } else { + redirectURL = [[NSURL alloc] initWithString:redirectURLStr]; + if (!redirectURL) + AWLogWarn(@"MdotM ad: Malformed redirect URL string %@", redirectURLStr); + } + AWLogDebug(@"Got MdotM ad %@ %@ %d %d %d", text, redirectURL, + adType, launchType, animType); + + self.adView = [[AdWhirlCustomAdView alloc] initWithDelegate:self + text:text + redirectURL:redirectURL + clickMetricsURL:nil + adType:adType + launchType:launchType + animType:animType + backgroundColor:[self helperBackgroundColorToUse] + textColor:[self helperTextColorToUse]]; + [self.adView release]; + self.adNetworkView = adView; + [redirectURL release]; + if (adView == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:@"Error initializing MdotM ad view"]; + return NO; + } + + // fetch image + id imageURL = [adInfo objectForKey:@"img_url"]; + if ( [imageURL isKindOfClass:[NSString class]]) { + AWLogDebug(@"Request MdotM ad image at %@", imageURL); + NSURLRequest *imageRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:imageURL]]; + NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:imageRequest + delegate:self]; + self.imageConnection = conn; + [conn release]; + } else { + return(NO); + } + } else { + return(NO); + } + } + } else { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:@"Expected top-level dictionary in MdotM ad data"]; + return NO; + } + return YES; +} + +- (void)stopBeingDelegate { + AdWhirlCustomAdView *theAdView = (AdWhirlCustomAdView *)self.adNetworkView; + if (theAdView != nil) { + theAdView.delegate = nil; + } +} + +- (void)dealloc { + [locationManager release], locationManager = nil; + [adConnection release], adConnection = nil; + [adData release], adData = nil; + [imageConnection release], imageConnection = nil; + [imageData release], imageData = nil; + [adView release], adView = nil; + [webBrowserController release], webBrowserController = nil; + [super dealloc]; +} + +#pragma mark NSURLConnection delegate methods. + +- (void)connection:(NSURLConnection *)conn didReceiveResponse:(NSURLResponse *)response { + if (conn == adConnection) { + [adData setLength:0]; + } + else if (conn == imageConnection) { + [imageData setLength:0]; + } +} + +- (void)connection:(NSURLConnection *)conn didFailWithError:(NSError *)error { + if (conn == adConnection) { + [adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError + description:@"Error connecting to MdotM ad server" + underlyingError:error]]; + requesting = NO; + } else if (conn == imageConnection) { + [adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError + description:@"Error connecting to MdotM to fetch image" + underlyingError:error]]; + requesting = NO; + } +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)conn { + if (conn == adConnection) { + NSError *error = nil; + if (![self parseAdData:adData error:&error]) { + [adWhirlView adapter:self didFailAd:error]; + requesting = NO; + return; + } + } + else if (conn == imageConnection) { + UIImage *image = [[UIImage alloc] initWithData:imageData]; + if (image == nil) { + [adWhirlView adapter:self + didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdImageError + description:@"Cannot initialize MdotM ad image from data"]]; + requesting = NO; + return; + } + adView.image = image; + [adView setNeedsDisplay]; + [image release]; + requesting = NO; + [adWhirlView adapter:self didReceiveAdView:self.adView]; + } +} + +- (void)connection:(NSURLConnection *)conn didReceiveData:(NSData *)data { + if (conn == adConnection) { + [adData appendData:data]; + } + else if (conn == imageConnection) { + [imageData appendData:data]; + } +} + +#pragma mark AdWhirlCustomAdViewDelegate methods + +- (void)adTapped:(AdWhirlCustomAdView *)ad { + if (ad != adView) return; + if (ad.clickMetricsURL != nil) { + NSURLRequest *metRequest = [NSURLRequest requestWithURL:ad.clickMetricsURL]; + [NSURLConnection connectionWithRequest:metRequest + delegate:nil]; // fire and forget + } + if (ad.redirectURL == nil) { + AWLogError(@"MdotM ad redirect URL is nil"); + return; + } + switch (ad.launchType) { + case AWCustomAdLaunchTypeSafari: + [[UIApplication sharedApplication] openURL:ad.redirectURL]; + break; + case AWCustomAdLaunchTypeCanvas: + if (self.webBrowserController == nil) { + AdWhirlWebBrowserController *ctrlr = [[AdWhirlWebBrowserController alloc] init]; + self.webBrowserController = ctrlr; + [ctrlr release]; + } + webBrowserController.delegate = self; + [webBrowserController presentWithController:[adWhirlDelegate viewControllerForPresentingModalView] + transition:ad.animType]; + [self helperNotifyDelegateOfFullScreenModal]; + [webBrowserController loadURL:ad.redirectURL]; + break; + default: + AWLogError(@"MdotM ad: Unsupported launch type %d", ad.launchType); + break; + } +} + +#pragma mark AdWhirlWebBrowserControllerDelegate methods + +- (void)webBrowserClosed:(AdWhirlWebBrowserController *)controller { + if (controller != webBrowserController) return; + self.webBrowserController = nil; // don't keep around to save memory + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.h new file mode 100644 index 000000000..21ab998df --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.h @@ -0,0 +1,30 @@ +/* + + AdWhirlAdapterMillennial.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "MMAdView.h" + +@interface AdWhirlAdapterMillennial : AdWhirlAdNetworkAdapter { + NSMutableDictionary *requestData; +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.m new file mode 100644 index 000000000..1d16a2e38 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterMillennial.m @@ -0,0 +1,227 @@ +/* + + AdWhirlAdapterMillennial.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterMillennial.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlDelegateProtocol.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +#define kMillennialAdFrame (CGRectMake(0, 0, 320, 53)) + +@interface AdWhirlAdapterMillennial () + +- (CLLocationDegrees)latitude; + +- (CLLocationDegrees)longitude; + +- (NSInteger)age; + +- (NSString *)zipCode; + +- (NSString *)sex; + +@end + + +@implementation AdWhirlAdapterMillennial + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeMillennial; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + NSString *apID; + if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaApIDString)]) { + apID = [adWhirlDelegate millennialMediaApIDString]; + } + else { + apID = networkConfig.pubId; + } + + requestData = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + @"adwhirl", @"vendor", + nil]; + if ([self respondsToSelector:@selector(zipCode)]) { + [requestData setValue:[self zipCode] forKey:@"zip"]; + } + if ([self respondsToSelector:@selector(age)]) { + [requestData setValue:[NSString stringWithFormat:@"%d",[self age]] forKey:@"age"]; + } + if ([self respondsToSelector:@selector(sex)]) { + [requestData setValue:[self sex] forKey:@"sex"]; + } + if ([self respondsToSelector:@selector(latitude)]) { + [requestData setValue:[NSString stringWithFormat:@"%lf",[self latitude]] forKey:@"lat"]; + } + if ([self respondsToSelector:@selector(longitude)]) { + [requestData setValue:[NSString stringWithFormat:@"%lf",[self longitude]] forKey:@"long"]; + } + MMAdType adType = MMBannerAdTop; + if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaAdType)]) { + adType = [adWhirlDelegate millennialMediaAdType]; + } + MMAdView *adView = [MMAdView adWithFrame:kMillennialAdFrame + type:adType + apid:apID + delegate:self + loadAd:YES + startTimer:NO]; + self.adNetworkView = adView; +} + +- (void)stopBeingDelegate { + MMAdView *adView = (MMAdView *)adNetworkView; + if (adView != nil) { + [adView setRefreshTimerEnabled:false]; + adView.delegate = nil; + } +} + +- (void)dealloc { + [requestData release]; + [super dealloc]; +} + +#pragma mark MMAdDelegate methods + +- (NSDictionary *)requestData { + AWLogDebug(@"Sending requestData to MM: %@", requestData); + return requestData; +} + +- (void)adRequestSucceeded:(MMAdView *)adView { + // millennial ads are slightly taller than default frame, at 53 pixels. + [adWhirlView adapter:self didReceiveAdView:adNetworkView]; +} + +- (void)adRequestFailed:(MMAdView *)adView { + [adWhirlView adapter:self didFailAd:nil]; +} + +- (void)adModalWillAppear { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)adModalWasDismissed { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +#pragma mark requestData optional methods + +// The follow is kept for gathering requestData + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(latitude) + && ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return NO; + } + else if (selector == @selector(longitude) + && ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return NO; + } + else if (selector == @selector(age) + && (!([adWhirlDelegate respondsToSelector:@selector(millennialMediaAge)] + || [adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) + || [self age] < 0)) { + return NO; + } + else if (selector == @selector(zipCode) + && ![adWhirlDelegate respondsToSelector:@selector(postalCode)]) { + return NO; + } + else if (selector == @selector(sex) + && ![adWhirlDelegate respondsToSelector:@selector(gender)]) { + return NO; + } + else if (selector == @selector(householdIncome) + && ![adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) { + return NO; + } + else if (selector == @selector(educationLevel) + && ![adWhirlDelegate respondsToSelector:@selector(millennialMediaEducationLevel)]) { + return NO; + } + else if (selector == @selector(ethnicity) + && ![adWhirlDelegate respondsToSelector:@selector(millennialMediaEthnicity)]) { + return NO; + } + return [super respondsToSelector:selector]; +} + +- (CLLocationDegrees)latitude { + CLLocation *loc = [adWhirlDelegate locationInfo]; + if (loc == nil) return 0.0; + return loc.coordinate.latitude; +} + +- (CLLocationDegrees)longitude { + CLLocation *loc = [adWhirlDelegate locationInfo]; + if (loc == nil) return 0.0; + return loc.coordinate.longitude; +} + +- (NSInteger)age { + if ([adWhirlDelegate respondsToSelector:@selector(millennialMediaAge)]) { + return [adWhirlDelegate millennialMediaAge]; + } + return [self helperCalculateAge]; +} + +- (NSString *)zipCode { + return [adWhirlDelegate postalCode]; +} + +- (NSString *)sex { + NSString *gender = [adWhirlDelegate gender]; + NSString *sex = @""; + if (gender == nil) + return sex; + if ([gender compare:@"m"] == NSOrderedSame) { + sex = @"M"; + } + else if ([gender compare:@"f"] == NSOrderedSame) { + sex = @"F"; + } + return sex; +} + +/* +- (NSInteger)householdIncome { + return (NSInteger)[adWhirlDelegate incomeLevel]; +} + +- (MMEducation)educationLevel { + return [adWhirlDelegate millennialMediaEducationLevel]; +} + +- (MMEthnicity)ethnicity { + return [adWhirlDelegate millennialMediaEthnicity]; +} +*/ + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.h new file mode 100644 index 000000000..a36f19e05 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.h @@ -0,0 +1,45 @@ +/* + + AdWhirlAdapterNexage.h + Copyright 2011 Google, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import "AdWhirlAdNetworkAdapter.h" +#import "NexageDelegateProtocol.h" + +@class NexageAdViewController; + +@interface AdWhirlAdapterNexage : AdWhirlAdNetworkAdapter + { + NexageAdViewController* adViewController; + NSString* position; +} + ++ (AdWhirlAdNetworkType)networkType; +- (NSDate *)dateOfBirth; +- (NSString *)postCode; +- (NSString *)gender; +- (NSString *)keywords; +- (NSInteger)houseIncome; +- (NSString *)city; +- (NSString *)designatedMarketArea; +- (NSString *)country; +- (NSString *)ethnicity; +- (NSString *)maritalStatus; +- (NSString *)areaCode; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.m new file mode 100644 index 000000000..770ba83b6 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterNexage.m @@ -0,0 +1,219 @@ +/* + + AdWhirlAdapterNexage.m + Copyright 2011 Google, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdapterNexage.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "NexageAdViewController.h" +#import "NexageAdParameters.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlError.h" + +@implementation AdWhirlAdapterNexage + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeNexage; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd{ + NSDictionary* atts = [NSDictionary dictionaryWithObjectsAndKeys: + [self dateOfBirth], @"u(dob)", + [self country], @"u(country)", + [self city], @"u(city)", + [self designatedMarketArea], @"u(dma)", + [self ethnicity], @"u(eth)", + [self gender], @"u(gender)", + [NSNumber numberWithDouble:[self houseIncome]], @"u(hhi)", + [self keywords], @"u(keywords)", + [self maritalStatus], @"u(marital)", + [self postCode], @"u(zip)", + nil]; + + NSDictionary* credDict; + if ([adWhirlDelegate respondsToSelector:@selector(nexageDictionary)]) { + credDict = [adWhirlDelegate nexageDictionary]; + } + else { + credDict = [networkConfig credentials]; + } + + BOOL testMode = NO; + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)] + && [adWhirlDelegate adWhirlTestMode]) { + testMode = YES; + } + + // Nexage does weird things with position which can result in an over-release, + // so we're basically forced to leak this... + position = [[credDict objectForKey:@"position"] copy]; + if(position == nil){ + [adWhirlView adapter:self didFailAd:nil]; + return; + } + + adViewController = + [[NexageAdViewController alloc] initWithDelegate:position delegate:self]; + [adViewController setEnable:YES]; + + + [adViewController setAttributes:atts]; + [adViewController setTestMode:testMode]; + [adViewController locationAware:adWhirlConfig.locationOn]; +#ifdef ADWHIRL_DEBUG + [adViewController enableLogging:YES]; +#endif + self.adNetworkView = adViewController.view; +} + +- (void)stopBeingDelegate { + if (adViewController != nil) { + adViewController.delegate = nil; + } +} + +- (void)dealloc { + [self stopBeingDelegate]; + [adViewController setAttributes:nil]; + [adViewController release]; + adViewController = nil; + [super dealloc]; +} + +#pragma mark NexageDelegateProtocol + +- (void)adReceived:(UIView *)ad { + [adWhirlView adapter:self didReceiveAdView:ad]; +} +/** + * This method will be called when user clicks the ad banner. + * The URL is an optional parameter, if Ad is from the Nexage mediation + * platform, you will get validate url, if it is nil, that means the action + * is from integrated sdk. Please check if (url == nil). The return YES, means + * the sdk will handle click event, otherwise sdk will ignore the user action. + * Basic Ad network principle should always return YES. Please refer our dev + * document for details + */ +- (BOOL)adActionShouldBegin:(NSURLRequest *)request + willLeaveApplication:(BOOL)willLeave { + [self helperNotifyDelegateOfFullScreenModal]; + return YES; +} + +/** + * The delegate will be called when full screen web browser is closed + */ +- (void)adFullScreenWebBrowserWillClose { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} +/** + * identify the ad did not receive at this momnent. + */ +- (void)didFailToReceiveAd { + [adWhirlView adapter:self didFailAd:nil]; +} + +- (NSString *)dcnForAd { + NSDictionary *credDict; + if ([adWhirlDelegate respondsToSelector:@selector(nexageDictionary)]) { + credDict = [adWhirlDelegate nexageDictionary]; + } + else { + credDict = [networkConfig credentials]; + } + return [credDict objectForKey:@"dcn"]; +} + +- (UIViewController*)currentViewController { + return [adWhirlDelegate viewControllerForPresentingModalView]; +} + +#pragma mark user profiles + +- (NSDate *)dateOfBirth { + if([adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) + return [adWhirlDelegate dateOfBirth]; + return nil; +} + +- (NSString *)postCode { + if([adWhirlDelegate respondsToSelector:@selector(postalCode)]) + return [adWhirlDelegate postalCode]; + else return nil; +} + +- (NSString *)gender { + if([adWhirlDelegate respondsToSelector:@selector(gender)]) + return [adWhirlDelegate gender]; + else return nil; +} + +- (NSString *)keywords { + if([adWhirlDelegate respondsToSelector:@selector(keywords)]) + return [adWhirlDelegate keywords]; + else return nil; +} + +- (NSInteger)houseIncome { + if([adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) + return [adWhirlDelegate incomeLevel]; + return 0; +} + +- (NSString *)city { + if([adWhirlDelegate respondsToSelector:@selector(nexageCity)]) + return [adWhirlDelegate nexageCity]; + else return nil; +} + +- (NSString *)designatedMarketArea { + if([adWhirlDelegate respondsToSelector:@selector(nexageDesignatedMarketArea)]) + return [adWhirlDelegate nexageDesignatedMarketArea]; + else return nil; +} + +- (NSString *)country { + if([adWhirlDelegate respondsToSelector:@selector(nexageCountry)]) + return [adWhirlDelegate nexageCountry]; + else return nil; +} + +- (NSString *)ethnicity { + if([adWhirlDelegate respondsToSelector:@selector(nexageEthnicity)]) + return [adWhirlDelegate nexageEthnicity]; + else return nil; +} + +- (NSString *)maritalStatus { + if([adWhirlDelegate respondsToSelector:@selector(nexageMaritalStatus)]) + return [adWhirlDelegate nexageMaritalStatus]; + else return nil; +} + +- (NSString *)areaCode { + if([adWhirlDelegate respondsToSelector:@selector(areaCode)]) + return [adWhirlDelegate areaCode]; + else return nil; +} +@end \ No newline at end of file diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.h new file mode 100644 index 000000000..d887c91c0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.h @@ -0,0 +1,30 @@ +/* + + AdWhirlAdapterOneRiot.h + + Copyright 2010 OneRiot, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdNetworkAdapter.h" +#import "OneRiotAd.h" + +@interface AdWhirlAdapterOneRiot : AdWhirlAdNetworkAdapter { + OneRiotAd *adControl; +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.m new file mode 100644 index 000000000..c7a25e7c9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterOneRiot.m @@ -0,0 +1,75 @@ +/* + + AdWhirlAdapterOneRiot.m + + Copyright 2010 OneRiot, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdapterOneRiot.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkConfig.h" + +@interface AdWhirlAdapterOneRiot () + +@property (nonatomic,retain) OneRiotAd *adControl; + +@end + +@implementation AdWhirlAdapterOneRiot + +@synthesize adControl; + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeOneRiot; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + NSString *appId = networkConfig.pubId; + + if ([adWhirlDelegate respondsToSelector:@selector(oneRiotAppID)]) { + appId = [adWhirlDelegate oneRiotAppID]; + } + + adControl = [[OneRiotAd alloc] initWithAppId:appId andWidth:300 + andHeight:50]; + + adControl.RefreshInterval = adWhirlConfig.refreshInterval; + adControl.ReportGPS = adWhirlConfig.locationOn; + + if ([adWhirlDelegate + respondsToSelector:@selector(oneRiotContextParameters)]) { + NSArray* contextParams = [adWhirlDelegate oneRiotContextParameters]; + + for (NSString* param in contextParams){ + [adControl addContextParameters:param]; + } + } + [adControl loadAd]; + self.adNetworkView = adControl; +} + +-(void) dealloc { + [adControl release]; + adControl = nil; + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.h new file mode 100644 index 000000000..477b3d0bb --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.h @@ -0,0 +1,30 @@ +/* + + AdWhirlAdapterQuattro.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "QWAdView.h" + +@interface AdWhirlAdapterQuattro : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.m new file mode 100644 index 000000000..4102da14f --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterQuattro.m @@ -0,0 +1,222 @@ +/* + + AdWhirlAdapterQuattro.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterQuattro.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "QWAdView.h" +#import "QWTestMode.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterQuattro + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeQuattro; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + QWEnableLocationServicesForAds(adWhirlConfig.locationOn); + + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)] + && [adWhirlDelegate adWhirlTestMode]) { + QWSetTestMode(YES); + QWSetLogging(YES); + } + else { + QWSetTestMode(NO); + QWSetLogging(NO); + } + NSDictionary *credDict; + if ([adWhirlDelegate respondsToSelector:@selector(quattroWirelessDictionary)]) { + credDict = [adWhirlDelegate quattroWirelessDictionary]; + } + else { + credDict = [networkConfig credentials]; + } + NSString *pubId = [credDict objectForKey:@"publisherID"]; + NSString *siteId = [credDict objectForKey:@"siteID"]; + QWAdType adType = QWAdTypeBanner; + if ([adWhirlDelegate respondsToSelector:@selector(quattroWirelessAdType)]) { + adType = (QWAdType)[adWhirlDelegate quattroWirelessAdType]; + } + UIDeviceOrientation orientation; + if ([self.adWhirlDelegate respondsToSelector:@selector(adWhirlCurrentOrientation)]) { + orientation = [self.adWhirlDelegate adWhirlCurrentOrientation]; + } + else { + orientation = [UIDevice currentDevice].orientation; + } + QWAdView *quattroAd = [QWAdView adViewWithType:adType + publisherID:pubId + siteID:siteId + orientation:orientation + delegate:self]; + quattroAd.textColor = [self helperTextColorToUse]; + quattroAd.backgroundColor = [self helperBackgroundColorToUse]; + [quattroAd displayNewAd]; + self.adNetworkView = quattroAd; +} + +- (void)stopBeingDelegate { + QWAdView *quattroAd = (QWAdView *)self.adNetworkView; + if (quattroAd != nil) { + quattroAd.delegate = nil; + } +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark QWAdViewDelegate methods + +- (void)adView:(QWAdView *)adView didDisplayAd:(QWAd *)ad { + // somehow the test banner ad is showing 80 pixels as height sometimes. + // check for that and adjust + AWLogDebug(@"Quattro reported frame %@", NSStringFromCGRect(self.adNetworkView.frame)); + if (self.adNetworkView.frame.size.height > 50.0) { + CGRect f = adNetworkView.frame; + f.size.height = 50; + adNetworkView.frame = f; + } + [adWhirlView adapter:self didReceiveAdView:adView]; +} + +- (void)dispatchError:(NSError*)error +{ + [adWhirlView adapter:self didFailAd:error]; +} + +- (void)adView:(QWAdView *)adView failedWithError:(NSError *)error { + [self performSelectorOnMainThread:@selector(dispatchError:) withObject:error waitUntilDone:NO]; +} + +- (void)adView:(QWAdView *)adView displayLandingPage:(UIViewController *)controller { + [self helperNotifyDelegateOfFullScreenModal]; + [[adWhirlDelegate viewControllerForPresentingModalView] presentModalViewController:controller + animated:YES]; +} + +- (void)adView:(QWAdView *)adView dismiss:(UIViewController *)controller { + [[adWhirlDelegate viewControllerForPresentingModalView] dismissModalViewControllerAnimated:YES]; + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +#pragma mark QWAdViewDelegate optional methods + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(latitude:) + && ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return NO; + } + else if (selector == @selector(longitude:) + && ![adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + return NO; + } + else if (selector == @selector(age:) + && (![adWhirlDelegate respondsToSelector:@selector(dateOfBirth)] + || [self age:nil] < 0)) { + return NO; + } + else if (selector == @selector(zipcode:) + && ![adWhirlDelegate respondsToSelector:@selector(postalCode)]) { + return NO; + } + else if (selector == @selector(gender:) + && ![adWhirlDelegate respondsToSelector:@selector(gender)]) { + return NO; + } + else if (selector == @selector(income:) + && ![adWhirlDelegate respondsToSelector:@selector(incomeLevel)]) { + return NO; + } + else if (selector == @selector(education:) + && ![adWhirlDelegate respondsToSelector:@selector(quattroWirelessEducationLevel)]) { + return NO; + } + else if (selector == @selector(birthdate:) + && ![adWhirlDelegate respondsToSelector:@selector(dateOfBirth)]) { + return NO; + } + else if (selector == @selector(ethnicity:) + && ![adWhirlDelegate respondsToSelector:@selector(quattroWirelessEthnicity)]) { + return NO; + } + return [super respondsToSelector:selector]; +} + +- (double)latitude:(QWAdView *)adView { + CLLocation *loc = [adWhirlDelegate locationInfo]; + if (loc == nil) return 0.0; + return loc.coordinate.latitude; +} + +- (double)longitude:(QWAdView *)adView { + CLLocation *loc = [adWhirlDelegate locationInfo]; + if (loc == nil) return 0.0; + return loc.coordinate.longitude; +} + +- (NSString *)zipcode:(QWAdView *)adView { + return [adWhirlDelegate postalCode]; +} + +- (NSUInteger)age:(QWAdView *)adView { + return [self helperCalculateAge]; +} + +- (QWGender)gender:(QWAdView *)adView { + NSString *gender = [adWhirlDelegate gender]; + QWGender sex = QWGenderUnknown; + if (gender == nil) + return sex; + if ([gender compare:@"m"] == NSOrderedSame) { + sex = QWGenderMale; + } + else if ([gender compare:@"f"] == NSOrderedSame) { + sex = QWGenderFemale; + } + return sex; +} + +- (NSUInteger)income:(QWAdView *)adView { + return [adWhirlDelegate incomeLevel]; +} + +- (QWEducationLevel)education:(QWAdView *)adView { + return [adWhirlDelegate quattroWirelessEducationLevel]; +} + +- (NSDate *)birthdate:(QWAdView *)adView { + return [adWhirlDelegate dateOfBirth]; +} + +- (QWEthnicity)ethnicity:(QWAdView *)adView { + return [adWhirlDelegate quattroWirelessEthnicity]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.h new file mode 100644 index 000000000..7c073d0db --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.h @@ -0,0 +1,29 @@ +/* + + AdWhirlAdapterVideoEgg.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" + +@interface AdWhirlAdapterVideoEgg : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.m new file mode 100644 index 000000000..3a8f1653c --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterVideoEgg.m @@ -0,0 +1,117 @@ +/* + + AdWhirlAdapterVideoEgg.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterVideoEgg.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdFrameView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@interface AdWhirlAdapterVideoEgg () + +- (void)loadSuccess:(NSNotification *)notification; +- (void)loadFailed:(NSNotification *)notification; +- (void)launchAd:(NSNotification *)notification; +- (void)closeAd:(NSNotification *)notification; + +@end + + +@implementation AdWhirlAdapterVideoEgg + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeVideoEgg; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + AdFrameView *aw = [[AdFrameView alloc] init]; + + NSDictionary *credentials = [networkConfig credentials]; + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTestMode)] + && [adWhirlDelegate adWhirlTestMode]) { + credentials = [NSDictionary dictionaryWithObjectsAndKeys: + @"testpublisher", @"publisher", + @"testarea", @"area", + nil]; + } + else if ([adWhirlDelegate respondsToSelector:@selector(videoEggConfigDictionary)]) { + credentials = [adWhirlDelegate videoEggConfigDictionary]; + } + + NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter]; + [notifCenter addObserver:self + selector:@selector(loadSuccess:) + name:kVELoadSuccess + object:aw]; + [notifCenter addObserver:self + selector:@selector(loadFailed:) + name:kVELoadFailure + object:aw]; + [notifCenter addObserver:self + selector:@selector(launchAd:) + name:kVELaunchedAd + object:aw]; + [notifCenter addObserver:self + selector:@selector(closeAd:) + name:kVEClosedAd + object:aw]; + + VEConfig *config = [VEConfig dictionaryWithDictionary:credentials]; + [aw requestAd:config]; + self.adNetworkView = aw; + [aw release]; +} + +- (void)stopBeingDelegate { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark VideoEgg notification methods + +- (void)loadSuccess:(NSNotification *)notification { + CGRect frame = CGRectMake(0,0,ADFRAME_BANNER_WIDTH, ADFRAME_BANNER_HEIGHT); + adNetworkView.frame = frame; + [adWhirlView adapter:self didReceiveAdView:adNetworkView]; +} + +- (void)loadFailed:(NSNotification *)notification { + [adWhirlView adapter:self didFailAd:nil]; +} + +- (void)launchAd:(NSNotification *)notification { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)closeAd:(NSNotification *)notification { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.h new file mode 100644 index 000000000..a1eda1a35 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.h @@ -0,0 +1,32 @@ +/* + + AdWhirlAdapterZestADZ.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "ZestadzDelegateProtocal.h" + +@class ZestadzView; + +@interface AdWhirlAdapterZestADZ : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.m new file mode 100644 index 000000000..0442c9733 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/adapters/AdWhirlAdapterZestADZ.m @@ -0,0 +1,101 @@ +/* + + AdWhirlAdapterZestADZ.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterZestADZ.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlView.h" +#import "ZestadzView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterZestADZ + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeZestADZ; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + ZestadzView *zestView = [ZestadzView requestAdWithDelegate:self]; + self.adNetworkView = zestView; +} + +- (void)stopBeingDelegate { + // no way to set zestView's delegate to nil +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark ZestadzDelegate required methods. + +- (NSString *)clientId { + if ([adWhirlDelegate respondsToSelector:@selector(zestADZClientID)]) { + return [adWhirlDelegate zestADZClientID]; + } + return networkConfig.pubId; +} + +- (UIViewController *)currentViewController { + return [adWhirlDelegate viewControllerForPresentingModalView]; +} + +#pragma mark ZestadzDelegate notification methods + +- (void)didReceiveAd:(ZestadzView *)adView { + [adWhirlView adapter:self didReceiveAdView:adView]; +} + +- (void)didFailToReceiveAd:(ZestadzView *)adView { + [adWhirlView adapter:self didFailAd:nil]; +} + +- (void)willPresentFullScreenModal { + [self helperNotifyDelegateOfFullScreenModal]; +} + +- (void)didDismissFullScreenModal { + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +#pragma mark ZestadzDelegate config methods +- (UIColor *)adBackgroundColor { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlAdBackgroundColor)]) { + return [adWhirlDelegate adWhirlAdBackgroundColor]; + } + + return nil; +} + +- (NSString *)keywords { + if ([adWhirlDelegate respondsToSelector:@selector(keywords)]) { + return [adWhirlDelegate keywords]; + } + + return @"iphone ipad ipod"; +} + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/ARRollerView.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/ARRollerView.m new file mode 100644 index 000000000..4c1a0f9f1 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/ARRollerView.m @@ -0,0 +1,46 @@ +/* + + ARRollerView.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "ARRollerView.h" +#import "AdWhirlView+.h" + +@interface ARRollerView () +- (id)initWithDelegate:(id)delegate; +@end + +@implementation ARRollerView + ++ (ARRollerView*)requestRollerViewWithDelegate:(id)delegate { + return [[[ARRollerView alloc] initWithDelegate:delegate] autorelease]; +} + +- (id)initWithDelegate:(id)d { + return [super initWithDelegate:d]; +} + +- (void)getNextAd { + [self requestFreshAd]; +} + +- (void)setDelegateToNil { + self.delegate = nil; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityDelegate.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityDelegate.h new file mode 100644 index 000000000..98e6d3859 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityDelegate.h @@ -0,0 +1,29 @@ +/* + + AWNetworkReachabilityDelegate.h + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +@class AWNetworkReachabilityWrapper; + +@protocol AWNetworkReachabilityDelegate + +@optional +- (void)reachabilityBecameReachable:(AWNetworkReachabilityWrapper *)reachability; +- (void)reachabilityNotReachable:(AWNetworkReachabilityWrapper *)reachability; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.h new file mode 100644 index 000000000..e1b130146 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.h @@ -0,0 +1,53 @@ +/* + + AWNetworkReachabilityWrapper.h + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import +#import +#import +#import +#import +#import +#import "AWNetworkReachabilityDelegate.h" + +@class AWNetworkReachabilityWrapper; + + +// Created for ease of mocking (hence testing) +@interface AWNetworkReachabilityWrapper : NSObject { + NSString *hostname_; + SCNetworkReachabilityRef reachability_; + id delegate_; +} + +@property (nonatomic,readonly) NSString *hostname; +@property (nonatomic,assign) id delegate; + ++ (AWNetworkReachabilityWrapper *) reachabilityWithHostname:(NSString *)host + callbackDelegate:(id)delegate; + +- (id)initWithHostname:(NSString *)host + callbackDelegate:(id)delegate; + +- (BOOL)scheduleInCurrentRunLoop; + +- (BOOL)unscheduleFromCurrentRunLoop; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.m new file mode 100644 index 000000000..3b04c1122 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AWNetworkReachabilityWrapper.m @@ -0,0 +1,172 @@ +/* + + AWNetworkReachabilityWrapper.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AWNetworkReachabilityWrapper.h" +#import "AdWhirlLog.h" + +static void reachabilityCallback(SCNetworkReachabilityRef reachability, + SCNetworkReachabilityFlags flags, + void* data); + +@implementation AWNetworkReachabilityWrapper + +@synthesize hostname = hostname_; +@synthesize delegate = delegate_; + ++ (AWNetworkReachabilityWrapper *) reachabilityWithHostname:(NSString *)host + callbackDelegate:(id)delegate { + return [[[AWNetworkReachabilityWrapper alloc] initWithHostname:host + callbackDelegate:delegate] + autorelease]; +} + +- (id)initWithHostname:(NSString *)host + callbackDelegate:(id)delegate { + self = [super init]; + if (self != nil) { + reachability_ = SCNetworkReachabilityCreateWithName(NULL, + [host UTF8String]); + if (reachability_ == nil) { + AWLogError(@"Error creating SCNetworkReachability"); + [self release]; + return nil; + } + hostname_ = [[NSString alloc] initWithString:host]; + self.delegate = delegate; + + // set callback + SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL}; + if (!SCNetworkReachabilitySetCallback(reachability_, + &reachabilityCallback, + &context)) { + AWLogError(@"Error setting SCNetworkReachability callback"); + [self release]; + return nil; + } + } + return self; +} + +- (BOOL)scheduleInCurrentRunLoop { + return SCNetworkReachabilityScheduleWithRunLoop(reachability_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode); +} + +- (BOOL)unscheduleFromCurrentRunLoop { + return SCNetworkReachabilityUnscheduleFromRunLoop(reachability_, + CFRunLoopGetCurrent(), + kCFRunLoopDefaultMode); +} + +- (void)dealloc { + [self unscheduleFromCurrentRunLoop]; + if (reachability_ != NULL) CFRelease(reachability_); + [hostname_ release]; + [super dealloc]; +} + +#pragma mark callback methods + +static void printReachabilityFlags(SCNetworkReachabilityFlags flags) +{ + AWLogDebug(@"Reachability flag status: %c%c%c%c%c%c%c%c%c", + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', +#ifdef kSCNetworkReachabilityFlagsConnectionOnDemand + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', +#else + '-', +#endif + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-' + ); +} + +- (void)notifyDelegateNotReachable { + if (self.delegate != nil && [self.delegate respondsToSelector: + @selector(reachabilityNotReachable:)]) { + [self.delegate reachabilityNotReachable:self]; + } +} + +- (void)gotCallback:(SCNetworkReachabilityRef)reachability + flags:(SCNetworkReachabilityFlags)flags { + if (reachability != reachability_) { + AWLogError(@"Unrelated reachability calling back to this object"); + return; + } + + printReachabilityFlags(flags); + if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { + [self notifyDelegateNotReachable]; + return; + } + + // even if the Reachable flag is on it may not be true for immediate use + BOOL reachable = NO; + + if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { + // no connection required, we should be able to connect, via WiFi presumably + reachable = YES; + } + + if (( +#ifdef kSCNetworkReachabilityFlagsConnectionOnDemand + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0 || +#endif + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0) + && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) { + // The connection is on-demand or on-traffic and no user intervention is + // needed, likely able to connect + reachable = YES; + } + + if ((flags & kSCNetworkReachabilityFlagsIsWWAN) + == kSCNetworkReachabilityFlagsIsWWAN) { + // WWAN connections are available, likely able to connect barring network + // outage... + reachable = YES; + } + + if (!reachable) { + [self notifyDelegateNotReachable]; + return; + } + + // notify delegate that host just got reachable + if (self.delegate != nil && [self.delegate respondsToSelector: + @selector(reachabilityBecameReachable:)]) { + [self.delegate reachabilityBecameReachable:self]; + } +} + +void reachabilityCallback(SCNetworkReachabilityRef reachability, + SCNetworkReachabilityFlags flags, + void* data) { + AWNetworkReachabilityWrapper *wrapper = (AWNetworkReachabilityWrapper *)data; + [wrapper gotCallback:reachability flags:flags]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.h new file mode 100644 index 000000000..de690e999 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.h @@ -0,0 +1,46 @@ +/* + + AdWhirlAdNetworkAdapter+Helpers.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" + +@interface AdWhirlAdNetworkAdapter (Helpers) + +/** + * Subclasses call this to notify delegate that there's going to be a full + * screen modal (usually after tap). + */ +- (void)helperNotifyDelegateOfFullScreenModal; + +/** + * Subclasses call this to notify delegate that the full screen modal has + * been dismissed. + */ +- (void)helperNotifyDelegateOfFullScreenModalDismissal; + +/* + * Subclasses call to get various configs to use, from the AdWhirlDelegate or + * config from server. + */ +- (UIColor *)helperBackgroundColorToUse; +- (UIColor *)helperTextColorToUse; +- (UIColor *)helperSecondaryTextColorToUse; +- (NSInteger)helperCalculateAge; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.m new file mode 100644 index 000000000..dda958b82 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter+Helpers.m @@ -0,0 +1,93 @@ +/* + + AdWhirlAdNetworkAdapter+Helpers.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlView.h" +#import "AdWhirlView+.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" + +@implementation AdWhirlAdNetworkAdapter (Helpers) + +- (void)helperNotifyDelegateOfFullScreenModal { + // don't request new ad when modal view is on + adWhirlView.showingModalView = YES; + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlWillPresentFullScreenModal)]) { + [adWhirlDelegate adWhirlWillPresentFullScreenModal]; + } +} + +- (void)helperNotifyDelegateOfFullScreenModalDismissal { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlDidDismissFullScreenModal)]) { + [adWhirlDelegate adWhirlDidDismissFullScreenModal]; + } + adWhirlView.showingModalView = NO; +} + +- (UIColor *)helperBackgroundColorToUse { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlAdBackgroundColor)]) { + UIColor *color = [adWhirlDelegate adWhirlAdBackgroundColor]; + if (color != nil) return color; + } + if ([adWhirlDelegate respondsToSelector:@selector(backgroundColor)]) { + UIColor *color = [adWhirlDelegate backgroundColor]; + if (color != nil) return color; + } + return adWhirlConfig.backgroundColor; +} + +- (UIColor *)helperTextColorToUse { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlTextColor)]) { + UIColor *color = [adWhirlDelegate adWhirlTextColor]; + if (color != nil) return color; + } + if ([adWhirlDelegate respondsToSelector:@selector(textColor)]) { + UIColor *color = [adWhirlDelegate textColor]; + if (color != nil) return color; + } + return adWhirlConfig.textColor; +} + +- (UIColor *)helperSecondaryTextColorToUse { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlSecondaryTextColor)]) { + UIColor *color = [adWhirlDelegate adWhirlSecondaryTextColor]; + if (color != nil) return color; + } + return nil; +} + +- (NSInteger)helperCalculateAge { + NSDate *birth = [adWhirlDelegate dateOfBirth]; + if (birth == nil) { + return -1; + } + NSDate *today = [[NSDate alloc] init]; + NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSDateComponents *components = [gregorian components:NSYearCalendarUnit + fromDate:birth + toDate:today + options:0]; + NSInteger years = [components year]; + [gregorian release]; + [today release]; + return years; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter.m new file mode 100644 index 000000000..1634bc8b6 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkAdapter.m @@ -0,0 +1,84 @@ +/* + + AdWhirlAdNetworkAdapter.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlView.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdNetworkAdapter + +@synthesize adWhirlDelegate; +@synthesize adWhirlView; +@synthesize adWhirlConfig; +@synthesize networkConfig; +@synthesize adNetworkView; + +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf { + self = [super init]; + if (self != nil) { + self.adWhirlDelegate = delegate; + self.adWhirlView = view; + self.adWhirlConfig = config; + self.networkConfig = netConf; + } + return self; +} + +- (void)getAd { + AWLogCrit(@"Subclass of AdWhirlAdNetworkAdapter must implement -getAd."); + [self doesNotRecognizeSelector:_cmd]; +} + +- (void)stopBeingDelegate { + AWLogCrit(@"Subclass of AdWhirlAdNetworkAdapter must implement -stopBeingDelegate."); + [self doesNotRecognizeSelector:_cmd]; +} + +- (BOOL)shouldSendExMetric { + return YES; +} + +- (void)rotateToOrientation:(UIInterfaceOrientation)orientation { + // do nothing by default. Subclasses implement specific handling. + AWLogDebug(@"rotate to orientation %d called for adapter %@", + orientation, NSStringFromClass([self class])); +} + +- (BOOL)isBannerAnimationOK:(AWBannerAnimationType)animType { + return YES; +} + +- (void)dealloc { + [self stopBeingDelegate]; + adWhirlDelegate = nil; + adWhirlView = nil; + [adWhirlConfig release], adWhirlConfig = nil; + [networkConfig release], networkConfig = nil; + [adNetworkView release], adNetworkView = nil; + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.h new file mode 100644 index 000000000..5f2c0ddff --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.h @@ -0,0 +1,57 @@ +/* + + AdNetwork.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import "AdWhirlDelegateProtocol.h" + +#define AWAdNetworkConfigKeyType @"type" +#define AWAdNetworkConfigKeyNID @"nid" +#define AWAdNetworkConfigKeyName @"nname" +#define AWAdNetworkConfigKeyWeight @"weight" +#define AWAdNetworkConfigKeyPriority @"priority" +#define AWAdNetworkConfigKeyCred @"key" + +@class AdWhirlError; +@class AdWhirlAdNetworkRegistry; + +@interface AdWhirlAdNetworkConfig : NSObject { + NSInteger networkType; + NSString *nid; + NSString *networkName; + double trafficPercentage; + NSInteger priority; + NSDictionary *credentials; + Class adapterClass; +} + +- (id)initWithDictionary:(NSDictionary *)adNetConfigDict + adNetworkRegistry:(AdWhirlAdNetworkRegistry *)registry + error:(AdWhirlError **)error; + +@property (nonatomic,readonly) NSInteger networkType; +@property (nonatomic,readonly) NSString *nid; +@property (nonatomic,readonly) NSString *networkName; +@property (nonatomic,readonly) double trafficPercentage; +@property (nonatomic,readonly) NSInteger priority; +@property (nonatomic,readonly) NSDictionary *credentials; +@property (nonatomic,readonly) NSString *pubId; +@property (nonatomic,readonly) Class adapterClass; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.m new file mode 100644 index 000000000..cece08ab1 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkConfig.m @@ -0,0 +1,169 @@ +/* + + AdNetwork.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlLog.h" +#import "AdWhirlError.h" +#import "AdWhirlClassWrapper.h" + +#define kAdWhirlPubIdKey @"pubid" + +@implementation AdWhirlAdNetworkConfig + +@synthesize networkType; +@synthesize nid; +@synthesize networkName; +@synthesize trafficPercentage; +@synthesize priority; +@synthesize credentials; +@synthesize adapterClass; + +- (id)initWithDictionary:(NSDictionary *)adNetConfigDict + adNetworkRegistry:(AdWhirlAdNetworkRegistry *)registry + error:(AdWhirlError **)error { + self = [super init]; + + if (self != nil) { + NSInteger temp; + id ntype = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyType]; + id netId = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyNID]; + id netName = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyName]; + id weight = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyWeight]; + id pri = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyPriority]; + + if (ntype == nil || netId == nil || netName == nil || pri == nil) { + NSString *errorMsg = + @"Ad network config has no network type, network id, network name, or priority"; + if (error != nil) { + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:errorMsg]; + } + else { + AWLogWarn(errorMsg); + } + + [self release]; + return nil; + } + + if (awIntVal(&temp, ntype)) { + networkType = temp; + } + if ([netId isKindOfClass:[NSString class]]) { + nid = [[NSString alloc] initWithString:netId]; + } + if ([netName isKindOfClass:[NSString class]]) { + networkName = [[NSString alloc] initWithString:netName]; + } + + double tempDouble; + if (weight == nil) { + trafficPercentage = 0.0; + } + else if (awDoubleVal(&tempDouble, weight)) { + trafficPercentage = tempDouble; + } + + if (awIntVal(&temp, pri)) { + priority = temp; + } + + if (networkType == 0 || nid == nil || networkName == nil || priority == 0) { + NSString *errorMsg = + @"Ad network config has invalid network type, network id, network name or priority"; + if (error != nil) { + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:errorMsg]; + } + else { + AWLogWarn(errorMsg); + } + + [self release]; + return nil; + } + + id cred = [adNetConfigDict objectForKey:AWAdNetworkConfigKeyCred]; + if (cred == nil) { + credentials = nil; + } + else { + if ([cred isKindOfClass:[NSDictionary class]]) { + credentials = [[NSDictionary alloc] initWithDictionary:cred copyItems:YES]; + } + else if ([cred isKindOfClass:[NSString class]]) { + credentials = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSString stringWithString:cred], kAdWhirlPubIdKey, + nil]; + } + } + + adapterClass = [registry adapterClassFor:networkType].theClass; + if (adapterClass == nil) { + NSString *errorMsg = + [NSString stringWithFormat:@"Ad network type %d not supported, no adapter found", + networkType]; + if (error != nil) { + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:errorMsg]; + } + else { + AWLogWarn(errorMsg); + } + + [self release]; + return nil; + } + } + + return self; +} + +- (NSString *)pubId { + if (credentials == nil) return nil; + return [credentials objectForKey:kAdWhirlPubIdKey]; +} + +- (NSString *)description { + NSString *creds = [self pubId]; + if (creds == nil) { + creds = @"{"; + for (NSString *k in [credentials keyEnumerator]) { + creds = [creds stringByAppendingFormat:@"%@:%@ ", + k, [credentials objectForKey:k]]; + } + creds = [creds stringByAppendingString:@"}"]; + } + return [NSString stringWithFormat: + @"name:%@ type:%d nid:%@ weight:%lf priority:%d creds:%@", + networkName, networkType, nid, trafficPercentage, priority, creds]; +} + +- (void)dealloc { + [nid release], nid = nil; + [networkName release], networkName = nil; + [credentials release], credentials = nil; + + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.h new file mode 100644 index 000000000..857714e31 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.h @@ -0,0 +1,34 @@ +/* + + AdWhirlAdNetworkRegistry.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import + +@class AdWhirlAdNetworkAdapter; +@class AdWhirlClassWrapper; + +@interface AdWhirlAdNetworkRegistry : NSObject { + NSMutableDictionary *adapterDict; +} + ++ (AdWhirlAdNetworkRegistry *)sharedRegistry; +- (void)registerClass:(Class)adapterClass; +- (AdWhirlClassWrapper *)adapterClassFor:(NSInteger)adNetworkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.m new file mode 100644 index 000000000..a48fab59a --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdNetworkRegistry.m @@ -0,0 +1,64 @@ +/* + + AdWhirlAdNetworkRegistry.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlClassWrapper.h" + +@implementation AdWhirlAdNetworkRegistry + ++ (AdWhirlAdNetworkRegistry *)sharedRegistry { + static AdWhirlAdNetworkRegistry *registry = nil; + if (registry == nil) { + registry = [[AdWhirlAdNetworkRegistry alloc] init]; + } + return registry; +} + +- (id)init { + self = [super init]; + if (self != nil) { + adapterDict = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (void)registerClass:(Class)adapterClass { + // have to do all these to avoid compiler warnings... + NSInteger (*netTypeMethod)(id, SEL); + netTypeMethod = (NSInteger (*)(id, SEL))[adapterClass methodForSelector:@selector(networkType)]; + NSInteger netType = netTypeMethod(adapterClass, @selector(networkType)); + NSNumber *key = [[NSNumber alloc] initWithInteger:netType]; + AdWhirlClassWrapper *wrapper = [[AdWhirlClassWrapper alloc] initWithClass:adapterClass]; + [adapterDict setObject:wrapper forKey:key]; + [key release]; + [wrapper release]; +} + +- (AdWhirlClassWrapper *)adapterClassFor:(NSInteger)adNetworkType { + return [adapterDict objectForKey:[NSNumber numberWithInteger:adNetworkType]]; +} + +- (void)dealloc { + [adapterDict release], adapterDict = nil; + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.h new file mode 100644 index 000000000..f2922233c --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.h @@ -0,0 +1,40 @@ +/* + + AdWhirlAdapterCustom.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlCustomAdView.h" +#import "AdWhirlWebBrowserController.h" + +@interface AdWhirlAdapterCustom : AdWhirlAdNetworkAdapter +{ + BOOL requesting; + CLLocationManager *locationManager; + NSURLConnection *adConnection; + NSMutableData *adData; + NSURLConnection *imageConnection; + NSMutableData *imageData; + AdWhirlCustomAdView *adView; + AdWhirlWebBrowserController *webBrowserController; +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.m new file mode 100644 index 000000000..0eda0ad55 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterCustom.m @@ -0,0 +1,423 @@ +/* + + AdWhirlAdapterCustom.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterCustom.h" +#import "AdWhirlView.h" +#import "AdWhirlLog.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlError.h" +#import "CJSONDeserializer.h" +#import "AdWhirlCustomAdView.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@interface AdWhirlAdapterCustom () + +- (BOOL)parseAdData:(NSData *)data error:(NSError **)error; + +@property (nonatomic,readonly) CLLocationManager *locationManager; +@property (nonatomic,retain) NSURLConnection *adConnection; +@property (nonatomic,retain) NSURLConnection *imageConnection; +@property (nonatomic,retain) AdWhirlCustomAdView *adView; +@property (nonatomic,retain) AdWhirlWebBrowserController *webBrowserController; +@property (nonatomic, assign) CGFloat scale; + +@end + + +@implementation AdWhirlAdapterCustom + +@synthesize adConnection; +@synthesize imageConnection; +@synthesize adView; +@synthesize webBrowserController; +@synthesize scale; + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeCustom; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (id)initWithAdWhirlDelegate:(id)delegate + view:(AdWhirlView *)view + config:(AdWhirlConfig *)config + networkConfig:(AdWhirlAdNetworkConfig *)netConf { + self = [super initWithAdWhirlDelegate:delegate + view:view + config:config + networkConfig:netConf]; + if (self != nil) { + adData = [[NSMutableData alloc] init]; + imageData = [[NSMutableData alloc] init]; + } + return self; +} + +- (BOOL)shouldSendExMetric { + return NO; // since we are getting the ad from the AdWhirl server anyway, no + // need to send extra metric ping to the same server. +} + +- (void)getAd { + @synchronized(self) { + if (requesting) return; + requesting = YES; + } + + NSURL *adRequestBaseURL = nil; + if ([self.adWhirlDelegate respondsToSelector:@selector(adWhirlCustomAdURL)]) { + adRequestBaseURL = [self.adWhirlDelegate adWhirlCustomAdURL]; + } + if (adRequestBaseURL == nil) { + adRequestBaseURL = [NSURL URLWithString:kAdWhirlDefaultCustomAdURL]; + } + NSString *query; + if (self.adWhirlConfig.locationOn) { + AWLogDebug(@"Allow location access in custom ad"); + CLLocation *location; + if ([self.adWhirlDelegate respondsToSelector:@selector(locationInfo)]) { + location = [self.adWhirlDelegate locationInfo]; + } + else { + location = [self.locationManager location]; + } + NSString *locationStr = [NSString stringWithFormat:@"%lf,%lf", + location.coordinate.latitude, + location.coordinate.longitude]; + query = [NSString stringWithFormat:@"?appver=%d&country_code=%@&appid=%@&nid=%@&location=%@&location_timestamp=%lf&client=1", + kAdWhirlAppVer, + [[NSLocale currentLocale] localeIdentifier], + self.adWhirlConfig.appKey, + self.networkConfig.nid, + locationStr, + [[NSDate date] timeIntervalSince1970]]; + } + else { + AWLogDebug(@"Do not allow location access in custom ad"); + query = [NSString stringWithFormat:@"?appver=%d&country_code=%@&appid=%@&nid=%@&client=1", + kAdWhirlAppVer, + [[NSLocale currentLocale] localeIdentifier], + self.adWhirlConfig.appKey, + self.networkConfig.nid]; + } + NSURL *adRequestURL = [NSURL URLWithString:query relativeToURL:adRequestBaseURL]; + AWLogDebug(@"Requesting custom ad at %@", adRequestURL); + NSURLRequest *adRequest = [NSURLRequest requestWithURL:adRequestURL]; + NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:adRequest + delegate:self]; + self.adConnection = conn; + [conn release]; +} + +- (void)stopBeingDelegate { + AdWhirlCustomAdView *theAdView = (AdWhirlCustomAdView *)self.adNetworkView; + if (theAdView != nil) { + theAdView.delegate = nil; + } +} + +- (void)dealloc { + [locationManager release], locationManager = nil; + [adConnection release], adConnection = nil; + [adData release], adData = nil; + [imageConnection release], imageConnection = nil; + [imageData release], imageData = nil; + [adView release], adView = nil; + [webBrowserController release], webBrowserController = nil; + [super dealloc]; +} + + +- (CLLocationManager *)locationManager { + if (locationManager == nil) { + locationManager = [[CLLocationManager alloc] init]; + } + return locationManager; +} + +- (BOOL)parseEnums:(int *)val + adInfo:(NSDictionary*)info + minVal:(int)min + maxVal:(int)max + fieldName:(NSString *)name + error:(NSError **)error { + NSString *str = [info objectForKey:name]; + if (str == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:[NSString stringWithFormat: + @"Custom ad data has no '%@' field", name]]; + return NO; + } + int intVal = [str intValue]; + if (intVal <= min || intVal >= max) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:[NSString stringWithFormat: + @"Custom ad: Invalid value for %@ - %d", name, intVal]]; + return NO; + } + *val = intVal; + return YES; +} + +- (BOOL)parseAdData:(NSData *)data error:(NSError **)error { + NSError *jsonError = nil; + id parsed = [[CJSONDeserializer deserializer] deserialize:data error:&jsonError]; + if (parsed == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdParseError + description:@"Error parsing custom ad JSON from server" + underlyingError:jsonError]; + return NO; + } + if ([parsed isKindOfClass:[NSDictionary class]]) { + NSDictionary *adInfo = parsed; + + // gather up and validate ad info + NSString *text = [adInfo objectForKey:@"ad_text"]; + NSString *redirectURLStr = [adInfo objectForKey:@"redirect_url"]; + + int adTypeInt; + if (![self parseEnums:&adTypeInt + adInfo:adInfo + minVal:AWCustomAdTypeMIN + maxVal:AWCustomAdTypeMAX + fieldName:@"ad_type" + error:error]) { + return NO; + } + AWCustomAdType adType = adTypeInt; + + int launchTypeInt; + if (![self parseEnums:&launchTypeInt + adInfo:adInfo + minVal:AWCustomAdLaunchTypeMIN + maxVal:AWCustomAdLaunchTypeMAX + fieldName:@"launch_type" + error:error]) { + return NO; + } + AWCustomAdLaunchType launchType = launchTypeInt; + + int animTypeInt; + if (![self parseEnums:&animTypeInt + adInfo:adInfo + minVal:AWCustomAdWebViewAnimTypeMIN + maxVal:AWCustomAdWebViewAnimTypeMAX + fieldName:@"webview_animation_type" + error:error]) { + return NO; + } + AWCustomAdWebViewAnimType animType = animTypeInt; + + NSURL *redirectURL = nil; + if (redirectURLStr == nil) { + AWLogWarn(@"No redirect URL for custom ad"); + } + else { + redirectURL = [[NSURL alloc] initWithString:redirectURLStr]; + if (!redirectURL) + AWLogWarn(@"Custom ad: Malformed redirect URL string %@", redirectURLStr); + } + + NSString *clickMetricsURLStr = [adInfo objectForKey:@"metrics_url"]; + NSURL *clickMetricsURL = nil; + if (clickMetricsURLStr == nil) { + AWLogWarn(@"No click metric URL for custom ad"); + } + else { + clickMetricsURL = [[NSURL alloc] initWithString:clickMetricsURLStr]; + if (!clickMetricsURL) + AWLogWarn(@"Malformed click metrics URL string %@", clickMetricsURLStr); + } + + AWLogDebug(@"Got custom ad '%@' %@ %@ %d %d %d", text, redirectURL, + clickMetricsURL, adType, launchType, animType); + + self.adView = [[AdWhirlCustomAdView alloc] initWithDelegate:self + text:text + redirectURL:redirectURL + clickMetricsURL:clickMetricsURL + adType:adType + launchType:launchType + animType:animType + backgroundColor:[self helperBackgroundColorToUse] + textColor:[self helperTextColorToUse]]; + [self.adView release]; + self.adNetworkView = adView; + [redirectURL release]; + [clickMetricsURL release]; + if (adView == nil) { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:@"Error initializing AdWhirl custom ad view"]; + return NO; + } + + // fetch image, set scale + self.scale = [[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [[UIScreen mainScreen] scale] : 1.0; + NSString *imageURL; + if (self.scale == 2.0 && adType == AWCustomAdTypeBanner) { + imageURL = [adInfo objectForKey:@"img_url_640x100"]; + if (imageURL == nil || [imageURL length] == 0) { + self.scale = 1.0f; + imageURL = [adInfo objectForKey:@"img_url"]; + } + } else { + imageURL = [adInfo objectForKey:@"img_url"]; + } + AWLogDebug(@"Request custom ad image at %@", imageURL); + NSURLRequest *imageRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:imageURL]]; + NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:imageRequest + delegate:self]; + self.imageConnection = conn; + [conn release]; + } + else { + if (error != nil) + *error = [AdWhirlError errorWithCode:AdWhirlCustomAdDataError + description:@"Expected top-level dictionary in custom ad data"]; + return NO; + } + return YES; +} + + +#pragma mark NSURLConnection delegate methods. + +- (void)connection:(NSURLConnection *)conn didReceiveResponse:(NSURLResponse *)response { + if (conn == adConnection) { + [adData setLength:0]; + } + else if (conn == imageConnection) { + [imageData setLength:0]; + } +} + +- (void)connection:(NSURLConnection *)conn didFailWithError:(NSError *)error { + if (conn == adConnection) { + [self.adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError + description:@"Error connecting to custom ad server" + underlyingError:error]]; + requesting = NO; + } + else if (conn == imageConnection) { + [self.adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdConnectionError + description:@"Error connecting to custom ad server to fetch image" + underlyingError:error]]; + requesting = NO; + } +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)conn { + if (conn == adConnection) { + NSError *error = nil; + if (![self parseAdData:adData error:&error]) { + [self.adWhirlView adapter:self didFailAd:error]; + requesting = NO; + return; + } + } + else if (conn == imageConnection) { + UIImage *image = [[UIImage alloc] initWithData:imageData]; + if (self.scale == 2.0) { + UIImage *img = [[UIImage alloc] initWithCGImage:image.CGImage scale:2.0 orientation:image.imageOrientation]; + [image release]; + image = img; + } + if (image == nil) { + [self.adWhirlView adapter:self didFailAd:[AdWhirlError errorWithCode:AdWhirlCustomAdImageError + description:@"Cannot initialize custom ad image from data"]]; + requesting = NO; + return; + } + adView.image = image; + [adView setNeedsDisplay]; + [image release]; + requesting = NO; + [self.adWhirlView adapter:self didReceiveAdView:self.adView]; + } +} + +- (void)connection:(NSURLConnection *)conn didReceiveData:(NSData *)data { + if (conn == adConnection) { + [adData appendData:data]; + } + else if (conn == imageConnection) { + [imageData appendData:data]; + } +} + + +#pragma mark AdWhirlCustomAdViewDelegate methods + +- (void)adTapped:(AdWhirlCustomAdView *)ad { + if (ad != adView) return; + if (ad.clickMetricsURL != nil) { + NSURLRequest *metRequest = [NSURLRequest requestWithURL:ad.clickMetricsURL]; + [NSURLConnection connectionWithRequest:metRequest + delegate:nil]; // fire and forget + AWLogDebug(@"Sent custom ad click ping to %@", ad.clickMetricsURL); + } + if (ad.redirectURL == nil) { + AWLogError(@"Custom ad redirect URL is nil"); + return; + } + switch (ad.launchType) { + case AWCustomAdLaunchTypeSafari: + AWLogDebug(@"Opening URL '%@' for custom ad", ad.redirectURL); + if ([[UIApplication sharedApplication] openURL:ad.redirectURL] == NO) { + AWLogError(@"Cannot open URL '%@' for custom ad", ad.redirectURL); + } + break; + case AWCustomAdLaunchTypeCanvas: + if (self.webBrowserController == nil) { + AdWhirlWebBrowserController *ctrlr = [[AdWhirlWebBrowserController alloc] init]; + self.webBrowserController = ctrlr; + [ctrlr release]; + } + webBrowserController.delegate = self; + [webBrowserController presentWithController:[self.adWhirlDelegate viewControllerForPresentingModalView] + transition:ad.animType]; + [self helperNotifyDelegateOfFullScreenModal]; + [webBrowserController loadURL:ad.redirectURL]; + break; + default: + AWLogError(@"Custom ad: Unsupported launch type %d", ad.launchType); + break; + } +} + + +#pragma mark AdWhirlWebBrowserControllerDelegate methods + +- (void)webBrowserClosed:(AdWhirlWebBrowserController *)controller { + if (controller != webBrowserController) return; + self.webBrowserController = nil; // don't keep around to save memory + [self helperNotifyDelegateOfFullScreenModalDismissal]; +} + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.h new file mode 100644 index 000000000..0960978bd --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.h @@ -0,0 +1,29 @@ +/* + + AdWhirlAdapterEvent.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdNetworkAdapter.h" + +@interface AdWhirlAdapterEvent : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.m new file mode 100644 index 000000000..4069e77b4 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterEvent.m @@ -0,0 +1,69 @@ +/* + + AdWhirlAdapterEvent.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlAdapterEvent.h" +#import "AdWhirlView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlAdNetworkConfig.h" + +@implementation AdWhirlAdapterEvent + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeEvent; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + NSArray *eventKeys = [networkConfig.pubId componentsSeparatedByString:@"|;|"]; + NSString *eventSelectorStr = [eventKeys objectAtIndex:1]; + SEL eventSelector = NSSelectorFromString(eventSelectorStr); + + if ([adWhirlDelegate respondsToSelector:eventSelector]) { + [adWhirlDelegate performSelector:eventSelector]; + [adWhirlView adapterDidFinishAdRequest:self]; + } + else { + NSString *eventSelectorColonStr = [NSString stringWithFormat:@"%@:", eventSelectorStr]; + SEL eventSelectorColon = NSSelectorFromString(eventSelectorColonStr); + if ([adWhirlDelegate respondsToSelector:eventSelectorColon]) { + [adWhirlDelegate performSelector:eventSelectorColon withObject:adWhirlView]; + [adWhirlView adapterDidFinishAdRequest:self]; + } + else { + AWLogWarn(@"Delegate does not implement function %@ nor %@", eventSelectorStr, eventSelectorColonStr); + [adWhirlView adapter:self didFailAd:nil]; + } + } +} + +- (void)stopBeingDelegate { + // Nothing to do +} + +- (void)dealloc { + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.h new file mode 100644 index 000000000..d7dae4d62 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.h @@ -0,0 +1,29 @@ +/* + + AdWhirlAdapterGeneric.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" + +@interface AdWhirlAdapterGeneric : AdWhirlAdNetworkAdapter { + +} + ++ (AdWhirlAdNetworkType)networkType; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.m new file mode 100644 index 000000000..0fffc0166 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlAdapterGeneric.m @@ -0,0 +1,56 @@ +/* + + AdWhirlAdapterGeneric.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdapterGeneric.h" +#import "AdWhirlView.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter+Helpers.h" +#import "AdWhirlAdNetworkRegistry.h" + +@implementation AdWhirlAdapterGeneric + ++ (AdWhirlAdNetworkType)networkType { + return AdWhirlAdNetworkTypeGeneric; +} + ++ (void)load { + [[AdWhirlAdNetworkRegistry sharedRegistry] registerClass:self]; +} + +- (void)getAd { + if ([adWhirlDelegate respondsToSelector:@selector(adWhirlReceivedRequestForDeveloperToFufill:)]) { + [adWhirlDelegate adWhirlReceivedRequestForDeveloperToFufill:adWhirlView]; + [adWhirlView adapterDidFinishAdRequest:self]; + } + else { + AWLogWarn(@"Delegate does not implement adWhirlReceivedRequestForDeveloperToFufill"); + [adWhirlView adapter:self didFailAd:nil]; + } +} + +- (void)stopBeingDelegate { + // nothing to do +} + +- (void)dealloc { + [super dealloc]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.h new file mode 100644 index 000000000..d3740a69d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.h @@ -0,0 +1,31 @@ +/* + + AdWhirlClassWrapper.h + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import + +@interface AdWhirlClassWrapper : NSObject { + Class theClass; +} + +- (id)initWithClass:(Class)c; + +@property (nonatomic, readonly) Class theClass; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.m new file mode 100644 index 000000000..b22822028 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlClassWrapper.m @@ -0,0 +1,35 @@ +/* + + AdWhirlClassWrapper.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlClassWrapper.h" + +@implementation AdWhirlClassWrapper + +@synthesize theClass; + +- (id)initWithClass:(Class)c { + self = [super init]; + if (self != nil) { + theClass = c; + } + return self; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.h new file mode 100644 index 000000000..4ddef2ba6 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.h @@ -0,0 +1,103 @@ +/* + + AdWhirlConfig.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import +#import "CJSONDeserializer.h" + +@class AdWhirlConfig; +@protocol AdWhirlConfigDelegate + +@optional +- (void)adWhirlConfigDidReceiveConfig:(AdWhirlConfig *)config; +- (void)adWhirlConfigDidFail:(AdWhirlConfig *)config error:(NSError *)error; +- (NSURL *)adWhirlConfigURL; + +@end + +typedef enum { + AWBannerAnimationTypeNone = 0, + AWBannerAnimationTypeFlipFromLeft = 1, + AWBannerAnimationTypeFlipFromRight = 2, + AWBannerAnimationTypeCurlUp = 3, + AWBannerAnimationTypeCurlDown = 4, + AWBannerAnimationTypeSlideFromLeft = 5, + AWBannerAnimationTypeSlideFromRight = 6, + AWBannerAnimationTypeFadeIn = 7, + AWBannerAnimationTypeRandom = 8, +} AWBannerAnimationType; + +@class AdWhirlAdNetworkConfig; +@class AdWhirlAdNetworkRegistry; + +@interface AdWhirlConfig : NSObject { + NSString *appKey; + NSURL *configURL; + BOOL legacy; + + BOOL adsAreOff; + NSMutableArray *adNetworkConfigs; + + UIColor *backgroundColor; + UIColor *textColor; + NSTimeInterval refreshInterval; + BOOL locationOn; + AWBannerAnimationType bannerAnimationType; + NSInteger fullscreenWaitInterval; + NSInteger fullscreenMaxAds; + + NSMutableArray *delegates; + BOOL hasConfig; + + AdWhirlAdNetworkRegistry *adNetworkRegistry; +} + +- (id)initWithAppKey:(NSString *)ak delegate:(id)delegate; +- (BOOL)parseConfig:(NSData *)data error:(NSError **)error; +- (BOOL)addDelegate:(id)delegate; +- (BOOL)removeDelegate:(id)delegate; +- (void)notifyDelegatesOfFailure:(NSError *)error; + +@property (nonatomic,readonly) NSString *appKey; +@property (nonatomic,readonly) NSURL *configURL; + +@property (nonatomic,readonly) BOOL hasConfig; + +@property (nonatomic,readonly) BOOL adsAreOff; +@property (nonatomic,readonly) NSArray *adNetworkConfigs; +@property (nonatomic,readonly) UIColor *backgroundColor; +@property (nonatomic,readonly) UIColor *textColor; +@property (nonatomic,readonly) NSTimeInterval refreshInterval; +@property (nonatomic,readonly) BOOL locationOn; +@property (nonatomic,readonly) AWBannerAnimationType bannerAnimationType; +@property (nonatomic,readonly) NSInteger fullscreenWaitInterval; +@property (nonatomic,readonly) NSInteger fullscreenMaxAds; + +@property (nonatomic,assign) AdWhirlAdNetworkRegistry *adNetworkRegistry; + +@end + + +// Convenience conversion functions, converts val into native types var. +// val can be NSNumber or NSString, all else will cause function to fail +// On failure, return NO. +BOOL awIntVal(NSInteger *var, id val); +BOOL awFloatVal(CGFloat *var, id val); +BOOL awDoubleVal(double *var, id val); diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.m new file mode 100644 index 000000000..3860aea74 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfig.m @@ -0,0 +1,562 @@ +/* + + AdWhirlConfig.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import + +#import "AdWhirlConfig.h" +#import "AdWhirlError.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlLog.h" +#import "AdWhirlView.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "UIColor+AdWhirlConfig.h" +#import "AWNetworkReachabilityWrapper.h" + + +BOOL awIntVal(NSInteger *var, id val) { + if ([val isKindOfClass:[NSNumber class]] || [val isKindOfClass:[NSString class]]) { + *var = [val integerValue]; + return YES; + } + return NO; +} + +BOOL awFloatVal(CGFloat *var, id val) { + if ([val isKindOfClass:[NSNumber class]] || [val isKindOfClass:[NSString class]]) { + *var = [val floatValue]; + return YES; + } + return NO; +} + +BOOL awDoubleVal(double *var, id val) { + if ([val isKindOfClass:[NSNumber class]] || [val isKindOfClass:[NSString class]]) { + *var = [val doubleValue]; + return YES; + } + return NO; +} + + +@implementation AdWhirlConfig + +@synthesize appKey; +@synthesize configURL; +@synthesize adsAreOff; +@synthesize adNetworkConfigs; +@synthesize backgroundColor; +@synthesize textColor; +@synthesize refreshInterval; +@synthesize locationOn; +@synthesize bannerAnimationType; +@synthesize fullscreenWaitInterval; +@synthesize fullscreenMaxAds; +@synthesize hasConfig; + +@synthesize adNetworkRegistry; + +#pragma mark - + +- (id)initWithAppKey:(NSString *)ak delegate:(id)delegate { + self = [super init]; + if (self != nil) { + appKey = [[NSString alloc] initWithString:ak]; + legacy = NO; + adNetworkConfigs = [[NSMutableArray alloc] init]; + delegates = [[NSMutableArray alloc] init]; + hasConfig = NO; + [self addDelegate:delegate]; + + // object dependencies + adNetworkRegistry = [AdWhirlAdNetworkRegistry sharedRegistry]; + + // default values + backgroundColor = [[UIColor alloc] initWithRed:0.3 green:0.3 blue:0.3 alpha:1.0]; + textColor = [[UIColor whiteColor] retain]; + refreshInterval = 60; + locationOn = YES; + bannerAnimationType = AWBannerAnimationTypeRandom; + fullscreenWaitInterval = 60; + fullscreenMaxAds = 2; + + // config URL + NSURL *configBaseURL = nil; + if ([delegate respondsToSelector:@selector(adWhirlConfigURL)]) { + configBaseURL = [delegate adWhirlConfigURL]; + } + if (configBaseURL == nil) { + configBaseURL = [NSURL URLWithString:kAdWhirlDefaultConfigURL]; + } + configURL = [[NSURL alloc] initWithString:[NSString stringWithFormat:@"?appid=%@&appver=%d&client=1", + appKey, + kAdWhirlAppVer] + relativeToURL:configBaseURL]; + } + return self; +} + +- (BOOL)addDelegate:(id)delegate { + for (NSValue *w in delegates) { + id existing = [w nonretainedObjectValue]; + if (existing == delegate) { + return NO; // already in the list of delegates + } + } + NSValue *wrapped = [NSValue valueWithNonretainedObject:delegate]; + [delegates addObject:wrapped]; + return YES; +} + +- (BOOL)removeDelegate:(id)delegate { + NSUInteger i; + for (i = 0; i < [delegates count]; i++) { + NSValue *w = [delegates objectAtIndex:i]; + id existing = [w nonretainedObjectValue]; + if (existing == delegate) { + break; + } + } + if (i < [delegates count]) { + [delegates removeObjectAtIndex:i]; + return YES; + } + return NO; +} + +- (void)notifyDelegatesOfFailure:(NSError *)error { + for (NSValue *wrapped in delegates) { + id delegate = [wrapped nonretainedObjectValue]; + if ([delegate respondsToSelector:@selector(adWhirlConfigDidFail:error:)]) { + [delegate adWhirlConfigDidFail:self error:error]; + } + } +} + +- (NSString *)description { + NSString *desc = [super description]; + NSString *configs = [NSString stringWithFormat: + @"location_access:%d fg_color:%@ bg_color:%@ cycle_time:%lf transition:%d", + locationOn, textColor, backgroundColor, refreshInterval, bannerAnimationType]; + return [NSString stringWithFormat:@"%@:\n%@ networks:%@",desc,configs,adNetworkConfigs]; +} + +- (void)dealloc { + [appKey release], appKey = nil; + [configURL release], configURL = nil; + [adNetworkConfigs release], adNetworkConfigs = nil; + [backgroundColor release], backgroundColor = nil; + [textColor release], textColor = nil; + [delegates release], delegates = nil; + [super dealloc]; +} + +#pragma mark parsing methods + +- (BOOL)parseExtraConfig:(NSDictionary *)configDict error:(NSError **)error { + id bgColor = [configDict objectForKey:@"background_color_rgb"]; + if (bgColor != nil && [bgColor isKindOfClass:[NSDictionary class]]) { + [backgroundColor release]; + backgroundColor = [[UIColor alloc] initWithDict:(NSDictionary *)bgColor]; + } + id txtColor = [configDict objectForKey:@"text_color_rgb"]; + if (txtColor != nil && [txtColor isKindOfClass:[NSDictionary class]]) { + [textColor release]; + textColor = [[UIColor alloc] initWithDict:txtColor]; + } + id tempVal; + tempVal = [configDict objectForKey:@"refresh_interval"]; + if (tempVal == nil) + tempVal = [configDict objectForKey:@"cycle_time"]; + NSInteger tempInt; + if (tempVal && awIntVal(&tempInt, tempVal)) { + refreshInterval = (NSTimeInterval)tempInt; + if (refreshInterval >= 30000.0) { + // effectively forever, set to 0 + refreshInterval = 0.0; + } + } + if (awIntVal(&tempInt, [configDict objectForKey:@"location_on"])) { + locationOn = (tempInt == 0)? NO : YES; + // check user preference. user preference of NO trumps all + + BOOL bLocationServiceEnabled = NO; + if ([CLLocationManager respondsToSelector: + @selector(locationServicesEnabled)]) { + bLocationServiceEnabled = [CLLocationManager locationServicesEnabled]; + } + else { + CLLocationManager* locMan = [[CLLocationManager alloc] init]; + bLocationServiceEnabled = locMan.locationServicesEnabled; + [locMan release], locMan = nil; + } + + if (locationOn == YES && bLocationServiceEnabled == NO) { + AWLogDebug(@"User disabled location services, set locationOn to NO"); + locationOn = NO; + } + } + tempVal = [configDict objectForKey:@"transition"]; + if (tempVal == nil) + tempVal = [configDict objectForKey:@"banner_animation_type"]; + if (tempVal && awIntVal(&tempInt, tempVal)) { + switch (tempInt) { + case 0: bannerAnimationType = AWBannerAnimationTypeNone; break; + case 1: bannerAnimationType = AWBannerAnimationTypeFlipFromLeft; break; + case 2: bannerAnimationType = AWBannerAnimationTypeFlipFromRight; break; + case 3: bannerAnimationType = AWBannerAnimationTypeCurlUp; break; + case 4: bannerAnimationType = AWBannerAnimationTypeCurlDown; break; + case 5: bannerAnimationType = AWBannerAnimationTypeSlideFromLeft; break; + case 6: bannerAnimationType = AWBannerAnimationTypeSlideFromRight; break; + case 7: bannerAnimationType = AWBannerAnimationTypeFadeIn; break; + case 8: bannerAnimationType = AWBannerAnimationTypeRandom; break; + } + } + if (awIntVal(&tempInt, [configDict objectForKey:@"fullscreen_wait_interval"])) { + fullscreenWaitInterval = tempInt; + } + if (awIntVal(&tempInt, [configDict objectForKey:@"fullscreen_max_ads"])) { + fullscreenMaxAds = tempInt; + } + return YES; +} + +- (BOOL)parseLegacyConfig:(NSArray *)configArray error:(NSError **)error { + NSMutableDictionary *adNetConfigDicts = [[NSMutableDictionary alloc] init]; + for (int i = 0; i < [configArray count]; i++) { + id configObj = [configArray objectAtIndex:i]; + if (![configObj isKindOfClass:[NSDictionary class]]) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:@"Expected dictionary in config data"]; + [adNetConfigDicts release]; + return NO; + } + NSDictionary *configDict = (NSDictionary *)configObj; + switch (i) { + case 0: + // ration map + case 1: + // key map + case 2: + // priority map + for (id key in [configDict keyEnumerator]) { + // format: "_" e.g. "admob_ration" + NSString *strKey = (NSString *)key; + if ([strKey compare:@"empty_ration"] == NSOrderedSame) { + NSInteger empty_ration; + if (awIntVal(&empty_ration, [configDict objectForKey:key]) && empty_ration == 100) { + adsAreOff = YES; + [adNetConfigDicts release]; + return YES; + } + } + adsAreOff = NO; + NSRange underScorePos = [strKey rangeOfString:@"_" options:NSBackwardsSearch]; + if (underScorePos.location == NSNotFound) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:[NSString stringWithFormat: + @"Expected underscore delimiter in key '%@'", strKey]]; + [adNetConfigDicts release]; + return NO; + } + NSString *networkName = [strKey substringToIndex:underScorePos.location]; + NSString *valueName = [strKey substringFromIndex:(underScorePos.location+1)]; + if ([networkName length] == 0) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:[NSString stringWithFormat: + @"Empty ad network name in key '%@'", strKey]]; + [adNetConfigDicts release]; + return NO; + } + if ([valueName length] == 0) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:[NSString stringWithFormat: + @"Empty value name in key '%@'", strKey]]; + [adNetConfigDicts release]; + return NO; + } + if ([networkName compare:@"dontcare"] == NSOrderedSame) { + continue; + } + NSMutableDictionary *adNetConfigDict = [adNetConfigDicts objectForKey:networkName]; + if (adNetConfigDict == nil) { + adNetConfigDict = [[NSMutableDictionary alloc] init]; + [adNetConfigDicts setObject:adNetConfigDict forKey:networkName]; + [adNetConfigDict release]; + adNetConfigDict = [adNetConfigDicts objectForKey:networkName]; + } + NSString *properValueName; + if ([valueName compare:@"ration"] == NSOrderedSame) { + properValueName = AWAdNetworkConfigKeyWeight; + } + else if ([valueName compare:@"key"] == NSOrderedSame) { + properValueName = AWAdNetworkConfigKeyCred; + } + else if ([valueName compare:@"priority"] == NSOrderedSame) { + properValueName = AWAdNetworkConfigKeyPriority; + } + else { + properValueName = valueName; + } + [adNetConfigDict setObject:[configDict objectForKey:key] + forKey:properValueName]; + } + break; // ad network config maps + + case 3: + // general config map + if (![self parseExtraConfig:configDict error:error]) { + return NO; + } + break; // general config map + default: + AWLogWarn(@"Ignoring element at index %d in legacy config", i); + break; + } // switch (i) + } // loop configArray + + // adwhirl_ special handling + NSMutableDictionary *adRolloConfig = [adNetConfigDicts objectForKey:@"adrollo"]; + if (adRolloConfig != nil) { + AWLogDebug(@"Processing AdRollo config %@", adRolloConfig); + NSMutableArray *adWhirlNetworkConfigs = [[NSMutableArray alloc] init];; + for (NSString *netname in [adNetConfigDicts keyEnumerator]) { + if (![netname hasPrefix:@"adwhirl_"]) continue; + [adWhirlNetworkConfigs addObject:[adNetConfigDicts objectForKey:netname]]; + } + if ([adWhirlNetworkConfigs count] > 0) { + // split the ration evenly, use same credentials + NSInteger ration = [[adRolloConfig objectForKey:AWAdNetworkConfigKeyWeight] integerValue]; + ration = ration/[adWhirlNetworkConfigs count]; + for (NSMutableDictionary *cd in adWhirlNetworkConfigs) { + [cd setObject:[NSNumber numberWithInteger:ration] + forKey:AWAdNetworkConfigKeyWeight]; + [cd setObject:[adRolloConfig objectForKey:AWAdNetworkConfigKeyCred] + forKey:AWAdNetworkConfigKeyCred]; + } + } + [adWhirlNetworkConfigs release]; + } + + NSInteger totalWeight = 0; + for (id networkName in [adNetConfigDicts keyEnumerator]) { + NSString *netname = (NSString *)networkName; + if ([netname compare:@"adrollo"] == NSOrderedSame) { + // skip adrollo, was used for "adwhirl_" networks + continue; + } + NSMutableDictionary *adNetConfigDict = [adNetConfigDicts objectForKey:netname]; + + // set network type for legacy + NSInteger networkType = 0; + if ([netname compare:@"admob"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeAdMob; + } + else if ([netname compare:@"jumptap"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeJumpTap; + } + else if ([netname compare:@"videoegg"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeVideoEgg; + } + else if ([netname compare:@"medialets"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeMedialets; + } + else if ([netname compare:@"liverail"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeLiveRail; + } + else if ([netname compare:@"millennial"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeMillennial; + } + else if ([netname compare:@"greystripe"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeGreyStripe; + } + else if ([netname compare:@"quattro"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeQuattro; + } + else if ([netname compare:@"custom"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeCustom; + } + else if ([netname compare:@"adwhirl_10"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeAdWhirl10; + } + else if ([netname compare:@"mobclix"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeMobClix; + } + else if ([netname compare:@"adwhirl_12"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeMdotM; + } + else if ([netname compare:@"adwhirl_13"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeAdWhirl13; + } + else if ([netname compare:@"google_adsense"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeGoogleAdSense; + } + else if ([netname compare:@"google_doubleclick"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeGoogleDoubleClick; + } + else if ([netname compare:@"generic"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeGeneric; + } + else if ([netname compare:@"inmobi"] == NSOrderedSame) { + networkType = AdWhirlAdNetworkTypeInMobi; + } + + else { + AWLogWarn(@"Unrecognized ad network '%@' in legacy config, ignored", netname); + continue; + } + + [adNetConfigDict setObject:netname forKey:AWAdNetworkConfigKeyName]; + [adNetConfigDict setObject:[NSString stringWithFormat:@"%d", networkType] + forKey:AWAdNetworkConfigKeyNID]; + [adNetConfigDict setObject:[NSNumber numberWithInteger:networkType] + forKey:AWAdNetworkConfigKeyType]; + + AdWhirlError *adNetConfigError = nil; + AdWhirlAdNetworkConfig *adNetConfig = + [[AdWhirlAdNetworkConfig alloc] initWithDictionary:adNetConfigDict + adNetworkRegistry:adNetworkRegistry + error:&adNetConfigError]; + if (adNetConfig != nil) { + [adNetworkConfigs addObject:adNetConfig]; + totalWeight += adNetConfig.trafficPercentage; + [adNetConfig release]; + } + else { + AWLogWarn(@"Cannot create ad network config from %@: %@", adNetConfigDict, + adNetConfigError != nil? [adNetConfigError localizedDescription]:@""); + } + } // for each ad network name + + if (totalWeight == 0) { + adsAreOff = YES; + } + + [adNetConfigDicts release]; + return YES; +} + +- (BOOL)parseNewConfig:(NSDictionary *)configDict error:(NSError **)error { + id extra = [configDict objectForKey:@"extra"]; + if (extra != nil && [extra isKindOfClass:[NSDictionary class]]) { + NSDictionary *extraDict = extra; + if (![self parseExtraConfig:extraDict error:error]) { + return NO; + } + } + else { + AWLogWarn(@"No extra info dict in ad network config"); + } + + id rations = [configDict objectForKey:@"rations"]; + double totalWeight = 0.0; + if (rations != nil && [rations isKindOfClass:[NSArray class]]) { + if ([(NSArray *)rations count] == 0) { + adsAreOff = YES; + return YES; + } + adsAreOff = NO; + for (id c in (NSArray *)rations) { + if (![c isKindOfClass:[NSDictionary class]]) { + AWLogWarn(@"Element in rations array is not a dictionary %@ in ad network config",c); + continue; + } + AdWhirlError *adNetConfigError = nil; + AdWhirlAdNetworkConfig *adNetConfig = + [[AdWhirlAdNetworkConfig alloc] initWithDictionary:(NSDictionary *)c + adNetworkRegistry:adNetworkRegistry + error:&adNetConfigError]; + if (adNetConfig != nil) { + [adNetworkConfigs addObject:adNetConfig]; + totalWeight += adNetConfig.trafficPercentage; + [adNetConfig release]; + } + else { + AWLogWarn(@"Cannot create ad network config from %@: %@", c, + adNetConfigError != nil? [adNetConfigError localizedDescription]:@""); + } + } + } + else { + AWLogError(@"No rations array in ad network config"); + } + + if (totalWeight == 0.0) { + adsAreOff = YES; + } + + return YES; +} + +- (BOOL)parseConfig:(NSData *)data error:(NSError **)error { + if (hasConfig) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:@"Already has config, will not parse"]; + return NO; + } + NSError *jsonError = nil; + id parsed = [[CJSONDeserializer deserializer] deserialize:data error:&jsonError]; + if (parsed == nil) { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigParseError + description:@"Error parsing config JSON from server" + underlyingError:jsonError]; + return NO; + } + if ([parsed isKindOfClass:[NSArray class]]) { + // pre-open-source AdWhirl/AdRollo config + legacy = YES; + if (![self parseLegacyConfig:(NSArray *)parsed error:error]) { + return NO; + } + } + else if ([parsed isKindOfClass:[NSDictionary class]]) { + // open-source AdWhirl config + if (![self parseNewConfig:(NSDictionary *)parsed error:error]) { + return NO; + } + } + else { + if (error != NULL) + *error = [AdWhirlError errorWithCode:AdWhirlConfigDataError + description:@"Expected top-level dictionary in config data"]; + return NO; + } + + // parse success + hasConfig = YES; + + // notify delegates of success + for (NSValue *wrapped in delegates) { + id delegate = [wrapped nonretainedObjectValue]; + if ([delegate respondsToSelector:@selector(adWhirlConfigDidReceiveConfig:)]) { + [delegate adWhirlConfigDidReceiveConfig:self]; + } + } + + return YES; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.h new file mode 100644 index 000000000..a2094090e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.h @@ -0,0 +1,67 @@ +/* + + AdWhirlConfigStore.h + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import "AdWhirlConfigStore.h" +#import "AdWhirlConfig.h" +#import "AWNetworkReachabilityDelegate.h" + +@class AWNetworkReachabilityWrapper; + +// Singleton class to store AdWhirl configs, keyed by appKey. Fetched config +// is cached unless it is force-fetched using fetchConfig. Checks network +// reachability using AWNetworkReachabilityWrapper before making connections to +// fetch configs, so that that means it will wait forever until the config host +// is reachable. +@interface AdWhirlConfigStore : NSObject { + NSMutableDictionary *configs_; + AdWhirlConfig *fetchingConfig_; + + AWNetworkReachabilityWrapper *reachability_; + NSURLConnection *connection_; + NSMutableData *receivedData_; +} + +// Returns the singleton AdWhirlConfigStore object. ++ (AdWhirlConfigStore *)sharedStore; + +// Deletes all existing configs. ++ (void)resetStore; + +// Returns config for appKey. If config does not exist for appKey, goes and +// fetches the config from the server, the URL of which is taken from +// [delegate adWhirlConfigURL]. +// Returns nil if appKey is nil or empty, another fetch is in progress, or +// error setting up reachability check. +- (AdWhirlConfig *)getConfig:(NSString *)appKey + delegate:(id)delegate; + +// Fetches (or re-fetch) the config for the given appKey. Always go to the +// network. Call this to get a new version of the config from the server. +// Returns nil if appKey is nil or empty, another fetch is in progress, or +// error setting up reachability check. +- (AdWhirlConfig *)fetchConfig:(NSString *)appKey + delegate:(id )delegate; + +// For testing -- set mocks here. +@property (nonatomic,retain) AWNetworkReachabilityWrapper *reachability; +@property (nonatomic,retain) NSURLConnection *connection; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.m new file mode 100644 index 000000000..f1eff12ec --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlConfigStore.m @@ -0,0 +1,291 @@ +/* + + AdWhirlConfigStore.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "AdWhirlConfigStore.h" +#import "AdWhirlLog.h" +#import "AWNetworkReachabilityWrapper.h" +#import "AdWhirlError.h" + +static AdWhirlConfigStore *gStore = nil; + +@interface AdWhirlConfigStore () + +- (BOOL)checkReachability; +- (void)startFetchingAssumingReachable; +- (void)failedFetchingWithError:(AdWhirlError *)error; +- (void)finishedFetching; + +@end + + +@implementation AdWhirlConfigStore + +@synthesize reachability = reachability_; +@synthesize connection = connection_; + ++ (AdWhirlConfigStore *)sharedStore { + if (gStore == nil) { + gStore = [[AdWhirlConfigStore alloc] init]; + } + return gStore; +} + ++ (void)resetStore { + if (gStore != nil) { + [gStore release], gStore = nil; + [self sharedStore]; + } +} + +- (id)init { + self = [super init]; + if (self != nil) { + configs_ = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (AdWhirlConfig *)getConfig:(NSString *)appKey + delegate:(id)delegate { + AdWhirlConfig *config = [configs_ objectForKey:appKey]; + if (config != nil) { + if (config.hasConfig) { + if ([delegate + respondsToSelector:@selector(adWhirlConfigDidReceiveConfig:)]) { + // Don't call directly, instead schedule it in the runloop. Delegate + // may expect the message to be delivered out-of-band + [(NSObject *)delegate + performSelectorOnMainThread:@selector(adWhirlConfigDidReceiveConfig:) + withObject:config + waitUntilDone:NO]; + } + return config; + } + // If there's already a config fetching, and another call to this function + // add a delegate to the config + [config addDelegate:delegate]; + return config; + } + + // No config, create one, and start fetching it + return [self fetchConfig:appKey delegate:delegate]; +} + +- (AdWhirlConfig *)fetchConfig:(NSString *)appKey + delegate:(id )delegate { + + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + + if (fetchingConfig_ != nil) { + AWLogWarn(@"Another fetch is in progress, wait until finished."); + [config release]; + return nil; + } + fetchingConfig_ = config; + + if (![self checkReachability]) { + [config release]; + return nil; + } + + [configs_ setObject:config forKey:appKey]; + [config release]; + return config; +} + +- (void)dealloc { + if (reachability_ != nil) { + reachability_.delegate = nil; + [reachability_ release]; + } + [connection_ release]; + [receivedData_ release]; + [configs_ release]; + [super dealloc]; +} + + +#pragma mark private helper methods + +// Check reachability first +- (BOOL)checkReachability { + AWLogDebug(@"Checking if config is reachable at %@", + fetchingConfig_.configURL); + + // Normally reachability_ should be nil so a new one will be created. + // In a testing environment, it may already have been assigned with a mock. + // In any case, reachability_ will be released when the config URL is + // reachable, in -reachabilityBecameReachable. + if (reachability_ == nil) { + reachability_ = [AWNetworkReachabilityWrapper + reachabilityWithHostname:[fetchingConfig_.configURL host] + callbackDelegate:self]; + [reachability_ retain]; + } + if (reachability_ == nil) { + [fetchingConfig_ notifyDelegatesOfFailure: + [AdWhirlError errorWithCode:AdWhirlConfigConnectionError + description: + @"Error setting up reachability check to config server"]]; + return NO; + } + + if (![reachability_ scheduleInCurrentRunLoop]) { + [fetchingConfig_ notifyDelegatesOfFailure: + [AdWhirlError errorWithCode:AdWhirlConfigConnectionError + description: + @"Error scheduling reachability check to config server"]]; + [reachability_ release], reachability_ = nil; + return NO; + } + + return YES; +} + +// Make connection +- (void)startFetchingAssumingReachable { + // go fetch config + NSURLRequest *configRequest + = [NSURLRequest requestWithURL:fetchingConfig_.configURL]; + + // Normally connection_ should be nil so a new one will be created. + // In a testing environment, it may alreay have been assigned with a mock. + // In any case, connection_ will be release when connection failed or + // finished. + if (connection_ == nil) { + connection_ = [[NSURLConnection alloc] initWithRequest:configRequest + delegate:self]; + } + + // Error checking + if (connection_ == nil) { + [self failedFetchingWithError: + [AdWhirlError errorWithCode:AdWhirlConfigConnectionError + description: + @"Error creating connection to config server"]]; + return; + } + receivedData_ = [[NSMutableData alloc] init]; +} + +// Clean up after fetching failed +- (void)failedFetchingWithError:(AdWhirlError *)error { + // notify + [fetchingConfig_ notifyDelegatesOfFailure:error]; + + // remove the failed config from the cache + [configs_ removeObjectForKey:fetchingConfig_.appKey]; + // the config is only retained by the dict,now released + + [self finishedFetching]; +} + +// Clean up after fetching, success or failed +- (void)finishedFetching { + [connection_ release], connection_ = nil; + [receivedData_ release], receivedData_ = nil; + fetchingConfig_ = nil; +} + + +#pragma mark reachability methods + +- (void)reachabilityNotReachable:(AWNetworkReachabilityWrapper *)reach { + if (reach != reachability_) { + AWLogWarn(@"Unrecognized reachability object called not reachable %s:%d", + __FILE__, __LINE__); + return; + } + AWLogDebug(@"Config host %@ not (yet) reachable, check back later", + reach.hostname); + [reachability_ release], reachability_ = nil; + [self performSelector:@selector(checkReachability) + withObject:nil + afterDelay:10.0]; +} + +- (void)reachabilityBecameReachable:(AWNetworkReachabilityWrapper *)reach { + if (reach != reachability_) { + AWLogWarn(@"Unrecognized reachability object called reachable %s:%d", + __FILE__, __LINE__); + return; + } + // done with the reachability + [reachability_ release], reachability_ = nil; + + [self startFetchingAssumingReachable]; +} + + +#pragma mark NSURLConnection delegate methods. + +- (void)connection:(NSURLConnection *)conn + didReceiveResponse:(NSURLResponse *)response { + if (conn != connection_) { + AWLogError(@"Unrecognized connection object %s:%d", __FILE__, __LINE__); + return; + } + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { + NSHTTPURLResponse *http = (NSHTTPURLResponse*)response; + const int status = [http statusCode]; + + if (status < 200 || status >= 300) { + AWLogWarn(@"AdWhirlConfig: HTTP %d, cancelling %@", status, [http URL]); + [connection_ cancel]; + [self failedFetchingWithError: + [AdWhirlError errorWithCode:AdWhirlConfigStatusError + description:@"Config server did not return status 200"]]; + return; + } + } + + [receivedData_ setLength:0]; +} + +- (void)connection:(NSURLConnection *)conn didFailWithError:(NSError *)error { + if (conn != connection_) { + AWLogError(@"Unrecognized connection object %s:%d", __FILE__, __LINE__); + return; + } + [self failedFetchingWithError: + [AdWhirlError errorWithCode:AdWhirlConfigConnectionError + description:@"Error connecting to config server" + underlyingError:error]]; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)conn { + if (conn != connection_) { + AWLogError(@"Unrecognized connection object %s:%d", __FILE__, __LINE__); + return; + } + [fetchingConfig_ parseConfig:receivedData_ error:nil]; + [self finishedFetching]; +} + +- (void)connection:(NSURLConnection *)conn didReceiveData:(NSData *)data { + if (conn != connection_) { + AWLogError(@"Unrecognized connection object %s:%d", __FILE__, __LINE__); + return; + } + [receivedData_ appendData:data]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.h new file mode 100644 index 000000000..03dce95b7 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.h @@ -0,0 +1,101 @@ +/* + + AdWhirlCustomAdView.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import + +typedef enum { + AWCustomAdTypeMIN = 0, + AWCustomAdTypeBanner = 1, + AWCustomAdTypeText = 2, + AWCustomAdTypeAutoLaunchFallBackBanner = 3, + AWCustomAdTypeAutoLaunchFallBackText = 4, + AWCustomAdTypeSearchBar = 5, + AWCustomAdTypeMAX = 6 +} AWCustomAdType; + +typedef enum { + AWCustomAdLaunchTypeMIN = 0, + AWCustomAdLaunchTypeSafari = 1, + AWCustomAdLaunchTypeCanvas = 2, + AWCustomAdLaunchTypeSafariRedirectFollowThrough = 3, + AWCustomAdLaunchTypeMAX = 4 +} AWCustomAdLaunchType; + +typedef enum { + AWCustomAdWebViewAnimTypeMIN = -1, + AWCustomAdWebViewAnimTypeNone = 0, + AWCustomAdWebViewAnimTypeFlipFromLeft = 1, + AWCustomAdWebViewAnimTypeFlipFromRight = 2, + AWCustomAdWebViewAnimTypeCurlUp = 3, + AWCustomAdWebViewAnimTypeCurlDown = 4, + AWCustomAdWebViewAnimTypeSlideFromLeft = 5, + AWCustomAdWebViewAnimTypeSlideFromRight = 6, + AWCustomAdWebViewAnimTypeFadeIn = 7, + AWCustomAdWebViewAnimTypeModal = 8, + AWCustomAdWebViewAnimTypeRandom = 9, + AWCustomAdWebViewAnimTypeMAX = 10 +} AWCustomAdWebViewAnimType; + +@class AdWhirlCustomAdView; + +@protocol AdWhirlCustomAdViewDelegate + +- (void)adTapped:(AdWhirlCustomAdView *)adView; + +@end + + +@interface AdWhirlCustomAdView : UIButton +{ + id delegate; + UIImage *image; + UILabel *textLabel; + NSURL *redirectURL; + NSURL *clickMetricsURL; + AWCustomAdType adType; + AWCustomAdLaunchType launchType; + AWCustomAdWebViewAnimType animType; + UIColor *backgroundColor; + UIColor *textColor; +} + +- (id)initWithDelegate:(id)delegate + text:(NSString *)text + redirectURL:(NSURL *)redirectURL + clickMetricsURL:(NSURL *)clickMetricsURL + adType:(AWCustomAdType)adType + launchType:(AWCustomAdLaunchType)launchType + animType:(AWCustomAdWebViewAnimType)animType + backgroundColor:(UIColor *)bgColor + textColor:(UIColor *)fgColor; + +@property (nonatomic,assign) id delegate; +@property (nonatomic,retain) UIImage *image; +@property (nonatomic,readonly) UILabel *textLabel; +@property (nonatomic,readonly) NSURL *redirectURL; +@property (nonatomic,readonly) NSURL *clickMetricsURL; +@property (nonatomic,readonly) AWCustomAdType adType; +@property (nonatomic,readonly) AWCustomAdLaunchType launchType; +@property (nonatomic,readonly) AWCustomAdWebViewAnimType animType; +@property (nonatomic,readonly) UIColor *backgroundColor; +@property (nonatomic,readonly) UIColor *textColor; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.m new file mode 100644 index 000000000..711ebd65d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlCustomAdView.m @@ -0,0 +1,168 @@ +/* + + AdWhirlCustomAdView.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlCustomAdView.h" +#import "AdWhirlView.h" +#import "AdWhirlLog.h" + + +@implementation AdWhirlCustomAdView + +@synthesize delegate; +@synthesize image; +@synthesize textLabel; +@synthesize redirectURL; +@synthesize clickMetricsURL; +@synthesize adType; +@synthesize launchType; +@synthesize animType; +@synthesize backgroundColor; +@synthesize textColor; + +- (id)initWithDelegate:(id)d + text:(NSString *)txt + redirectURL:(NSURL *)rURL + clickMetricsURL:(NSURL *)cURL + adType:(AWCustomAdType)aType + launchType:(AWCustomAdLaunchType)launch + animType:(AWCustomAdWebViewAnimType)anim + backgroundColor:(UIColor *)bgColor + textColor:(UIColor *)fgColor { + + self = [super initWithFrame:kAdWhirlViewDefaultFrame]; + if (self != nil) { + delegate = d; + redirectURL = [rURL retain]; + clickMetricsURL = [cURL retain]; + adType = aType; + launchType = launch; + animType = anim; + backgroundColor = [bgColor retain]; + textColor = [fgColor retain]; + + if (adType == AWCustomAdTypeText) { + textLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 0, 270, CGRectGetHeight(self.bounds))]; + textLabel.text = txt; + textLabel.textColor = fgColor; + textLabel.numberOfLines = 3; + textLabel.backgroundColor = [UIColor clearColor]; + textLabel.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:13.0]; + [self addSubview:textLabel]; + } + + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.frame = self.bounds; + button.showsTouchWhenHighlighted = YES; + [button addTarget:self action:@selector(buttonTapUp:) forControlEvents:UIControlEventTouchUpInside]; + [self addSubview:button]; + } + return self; +} + +#define kNumBgColors 3 +#define kImageLeft 4 +#define kCornerRadius 7.0 +#define kImageDim 39 // assume square, so this is length of each side +#define kChamferLight [UIColor colorWithWhite:0.9 alpha:1].CGColor +#define kChamferDark [UIColor colorWithWhite:0.4 alpha:1].CGColor + +- (void)drawRect:(CGRect)rect { + + CGContextRef ctx = UIGraphicsGetCurrentContext(); + if (adType == AWCustomAdTypeText) { + + // draw background + CGFloat locations[kNumBgColors] = {0.0, 0.7, 1.0}; + CGColorRef colorArray[kNumBgColors] = + {[backgroundColor colorWithAlphaComponent:0.6].CGColor, + backgroundColor.CGColor, + backgroundColor.CGColor}; + CFArrayRef colors = CFArrayCreate(kCFAllocatorDefault, + (const void **)colorArray, + kNumBgColors, + &kCFTypeArrayCallBacks); + CGGradientRef gradient = CGGradientCreateWithColors(NULL, colors, locations); + CFRelease(colors); + CGContextSetFillColorWithColor(ctx, [UIColor whiteColor].CGColor); + CGContextFillRect(ctx, CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds))); + CGPoint midY = CGPointMake(0.0, CGRectGetHeight(self.bounds)/2); + CGPoint lowY = CGPointMake(0.0, CGRectGetHeight(self.bounds)); + CGContextDrawLinearGradient(ctx, gradient, CGPointZero, midY, 0); + CGContextDrawLinearGradient(ctx, gradient, lowY, midY, 0); + CGGradientRelease(gradient); + + // draw image and chamfer + CGFloat imageTop = (CGRectGetHeight(self.bounds) - kImageDim)/2.0; + CGPoint tl = CGPointMake(kImageLeft+kCornerRadius, imageTop+kCornerRadius); + CGPoint tr = CGPointMake(kImageLeft+kImageDim-kCornerRadius, imageTop+kCornerRadius); + CGPoint br = CGPointMake(kImageLeft+kImageDim-kCornerRadius, imageTop+kImageDim-kCornerRadius); + CGPoint bl = CGPointMake(kImageLeft+kCornerRadius, imageTop+kImageDim-kCornerRadius); + CGContextSaveGState(ctx); + CGContextMoveToPoint(ctx, kImageLeft, imageTop+kCornerRadius); + CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, M_PI, 3*M_PI/2, 0); + CGContextAddArc(ctx, tr.x, tr.y, kCornerRadius, 3*M_PI/2, 0, 0); + CGContextAddArc(ctx, br.x, br.y, kCornerRadius, 0, M_PI/2, 0); + CGContextAddArc(ctx, bl.x, bl.y, kCornerRadius, M_PI/2, M_PI, 0); + CGContextClosePath(ctx); + CGContextClip(ctx); + [image drawAtPoint:CGPointMake(kImageLeft, imageTop)]; + CGContextSetLineWidth(ctx, 0.5); + CGContextMoveToPoint(ctx, kImageLeft, imageTop+kImageDim-kCornerRadius); + CGContextSetStrokeColorWithColor(ctx, kChamferDark); + CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, M_PI, 5*M_PI/4, 0); + CGContextStrokePath(ctx); + CGContextSetStrokeColorWithColor(ctx, kChamferLight); + CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, 5*M_PI/4, 3*M_PI/2, 0); + CGContextAddArc(ctx, tr.x, tr.y, kCornerRadius, 3*M_PI/2, 0, 0); + CGContextAddArc(ctx, br.x, br.y, kCornerRadius, 0, M_PI/4, 0); + CGContextStrokePath(ctx); + CGContextSetStrokeColorWithColor(ctx, kChamferDark); + CGContextAddArc(ctx, br.x, br.y, kCornerRadius, M_PI/4, M_PI/2, 0); + CGContextAddArc(ctx, bl.x, bl.y, kCornerRadius, M_PI/2, M_PI, 0); + CGContextStrokePath(ctx); + CGContextRestoreGState(ctx); + + } // text ad + else if (adType == AWCustomAdTypeBanner) { + // draw image, place image in center of frame + [image drawAtPoint:CGPointMake((self.frame.size.width-image.size.width)/2, + (self.frame.size.height-image.size.height)/2)]; + } // banner ad +} + +- (void)dealloc { + [image release], image = nil; + [textLabel release], textLabel = nil; + [redirectURL release], redirectURL = nil; + [clickMetricsURL release], clickMetricsURL = nil; + [backgroundColor release], backgroundColor = nil; + [textColor release], textColor = nil; + [super dealloc]; +} + +#pragma mark UIButton control events + +- (void)buttonTapUp:(id)sender { + if (delegate != nil) { + [delegate adTapped:self]; + } +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.h new file mode 100644 index 000000000..fcf4b27ec --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.h @@ -0,0 +1,55 @@ +/* + + AdWhirlError.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import + +#define AdWhirlErrorDomain @"com.adwhirl.sdk.ErrorDomain" + +enum { + AdWhirlConfigConnectionError = 10, /* Cannot connect to config server */ + AdWhirlConfigStatusError = 11, /* config server did not return 200 */ + AdWhirlConfigParseError = 20, /* Error parsing config from server */ + AdWhirlConfigDataError = 30, /* Invalid config format from server */ + AdWhirlCustomAdConnectionError = 40, /* Cannot connect to custom ad server */ + AdWhirlCustomAdParseError = 50, /* Error parsing custom ad from server */ + AdWhirlCustomAdDataError = 60, /* Invalid custom ad data from server */ + AdWhirlCustomAdImageError = 70, /* Cannot create image from data */ + AdWhirlAdRequestIgnoredError = 80, /* ignoreNewAdRequests flag is set */ + AdWhirlAdRequestInProgressError = 90, /* ad request in progress */ + AdWhirlAdRequestNoConfigError = 100, /* no configurations for ad request */ + AdWhirlAdRequestTooSoonError = 110, /* requesting ad too soon */ + AdWhirlAdRequestNoMoreAdNetworks = 120, /* no more ad networks for rollover */ + AdWhirlAdRequestNoNetworkError = 130, /* no network connection */ + AdWhirlAdRequestModalActiveError = 140 /* modal view active */ +}; + +@interface AdWhirlError : NSError { + +} + ++ (AdWhirlError *)errorWithCode:(NSInteger)code userInfo:(NSDictionary *)dict; ++ (AdWhirlError *)errorWithCode:(NSInteger)code description:(NSString *)desc; ++ (AdWhirlError *)errorWithCode:(NSInteger)code description:(NSString *)desc underlyingError:(NSError *)uError; + +- (id)initWithCode:(NSInteger)code userInfo:(NSDictionary *)dict; +- (id)initWithCode:(NSInteger)code description:(NSString *)desc; +- (id)initWithCode:(NSInteger)code description:(NSString *)desc underlyingError:(NSError *)uError; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.m new file mode 100644 index 000000000..0cca4c296 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlError.m @@ -0,0 +1,56 @@ +/* + + AdWhirlError.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlError.h" + +@implementation AdWhirlError + ++ (AdWhirlError *)errorWithCode:(NSInteger)code userInfo:(NSDictionary *)dict { + return [[[AdWhirlError alloc] initWithCode:code userInfo:dict] autorelease]; +} + ++ (AdWhirlError *)errorWithCode:(NSInteger)code description:(NSString *)desc { + return [[[AdWhirlError alloc] initWithCode:code description:desc] autorelease]; +} + ++ (AdWhirlError *)errorWithCode:(NSInteger)code description:(NSString *)desc underlyingError:(NSError *)uError { + return [[[AdWhirlError alloc] initWithCode:code description:desc underlyingError:uError] autorelease]; +} + +- (id)initWithCode:(NSInteger)code userInfo:(NSDictionary *)dict { + return [super initWithDomain:AdWhirlErrorDomain code:code userInfo:dict]; +} + +- (id)initWithCode:(NSInteger)code description:(NSString *)desc { + NSDictionary *eInfo = [NSDictionary dictionaryWithObjectsAndKeys: + desc, NSLocalizedDescriptionKey, + nil]; + return [super initWithDomain:AdWhirlErrorDomain code:code userInfo:eInfo]; +} + +- (id)initWithCode:(NSInteger)code description:(NSString *)desc underlyingError:(NSError *)uError { + NSDictionary *eInfo = [NSDictionary dictionaryWithObjectsAndKeys: + desc, NSLocalizedDescriptionKey, + uError, NSUnderlyingErrorKey, + nil]; + return [super initWithDomain:AdWhirlErrorDomain code:code userInfo:eInfo]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.h new file mode 100644 index 000000000..be1996dd4 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.h @@ -0,0 +1,61 @@ +/* + + AdWhirlLog.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import + +typedef enum { + AWLogLevelNone = 0, + AWLogLevelCrit = 10, + AWLogLevelError = 20, + AWLogLevelWarn = 30, + AWLogLevelInfo = 40, + AWLogLevelDebug = 50 +} AWLogLevel; + +void AWLogSetLogLevel(AWLogLevel level); + +// The actual function name has an underscore prefix, just so we can +// hijack AWLog* with other functions for testing, by defining +// preprocessor macros +void _AWLogCrit(NSString *format, ...); +void _AWLogError(NSString *format, ...); +void _AWLogWarn(NSString *format, ...); +void _AWLogInfo(NSString *format, ...); +void _AWLogDebug(NSString *format, ...); + +#ifndef AWLogCrit +#define AWLogCrit(...) _AWLogCrit(__VA_ARGS__) +#endif + +#ifndef AWLogError +#define AWLogError(...) _AWLogError(__VA_ARGS__) +#endif + +#ifndef AWLogWarn +#define AWLogWarn(...) _AWLogWarn(__VA_ARGS__) +#endif + +#ifndef AWLogInfo +#define AWLogInfo(...) _AWLogInfo(__VA_ARGS__) +#endif + +#ifndef AWLogDebug +#define AWLogDebug(...) _AWLogDebug(__VA_ARGS__) +#endif diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.m new file mode 100644 index 000000000..c62ec9159 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlLog.m @@ -0,0 +1,67 @@ +/* + + AdWhirlLog.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlLog.h" + +static AWLogLevel g_AWLogLevel = AWLogLevelInfo; + +void AWLogSetLogLevel(AWLogLevel level) { + g_AWLogLevel = level; +} + +void _AWLogCrit(NSString *format, ...) { + if (g_AWLogLevel < AWLogLevelCrit) return; + va_list ap; + va_start(ap, format); + NSLogv(format, ap); + va_end(ap); +} + +void _AWLogError(NSString *format, ...) { + if (g_AWLogLevel < AWLogLevelError) return; + va_list ap; + va_start(ap, format); + NSLogv(format, ap); + va_end(ap); +} + +void _AWLogWarn(NSString *format, ...) { + if (g_AWLogLevel < AWLogLevelWarn) return; + va_list ap; + va_start(ap, format); + NSLogv(format, ap); + va_end(ap); +} + +void _AWLogInfo(NSString *format, ...) { + if (g_AWLogLevel < AWLogLevelInfo) return; + va_list ap; + va_start(ap, format); + NSLogv(format, ap); + va_end(ap); +} + +void _AWLogDebug(NSString *format, ...) { + if (g_AWLogLevel < AWLogLevelDebug) return; + va_list ap; + va_start(ap, format); + NSLogv(format, ap); + va_end(ap); +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView+.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView+.h new file mode 100644 index 000000000..5f326bd86 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView+.h @@ -0,0 +1,60 @@ +/* + + AdWhirlView+.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlAdNetworkAdapter.h" + + +@class AdWhirlConfigStore; + + +@interface AdWhirlView () + +// Only initializes default values for member variables +- (id)initWithDelegate:(id)delegate; + +// Kicks off getting config from AdWhirlConfigStore +- (void)startGetConfig; + +- (void)buildPrioritizedAdNetCfgsAndMakeRequest; +- (AdWhirlAdNetworkConfig *)nextNetworkCfgByPercent; +- (AdWhirlAdNetworkConfig *)nextNetworkCfgByPriority; +- (void)makeAdRequest:(BOOL)isFirstRequest; +- (void)reportExImpression:(NSString *)nid netType:(AdWhirlAdNetworkType)type; +- (void)reportExClick:(NSString *)nid netType:(AdWhirlAdNetworkType)type; +- (BOOL)canRefresh; +- (void)resignActive:(NSNotification *)notification; +- (void)becomeActive:(NSNotification *)notification; + +- (void)notifyDelegateOfErrorWithCode:(NSInteger)errorCode + description:(NSString *)desc; +- (void)notifyDelegateOfError:(NSError *)error; + +@property (retain) AdWhirlConfig *config; +@property (retain) NSMutableArray *prioritizedAdNetCfgs; +@property (nonatomic,retain) AdWhirlAdNetworkAdapter *currAdapter; +@property (nonatomic,retain) AdWhirlAdNetworkAdapter *lastAdapter; +@property (nonatomic,retain) NSDate *lastRequestTime; +@property (nonatomic,retain) NSTimer *refreshTimer; +@property (nonatomic) BOOL showingModalView; +@property (nonatomic,assign) AdWhirlConfigStore *configStore; +@property (nonatomic,retain) AWNetworkReachabilityWrapper *rollOverReachability; +@property (nonatomic,retain) NSArray *testDarts; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView.m new file mode 100644 index 000000000..523f07d1f --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlView.m @@ -0,0 +1,1015 @@ +/* + + AdWhirlView.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlView.h" +#import "AdWhirlView+.h" +#import "AdWhirlConfigStore.h" +#import "AdWhirlAdNetworkConfig.h" +#import "CJSONDeserializer.h" +#import "AdWhirlLog.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlError.h" +#import "AdWhirlConfigStore.h" +#import "AWNetworkReachabilityWrapper.h" + +#define kAdWhirlViewAdSubViewTag 1000 + + +NSInteger adNetworkPriorityComparer(id a, id b, void *ctx) { + AdWhirlAdNetworkConfig *acfg = a, *bcfg = b; + if(acfg.priority < bcfg.priority) + return NSOrderedAscending; + else if(acfg.priority > bcfg.priority) + return NSOrderedDescending; + else + return NSOrderedSame; +} + + +@implementation AdWhirlView + +#pragma mark Properties getters/setters + +@synthesize delegate; +@synthesize config; +@synthesize prioritizedAdNetCfgs; +@synthesize currAdapter; +@synthesize lastAdapter; +@synthesize lastRequestTime; +@synthesize refreshTimer; +@synthesize lastError; +@synthesize showingModalView; +@synthesize configStore; +@synthesize rollOverReachability; +@synthesize testDarts; + +- (void)setDelegate:(id )theDelegate { + [self willChangeValueForKey:@"delegate"]; + delegate = theDelegate; + if (self.currAdapter) { + self.currAdapter.adWhirlDelegate = theDelegate; + } + if (self.lastAdapter) { + self.lastAdapter.adWhirlDelegate = theDelegate; + } + [self didChangeValueForKey:@"delegate"]; +} + + +#pragma mark Life cycle methods + ++ (AdWhirlView *)requestAdWhirlViewWithDelegate:(id)delegate { + if (![delegate respondsToSelector: + @selector(viewControllerForPresentingModalView)]) { + [NSException raise:@"AdWhirlIncompleteDelegateException" + format:@"AdWhirlDelegate must implement" + @" viewControllerForPresentingModalView"]; + } + AdWhirlView *adView + = [[[AdWhirlView alloc] initWithDelegate:delegate] autorelease]; + [adView startGetConfig]; // errors are communicated via delegate + return adView; +} + +- (id)initWithDelegate:(id)d { + self = [super initWithFrame:kAdWhirlViewDefaultFrame]; + if (self != nil) { + delegate = d; + self.backgroundColor = [UIColor clearColor]; + // to prevent ugly artifacts if ad network banners are bigger than the + // default frame + self.clipsToBounds = YES; + showingModalView = NO; + appInactive = NO; + + // default config store. Can be overridden for testing + self.configStore = [AdWhirlConfigStore sharedStore]; + + // get notified of app activity + NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter]; + [notifCenter addObserver:self + selector:@selector(resignActive:) + name:UIApplicationWillResignActiveNotification + object:nil]; + [notifCenter addObserver:self + selector:@selector(becomeActive:) + name:UIApplicationDidBecomeActiveNotification + object:nil]; + + // remember pending ad requests, so we don't make more than one + // request per ad network at a time + pendingAdapters = [[NSMutableDictionary alloc] initWithCapacity:30]; + } + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [rollOverReachability setDelegate:nil]; + [rollOverReachability release], rollOverReachability = nil; + delegate = nil; + [config removeDelegate:self]; + [config release], config = nil; + [prioritizedAdNetCfgs release], prioritizedAdNetCfgs = nil; + totalPercent = 0.0; + requesting = NO; + currAdapter.adWhirlDelegate = nil, currAdapter.adWhirlView = nil; + [currAdapter release], currAdapter = nil; + lastAdapter.adWhirlDelegate = nil, lastAdapter.adWhirlView = nil; + [lastAdapter release], lastAdapter = nil; + [lastRequestTime release], lastRequestTime = nil; + [pendingAdapters release], pendingAdapters = nil; + if (refreshTimer != nil) { + [refreshTimer invalidate]; + [refreshTimer release], refreshTimer = nil; + } + [lastError release], lastError = nil; + + [super dealloc]; +} + + +#pragma mark Config and setup methods + +static id classAdWhirlDelegateForConfig = nil; + ++ (void)startPreFetchingConfigurationDataWithDelegate: + (id)delegate { + if (classAdWhirlDelegateForConfig != nil) { + AWLogWarn(@"Called startPreFetchingConfig when another fetch is" + @" in progress"); + return; + } + classAdWhirlDelegateForConfig = delegate; + [[AdWhirlConfigStore sharedStore] getConfig:[delegate adWhirlApplicationKey] + delegate:(id)self]; +} + ++ (void)updateAdWhirlConfigWithDelegate:(id)delegate { + if (classAdWhirlDelegateForConfig != nil) { + AWLogWarn(@"Called updateConfig when another fetch is in progress"); + return; + } + classAdWhirlDelegateForConfig = delegate; + [[AdWhirlConfigStore sharedStore] + fetchConfig:[delegate adWhirlApplicationKey] + delegate:(id)self]; +} + +- (void)startGetConfig { + // Invalidate ad refresh timer as it may change with the new config + if (self.refreshTimer) { + [self.refreshTimer invalidate]; + self.refreshTimer = nil; + } + + configFetchAttempts = 0; + AdWhirlConfig *cfg = [configStore getConfig:[delegate adWhirlApplicationKey] + delegate:(id)self]; + self.config = cfg; +} + +- (void)attemptFetchConfig { + AdWhirlConfig *cfg = [configStore + fetchConfig:[delegate adWhirlApplicationKey] + delegate:(id)self]; + if (cfg != nil) { + self.config = cfg; + } +} + +- (void)updateAdWhirlConfig { + // Invalidate ad refresh timer as it may change with the new config + if (self.refreshTimer) { + [self.refreshTimer invalidate]; + self.refreshTimer = nil; + } + + // Request new config + AWLogDebug(@"======== Updating config ========"); + configFetchAttempts = 0; + [self attemptFetchConfig]; +} + +#pragma mark Ads management private methods + +- (void)buildPrioritizedAdNetCfgsAndMakeRequest { + NSMutableArray *freshNetCfgs = [[NSMutableArray alloc] init]; + for (AdWhirlAdNetworkConfig *cfg in config.adNetworkConfigs) { + // do not add the ad network in rotation if there's already a stray + // pending ad request to this ad network (due to network outage or plain + // slow request) + NSNumber *netKey = [NSNumber numberWithInt:(int)cfg.networkType]; + if ([pendingAdapters objectForKey:netKey] == nil) { + [freshNetCfgs addObject:cfg]; + } + else { + AWLogDebug(@"Already has pending ad request for network type %d," + @" not adding ad network config %@", + cfg.networkType, cfg); + } + } + [freshNetCfgs sortUsingFunction:adNetworkPriorityComparer context:nil]; + totalPercent = 0.0; + for (AdWhirlAdNetworkConfig *cfg in freshNetCfgs) { + totalPercent += cfg.trafficPercentage; + } + self.prioritizedAdNetCfgs = freshNetCfgs; + [freshNetCfgs release]; + + [self makeAdRequest:YES]; +} + +static BOOL randSeeded = NO; +- (double)nextDart { + if (testDarts != nil) { + if (testDartIndex >= [testDarts count]) { + testDartIndex = 0; + } + NSNumber *nextDartNum = [testDarts objectAtIndex:testDartIndex]; + double dart = [nextDartNum doubleValue]; + if (dart >= totalPercent) { + dart = totalPercent - 0.001; + } + testDartIndex++; + return dart; + } + else { + if (!randSeeded) { + srandom(CFAbsoluteTimeGetCurrent()); + randSeeded = YES; + } + return ((double)(random()-1)/RAND_MAX) * totalPercent; + } +} + +- (AdWhirlAdNetworkConfig *)nextNetworkCfgByPercent { + if ([prioritizedAdNetCfgs count] == 0) { + return nil; + } + + double dart = [self nextDart]; + + double tempTotal = 0.0; + + AdWhirlAdNetworkConfig *result = nil; + for (AdWhirlAdNetworkConfig *network in prioritizedAdNetCfgs) { + result = network; // make sure there is always a network chosen + tempTotal += network.trafficPercentage; + if (dart < tempTotal) { + // this is the one to use. + break; + } + } + + AWLogDebug(@">>>> By Percent chosen %@ (%@), dart %lf in %lf", + result.nid, result.networkName, dart, totalPercent); + return result; +} + +- (AdWhirlAdNetworkConfig *)nextNetworkCfgByPriority { + if ([prioritizedAdNetCfgs count] == 0) { + return nil; + } + AdWhirlAdNetworkConfig *result = [prioritizedAdNetCfgs objectAtIndex:0]; + AWLogDebug(@">>>> By Priority chosen %@ (%@)", + result.nid, result.networkName); + return result; +} + +- (void)makeAdRequest:(BOOL)isFirstRequest { + if ([prioritizedAdNetCfgs count] == 0) { + // ran out of ad networks + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoMoreAdNetworks + description:@"No more ad networks to roll over"]; + return; + } + + if (showingModalView) { + AWLogDebug(@"Modal view is active, not going to request another ad"); + return; + } + [self.rollOverReachability setDelegate:nil]; + self.rollOverReachability = nil; // stop any roll over reachability checks + + if (requesting) { + // it is OK to request a new one while another one is in progress + // the adapter callbacks from the old adapter will be ignored. + // User-initiated request ad will be blocked in requestFreshAd. + AWLogDebug(@"Already requesting ad, will request a new one."); + } + requesting = YES; + + AdWhirlAdNetworkConfig *nextAdNetCfg = nil; + + if (isFirstRequest && totalPercent > 0.0) { + nextAdNetCfg = [self nextNetworkCfgByPercent]; + } + else { + nextAdNetCfg = [self nextNetworkCfgByPriority]; + } + if (nextAdNetCfg == nil) { + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoMoreAdNetworks + description:@"No more ad networks to request"]; + return; + } + + AdWhirlAdNetworkAdapter *adapter = + [[nextAdNetCfg.adapterClass alloc] initWithAdWhirlDelegate:delegate + view:self + config:config + networkConfig:nextAdNetCfg]; + // keep the last adapter around to catch stale ad network delegate calls + // during transitions + self.lastAdapter = self.currAdapter; + self.currAdapter = adapter; + [adapter release]; + + // take nextAdNetCfg out so we don't request again when we roll over + [prioritizedAdNetCfgs removeObject:nextAdNetCfg]; + + if (lastRequestTime) { + [lastRequestTime release]; + } + lastRequestTime = [[NSDate date] retain]; + + // remember this pending request so we do not request again when we make + // new ad requests + NSNumber *netTypeKey = [NSNumber numberWithInt:(int)nextAdNetCfg.networkType]; + [pendingAdapters setObject:currAdapter forKey:netTypeKey]; + + // If last adapter is of the same network type, make the last adapter stop + // being an ad network view delegate to prevent the last adapter from calling + // back to this AdWhirlView during the transition and afterwards. + // We should not do this for all adapters, because if the last adapter is + // still in progress, we need to know about it in the adapter callbacks. + // That the last adapter is the same type as the new adapter is possible only + // if the last ad request finished, i.e. called back to its adapters. There + // are cases, e.g. iAd, when the ad network may call back multiple times, + // because of internal refreshes. + if (self.lastAdapter.networkConfig.networkType == + self.currAdapter.networkConfig.networkType) { + [self.lastAdapter stopBeingDelegate]; + } + + [currAdapter getAd]; +} + +- (BOOL)canRefresh { + return !(ignoreNewAdRequests + || ignoreAutoRefreshTimer + || appInactive + || showingModalView); +} + +- (void)timerRequestFreshAd { + if (![self canRefresh]) { + AWLogDebug(@"Not going to refresh due to flags, app not active or modal"); + return; + } + if (lastRequestTime != nil) { + NSTimeInterval sinceLast = -[lastRequestTime timeIntervalSinceNow]; + if (sinceLast <= kAWMinimumTimeBetweenFreshAdRequests) { + AWLogDebug(@"Ad refresh timer fired too soon after last ad request," + @" ignoring"); + return; + } + } + AWLogDebug(@"======== Refreshing ad due to timer ========"); + [self buildPrioritizedAdNetCfgsAndMakeRequest]; +} + +#pragma mark Ads management public methods + +- (void)requestFreshAd { + // only make request in main thread + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(requestFreshAd) + withObject:nil + waitUntilDone:NO]; + return; + } + if (ignoreNewAdRequests) { + // don't request new ad + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestIgnoredError + description:@"ignoreNewAdRequests flag set"]; + return; + } + if (requesting) { + // don't request if there's a request outstanding + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestInProgressError + description:@"Ad request already in progress"]; + return; + } + if (showingModalView) { + // don't request if there's a modal view active + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestModalActiveError + description:@"Modal view active"]; + return; + } + if (!config) { + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoConfigError + description:@"No ad configuration"]; + return; + } + if (lastRequestTime != nil) { + NSTimeInterval sinceLast = -[lastRequestTime timeIntervalSinceNow]; + if (sinceLast <= kAWMinimumTimeBetweenFreshAdRequests) { + NSString *desc + = [NSString stringWithFormat: + @"Requesting fresh ad too soon! It has been only %lfs. Minimum %lfs", + sinceLast, kAWMinimumTimeBetweenFreshAdRequests]; + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestTooSoonError + description:desc]; + return; + } + } + [self buildPrioritizedAdNetCfgsAndMakeRequest]; +} + +- (void)rollOver { + if (ignoreNewAdRequests) { + return; + } + // only make request in main thread + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(rollOver) + withObject:nil + waitUntilDone:NO]; + return; + } + [self makeAdRequest:NO]; +} + +- (BOOL)adExists { + UIView *currAdView = [self viewWithTag:kAdWhirlViewAdSubViewTag]; + return currAdView != nil; +} + +- (NSString *)mostRecentNetworkName { + if (currAdapter == nil) return nil; + return currAdapter.networkConfig.networkName; +} + +- (void)ignoreAutoRefreshTimer { + ignoreAutoRefreshTimer = YES; +} + +- (void)doNotIgnoreAutoRefreshTimer { + ignoreAutoRefreshTimer = NO; +} + +- (BOOL)isIgnoringAutoRefreshTimer { + return ignoreAutoRefreshTimer; +} + +- (void)ignoreNewAdRequests { + ignoreNewAdRequests = YES; +} + +- (void)doNotIgnoreNewAdRequests { + ignoreNewAdRequests = NO; +} + +- (BOOL)isIgnoringNewAdRequests { + return ignoreNewAdRequests; +} + + +#pragma mark Stats reporting methods + +- (void)metricPing:(NSURL *)endPointBaseURL + nid:(NSString *)nid + netType:(AdWhirlAdNetworkType)type { + // use config.appKey not from [delegate adWhirlApplicationKey] as delegate + // can be niled out at this point. Attempt at Issue #42 . + NSString *query + = [NSString stringWithFormat: + @"?appid=%@&nid=%@&type=%d&country_code=%@&appver=%d&client=1", + config.appKey, + nid, + type, + [[NSLocale currentLocale] localeIdentifier], + kAdWhirlAppVer]; + NSURL *metURL = [NSURL URLWithString:query + relativeToURL:endPointBaseURL]; + AWLogDebug(@"Sending metric ping to %@", metURL); + NSURLRequest *metRequest = [NSURLRequest requestWithURL:metURL]; + [NSURLConnection connectionWithRequest:metRequest + delegate:nil]; // fire and forget +} + +- (void)reportExImpression:(NSString *)nid netType:(AdWhirlAdNetworkType)type { + NSURL *baseURL = nil; + if ([delegate respondsToSelector:@selector(adWhirlImpMetricURL)]) { + baseURL = [delegate adWhirlImpMetricURL]; + } + if (baseURL == nil) { + baseURL = [NSURL URLWithString:kAdWhirlDefaultImpMetricURL]; + } + [self metricPing:baseURL nid:nid netType:type]; +} + +- (void)reportExClick:(NSString *)nid netType:(AdWhirlAdNetworkType)type { + NSURL *baseURL = nil; + if ([delegate respondsToSelector:@selector(adWhirlClickMetricURL)]) { + baseURL = [delegate adWhirlClickMetricURL]; + } + if (baseURL == nil) { + baseURL = [NSURL URLWithString:kAdWhirlDefaultClickMetricURL]; + } + [self metricPing:baseURL nid:nid netType:type]; +} + + +#pragma mark UI methods + +- (CGSize)actualAdSize { + if (currAdapter == nil || currAdapter.adNetworkView == nil) + return kAdWhirlViewDefaultSize; + return currAdapter.adNetworkView.frame.size; +} + +- (void)rotateToOrientation:(UIInterfaceOrientation)orientation { + if (currAdapter == nil) return; + [currAdapter rotateToOrientation:orientation]; +} + +- (void)transitionToView:(UIView *)view { + UIView *currAdView = [self viewWithTag:kAdWhirlViewAdSubViewTag]; + if (view == currAdView) { + AWLogDebug(@"ignoring ad transition to itself"); + return; // no need to transition to itself + } + view.tag = kAdWhirlViewAdSubViewTag; + if (currAdView) { + // swap + currAdView.tag = 0; + + AWBannerAnimationType animType; + if (config.bannerAnimationType == AWBannerAnimationTypeRandom) { + if (!randSeeded) { + srandom(CFAbsoluteTimeGetCurrent()); + } + // range is 1 to 7, inclusive + animType = (random() % 7) + 1; + AWLogDebug(@"Animation type chosen by random is %d", animType); + } + else { + animType = config.bannerAnimationType; + } + if (![currAdapter isBannerAnimationOK:animType]) { + animType = AWBannerAnimationTypeNone; + } + + if (animType == AWBannerAnimationTypeNone) { + [currAdView removeFromSuperview]; + [self addSubview:view]; + if ([delegate respondsToSelector: + @selector(adWhirlDidAnimateToNewAdIn:)]) { + // no animation, callback right away + [(NSObject *)delegate + performSelectorOnMainThread:@selector(adWhirlDidAnimateToNewAdIn:) + withObject:self + waitUntilDone:NO]; + } + } + else { + switch (animType) { + case AWBannerAnimationTypeSlideFromLeft: + { + CGRect f = view.frame; + f.origin.x = -f.size.width; + view.frame = f; + [self addSubview:view]; + break; + } + case AWBannerAnimationTypeSlideFromRight: + { + CGRect f = view.frame; + f.origin.x = self.frame.size.width; + view.frame = f; + [self addSubview:view]; + break; + } + case AWBannerAnimationTypeFadeIn: + view.alpha = 0; + [self addSubview:view]; + break; + default: + // no setup required for other animation types + break; + } + + [currAdView retain]; // will be released when animation is done + AWLogDebug(@"Beginning AdWhirlAdTransition animation" + @" currAdView %x incoming %x", currAdView, view); + [UIView beginAnimations:@"AdWhirlAdTransition" context:currAdView]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector: + @selector(newAdAnimationDidStopWithAnimationID:finished:context:)]; + [UIView setAnimationBeginsFromCurrentState:YES]; + [UIView setAnimationDuration:1.0]; + // cache has to set to NO because of VideoEgg + switch (animType) { + case AWBannerAnimationTypeFlipFromLeft: + [self addSubview:view]; + [currAdView removeFromSuperview]; + [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft + forView:self + cache:NO]; + break; + case AWBannerAnimationTypeFlipFromRight: + [self addSubview:view]; + [currAdView removeFromSuperview]; + [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight + forView:self + cache:NO]; + break; + case AWBannerAnimationTypeCurlUp: + [self addSubview:view]; + [currAdView removeFromSuperview]; + [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp + forView:self + cache:NO]; + break; + case AWBannerAnimationTypeCurlDown: + [self addSubview:view]; + [currAdView removeFromSuperview]; + [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown + forView:self + cache:NO]; + break; + case AWBannerAnimationTypeSlideFromLeft: + case AWBannerAnimationTypeSlideFromRight: + { + CGRect f = view.frame; + f.origin.x = 0; + view.frame = f; + break; + } + case AWBannerAnimationTypeFadeIn: + view.alpha = 1.0; + break; + default: + [self addSubview:view]; + AWLogWarn(@"Unrecognized Animation type: %d", animType); + break; + } + [UIView commitAnimations]; + } + } + else { // currAdView + // new + [self addSubview:view]; + if ([delegate respondsToSelector:@selector(adWhirlDidAnimateToNewAdIn:)]) { + // no animation, callback right away + [(NSObject *)delegate + performSelectorOnMainThread:@selector(adWhirlDidAnimateToNewAdIn:) + withObject:self + waitUntilDone:NO]; + } + } +} + +- (void)replaceBannerViewWith:(UIView*)bannerView { + [self transitionToView:bannerView]; +} + +// Called at the end of the new ad animation; we use this opportunity to do +// memory management cleanup. See the comment in adDidLoad:. +- (void)newAdAnimationDidStopWithAnimationID:(NSString *)animationID + finished:(BOOL)finished + context:(void *)context +{ + AWLogDebug(@"animation %@ finished %@ context %x", + animationID, finished? @"YES":@"NO", context); + UIView *adViewToRemove = (UIView *)context; + [adViewToRemove removeFromSuperview]; + [adViewToRemove release]; // was retained before beginAnimations + lastAdapter.adWhirlDelegate = nil, lastAdapter.adWhirlView = nil; + self.lastAdapter = nil; + if ([delegate respondsToSelector:@selector(adWhirlDidAnimateToNewAdIn:)]) { + [delegate adWhirlDidAnimateToNewAdIn:self]; + } +} + + +#pragma mark UIView touch methods + +- (BOOL)_isEventATouch30:(UIEvent *)event { + if ([event respondsToSelector:@selector(type)]) { + return event.type == UIEventTypeTouches; + } + return YES; // UIEvent in 2.2.1 has no type property, so assume yes. +} + +- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { + BOOL itsInside = [super pointInside:point withEvent:event]; + if (itsInside && currAdapter != nil && lastNotifyAdapter != currAdapter + && [self _isEventATouch30:event] + && [currAdapter shouldSendExMetric]) { + lastNotifyAdapter = currAdapter; + [self reportExClick:currAdapter.networkConfig.nid + netType:currAdapter.networkConfig.networkType]; + } + return itsInside; +} + + +#pragma mark UIView methods + +- (void)willMoveToSuperview:(UIView *)newSuperview { + if (newSuperview == nil) { + [refreshTimer invalidate]; + self.refreshTimer = nil; + } +} + + +#pragma mark Adapter callbacks + +// Chores that are common to all adapter callbacks +- (void)adRequestReturnsForAdapter:(AdWhirlAdNetworkAdapter *)adapter { + // no longer pending. Need to retain and autorelease the adapter + // since the adapter may not be retained anywhere else other than the pending + // dict + NSNumber *netTypeKey + = [NSNumber numberWithInt:(int)adapter.networkConfig.networkType]; + AdWhirlAdNetworkAdapter *pendingAdapter + = [pendingAdapters objectForKey:netTypeKey]; + if (pendingAdapter != nil) { + if (pendingAdapter != adapter) { + // Possible if the ad refreshes itself and sends callbacks doing so, while + // a new ad of the same network is pending (e.g. iAd) + AWLogError(@"Stored pending adapter %@ for network type %@ is different" + @" from the one sending the adapter callback %@", + pendingAdapter, + netTypeKey, + adapter); + } + [[pendingAdapter retain] autorelease]; + [pendingAdapters removeObjectForKey:netTypeKey]; + } +} + +- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter + didReceiveAdView:(UIView *)view { + [self adRequestReturnsForAdapter:adapter]; + if (adapter != currAdapter) { + AWLogDebug(@"Received didReceiveAdView from a stale adapter %@", adapter); + return; + } + AWLogDebug(@"Received ad from adapter (nid %@)", adapter.networkConfig.nid); + + // UIView operations should be performed on main thread + [self performSelectorOnMainThread:@selector(transitionToView:) + withObject:view + waitUntilDone:NO]; + requesting = NO; + + // report impression and notify delegate + if ([adapter shouldSendExMetric]) { + [self reportExImpression:adapter.networkConfig.nid + netType:adapter.networkConfig.networkType]; + } + if ([delegate respondsToSelector:@selector(adWhirlDidReceiveAd:)]) { + [delegate adWhirlDidReceiveAd:self]; + } +} + +- (void)adapter:(AdWhirlAdNetworkAdapter *)adapter didFailAd:(NSError *)error { + [self adRequestReturnsForAdapter:adapter]; + if (adapter != currAdapter) { + AWLogDebug(@"Received didFailAd from a stale adapter %@: %@", + adapter, error); + return; + } + AWLogDebug(@"Failed to receive ad from adapter (nid %@): %@", + adapter.networkConfig.nid, error); + requesting = NO; + + if ([prioritizedAdNetCfgs count] == 0) { + // we have run out of networks to try and need to error out. + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoMoreAdNetworks + description:@"No more ad networks to roll over"]; + return; + } + + // try to roll over, but before we do, check to see if the failure is because + // network has gotten unreachable. If so, don't roll over. Use www.google.com + // as test, assuming www.google.com itself is always up if there's network. + self.rollOverReachability + = [AWNetworkReachabilityWrapper reachabilityWithHostname:@"www.google.com" + callbackDelegate:self]; + if (self.rollOverReachability == nil) { + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoNetworkError + description:@"Failed network reachability test"]; + return; + } + if (![self.rollOverReachability scheduleInCurrentRunLoop]) { + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoNetworkError + description:@"Failed network reachability test"]; + return; + } +} + +- (void)adapterDidFinishAdRequest:(AdWhirlAdNetworkAdapter *)adapter { + [self adRequestReturnsForAdapter:adapter]; + if (adapter != currAdapter) { + AWLogDebug(@"Received adapterDidFinishAdRequest from a stale adapter"); + return; + } + // view is supplied via other mechanism (e.g. Generic Notification or Event) + requesting = NO; + + // report impression. No need to notify delegate because delegate is notified + // via Generic Notification or event. + if ([adapter shouldSendExMetric]) { + [self reportExImpression:adapter.networkConfig.nid + netType:adapter.networkConfig.networkType]; + } +} + + +#pragma mark AWNetworkReachabilityDelegate methods + +- (void)reachabilityNotReachable:(AWNetworkReachabilityWrapper *)reach { + if (reach == self.rollOverReachability) { + [self.rollOverReachability setDelegate:nil]; + self.rollOverReachability = nil; // release it and unschedule + [self notifyDelegateOfErrorWithCode:AdWhirlAdRequestNoNetworkError + description:@"No network connection for rollover"]; + return; + } + AWLogWarn(@"Unrecognized reachability called not reachable %s:%d", + __FILE__, __LINE__); +} + +- (void)reachabilityBecameReachable:(AWNetworkReachabilityWrapper *)reach { + if (reach == self.rollOverReachability) { + // not an error, just need to rollover + [lastError release], lastError = nil; + if ([delegate respondsToSelector: + @selector(adWhirlDidFailToReceiveAd:usingBackup:)]) { + [delegate adWhirlDidFailToReceiveAd:self usingBackup:YES]; + } + [self.rollOverReachability setDelegate:nil]; + self.rollOverReachability = nil; // release it and unschedule + [self rollOver]; + return; + } + AWLogWarn(@"Unrecognized reachability called reachable %s:%d", + __FILE__, __LINE__); +} + + +#pragma mark AdWhirlConfigDelegate methods + ++ (NSURL *)adWhirlConfigURL { + if (classAdWhirlDelegateForConfig != nil + && [classAdWhirlDelegateForConfig respondsToSelector: + @selector(adWhirlConfigURL)]) { + return [classAdWhirlDelegateForConfig adWhirlConfigURL]; + } + return nil; +} + ++ (void)adWhirlConfigDidReceiveConfig:(AdWhirlConfig *)config { + AWLogDebug(@"Fetched Ad network config: %@", config); + if (classAdWhirlDelegateForConfig != nil + && [classAdWhirlDelegateForConfig respondsToSelector: + @selector(adWhirlDidReceiveConfig:)]) { + [classAdWhirlDelegateForConfig adWhirlDidReceiveConfig:nil]; + } + classAdWhirlDelegateForConfig = nil; +} + ++ (void)adWhirlConfigDidFail:(AdWhirlConfig *)cfg error:(NSError *)error { + AWLogError(@"Failed pre-fetching AdWhirl config: %@", error); + classAdWhirlDelegateForConfig = nil; +} + +- (void)adWhirlConfigDidReceiveConfig:(AdWhirlConfig *)cfg { + if (self.config != cfg) { + AWLogWarn(@"AdWhirlView: getting adWhirlConfigDidReceiveConfig callback" + @" from unknown AdWhirlConfig object"); + return; + } + AWLogDebug(@"Fetched Ad network config: %@", cfg); + if ([delegate respondsToSelector:@selector(adWhirlDidReceiveConfig:)]) { + [delegate adWhirlDidReceiveConfig:self]; + } + if (cfg.adsAreOff) { + if ([delegate respondsToSelector: + @selector(adWhirlReceivedNotificationAdsAreOff:)]) { + // to prevent self being freed before this returns, in case the + // delegate decides to release this + [self retain]; + [delegate adWhirlReceivedNotificationAdsAreOff:self]; + [self autorelease]; + } + return; + } + + // Perform ad network data structure build and request in main thread + // to avoid contention + [self performSelectorOnMainThread: + @selector(buildPrioritizedAdNetCfgsAndMakeRequest) + withObject:nil + waitUntilDone:NO]; + + // Setup recurring timer for ad refreshes, if required + if (config.refreshInterval > kAWMinimumTimeBetweenFreshAdRequests) { + self.refreshTimer + = [NSTimer scheduledTimerWithTimeInterval:config.refreshInterval + target:self + selector:@selector(timerRequestFreshAd) + userInfo:nil + repeats:YES]; + } +} + +- (void)adWhirlConfigDidFail:(AdWhirlConfig *)cfg error:(NSError *)error { + if (self.config != nil && self.config != cfg) { + // self.config could be nil if this is called before init is finished + AWLogWarn(@"AdWhirlView: getting adWhirlConfigDidFail callback from unknown" + @" AdWhirlConfig object"); + return; + } + configFetchAttempts++; + if (configFetchAttempts < 3) { + // schedule in run loop to avoid recursive calls to this function + [self performSelectorOnMainThread:@selector(attemptFetchConfig) + withObject:self + waitUntilDone:NO]; + } + else { + AWLogError(@"Failed fetching AdWhirl config: %@", error); + [self notifyDelegateOfError:error]; + } +} + +- (NSURL *)adWhirlConfigURL { + if ([delegate respondsToSelector:@selector(adWhirlConfigURL)]) { + return [delegate adWhirlConfigURL]; + } + return nil; +} + + +#pragma mark Active status notification callbacks + +- (void)resignActive:(NSNotification *)notification { + AWLogDebug(@"App become inactive, AdWhirlView will stop requesting ads"); + appInactive = YES; +} + +- (void)becomeActive:(NSNotification *)notification { + AWLogDebug(@"App become active, AdWhirlView will resume requesting ads"); + appInactive = NO; +} + + +#pragma mark AdWhirlDelegate helper methods + +- (void)notifyDelegateOfErrorWithCode:(NSInteger)errorCode + description:(NSString *)desc { + NSError *error = [[AdWhirlError alloc] initWithCode:errorCode + description:desc]; + [self notifyDelegateOfError:error]; + [error release]; +} + +- (void)notifyDelegateOfError:(NSError *)error { + [error retain]; + [lastError release]; + lastError = error; + if ([delegate respondsToSelector: + @selector(adWhirlDidFailToReceiveAd:usingBackup:)]) { + // to prevent self being freed before this returns, in case the + // delegate decides to release this + [self retain]; + [delegate adWhirlDidFailToReceiveAd:self usingBackup:NO]; + [self autorelease]; + } +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowser.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowser.xib new file mode 100644 index 000000000..21866d575 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowser.xib @@ -0,0 +1,764 @@ + + + + 784 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 87 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {320, 436} + + + 3 + MQA + + 2 + + + YES + YES + 2000 + IBCocoaTouchFramework + YES + 1 + YES + + + + 266 + {{0, 436}, {320, 44}} + + NO + NO + 1000 + IBCocoaTouchFramework + + YES + + 1001 + NO + IBCocoaTouchFramework + + + + IBCocoaTouchFramework + + 5 + + + 1002 + NO + IBCocoaTouchFramework + + 17 + + + IBCocoaTouchFramework + + 5 + + + 1003 + NO + IBCocoaTouchFramework + + 13 + + + 1004 + NO + IBCocoaTouchFramework + + 14 + + + IBCocoaTouchFramework + + 5 + + + 1005 + NO + IBCocoaTouchFramework + + 9 + + + IBCocoaTouchFramework + + 5 + + + 1006 + IBCocoaTouchFramework + 1 + + 0 + + + + 3 + MAA + + + + + {320, 480} + + + 3 + MAA + + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 10 + + + + delegate + + + + 13 + + + + back: + + + + 41 + + + + forward: + + + + 42 + + + + reload: + + + + 43 + + + + stop: + + + + 44 + + + + linkOut: + + + + 45 + + + + close: + + + + 46 + + + + backButton + + + + 64 + + + + closeButton + + + + 65 + + + + forwardButton + + + + 66 + + + + linkOutButton + + + + 67 + + + + reloadButton + + + + 68 + + + + stopButton + + + + 69 + + + + webView + + + + 70 + + + + toolBar + + + + 71 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 3 + + + + + 4 + + + YES + + + + + + + + + + + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 25 + + + + + 26 + + + + + 31 + + + + + 39 + + + + + 40 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 3.IBPluginDependency + 31.IBPluginDependency + 39.IBPluginDependency + 4.IBPluginDependency + 40.IBPluginDependency + 5.CustomClassName + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + AdWhirlWebBrowserController + UIResponder + {{577, 64}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AdWhirlBackButton + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 71 + + + + YES + + AdWhirlBackButton + UIBarButtonItem + + IBProjectSource + ../AdWhirl/internal/AdWhirlWebBrowserController.h + + + + AdWhirlWebBrowserController + UIViewController + + YES + + YES + back: + close: + forward: + linkOut: + reload: + stop: + + + YES + id + id + id + id + id + id + + + + YES + + YES + backButton + closeButton + delegate + forwardButton + linkOutButton + reloadButton + stopButton + toolBar + webView + + + YES + UIBarButtonItem + UIBarButtonItem + id + UIBarButtonItem + UIBarButtonItem + UIBarButtonItem + UIBarButtonItem + UIToolbar + UIWebView + + + + + + + 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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIToolbar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIToolbar.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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWebView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWebView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../AdWhirlSDK2_Sample.xcodeproj + 3 + 87 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.h new file mode 100644 index 000000000..79c7c90e2 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.h @@ -0,0 +1,75 @@ +/* + + AdWhirlWebBrowserController.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import +#import "AdWhirlCustomAdView.h" + +@class AdWhirlWebBrowserController; + +@protocol AdWhirlWebBrowserControllerDelegate + +- (void)webBrowserClosed:(AdWhirlWebBrowserController *)controller; + +@end + + +@interface AdWhirlWebBrowserController : UIViewController { + id delegate; + UIViewController *viewControllerForPresenting; + NSArray *loadingButtons; + NSArray *loadedButtons; + AWCustomAdWebViewAnimType transitionType; + + UIWebView *webView; + UIToolbar *toolBar; + UIBarButtonItem *backButton; + UIBarButtonItem *forwardButton; + UIBarButtonItem *reloadButton; + UIBarButtonItem *stopButton; + UIBarButtonItem *linkOutButton; + UIBarButtonItem *closeButton; +} + +@property (nonatomic,assign) id delegate; +@property (nonatomic,assign) UIViewController *viewControllerForPresenting; +@property (nonatomic,retain) IBOutlet UIWebView *webView; +@property (nonatomic,retain) IBOutlet UIToolbar *toolBar; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *backButton; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *forwardButton; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *reloadButton; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *stopButton; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *linkOutButton; +@property (nonatomic,retain) IBOutlet UIBarButtonItem *closeButton; + +- (void)presentWithController:(UIViewController *)viewController transition:(AWCustomAdWebViewAnimType)animType; +- (void)loadURL:(NSURL *)url; +- (IBAction)back:(id)sender; +- (IBAction)forward:(id)sender; +- (IBAction)reload:(id)sender; +- (IBAction)stop:(id)sender; +- (IBAction)linkOut:(id)sender; +- (IBAction)close:(id)sender; + +@end + +@interface AdWhirlBackButton : UIBarButtonItem +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.m new file mode 100644 index 000000000..98e07b538 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/AdWhirlWebBrowserController.m @@ -0,0 +1,266 @@ +/* + + AdWhirlWebBrowserController.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlWebBrowserController.h" +#import "AdWhirlLog.h" + +#define kAWWebViewAnimDuration 1.0 + +@interface AdWhirlWebBrowserController () +@property (nonatomic,retain) NSArray *loadingButtons; +@property (nonatomic,retain) NSArray *loadedButtons; +@end + + +@implementation AdWhirlWebBrowserController + +@synthesize delegate; +@synthesize viewControllerForPresenting; +@synthesize loadingButtons; +@synthesize loadedButtons; + +@synthesize webView; +@synthesize toolBar; +@synthesize backButton; +@synthesize forwardButton; +@synthesize reloadButton; +@synthesize stopButton; +@synthesize linkOutButton; +@synthesize closeButton; + + +- (id)init { + if ((self = [super initWithNibName:@"AdWhirlWebBrowser" bundle:nil])) { + } + return self; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + if (self.webView.request) { + // has content from before, clear by creating another UIWebView + CGRect frame = self.webView.frame; + NSInteger tag = self.webView.tag; + UIWebView *newView = [[UIWebView alloc] initWithFrame:frame]; + newView.tag = tag; + UIWebView *oldView = self.webView; + [oldView removeFromSuperview]; + [self.view addSubview:newView]; + newView.delegate = self; + newView.scalesPageToFit = YES; + [newView release]; + } + self.toolBar.items = self.loadedButtons; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + NSArray *items = self.toolBar.items; + + NSMutableArray *loadingItems = [[NSMutableArray alloc] init]; + [loadingItems addObjectsFromArray:items]; + [loadingItems removeObjectAtIndex:4]; + self.loadingButtons = loadingItems; + [loadingItems release], loadingItems = nil; + + NSMutableArray *loadedItems = [[NSMutableArray alloc] init]; + [loadedItems addObjectsFromArray:items]; + [loadedItems removeObjectAtIndex:5]; + self.loadedButtons = loadedItems; + [loadedItems release], loadedItems = nil; +} + +- (void)viewDidDisappear:(BOOL)animated { + if (self.delegate) { + [delegate webBrowserClosed:self]; + } +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [viewControllerForPresenting shouldAutorotateToInterfaceOrientation:interfaceOrientation]; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)presentWithController:(UIViewController *)viewController transition:(AWCustomAdWebViewAnimType)animType { + self.viewControllerForPresenting = viewController; + + if ([self respondsToSelector:@selector(setModalTransitionStyle:)]) { + switch (animType) { + case AWCustomAdWebViewAnimTypeFlipFromLeft: + case AWCustomAdWebViewAnimTypeFlipFromRight: + self.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; + break; + case AWCustomAdWebViewAnimTypeFadeIn: + self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + case AWCustomAdWebViewAnimTypeModal: + default: + self.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + break; + } + } + [viewController presentModalViewController:self animated:YES]; +} + +- (void)loadURL:(NSURL *)url { + NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; + [self.webView loadRequest:urlRequest]; +} + +- (void)dealloc { + [loadingButtons release], loadingButtons = nil; + [loadedButtons release], loadedButtons = nil; + + // IBOutlets were retained automatically + webView.delegate = nil; + [webView release], webView = nil; + [toolBar release], toolBar = nil; + [backButton release], backButton = nil; + [forwardButton release], forwardButton = nil; + [reloadButton release], reloadButton = nil; + [stopButton release], stopButton = nil; + [linkOutButton release], linkOutButton = nil; + [closeButton release], closeButton = nil; + [super dealloc]; +} + +#pragma mark - +#pragma mark UIWebViewDelegate methods + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + if ([request URL] != nil && [[request URL] scheme] != nil) { + if ([[[request URL] scheme] isEqualToString:@"mailto"]) { + // need to explicitly call out to the Mail app + [[UIApplication sharedApplication] openURL:[request URL]]; + } + } + return YES; +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + self.toolBar.items = self.loadedButtons; + if (self.webView.canGoForward) { + self.forwardButton.enabled = YES; + } + if (self.webView.canGoBack) { + self.backButton.enabled = YES; + } + self.reloadButton.enabled = YES; + self.stopButton.enabled = NO; + if (self.webView.request) { + self.linkOutButton.enabled = YES; + } +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + self.toolBar.items = self.loadedButtons; + if (self.webView.canGoForward) { + self.forwardButton.enabled = YES; + } + if (self.webView.canGoBack) { + self.backButton.enabled = YES; + } + self.reloadButton.enabled = YES; + self.stopButton.enabled = NO; + if (self.webView.request) { + self.linkOutButton.enabled = YES; + } + +// // extract title of page +// NSString* title = [self.webView stringByEvaluatingJavaScriptFromString: @"document.title"]; +// self.navigationItem.title = title; +} + +- (void)webViewDidStartLoad:(UIWebView *)webView { + [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; + self.toolBar.items = self.loadingButtons; + self.forwardButton.enabled = NO; + self.backButton.enabled = NO; + self.reloadButton.enabled = NO; + self.stopButton.enabled = YES; +} + +#pragma mark - +#pragma mark button targets + +- (IBAction)forward:(id)sender { + [self.webView goForward]; +} + +- (IBAction)back:(id)sender { + [self.webView goBack]; +} + +- (IBAction)stop:(id)sender { + [self.webView stopLoading]; +} + +- (IBAction)reload:(id)sender { + [self.webView reload]; +} + +- (IBAction)linkOut:(id)sender { + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + [[UIApplication sharedApplication] openURL:self.webView.request.URL]; +} + +- (IBAction)close:(id)sender { + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + [viewControllerForPresenting dismissModalViewControllerAnimated:YES]; +} + +@end + + +@implementation AdWhirlBackButton + +- (void)awakeFromNib { + // draw the back image + CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); + CGContextRef ctx = CGBitmapContextCreate(nil, 25, 25, 8, 0, colorspace, + kCGImageAlphaPremultipliedLast); + CGColorSpaceRelease(colorspace); + CGPoint bot = CGPointMake(19, 2); + CGPoint top = CGPointMake(19, 20); + CGPoint tip = CGPointMake(4, 11); + CGContextSetFillColorWithColor(ctx, [UIColor whiteColor].CGColor); + CGContextMoveToPoint(ctx, bot.x, bot.y); + CGContextAddLineToPoint(ctx, tip.x, tip.y); + CGContextAddLineToPoint(ctx, top.x, top.y); + CGContextFillPath(ctx); + + // set the image + CGImageRef backImgRef = CGBitmapContextCreateImage(ctx); + CGContextRelease(ctx); + UIImage* backImage = [[UIImage alloc] initWithCGImage:backImgRef]; + CGImageRelease(backImgRef); + self.image = backImage; + [backImage release]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.h new file mode 100644 index 000000000..0edf8d924 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.h @@ -0,0 +1,31 @@ +/* + + UIColor+AdWhirlConfig.h + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import +#import "UIColor+AdWhirlConfig.h" + +@class AdWhirlConfig; + +@interface UIColor (AdWhirlConfig) + +- (id)initWithDict:(NSDictionary *)dict; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.m new file mode 100644 index 000000000..e72b96f56 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/internal/UIColor+AdWhirlConfig.m @@ -0,0 +1,73 @@ +/* + + UIColor+AdWhirlConfig.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "UIColor+AdWhirlConfig.h" +#import "AdWhirlConfig.h" + +@implementation UIColor (AdWhirlConfig) + +- (id)initWithDict:(NSDictionary *)dict { + id red, green, blue, alpha; + CGFloat r, g, b, a; + + red = [dict objectForKey:@"red"]; + if (red == nil) { + [self release]; + return nil; + } + green = [dict objectForKey:@"green"]; + if (green == nil) { + [self release]; + return nil; + } + blue = [dict objectForKey:@"blue"]; + if (blue == nil) { + [self release]; + return nil; + } + + NSInteger temp; + if (!awIntVal(&temp, red)) { + [self release]; + return nil; + } + r = (CGFloat)temp/255.0; + if (!awIntVal(&temp, green)) { + [self release]; + return nil; + } + g = (CGFloat)temp/255.0; + if (!awIntVal(&temp, blue)) { + [self release]; + return nil; + } + b = (CGFloat)temp/255.0; + + a = 1.0; // default 1.0 + alpha = [dict objectForKey:@"alpha"]; + CGFloat temp_f; + if (alpha != nil && awFloatVal(&temp_f, alpha)) { + a = (CGFloat)temp_f; + } + + return [self initWithRed:r green:g blue:b alpha:a]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerProtocol.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerProtocol.h new file mode 100644 index 000000000..b471fe65a --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerProtocol.h @@ -0,0 +1,31 @@ +/* + + ARRollerProtocol.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlDelegateProtocol.h" + +#define ARRollerDelegate AdWhirlDelegate + +#define adRolloApplicationKey adWhirlApplicationKey +#define rollerDidReceiveAd adWhirlDidReceiveAd +#define rollerDidFailToReceiveAd adWhirlDidFailToReceiveAd +#define rollerReceivedRequestForDeveloperToFulfill adWhirlReceivedRequestForDeveloperToFufill +#define rollerReceivedNotificationAdsAreOff adWhirlView +#define willDisplayWebViewCanvas adWhirlWillPresentFullScreenModal +#define didDismissWebViewCanvas adWhirlDidDismissFullScreenModal diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerView.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerView.h new file mode 100644 index 000000000..4f6753a09 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirl/legacy/ARRollerView.h @@ -0,0 +1,30 @@ +/* + + ARRollerView.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlView.h" +#import "ARRollerProtocol.h" + +@interface ARRollerView : AdWhirlView + ++ (ARRollerView*)requestRollerViewWithDelegate:(id)delegate; +- (void)getNextAd; +- (void)setDelegateToNil; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-2_1_1.xcodeproj/project.pbxproj b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-2_1_1.xcodeproj/project.pbxproj new file mode 100755 index 000000000..c5a47ec96 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-2_1_1.xcodeproj/project.pbxproj @@ -0,0 +1,845 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* RootViewController.xib */; }; + A62A0D91118F830F0013A568 /* AdWhirlAdapterEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A62A0D90118F830F0013A568 /* AdWhirlAdapterEvent.m */; }; + A630FDE8110FB5C800D6740A /* BottomBannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = A630FDE7110FB5C800D6740A /* BottomBannerController.m */; }; + A630FDEC110FB6DB00D6740A /* BottomBannerController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A630FDEB110FB6DB00D6740A /* BottomBannerController.xib */; }; + A63C952410A8762800E81577 /* TableController.m in Sources */ = {isa = PBXBuildFile; fileRef = A63C952210A8762800E81577 /* TableController.m */; }; + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A63C952610A8CCFF00E81577 /* TableController.xib */; }; + A66424BE110F68250045DB6E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A66424BD110F68250045DB6E /* AudioToolbox.framework */; }; + A66424D2110F68C10045DB6E /* AdWhirlAdapterMdotM.m in Sources */ = {isa = PBXBuildFile; fileRef = A66424D1110F68C10045DB6E /* AdWhirlAdapterMdotM.m */; }; + A66A01AE11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.m in Sources */ = {isa = PBXBuildFile; fileRef = A66A01AD11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.m */; }; + A66A01B611B6C7E1001DFCF0 /* libGoogleAds.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A66A01B511B6C7E1001DFCF0 /* libGoogleAds.a */; }; + A66A01D411B6C7FC001DFCF0 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A66A01D311B6C7FC001DFCF0 /* AVFoundation.framework */; }; + A678692C1121D44F008E55E8 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A678692B1121D44F008E55E8 /* MapKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + A678692E1121D44F008E55E8 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A678692D1121D44F008E55E8 /* MessageUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + A67869FE1121EF30008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869F41121EF30008E55E8 /* libJumptapApi.a */; }; + A67869FF1121EF30008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869F61121EF30008E55E8 /* libJumptapApi.a */; }; + A6786A001121EF30008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869F91121EF30008E55E8 /* libJumptapApi.a */; }; + A6786A011121EF30008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869FB1121EF30008E55E8 /* libJumptapApi.a */; }; + A6786A8C112226A7008E55E8 /* LocationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6786A8B112226A7008E55E8 /* LocationController.m */; }; + A6786A8E112226B2008E55E8 /* LocationController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6786A8D112226B2008E55E8 /* LocationController.xib */; }; + A6A324FB11593718008301A2 /* libMMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6A324F911593718008301A2 /* libMMSDK.a */; }; + A6B0CF5F10ACBFB900B29A14 /* adwhirlsample_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = A6B0CF5E10ACBFB900B29A14 /* adwhirlsample_icon.png */; }; + A6BF6FEA114AFE07005C95B8 /* ModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6BF6FE9114AFE07005C95B8 /* ModalViewController.xib */; }; + A6BF6FED114AFE19005C95B8 /* ModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6BF6FEC114AFE19005C95B8 /* ModalViewController.m */; }; + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */; }; + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */; }; + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */; }; + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */; }; + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */; }; + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */; }; + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */; }; + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */; }; + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */; }; + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */; }; + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */; }; + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */; }; + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */; }; + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */; }; + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */; }; + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */; }; + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C5210A4C4470091B7F9 /* libz.dylib */; }; + A6EC5C5E10A4C9900091B7F9 /* AdWhirlAdapterAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */; }; + A6EC5C5F10A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */; }; + A6EC5C6010A4C9900091B7F9 /* AdWhirlAdapterMillennial.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */; }; + A6EC5C6110A4C9900091B7F9 /* AdWhirlAdapterQuattro.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */; }; + A6EC5C6210A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */; }; + A6EC5C9210A4D52E0091B7F9 /* libAdFrame-X86.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */; }; + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */; }; + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */; }; + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */; }; + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */; }; + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */; }; + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */; }; + A6EC5DB710A507C00091B7F9 /* libAdFrame-ARM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */; }; + A6ED4965114F0307002C57E6 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4950114F0307002C57E6 /* CDataScanner.m */; }; + A6ED4966114F0307002C57E6 /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4953114F0307002C57E6 /* CDataScanner_Extensions.m */; }; + A6ED4967114F0307002C57E6 /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4955114F0307002C57E6 /* NSCharacterSet_Extensions.m */; }; + A6ED4968114F0307002C57E6 /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4957114F0307002C57E6 /* NSDictionary_JSONExtensions.m */; }; + A6ED4969114F0307002C57E6 /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4959114F0307002C57E6 /* NSScanner_Extensions.m */; }; + A6ED496A114F0307002C57E6 /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED495C114F0307002C57E6 /* CJSONDataSerializer.m */; }; + A6ED496B114F0307002C57E6 /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED495E114F0307002C57E6 /* CJSONDeserializer.m */; }; + A6ED496C114F0307002C57E6 /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4960114F0307002C57E6 /* CJSONScanner.m */; }; + A6ED496D114F0307002C57E6 /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4962114F0307002C57E6 /* CJSONSerializer.m */; }; + A6ED496E114F0307002C57E6 /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4964114F0307002C57E6 /* CSerializedJSONData.m */; }; + A6ED4974114F03B3002C57E6 /* libAdMob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6ED4973114F03B3002C57E6 /* libAdMob.a */; }; + A6F55CC31121CDDE0062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6F55CC11121CDDE0062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */; }; + A6F55CC41121CDDE0062F368 /* libQuattroWireless3.1.0-os3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6F55CC21121CDDE0062F368 /* libQuattroWireless3.1.0-os3.0.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_SampleAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlSDK2_SampleAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdWhirlSDK2.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_Sample_Prefix.pch; sourceTree = ""; }; + 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; + 28F335F01007B36200424DE2 /* RootViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AdWhirlSDK2_Sample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A62A0D8F118F830F0013A568 /* AdWhirlAdapterEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterEvent.h; sourceTree = ""; }; + A62A0D90118F830F0013A568 /* AdWhirlAdapterEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterEvent.m; sourceTree = ""; }; + A630FDE6110FB5C800D6740A /* BottomBannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomBannerController.h; sourceTree = ""; }; + A630FDE7110FB5C800D6740A /* BottomBannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomBannerController.m; sourceTree = ""; }; + A630FDEB110FB6DB00D6740A /* BottomBannerController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BottomBannerController.xib; sourceTree = ""; }; + A63C952110A8762800E81577 /* TableController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableController.h; sourceTree = ""; }; + A63C952210A8762800E81577 /* TableController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableController.m; sourceTree = ""; }; + A63C952610A8CCFF00E81577 /* TableController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableController.xib; sourceTree = ""; }; + A63C959610A8D6C000E81577 /* SampleConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleConstants.h; sourceTree = ""; }; + A66424BD110F68250045DB6E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A66424D0110F68C10045DB6E /* AdWhirlAdapterMdotM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMdotM.h; sourceTree = ""; }; + A66424D1110F68C10045DB6E /* AdWhirlAdapterMdotM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMdotM.m; sourceTree = ""; }; + A66A01AC11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGoogleAdSense.h; sourceTree = ""; }; + A66A01AD11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGoogleAdSense.m; sourceTree = ""; }; + A66A01B011B6C7E1001DFCF0 /* GADAdSenseAudioParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdSenseAudioParameters.h; sourceTree = ""; }; + A66A01B111B6C7E1001DFCF0 /* GADAdSenseParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdSenseParameters.h; sourceTree = ""; }; + A66A01B211B6C7E1001DFCF0 /* GADAdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdViewController.h; sourceTree = ""; }; + A66A01B311B6C7E1001DFCF0 /* GADDoubleClickParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADDoubleClickParameters.h; sourceTree = ""; }; + A66A01B411B6C7E1001DFCF0 /* GADRequestError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADRequestError.h; sourceTree = ""; }; + A66A01B511B6C7E1001DFCF0 /* libGoogleAds.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAds.a; sourceTree = ""; }; + A66A01D311B6C7FC001DFCF0 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A678692B1121D44F008E55E8 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + A678692D1121D44F008E55E8 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + A67869F41121EF30008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869F61121EF30008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869F91121EF30008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869FB1121EF30008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869FC1121EF30008E55E8 /* JTAdWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JTAdWidget.h; sourceTree = ""; }; + A67869FD1121EF30008E55E8 /* JumpTapAppReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpTapAppReport.h; sourceTree = ""; }; + A6786A8A112226A7008E55E8 /* LocationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationController.h; sourceTree = ""; }; + A6786A8B112226A7008E55E8 /* LocationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationController.m; sourceTree = ""; }; + A6786A8D112226B2008E55E8 /* LocationController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LocationController.xib; sourceTree = ""; }; + A6953FC3116657DF00F099E5 /* MMAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMAdView.h; sourceTree = ""; }; + A6A324F911593718008301A2 /* libMMSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libMMSDK.a; sourceTree = ""; }; + A6B0CDC610AB38B700B29A14 /* QWAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAd.h; sourceTree = ""; }; + A6B0CDC710AB38B700B29A14 /* QWAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAdView.h; sourceTree = ""; }; + A6B0CDC810AB38B700B29A14 /* QWTestMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWTestMode.h; sourceTree = ""; }; + A6B0CF5E10ACBFB900B29A14 /* adwhirlsample_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = adwhirlsample_icon.png; sourceTree = ""; }; + A6BF6FE9114AFE07005C95B8 /* ModalViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModalViewController.xib; sourceTree = ""; }; + A6BF6FEB114AFE19005C95B8 /* ModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModalViewController.h; sourceTree = ""; }; + A6BF6FEC114AFE19005C95B8 /* ModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalViewController.m; sourceTree = ""; }; + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkAdapter.h; sourceTree = ""; }; + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlDelegateProtocol.h; sourceTree = ""; }; + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlView.h; sourceTree = ""; }; + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkConfig.h; sourceTree = ""; }; + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfig.m; sourceTree = ""; }; + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkRegistry.h; sourceTree = ""; }; + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkRegistry.m; sourceTree = ""; }; + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfig.h; sourceTree = ""; }; + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfig.m; sourceTree = ""; }; + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlCustomAdView.h; sourceTree = ""; }; + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlCustomAdView.m; sourceTree = ""; }; + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlError.h; sourceTree = ""; }; + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlError.m; sourceTree = ""; }; + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlLog.h; sourceTree = ""; }; + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlLog.m; sourceTree = ""; }; + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlView+.h"; sourceTree = ""; }; + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlView.m; sourceTree = ""; }; + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdWhirlWebBrowser.xib; sourceTree = ""; }; + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlWebBrowserController.h; sourceTree = ""; }; + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlWebBrowserController.m; sourceTree = ""; }; + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRollerView.m; sourceTree = ""; }; + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerProtocol.h; sourceTree = ""; }; + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerView.h; sourceTree = ""; }; + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + A6EC5C5210A4C4470091B7F9 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + A6EC5C5410A4C9900091B7F9 /* AdWhirlAdapterAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterAdMob.h; sourceTree = ""; }; + A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterAdMob.m; sourceTree = ""; }; + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterJumpTap.h; sourceTree = ""; }; + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterJumpTap.m; sourceTree = ""; }; + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMillennial.h; sourceTree = ""; }; + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMillennial.m; sourceTree = ""; }; + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterQuattro.h; sourceTree = ""; }; + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterQuattro.m; sourceTree = ""; }; + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterVideoEgg.h; sourceTree = ""; }; + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterVideoEgg.m; sourceTree = ""; }; + A6EC5C6710A4C9F70091B7F9 /* AdMobDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdMobDelegateProtocol.h; sourceTree = ""; }; + A6EC5C6810A4C9F70091B7F9 /* AdMobView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdMobView.h; sourceTree = ""; }; + A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libAdFrame-ARM.a"; sourceTree = ""; }; + A6EC5C8A10A4D52E0091B7F9 /* AdFrameConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameConstants.h; sourceTree = ""; }; + A6EC5C8B10A4D52E0091B7F9 /* AdFrameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameView.h; sourceTree = ""; }; + A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libAdFrame-X86.a"; sourceTree = ""; }; + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterCustom.h; sourceTree = ""; }; + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterCustom.m; sourceTree = ""; }; + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGeneric.h; sourceTree = ""; }; + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGeneric.m; sourceTree = ""; }; + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkAdapter.m; sourceTree = ""; }; + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlAdNetworkAdapter+Helpers.h"; sourceTree = ""; }; + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AdWhirlAdNetworkAdapter+Helpers.m"; sourceTree = ""; }; + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleViewController.h; sourceTree = ""; }; + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleViewController.m; sourceTree = ""; }; + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SimpleViewController.xib; sourceTree = ""; }; + A6ED494F114F0307002C57E6 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = ""; }; + A6ED4950114F0307002C57E6 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = ""; }; + A6ED4952114F0307002C57E6 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = ""; }; + A6ED4953114F0307002C57E6 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = ""; }; + A6ED4954114F0307002C57E6 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = ""; }; + A6ED4955114F0307002C57E6 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = ""; }; + A6ED4956114F0307002C57E6 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = ""; }; + A6ED4957114F0307002C57E6 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = ""; }; + A6ED4958114F0307002C57E6 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = ""; }; + A6ED4959114F0307002C57E6 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = ""; }; + A6ED495B114F0307002C57E6 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = ""; }; + A6ED495C114F0307002C57E6 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = ""; }; + A6ED495D114F0307002C57E6 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = ""; }; + A6ED495E114F0307002C57E6 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = ""; }; + A6ED495F114F0307002C57E6 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = ""; }; + A6ED4960114F0307002C57E6 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = ""; }; + A6ED4961114F0307002C57E6 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = ""; }; + A6ED4962114F0307002C57E6 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = ""; }; + A6ED4963114F0307002C57E6 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = ""; }; + A6ED4964114F0307002C57E6 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = ""; }; + A6ED4973114F03B3002C57E6 /* libAdMob.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAdMob.a; sourceTree = ""; }; + A6F55CC11121CDDE0062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless-Simulator3.1.0-os3.0.a"; sourceTree = ""; }; + A6F55CC21121CDDE0062F368 /* libQuattroWireless3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless3.1.0-os3.0.a"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */, + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */, + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */, + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */, + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */, + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */, + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */, + A6EC5C9210A4D52E0091B7F9 /* libAdFrame-X86.a in Frameworks */, + A6EC5DB710A507C00091B7F9 /* libAdFrame-ARM.a in Frameworks */, + A66424BE110F68250045DB6E /* AudioToolbox.framework in Frameworks */, + A6F55CC31121CDDE0062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a in Frameworks */, + A6F55CC41121CDDE0062F368 /* libQuattroWireless3.1.0-os3.0.a in Frameworks */, + A678692C1121D44F008E55E8 /* MapKit.framework in Frameworks */, + A678692E1121D44F008E55E8 /* MessageUI.framework in Frameworks */, + A67869FE1121EF30008E55E8 /* libJumptapApi.a in Frameworks */, + A67869FF1121EF30008E55E8 /* libJumptapApi.a in Frameworks */, + A6786A001121EF30008E55E8 /* libJumptapApi.a in Frameworks */, + A6786A011121EF30008E55E8 /* libJumptapApi.a in Frameworks */, + A6A324FB11593718008301A2 /* libMMSDK.a in Frameworks */, + A6ED4974114F03B3002C57E6 /* libAdMob.a in Frameworks */, + A66A01B611B6C7E1001DFCF0 /* libGoogleAds.a in Frameworks */, + A66A01D411B6C7FC001DFCF0 /* AVFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + A6BF6FEB114AFE19005C95B8 /* ModalViewController.h */, + A6BF6FEC114AFE19005C95B8 /* ModalViewController.m */, + A6786A8A112226A7008E55E8 /* LocationController.h */, + A6786A8B112226A7008E55E8 /* LocationController.m */, + 28C286DF0D94DF7D0034E888 /* RootViewController.h */, + 28C286E00D94DF7D0034E888 /* RootViewController.m */, + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */, + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */, + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */, + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */, + A630FDE6110FB5C800D6740A /* BottomBannerController.h */, + A630FDE7110FB5C800D6740A /* BottomBannerController.m */, + A63C952110A8762800E81577 /* TableController.h */, + A63C952210A8762800E81577 /* TableController.m */, + A63C959610A8D6C000E81577 /* SampleConstants.h */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */, + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */, + A6ED494E114F0307002C57E6 /* TouchJSON */, + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + A6BF6FE9114AFE07005C95B8 /* ModalViewController.xib */, + A6786A8D112226B2008E55E8 /* LocationController.xib */, + A6B0CF5E10ACBFB900B29A14 /* adwhirlsample_icon.png */, + A63C952610A8CCFF00E81577 /* TableController.xib */, + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */, + A630FDEB110FB6DB00D6740A /* BottomBannerController.xib */, + 28F335F01007B36200424DE2 /* RootViewController.xib */, + 28AD735F0D9D9599002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, + A66A01D311B6C7FC001DFCF0 /* AVFoundation.framework */, + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */, + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */, + A66424BD110F68250045DB6E /* AudioToolbox.framework */, + A678692B1121D44F008E55E8 /* MapKit.framework */, + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */, + A678692D1121D44F008E55E8 /* MessageUI.framework */, + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */, + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */, + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */, + A6EC5C5210A4C4470091B7F9 /* libz.dylib */, + ); + name = Frameworks; + sourceTree = ""; + }; + A66A01AF11B6C7E1001DFCF0 /* GoogleAdSense */ = { + isa = PBXGroup; + children = ( + A66A01B011B6C7E1001DFCF0 /* GADAdSenseAudioParameters.h */, + A66A01B111B6C7E1001DFCF0 /* GADAdSenseParameters.h */, + A66A01B211B6C7E1001DFCF0 /* GADAdViewController.h */, + A66A01B311B6C7E1001DFCF0 /* GADDoubleClickParameters.h */, + A66A01B411B6C7E1001DFCF0 /* GADRequestError.h */, + A66A01B511B6C7E1001DFCF0 /* libGoogleAds.a */, + ); + name = GoogleAdSense; + path = ../AdNetworkLibs/GoogleAdSense; + sourceTree = SOURCE_ROOT; + }; + A67869F11121EF30008E55E8 /* JumptapApi */ = { + isa = PBXGroup; + children = ( + A67869F21121EF30008E55E8 /* 2.2.1 */, + A67869F71121EF30008E55E8 /* 3.0 */, + A67869FC1121EF30008E55E8 /* JTAdWidget.h */, + A67869FD1121EF30008E55E8 /* JumpTapAppReport.h */, + ); + name = JumptapApi; + path = ../AdNetworkLibs/JumptapApi; + sourceTree = SOURCE_ROOT; + }; + A67869F21121EF30008E55E8 /* 2.2.1 */ = { + isa = PBXGroup; + children = ( + A67869F31121EF30008E55E8 /* iphoneos */, + A67869F51121EF30008E55E8 /* iphonesimulator */, + ); + path = 2.2.1; + sourceTree = ""; + }; + A67869F31121EF30008E55E8 /* iphoneos */ = { + isa = PBXGroup; + children = ( + A67869F41121EF30008E55E8 /* libJumptapApi.a */, + ); + path = iphoneos; + sourceTree = ""; + }; + A67869F51121EF30008E55E8 /* iphonesimulator */ = { + isa = PBXGroup; + children = ( + A67869F61121EF30008E55E8 /* libJumptapApi.a */, + ); + path = iphonesimulator; + sourceTree = ""; + }; + A67869F71121EF30008E55E8 /* 3.0 */ = { + isa = PBXGroup; + children = ( + A67869F81121EF30008E55E8 /* iphoneos */, + A67869FA1121EF30008E55E8 /* iphonesimulator */, + ); + path = 3.0; + sourceTree = ""; + }; + A67869F81121EF30008E55E8 /* iphoneos */ = { + isa = PBXGroup; + children = ( + A67869F91121EF30008E55E8 /* libJumptapApi.a */, + ); + path = iphoneos; + sourceTree = ""; + }; + A67869FA1121EF30008E55E8 /* iphonesimulator */ = { + isa = PBXGroup; + children = ( + A67869FB1121EF30008E55E8 /* libJumptapApi.a */, + ); + path = iphonesimulator; + sourceTree = ""; + }; + A6B0CDC110AB38B700B29A14 /* QuattroWirelessLib */ = { + isa = PBXGroup; + children = ( + A6F55CC11121CDDE0062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */, + A6F55CC21121CDDE0062F368 /* libQuattroWireless3.1.0-os3.0.a */, + A6B0CDC610AB38B700B29A14 /* QWAd.h */, + A6B0CDC710AB38B700B29A14 /* QWAdView.h */, + A6B0CDC810AB38B700B29A14 /* QWTestMode.h */, + ); + name = QuattroWirelessLib; + path = ../AdNetworkLibs/QuattroWirelessLib; + sourceTree = SOURCE_ROOT; + }; + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */ = { + isa = PBXGroup; + children = ( + A6EC5B3D10A4B0C60091B7F9 /* adapters */, + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */, + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */, + A6EC5B5410A4B0C60091B7F9 /* internal */, + A6EC5B6710A4B0C60091B7F9 /* legacy */, + ); + name = AdWhirl; + path = ../AdWhirl; + sourceTree = SOURCE_ROOT; + }; + A6EC5B3D10A4B0C60091B7F9 /* adapters */ = { + isa = PBXGroup; + children = ( + A66A01AC11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.h */, + A66A01AD11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.m */, + A66424D0110F68C10045DB6E /* AdWhirlAdapterMdotM.h */, + A66424D1110F68C10045DB6E /* AdWhirlAdapterMdotM.m */, + A6EC5C5410A4C9900091B7F9 /* AdWhirlAdapterAdMob.h */, + A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */, + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */, + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */, + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */, + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */, + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */, + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */, + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */, + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */, + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */, + ); + path = adapters; + sourceTree = ""; + }; + A6EC5B5410A4B0C60091B7F9 /* internal */ = { + isa = PBXGroup; + children = ( + A62A0D8F118F830F0013A568 /* AdWhirlAdapterEvent.h */, + A62A0D90118F830F0013A568 /* AdWhirlAdapterEvent.m */, + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */, + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */, + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */, + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */, + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */, + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */, + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */, + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */, + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */, + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */, + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */, + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */, + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */, + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */, + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */, + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */, + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */, + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */, + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */, + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */, + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */, + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */, + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */, + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */, + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */, + ); + path = internal; + sourceTree = ""; + }; + A6EC5B6710A4B0C60091B7F9 /* legacy */ = { + isa = PBXGroup; + children = ( + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */, + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */, + ); + path = legacy; + sourceTree = ""; + }; + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */ = { + isa = PBXGroup; + children = ( + A66A01AF11B6C7E1001DFCF0 /* GoogleAdSense */, + A67869F11121EF30008E55E8 /* JumptapApi */, + A6EC5C6610A4C9F70091B7F9 /* AdMob */, + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */, + A6B0CDC110AB38B700B29A14 /* QuattroWirelessLib */, + A6EC5C8510A4D52E0091B7F9 /* VEAdFrames.1.0.4_2.2 */, + ); + name = AdNetworkLibs; + sourceTree = ""; + }; + A6EC5C6610A4C9F70091B7F9 /* AdMob */ = { + isa = PBXGroup; + children = ( + A6ED4973114F03B3002C57E6 /* libAdMob.a */, + A6EC5C6710A4C9F70091B7F9 /* AdMobDelegateProtocol.h */, + A6EC5C6810A4C9F70091B7F9 /* AdMobView.h */, + ); + name = AdMob; + path = ../AdNetworkLibs/AdMob; + sourceTree = SOURCE_ROOT; + }; + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */ = { + isa = PBXGroup; + children = ( + A6953FC3116657DF00F099E5 /* MMAdView.h */, + A6A324F911593718008301A2 /* libMMSDK.a */, + ); + name = MillennialMedia; + path = ../AdNetworkLibs/MillennialMedia; + sourceTree = SOURCE_ROOT; + }; + A6EC5C8510A4D52E0091B7F9 /* VEAdFrames.1.0.4_2.2 */ = { + isa = PBXGroup; + children = ( + A6EC5C8610A4D52E0091B7F9 /* ARM */, + A6EC5C8910A4D52E0091B7F9 /* include */, + A6EC5C8C10A4D52E0091B7F9 /* X86 */, + ); + name = VEAdFrames.1.0.4_2.2; + path = ../AdNetworkLibs/VEAdFrames.1.0.4_2.2; + sourceTree = SOURCE_ROOT; + }; + A6EC5C8610A4D52E0091B7F9 /* ARM */ = { + isa = PBXGroup; + children = ( + A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */, + ); + path = ARM; + sourceTree = ""; + }; + A6EC5C8910A4D52E0091B7F9 /* include */ = { + isa = PBXGroup; + children = ( + A6EC5C8A10A4D52E0091B7F9 /* AdFrameConstants.h */, + A6EC5C8B10A4D52E0091B7F9 /* AdFrameView.h */, + ); + path = include; + sourceTree = ""; + }; + A6EC5C8C10A4D52E0091B7F9 /* X86 */ = { + isa = PBXGroup; + children = ( + A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */, + ); + path = X86; + sourceTree = ""; + }; + A6ED494E114F0307002C57E6 /* TouchJSON */ = { + isa = PBXGroup; + children = ( + A6ED494F114F0307002C57E6 /* CDataScanner.h */, + A6ED4950114F0307002C57E6 /* CDataScanner.m */, + A6ED4951114F0307002C57E6 /* Extensions */, + A6ED495A114F0307002C57E6 /* JSON */, + ); + name = TouchJSON; + path = ../TouchJSON; + sourceTree = SOURCE_ROOT; + }; + A6ED4951114F0307002C57E6 /* Extensions */ = { + isa = PBXGroup; + children = ( + A6ED4952114F0307002C57E6 /* CDataScanner_Extensions.h */, + A6ED4953114F0307002C57E6 /* CDataScanner_Extensions.m */, + A6ED4954114F0307002C57E6 /* NSCharacterSet_Extensions.h */, + A6ED4955114F0307002C57E6 /* NSCharacterSet_Extensions.m */, + A6ED4956114F0307002C57E6 /* NSDictionary_JSONExtensions.h */, + A6ED4957114F0307002C57E6 /* NSDictionary_JSONExtensions.m */, + A6ED4958114F0307002C57E6 /* NSScanner_Extensions.h */, + A6ED4959114F0307002C57E6 /* NSScanner_Extensions.m */, + ); + path = Extensions; + sourceTree = ""; + }; + A6ED495A114F0307002C57E6 /* JSON */ = { + isa = PBXGroup; + children = ( + A6ED495B114F0307002C57E6 /* CJSONDataSerializer.h */, + A6ED495C114F0307002C57E6 /* CJSONDataSerializer.m */, + A6ED495D114F0307002C57E6 /* CJSONDeserializer.h */, + A6ED495E114F0307002C57E6 /* CJSONDeserializer.m */, + A6ED495F114F0307002C57E6 /* CJSONScanner.h */, + A6ED4960114F0307002C57E6 /* CJSONScanner.m */, + A6ED4961114F0307002C57E6 /* CJSONSerializer.h */, + A6ED4962114F0307002C57E6 /* CJSONSerializer.m */, + A6ED4963114F0307002C57E6 /* CSerializedJSONData.h */, + A6ED4964114F0307002C57E6 /* CSerializedJSONData.m */, + ); + path = JSON; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AdWhirlSDK2_Sample; + productName = AdWhirlSDK2_Sample; + productReference = 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample-2_1_1" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */, + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */, + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */, + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */, + A6B0CF5F10ACBFB900B29A14 /* adwhirlsample_icon.png in Resources */, + A630FDEC110FB6DB00D6740A /* BottomBannerController.xib in Resources */, + A6786A8E112226B2008E55E8 /* LocationController.xib in Resources */, + A6BF6FEA114AFE07005C95B8 /* ModalViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */, + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */, + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */, + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */, + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */, + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */, + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */, + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */, + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */, + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */, + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */, + A6EC5C5E10A4C9900091B7F9 /* AdWhirlAdapterAdMob.m in Sources */, + A6EC5C5F10A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m in Sources */, + A6EC5C6010A4C9900091B7F9 /* AdWhirlAdapterMillennial.m in Sources */, + A6EC5C6110A4C9900091B7F9 /* AdWhirlAdapterQuattro.m in Sources */, + A6EC5C6210A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m in Sources */, + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */, + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */, + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */, + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */, + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */, + A63C952410A8762800E81577 /* TableController.m in Sources */, + A66424D2110F68C10045DB6E /* AdWhirlAdapterMdotM.m in Sources */, + A630FDE8110FB5C800D6740A /* BottomBannerController.m in Sources */, + A6786A8C112226A7008E55E8 /* LocationController.m in Sources */, + A6BF6FED114AFE19005C95B8 /* ModalViewController.m in Sources */, + A6ED4965114F0307002C57E6 /* CDataScanner.m in Sources */, + A6ED4966114F0307002C57E6 /* CDataScanner_Extensions.m in Sources */, + A6ED4967114F0307002C57E6 /* NSCharacterSet_Extensions.m in Sources */, + A6ED4968114F0307002C57E6 /* NSDictionary_JSONExtensions.m in Sources */, + A6ED4969114F0307002C57E6 /* NSScanner_Extensions.m in Sources */, + A6ED496A114F0307002C57E6 /* CJSONDataSerializer.m in Sources */, + A6ED496B114F0307002C57E6 /* CJSONDeserializer.m in Sources */, + A6ED496C114F0307002C57E6 /* CJSONScanner.m in Sources */, + A6ED496D114F0307002C57E6 /* CJSONSerializer.m in Sources */, + A6ED496E114F0307002C57E6 /* CSerializedJSONData.m in Sources */, + A62A0D91118F830F0013A568 /* AdWhirlAdapterEvent.m in Sources */, + A66A01AE11B6C7AC001DFCF0 /* AdWhirlAdapterGoogleAdSense.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/AdMob\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/ARM\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/X86\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi/$(IPHONEOS_DEPLOYMENT_TARGET)/$(PLATFORM_NAME)/\"", + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/GoogleAdSense\"", + ); + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/AdMob\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/ARM\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/X86\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi/$(IPHONEOS_DEPLOYMENT_TARGET)/$(PLATFORM_NAME)/\"", + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/GoogleAdSense\"", + ); + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = "ADWHIRL_DEBUG=1"; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 2.2.1; + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 2.2.1; + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample-2_1_1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-3_x.xcodeproj/project.pbxproj b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-3_x.xcodeproj/project.pbxproj new file mode 100755 index 000000000..79b6d7934 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-3_x.xcodeproj/project.pbxproj @@ -0,0 +1,841 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* RootViewController.xib */; }; + A615C26A11B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.m in Sources */ = {isa = PBXBuildFile; fileRef = A615C26911B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.m */; }; + A615C27811B5DEDD00E0C50F /* libGoogleAds.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A615C27711B5DEDD00E0C50F /* libGoogleAds.a */; }; + A61E1BA711B6213700D0DD65 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A61E1BA611B6213700D0DD65 /* AVFoundation.framework */; }; + A61F580C110F698700444E50 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A61F580B110F698700444E50 /* AudioToolbox.framework */; }; + A62A0D36118F7D810013A568 /* AdWhirlAdapterEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */; }; + A630FD61110FABAB00D6740A /* BottomBannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = A630FD5F110FABAB00D6740A /* BottomBannerController.m */; }; + A630FDAA110FB3E700D6740A /* BottomBannerController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A630FDA9110FB3E700D6740A /* BottomBannerController.xib */; }; + A63C952410A8762800E81577 /* TableController.m in Sources */ = {isa = PBXBuildFile; fileRef = A63C952210A8762800E81577 /* TableController.m */; }; + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A63C952610A8CCFF00E81577 /* TableController.xib */; }; + A67869C61121E5C1008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869BC1121E5C1008E55E8 /* libJumptapApi.a */; }; + A67869C71121E5C1008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869BE1121E5C1008E55E8 /* libJumptapApi.a */; }; + A67869C81121E5C1008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869C11121E5C1008E55E8 /* libJumptapApi.a */; }; + A67869C91121E5C1008E55E8 /* libJumptapApi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A67869C31121E5C1008E55E8 /* libJumptapApi.a */; }; + A690297D11458AE200F2E41D /* libAdMob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A690297C11458AE200F2E41D /* libAdMob.a */; }; + A6A7997D1120D36A00A00FD8 /* LocationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6A7997C1120D36A00A00FD8 /* LocationController.m */; }; + A6A7998D1120D69600A00FD8 /* LocationController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6A7998C1120D69600A00FD8 /* LocationController.xib */; }; + A6B0CF2C10ACBD8900B29A14 /* adwhirlsample_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */; }; + A6B9860E11484CF2001B2F2B /* AdWhirlAdapterAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */; }; + A6B9860F11484CF3001B2F2B /* AdWhirlAdapterJumpTap.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */; }; + A6B9861011484CF4001B2F2B /* AdWhirlAdapterMdotM.m in Sources */ = {isa = PBXBuildFile; fileRef = A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */; }; + A6B9861111484CF4001B2F2B /* AdWhirlAdapterMillennial.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */; }; + A6B9861211484CF5001B2F2B /* AdWhirlAdapterQuattro.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */; }; + A6B9861311484CF6001B2F2B /* AdWhirlAdapterVideoEgg.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */; }; + A6BF7002114B0F9A005C95B8 /* libMMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6BF7001114B0F9A005C95B8 /* libMMSDK.a */; }; + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */; }; + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */; }; + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */; }; + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */; }; + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */; }; + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */; }; + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */; }; + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */; }; + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */; }; + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */; }; + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */; }; + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */; }; + A6EC5BDC10A4C3150091B7F9 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */; }; + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */; }; + A6EC5BF310A4C3400091B7F9 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */; }; + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */; }; + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */; }; + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */; }; + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C5210A4C4470091B7F9 /* libz.dylib */; }; + A6EC5C9210A4D52E0091B7F9 /* libAdFrame-X86.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */; }; + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */; }; + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */; }; + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */; }; + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */; }; + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */; }; + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */; }; + A6EC5DB710A507C00091B7F9 /* libAdFrame-ARM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */; }; + A6ED4928114F0131002C57E6 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4913114F0131002C57E6 /* CDataScanner.m */; }; + A6ED4929114F0131002C57E6 /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */; }; + A6ED492A114F0131002C57E6 /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */; }; + A6ED492B114F0131002C57E6 /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */; }; + A6ED492C114F0131002C57E6 /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */; }; + A6ED492D114F0131002C57E6 /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */; }; + A6ED492E114F0131002C57E6 /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */; }; + A6ED492F114F0131002C57E6 /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4923114F0131002C57E6 /* CJSONScanner.m */; }; + A6ED4930114F0131002C57E6 /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4925114F0131002C57E6 /* CJSONSerializer.m */; }; + A6ED4931114F0131002C57E6 /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */; }; + A6F55C6C1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6F55C6A1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */; }; + A6F55C6D1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6F55C6B1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a */; }; + A6F6CC7A1149A8B500DFFFEA /* ModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6F6CC781149A8B500DFFFEA /* ModalViewController.m */; }; + A6F6CC7B1149A8B500DFFFEA /* ModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_SampleAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlSDK2_SampleAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdWhirlSDK2.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_Sample_Prefix.pch; sourceTree = ""; }; + 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; + 28F335F01007B36200424DE2 /* RootViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AdWhirlSDK2_Sample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A615C26811B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGoogleAdSense.h; sourceTree = ""; }; + A615C26911B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGoogleAdSense.m; sourceTree = ""; }; + A615C27211B5DEDD00E0C50F /* GADAdSenseAudioParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdSenseAudioParameters.h; sourceTree = ""; }; + A615C27311B5DEDD00E0C50F /* GADAdSenseParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdSenseParameters.h; sourceTree = ""; }; + A615C27411B5DEDD00E0C50F /* GADAdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADAdViewController.h; sourceTree = ""; }; + A615C27511B5DEDD00E0C50F /* GADDoubleClickParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADDoubleClickParameters.h; sourceTree = ""; }; + A615C27611B5DEDD00E0C50F /* GADRequestError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADRequestError.h; sourceTree = ""; }; + A615C27711B5DEDD00E0C50F /* libGoogleAds.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAds.a; sourceTree = ""; }; + A61E1BA611B6213700D0DD65 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A61F580B110F698700444E50 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A62A0D34118F7D810013A568 /* AdWhirlAdapterEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterEvent.h; sourceTree = ""; }; + A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterEvent.m; sourceTree = ""; }; + A630FD5E110FABAB00D6740A /* BottomBannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomBannerController.h; sourceTree = ""; }; + A630FD5F110FABAB00D6740A /* BottomBannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomBannerController.m; sourceTree = ""; }; + A630FDA9110FB3E700D6740A /* BottomBannerController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BottomBannerController.xib; sourceTree = ""; }; + A63C952110A8762800E81577 /* TableController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableController.h; sourceTree = ""; }; + A63C952210A8762800E81577 /* TableController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableController.m; sourceTree = ""; }; + A63C952610A8CCFF00E81577 /* TableController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableController.xib; sourceTree = ""; }; + A63C959610A8D6C000E81577 /* SampleConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleConstants.h; sourceTree = ""; }; + A67869BC1121E5C1008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869BE1121E5C1008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869C11121E5C1008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869C31121E5C1008E55E8 /* libJumptapApi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libJumptapApi.a; sourceTree = ""; }; + A67869C41121E5C1008E55E8 /* JTAdWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JTAdWidget.h; sourceTree = ""; }; + A67869C51121E5C1008E55E8 /* JumpTapAppReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpTapAppReport.h; sourceTree = ""; }; + A67F2A601162949700E0278D /* MMAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMAdView.h; sourceTree = ""; }; + A690297A11458AA000F2E41D /* AdMobDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdMobDelegateProtocol.h; sourceTree = ""; }; + A690297B11458ABF00F2E41D /* AdMobView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdMobView.h; sourceTree = ""; }; + A690297C11458AE200F2E41D /* libAdMob.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAdMob.a; sourceTree = ""; }; + A6A7997B1120D36A00A00FD8 /* LocationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationController.h; sourceTree = ""; }; + A6A7997C1120D36A00A00FD8 /* LocationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationController.m; sourceTree = ""; }; + A6A7998C1120D69600A00FD8 /* LocationController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LocationController.xib; sourceTree = ""; }; + A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = adwhirlsample_icon.png; sourceTree = ""; }; + A6BF7001114B0F9A005C95B8 /* libMMSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMMSDK.a; path = ../../third_party_libs/iphone/MillennialMedia/libMMSDK.a; sourceTree = SOURCE_ROOT; }; + A6CB6843110E3B6800B24288 /* AdWhirlAdapterMdotM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMdotM.h; sourceTree = ""; }; + A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMdotM.m; sourceTree = ""; }; + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkAdapter.h; sourceTree = ""; }; + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlDelegateProtocol.h; sourceTree = ""; }; + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlView.h; sourceTree = ""; }; + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkConfig.h; sourceTree = ""; }; + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfig.m; sourceTree = ""; }; + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkRegistry.h; sourceTree = ""; }; + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkRegistry.m; sourceTree = ""; }; + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfig.h; sourceTree = ""; }; + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfig.m; sourceTree = ""; }; + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlCustomAdView.h; sourceTree = ""; }; + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlCustomAdView.m; sourceTree = ""; }; + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlError.h; sourceTree = ""; }; + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlError.m; sourceTree = ""; }; + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlLog.h; sourceTree = ""; }; + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlLog.m; sourceTree = ""; }; + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlView+.h"; sourceTree = ""; }; + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlView.m; sourceTree = ""; }; + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdWhirlWebBrowser.xib; sourceTree = ""; }; + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlWebBrowserController.h; sourceTree = ""; }; + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlWebBrowserController.m; sourceTree = ""; }; + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRollerView.m; sourceTree = ""; }; + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerProtocol.h; sourceTree = ""; }; + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerView.h; sourceTree = ""; }; + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; + A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + A6EC5C5210A4C4470091B7F9 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + A6EC5C5410A4C9900091B7F9 /* AdWhirlAdapterAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterAdMob.h; sourceTree = ""; }; + A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterAdMob.m; sourceTree = ""; }; + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterJumpTap.h; sourceTree = ""; }; + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterJumpTap.m; sourceTree = ""; }; + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMillennial.h; sourceTree = ""; }; + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMillennial.m; sourceTree = ""; }; + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterQuattro.h; sourceTree = ""; }; + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterQuattro.m; sourceTree = ""; }; + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterVideoEgg.h; sourceTree = ""; }; + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterVideoEgg.m; sourceTree = ""; }; + A6EC5C7810A4D4500091B7F9 /* QWAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAd.h; sourceTree = ""; }; + A6EC5C7910A4D4500091B7F9 /* QWAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAdView.h; sourceTree = ""; }; + A6EC5C7A10A4D4500091B7F9 /* QWTestMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWTestMode.h; sourceTree = ""; }; + A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libAdFrame-ARM.a"; sourceTree = ""; }; + A6EC5C8A10A4D52E0091B7F9 /* AdFrameConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameConstants.h; sourceTree = ""; }; + A6EC5C8B10A4D52E0091B7F9 /* AdFrameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameView.h; sourceTree = ""; }; + A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libAdFrame-X86.a"; sourceTree = ""; }; + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterCustom.h; sourceTree = ""; }; + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterCustom.m; sourceTree = ""; }; + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGeneric.h; sourceTree = ""; }; + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGeneric.m; sourceTree = ""; }; + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkAdapter.m; sourceTree = ""; }; + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlAdNetworkAdapter+Helpers.h"; sourceTree = ""; }; + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AdWhirlAdNetworkAdapter+Helpers.m"; sourceTree = ""; }; + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleViewController.h; sourceTree = ""; }; + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleViewController.m; sourceTree = ""; }; + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SimpleViewController.xib; sourceTree = ""; }; + A6ED4912114F0131002C57E6 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = ""; }; + A6ED4913114F0131002C57E6 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = ""; }; + A6ED4915114F0131002C57E6 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = ""; }; + A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = ""; }; + A6ED4917114F0131002C57E6 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = ""; }; + A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = ""; }; + A6ED4919114F0131002C57E6 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = ""; }; + A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = ""; }; + A6ED491B114F0131002C57E6 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = ""; }; + A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = ""; }; + A6ED491E114F0131002C57E6 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = ""; }; + A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = ""; }; + A6ED4920114F0131002C57E6 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = ""; }; + A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = ""; }; + A6ED4922114F0131002C57E6 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = ""; }; + A6ED4923114F0131002C57E6 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = ""; }; + A6ED4924114F0131002C57E6 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = ""; }; + A6ED4925114F0131002C57E6 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = ""; }; + A6ED4926114F0131002C57E6 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = ""; }; + A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = ""; }; + A6F55C6A1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless-Simulator3.1.0-os3.0.a"; sourceTree = ""; }; + A6F55C6B1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless3.1.0-os3.0.a"; sourceTree = ""; }; + A6F6CC771149A8B500DFFFEA /* ModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModalViewController.h; sourceTree = ""; }; + A6F6CC781149A8B500DFFFEA /* ModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalViewController.m; sourceTree = ""; }; + A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModalViewController.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */, + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */, + A6EC5BDC10A4C3150091B7F9 /* MapKit.framework in Frameworks */, + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */, + A6EC5BF310A4C3400091B7F9 /* MessageUI.framework in Frameworks */, + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */, + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */, + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */, + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */, + A6EC5C9210A4D52E0091B7F9 /* libAdFrame-X86.a in Frameworks */, + A6EC5DB710A507C00091B7F9 /* libAdFrame-ARM.a in Frameworks */, + A61F580C110F698700444E50 /* AudioToolbox.framework in Frameworks */, + A6F55C6C1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a in Frameworks */, + A6F55C6D1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a in Frameworks */, + A67869C61121E5C1008E55E8 /* libJumptapApi.a in Frameworks */, + A67869C71121E5C1008E55E8 /* libJumptapApi.a in Frameworks */, + A67869C81121E5C1008E55E8 /* libJumptapApi.a in Frameworks */, + A67869C91121E5C1008E55E8 /* libJumptapApi.a in Frameworks */, + A6BF7002114B0F9A005C95B8 /* libMMSDK.a in Frameworks */, + A690297D11458AE200F2E41D /* libAdMob.a in Frameworks */, + A615C27811B5DEDD00E0C50F /* libGoogleAds.a in Frameworks */, + A61E1BA711B6213700D0DD65 /* AVFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 28C286DF0D94DF7D0034E888 /* RootViewController.h */, + 28C286E00D94DF7D0034E888 /* RootViewController.m */, + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */, + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */, + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */, + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */, + A63C952110A8762800E81577 /* TableController.h */, + A63C952210A8762800E81577 /* TableController.m */, + A63C959610A8D6C000E81577 /* SampleConstants.h */, + A630FD5E110FABAB00D6740A /* BottomBannerController.h */, + A630FD5F110FABAB00D6740A /* BottomBannerController.m */, + A6A7997B1120D36A00A00FD8 /* LocationController.h */, + A6A7997C1120D36A00A00FD8 /* LocationController.m */, + A6F6CC771149A8B500DFFFEA /* ModalViewController.h */, + A6F6CC781149A8B500DFFFEA /* ModalViewController.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */, + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */, + A6ED4911114F0131002C57E6 /* TouchJSON */, + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + A6A7998C1120D69600A00FD8 /* LocationController.xib */, + A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */, + A63C952610A8CCFF00E81577 /* TableController.xib */, + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */, + A630FDA9110FB3E700D6740A /* BottomBannerController.xib */, + 28F335F01007B36200424DE2 /* RootViewController.xib */, + A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */, + 28AD735F0D9D9599002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, + A61E1BA611B6213700D0DD65 /* AVFoundation.framework */, + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */, + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */, + A61F580B110F698700444E50 /* AudioToolbox.framework */, + A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */, + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */, + A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */, + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */, + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */, + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */, + A6EC5C5210A4C4470091B7F9 /* libz.dylib */, + ); + name = Frameworks; + sourceTree = ""; + }; + A615C27111B5DEDD00E0C50F /* GoogleAdSense */ = { + isa = PBXGroup; + children = ( + A615C27211B5DEDD00E0C50F /* GADAdSenseAudioParameters.h */, + A615C27311B5DEDD00E0C50F /* GADAdSenseParameters.h */, + A615C27411B5DEDD00E0C50F /* GADAdViewController.h */, + A615C27511B5DEDD00E0C50F /* GADDoubleClickParameters.h */, + A615C27611B5DEDD00E0C50F /* GADRequestError.h */, + A615C27711B5DEDD00E0C50F /* libGoogleAds.a */, + ); + name = GoogleAdSense; + path = ../AdNetworkLibs/GoogleAdSense; + sourceTree = SOURCE_ROOT; + }; + A67869B91121E5C1008E55E8 /* JumptapApi */ = { + isa = PBXGroup; + children = ( + A67869BA1121E5C1008E55E8 /* 2.2.1 */, + A67869BF1121E5C1008E55E8 /* 3.0 */, + A67869C41121E5C1008E55E8 /* JTAdWidget.h */, + A67869C51121E5C1008E55E8 /* JumpTapAppReport.h */, + ); + name = JumptapApi; + path = ../AdNetworkLibs/JumptapApi; + sourceTree = SOURCE_ROOT; + }; + A67869BA1121E5C1008E55E8 /* 2.2.1 */ = { + isa = PBXGroup; + children = ( + A67869BB1121E5C1008E55E8 /* iphoneos */, + A67869BD1121E5C1008E55E8 /* iphonesimulator */, + ); + path = 2.2.1; + sourceTree = ""; + }; + A67869BB1121E5C1008E55E8 /* iphoneos */ = { + isa = PBXGroup; + children = ( + A67869BC1121E5C1008E55E8 /* libJumptapApi.a */, + ); + path = iphoneos; + sourceTree = ""; + }; + A67869BD1121E5C1008E55E8 /* iphonesimulator */ = { + isa = PBXGroup; + children = ( + A67869BE1121E5C1008E55E8 /* libJumptapApi.a */, + ); + path = iphonesimulator; + sourceTree = ""; + }; + A67869BF1121E5C1008E55E8 /* 3.0 */ = { + isa = PBXGroup; + children = ( + A67869C01121E5C1008E55E8 /* iphoneos */, + A67869C21121E5C1008E55E8 /* iphonesimulator */, + ); + path = 3.0; + sourceTree = ""; + }; + A67869C01121E5C1008E55E8 /* iphoneos */ = { + isa = PBXGroup; + children = ( + A67869C11121E5C1008E55E8 /* libJumptapApi.a */, + ); + path = iphoneos; + sourceTree = ""; + }; + A67869C21121E5C1008E55E8 /* iphonesimulator */ = { + isa = PBXGroup; + children = ( + A67869C31121E5C1008E55E8 /* libJumptapApi.a */, + ); + path = iphonesimulator; + sourceTree = ""; + }; + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */ = { + isa = PBXGroup; + children = ( + A6EC5B3D10A4B0C60091B7F9 /* adapters */, + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */, + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */, + A6EC5B5410A4B0C60091B7F9 /* internal */, + A6EC5B6710A4B0C60091B7F9 /* legacy */, + ); + name = AdWhirl; + path = ../AdWhirl; + sourceTree = SOURCE_ROOT; + }; + A6EC5B3D10A4B0C60091B7F9 /* adapters */ = { + isa = PBXGroup; + children = ( + A615C26811B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.h */, + A615C26911B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.m */, + A6CB6843110E3B6800B24288 /* AdWhirlAdapterMdotM.h */, + A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */, + A6EC5C5410A4C9900091B7F9 /* AdWhirlAdapterAdMob.h */, + A6EC5C5510A4C9900091B7F9 /* AdWhirlAdapterAdMob.m */, + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */, + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */, + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */, + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */, + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */, + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */, + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */, + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */, + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */, + ); + path = adapters; + sourceTree = ""; + }; + A6EC5B5410A4B0C60091B7F9 /* internal */ = { + isa = PBXGroup; + children = ( + A62A0D34118F7D810013A568 /* AdWhirlAdapterEvent.h */, + A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */, + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */, + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */, + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */, + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */, + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */, + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */, + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */, + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */, + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */, + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */, + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */, + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */, + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */, + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */, + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */, + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */, + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */, + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */, + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */, + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */, + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */, + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */, + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */, + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */, + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */, + ); + path = internal; + sourceTree = ""; + }; + A6EC5B6710A4B0C60091B7F9 /* legacy */ = { + isa = PBXGroup; + children = ( + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */, + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */, + ); + path = legacy; + sourceTree = ""; + }; + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */ = { + isa = PBXGroup; + children = ( + A6EC5C6610A4C9F70091B7F9 /* AdMob */, + A615C27111B5DEDD00E0C50F /* GoogleAdSense */, + A67869B91121E5C1008E55E8 /* JumptapApi */, + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */, + A6EC5C7510A4D4500091B7F9 /* QuattroWirelessLib */, + A6EC5C8510A4D52E0091B7F9 /* VEAdFrames.1.0.4_2.2 */, + ); + name = AdNetworkLibs; + sourceTree = ""; + }; + A6EC5C6610A4C9F70091B7F9 /* AdMob */ = { + isa = PBXGroup; + children = ( + A690297C11458AE200F2E41D /* libAdMob.a */, + A690297A11458AA000F2E41D /* AdMobDelegateProtocol.h */, + A690297B11458ABF00F2E41D /* AdMobView.h */, + ); + name = AdMob; + path = ../AdNetworkLibs/AdMob; + sourceTree = SOURCE_ROOT; + }; + A6EC5C7510A4D4500091B7F9 /* QuattroWirelessLib */ = { + isa = PBXGroup; + children = ( + A6F55C6A1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */, + A6F55C6B1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a */, + A6EC5C7810A4D4500091B7F9 /* QWAd.h */, + A6EC5C7910A4D4500091B7F9 /* QWAdView.h */, + A6EC5C7A10A4D4500091B7F9 /* QWTestMode.h */, + ); + name = QuattroWirelessLib; + path = ../AdNetworkLibs/QuattroWirelessLib; + sourceTree = SOURCE_ROOT; + }; + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */ = { + isa = PBXGroup; + children = ( + A67F2A601162949700E0278D /* MMAdView.h */, + A6BF7001114B0F9A005C95B8 /* libMMSDK.a */, + ); + name = MillennialMedia; + path = ../AdNetworkLibs/MillennialMedia; + sourceTree = SOURCE_ROOT; + }; + A6EC5C8510A4D52E0091B7F9 /* VEAdFrames.1.0.4_2.2 */ = { + isa = PBXGroup; + children = ( + A6EC5C8610A4D52E0091B7F9 /* ARM */, + A6EC5C8910A4D52E0091B7F9 /* include */, + A6EC5C8C10A4D52E0091B7F9 /* X86 */, + ); + name = VEAdFrames.1.0.4_2.2; + path = ../AdNetworkLibs/VEAdFrames.1.0.4_2.2; + sourceTree = SOURCE_ROOT; + }; + A6EC5C8610A4D52E0091B7F9 /* ARM */ = { + isa = PBXGroup; + children = ( + A6EC5C8810A4D52E0091B7F9 /* libAdFrame-ARM.a */, + ); + path = ARM; + sourceTree = ""; + }; + A6EC5C8910A4D52E0091B7F9 /* include */ = { + isa = PBXGroup; + children = ( + A6EC5C8A10A4D52E0091B7F9 /* AdFrameConstants.h */, + A6EC5C8B10A4D52E0091B7F9 /* AdFrameView.h */, + ); + path = include; + sourceTree = ""; + }; + A6EC5C8C10A4D52E0091B7F9 /* X86 */ = { + isa = PBXGroup; + children = ( + A6EC5C8E10A4D52E0091B7F9 /* libAdFrame-X86.a */, + ); + path = X86; + sourceTree = ""; + }; + A6ED4911114F0131002C57E6 /* TouchJSON */ = { + isa = PBXGroup; + children = ( + A6ED4912114F0131002C57E6 /* CDataScanner.h */, + A6ED4913114F0131002C57E6 /* CDataScanner.m */, + A6ED4914114F0131002C57E6 /* Extensions */, + A6ED491D114F0131002C57E6 /* JSON */, + ); + name = TouchJSON; + path = ../TouchJSON; + sourceTree = SOURCE_ROOT; + }; + A6ED4914114F0131002C57E6 /* Extensions */ = { + isa = PBXGroup; + children = ( + A6ED4915114F0131002C57E6 /* CDataScanner_Extensions.h */, + A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */, + A6ED4917114F0131002C57E6 /* NSCharacterSet_Extensions.h */, + A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */, + A6ED4919114F0131002C57E6 /* NSDictionary_JSONExtensions.h */, + A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */, + A6ED491B114F0131002C57E6 /* NSScanner_Extensions.h */, + A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */, + ); + path = Extensions; + sourceTree = ""; + }; + A6ED491D114F0131002C57E6 /* JSON */ = { + isa = PBXGroup; + children = ( + A6ED491E114F0131002C57E6 /* CJSONDataSerializer.h */, + A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */, + A6ED4920114F0131002C57E6 /* CJSONDeserializer.h */, + A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */, + A6ED4922114F0131002C57E6 /* CJSONScanner.h */, + A6ED4923114F0131002C57E6 /* CJSONScanner.m */, + A6ED4924114F0131002C57E6 /* CJSONSerializer.h */, + A6ED4925114F0131002C57E6 /* CJSONSerializer.m */, + A6ED4926114F0131002C57E6 /* CSerializedJSONData.h */, + A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */, + ); + path = JSON; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AdWhirlSDK2_Sample; + productName = AdWhirlSDK2_Sample; + productReference = 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample-3_x" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */, + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */, + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */, + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */, + A6B0CF2C10ACBD8900B29A14 /* adwhirlsample_icon.png in Resources */, + A630FDAA110FB3E700D6740A /* BottomBannerController.xib in Resources */, + A6A7998D1120D69600A00FD8 /* LocationController.xib in Resources */, + A6F6CC7B1149A8B500DFFFEA /* ModalViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */, + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */, + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */, + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */, + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */, + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */, + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */, + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */, + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */, + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */, + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */, + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */, + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */, + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */, + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */, + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */, + A63C952410A8762800E81577 /* TableController.m in Sources */, + A630FD61110FABAB00D6740A /* BottomBannerController.m in Sources */, + A6A7997D1120D36A00A00FD8 /* LocationController.m in Sources */, + A6B9860E11484CF2001B2F2B /* AdWhirlAdapterAdMob.m in Sources */, + A6B9860F11484CF3001B2F2B /* AdWhirlAdapterJumpTap.m in Sources */, + A6B9861011484CF4001B2F2B /* AdWhirlAdapterMdotM.m in Sources */, + A6B9861111484CF4001B2F2B /* AdWhirlAdapterMillennial.m in Sources */, + A6B9861211484CF5001B2F2B /* AdWhirlAdapterQuattro.m in Sources */, + A6B9861311484CF6001B2F2B /* AdWhirlAdapterVideoEgg.m in Sources */, + A6F6CC7A1149A8B500DFFFEA /* ModalViewController.m in Sources */, + A6ED4928114F0131002C57E6 /* CDataScanner.m in Sources */, + A6ED4929114F0131002C57E6 /* CDataScanner_Extensions.m in Sources */, + A6ED492A114F0131002C57E6 /* NSCharacterSet_Extensions.m in Sources */, + A6ED492B114F0131002C57E6 /* NSDictionary_JSONExtensions.m in Sources */, + A6ED492C114F0131002C57E6 /* NSScanner_Extensions.m in Sources */, + A6ED492D114F0131002C57E6 /* CJSONDataSerializer.m in Sources */, + A6ED492E114F0131002C57E6 /* CJSONDeserializer.m in Sources */, + A6ED492F114F0131002C57E6 /* CJSONScanner.m in Sources */, + A6ED4930114F0131002C57E6 /* CJSONSerializer.m in Sources */, + A6ED4931114F0131002C57E6 /* CSerializedJSONData.m in Sources */, + A62A0D36118F7D810013A568 /* AdWhirlAdapterEvent.m in Sources */, + A615C26A11B5DD3F00E0C50F /* AdWhirlAdapterGoogleAdSense.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/AdMob\"", + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/ARM\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/X86\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi/$(IPHONEOS_DEPLOYMENT_TARGET)/$(PLATFORM_NAME)\"", + "\"$(SRCROOT)/../AdNetworkLibs/GoogleAdSense\"", + ); + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/AdMob\"", + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/ARM\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames.1.0.4_2.2/X86\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi/$(IPHONEOS_DEPLOYMENT_TARGET)/$(PLATFORM_NAME)\"", + "\"$(SRCROOT)/../AdNetworkLibs/GoogleAdSense\"", + ); + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = "ADWHIRL_DEBUG=1"; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = ""; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = ""; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample-3_x" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-Info.plist b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-Info.plist new file mode 100644 index 000000000..cbc4dc828 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample-Info.plist @@ -0,0 +1,43 @@ + + + + + UIInterfaceOrientation + UIInterfaceOrientationPortrait + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + adwhirlsample_icon.png + CFBundleIconFiles + + adwhirlsample_icon.png + adwhirlsample_icon@2x.png + + CFBundleIdentifier + com.adwhirl.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + MMediaLocationAware + + MMediaDefaultEmbedWebView + + UIPrerenderedIcon + + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample.xcodeproj/project.pbxproj b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample.xcodeproj/project.pbxproj new file mode 100755 index 000000000..a0129e9d6 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample.xcodeproj/project.pbxproj @@ -0,0 +1,948 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1B183AA81211C7C60026647E /* UIColor+AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B183AA71211C7C60026647E /* UIColor+AdWhirlConfig.m */; }; + 1B3FC6ED11EB954700C890D2 /* libGreystripeSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B3FC6EC11EB954700C890D2 /* libGreystripeSDK.a */; }; + 1B42692511FE258400910F21 /* jtUniversalLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B42692411FE258400910F21 /* jtUniversalLib.a */; }; + 1B42692611FE25A500910F21 /* AdWhirlAdapterJumpTap.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */; }; + 1B6898DD120C916A0080EAC1 /* AdWhirlClassWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6898DC120C916A0080EAC1 /* AdWhirlClassWrapper.m */; }; + 1B6CE7CA121498DA00E44A28 /* AdWhirlConfigStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6CE7C9121498DA00E44A28 /* AdWhirlConfigStore.m */; }; + 1B6CE8921214AA6A00E44A28 /* AWNetworkReachabilityWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6CE8911214AA6A00E44A28 /* AWNetworkReachabilityWrapper.m */; }; + 1B7CC26C11EFB400004F4937 /* AdWhirlAdapterMillennial.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */; }; + 1B7CC26D11EFB403004F4937 /* AdWhirlAdapterVideoEgg.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */; }; + 1B7CC27411EFB42C004F4937 /* libAdFrame.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B7CC27311EFB42C004F4937 /* libAdFrame.a */; }; + 1B7CC27511EFB44C004F4937 /* libMMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A6BF7001114B0F9A005C95B8 /* libMMSDK.a */; }; + 1B8B5F0F11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B8B5F0E11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.m */; }; + 1B8B5F1811E7EEDF002762E3 /* libZestADZ.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B8B5F1511E7EEDF002762E3 /* libZestADZ.a */; }; + 1B91B4B71255596900C665F7 /* AdWhirlAdapterInMobi.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B91B4B61255596900C665F7 /* AdWhirlAdapterInMobi.m */; }; + 1BF8DFD111EB855100C2284D /* AdWhirlAdapterGreystripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF8DFD011EB855100C2284D /* AdWhirlAdapterGreystripe.m */; }; + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 204AE1CF141984A50043AA76 /* libNexageSDK-Lite.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 204AE1CE141984A50043AA76 /* libNexageSDK-Lite.a */; }; + 20840DAA13CE56780029064C /* libInMobi_iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20840DA913CE56780029064C /* libInMobi_iOS.a */; }; + 20B2547313A03F8300F33931 /* AdWhirlAdapterNexage.m in Sources */ = {isa = PBXBuildFile; fileRef = 20B2547213A03F8300F33931 /* AdWhirlAdapterNexage.m */; }; + 20F28CE013B00F87006C724A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20F28CDF13B00F87006C724A /* CFNetwork.framework */; }; + 20F28CE213B00FD5006C724A /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20F28CE113B00FD5006C724A /* MobileCoreServices.framework */; }; + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* RootViewController.xib */; }; + 6B42360512EA0D41001F5395 /* AdWhirlAdapterOneRiot.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B42360412EA0D41001F5395 /* AdWhirlAdapterOneRiot.m */; }; + 6B42369012EA29EB001F5395 /* libOneRiot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B42368F12EA29EB001F5395 /* libOneRiot.a */; }; + 6B629D491332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B629D481332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.m */; }; + 6B629D5E1332BC21000D019C /* libGoogleAdMobAds.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B629D5D1332BC21000D019C /* libGoogleAdMobAds.a */; }; + A6051FF011C7DF6600451D6F /* AdWhirlAdapterIAd.m in Sources */ = {isa = PBXBuildFile; fileRef = A6051FEF11C7DF6600451D6F /* AdWhirlAdapterIAd.m */; }; + A605200A11C7DF8400451D6F /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A605200911C7DF8400451D6F /* iAd.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + A605201311C7E20400451D6F /* AdWhirlAdapterMdotM.m in Sources */ = {isa = PBXBuildFile; fileRef = A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */; }; + A61E1BA711B6213700D0DD65 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A61E1BA611B6213700D0DD65 /* AVFoundation.framework */; }; + A61F580C110F698700444E50 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A61F580B110F698700444E50 /* AudioToolbox.framework */; }; + A62A0D36118F7D810013A568 /* AdWhirlAdapterEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */; }; + A630FD61110FABAB00D6740A /* BottomBannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = A630FD5F110FABAB00D6740A /* BottomBannerController.m */; }; + A630FDAA110FB3E700D6740A /* BottomBannerController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A630FDA9110FB3E700D6740A /* BottomBannerController.xib */; }; + A6392A3211C9777500459FD4 /* adwhirlsample_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A6392A3111C9777500459FD4 /* adwhirlsample_icon@2x.png */; }; + A63C952410A8762800E81577 /* TableController.m in Sources */ = {isa = PBXBuildFile; fileRef = A63C952210A8762800E81577 /* TableController.m */; }; + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A63C952610A8CCFF00E81577 /* TableController.xib */; }; + A6A7997D1120D36A00A00FD8 /* LocationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6A7997C1120D36A00A00FD8 /* LocationController.m */; }; + A6A7998D1120D69600A00FD8 /* LocationController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6A7998C1120D69600A00FD8 /* LocationController.xib */; }; + A6B0CF2C10ACBD8900B29A14 /* adwhirlsample_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */; }; + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */; }; + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */; }; + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */; }; + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */; }; + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */; }; + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */; }; + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */; }; + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */; }; + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */; }; + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */; }; + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */; }; + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */; }; + A6EC5BDC10A4C3150091B7F9 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */; }; + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */; }; + A6EC5BF310A4C3400091B7F9 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */; }; + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */; }; + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */; }; + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */; }; + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EC5C5210A4C4470091B7F9 /* libz.dylib */; }; + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */; }; + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */; }; + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */; }; + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */; }; + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */; }; + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */; }; + A6ED4928114F0131002C57E6 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4913114F0131002C57E6 /* CDataScanner.m */; }; + A6ED4929114F0131002C57E6 /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */; }; + A6ED492A114F0131002C57E6 /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */; }; + A6ED492B114F0131002C57E6 /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */; }; + A6ED492C114F0131002C57E6 /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */; }; + A6ED492D114F0131002C57E6 /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */; }; + A6ED492E114F0131002C57E6 /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */; }; + A6ED492F114F0131002C57E6 /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4923114F0131002C57E6 /* CJSONScanner.m */; }; + A6ED4930114F0131002C57E6 /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4925114F0131002C57E6 /* CJSONSerializer.m */; }; + A6ED4931114F0131002C57E6 /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */; }; + A6F6CC7A1149A8B500DFFFEA /* ModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6F6CC781149A8B500DFFFEA /* ModalViewController.m */; }; + A6F6CC7B1149A8B500DFFFEA /* ModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1B183AA61211C7C60026647E /* UIColor+AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+AdWhirlConfig.h"; sourceTree = ""; }; + 1B183AA71211C7C60026647E /* UIColor+AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AdWhirlConfig.m"; sourceTree = ""; }; + 1B1973FD12415A1B0083FB36 /* AWNetworkReachabilityDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityDelegate.h; sourceTree = ""; }; + 1B3FC6E911EB954700C890D2 /* GreystripeDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GreystripeDelegate.h; sourceTree = ""; }; + 1B3FC6EA11EB954700C890D2 /* GSAdEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GSAdEngine.h; sourceTree = ""; }; + 1B3FC6EB11EB954700C890D2 /* GSAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GSAdView.h; sourceTree = ""; }; + 1B3FC6EC11EB954700C890D2 /* libGreystripeSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGreystripeSDK.a; sourceTree = ""; }; + 1B42692411FE258400910F21 /* jtUniversalLib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = jtUniversalLib.a; sourceTree = ""; }; + 1B6898DB120C916A0080EAC1 /* AdWhirlClassWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlClassWrapper.h; sourceTree = ""; }; + 1B6898DC120C916A0080EAC1 /* AdWhirlClassWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlClassWrapper.m; sourceTree = ""; }; + 1B6CE7C8121498DA00E44A28 /* AdWhirlConfigStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfigStore.h; sourceTree = ""; }; + 1B6CE7C9121498DA00E44A28 /* AdWhirlConfigStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigStore.m; sourceTree = ""; }; + 1B6CE8901214AA6A00E44A28 /* AWNetworkReachabilityWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityWrapper.h; sourceTree = ""; }; + 1B6CE8911214AA6A00E44A28 /* AWNetworkReachabilityWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AWNetworkReachabilityWrapper.m; sourceTree = ""; }; + 1B7CC27111EFB42C004F4937 /* AdFrameConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameConstants.h; sourceTree = ""; }; + 1B7CC27211EFB42C004F4937 /* AdFrameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdFrameView.h; sourceTree = ""; }; + 1B7CC27311EFB42C004F4937 /* libAdFrame.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAdFrame.a; sourceTree = ""; }; + 1B8B5F0D11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterZestADZ.h; sourceTree = ""; }; + 1B8B5F0E11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterZestADZ.m; sourceTree = ""; }; + 1B8B5F1511E7EEDF002762E3 /* libZestADZ.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libZestADZ.a; sourceTree = ""; }; + 1B8B5F1611E7EEDF002762E3 /* ZestadzDelegateProtocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZestadzDelegateProtocal.h; sourceTree = ""; }; + 1B8B5F1711E7EEDF002762E3 /* ZestadzView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZestadzView.h; sourceTree = ""; }; + 1B91B4B51255596900C665F7 /* AdWhirlAdapterInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterInMobi.h; sourceTree = ""; }; + 1B91B4B61255596900C665F7 /* AdWhirlAdapterInMobi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterInMobi.m; sourceTree = ""; }; + 1BF8DFCF11EB855100C2284D /* AdWhirlAdapterGreystripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGreystripe.h; sourceTree = ""; }; + 1BF8DFD011EB855100C2284D /* AdWhirlAdapterGreystripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGreystripe.m; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_SampleAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlSDK2_SampleAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdWhirlSDK2.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 204AE1CE141984A50043AA76 /* libNexageSDK-Lite.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libNexageSDK-Lite.a"; sourceTree = ""; }; + 20840DA913CE56780029064C /* libInMobi_iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libInMobi_iOS.a; sourceTree = ""; }; + 20B2547113A03F8300F33931 /* AdWhirlAdapterNexage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterNexage.h; sourceTree = ""; }; + 20B2547213A03F8300F33931 /* AdWhirlAdapterNexage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterNexage.m; sourceTree = ""; }; + 20ED534C14687FD20080D52D /* IMAdError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMAdError.h; sourceTree = ""; }; + 20ED534D14687FD20080D52D /* IMAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMAdView.h; sourceTree = ""; }; + 20ED534E14687FD20080D52D /* IMAdDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMAdDelegate.h; sourceTree = ""; }; + 20ED534F14687FD20080D52D /* IMSDKUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMSDKUtil.h; sourceTree = ""; }; + 20ED535014687FD20080D52D /* IMAdRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMAdRequest.h; sourceTree = ""; }; + 20F28C7113AC30BB006C724A /* NexageAdParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NexageAdParameters.h; sourceTree = ""; }; + 20F28C7213AC30BB006C724A /* NexageAdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NexageAdViewController.h; sourceTree = ""; }; + 20F28C7313AC30BB006C724A /* NexageDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NexageDelegateProtocol.h; sourceTree = ""; }; + 20F28CDF13B00F87006C724A /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 20F28CE113B00FD5006C724A /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlSDK2_Sample_Prefix.pch; sourceTree = ""; }; + 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; + 28F335F01007B36200424DE2 /* RootViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 6B42360312EA0D41001F5395 /* AdWhirlAdapterOneRiot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterOneRiot.h; sourceTree = ""; }; + 6B42360412EA0D41001F5395 /* AdWhirlAdapterOneRiot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterOneRiot.m; sourceTree = ""; }; + 6B42365812EA16FE001F5395 /* OneRiotAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OneRiotAd.h; path = ../AdNetworkLibs/OneRiot/OneRiotAd.h; sourceTree = ""; }; + 6B42368F12EA29EB001F5395 /* libOneRiot.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOneRiot.a; path = ../AdNetworkLibs/OneRiot/libOneRiot.a; sourceTree = ""; }; + 6B629D471332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGoogleAdMobAds.h; sourceTree = ""; }; + 6B629D481332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGoogleAdMobAds.m; sourceTree = ""; }; + 6B629D511332BAB9000D019C /* GADBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADBannerView.h; sourceTree = ""; }; + 6B629D521332BAB9000D019C /* GADBannerViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADBannerViewDelegate.h; sourceTree = ""; }; + 6B629D531332BAB9000D019C /* GADInterstitial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADInterstitial.h; sourceTree = ""; }; + 6B629D541332BAB9000D019C /* GADInterstitialDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADInterstitialDelegate.h; sourceTree = ""; }; + 6B629D551332BAB9000D019C /* GADRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADRequest.h; sourceTree = ""; }; + 6B629D561332BAB9000D019C /* GADRequestError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GADRequestError.h; sourceTree = ""; }; + 6B629D5D1332BC21000D019C /* libGoogleAdMobAds.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAdMobAds.a; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AdWhirlSDK2_Sample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A6051FEE11C7DF6600451D6F /* AdWhirlAdapterIAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterIAd.h; sourceTree = ""; }; + A6051FEF11C7DF6600451D6F /* AdWhirlAdapterIAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterIAd.m; sourceTree = ""; }; + A605200911C7DF8400451D6F /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; + A61E1BA611B6213700D0DD65 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A61F580B110F698700444E50 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A62A0D34118F7D810013A568 /* AdWhirlAdapterEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterEvent.h; sourceTree = ""; }; + A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterEvent.m; sourceTree = ""; }; + A630FD5E110FABAB00D6740A /* BottomBannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomBannerController.h; sourceTree = ""; }; + A630FD5F110FABAB00D6740A /* BottomBannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomBannerController.m; sourceTree = ""; }; + A630FDA9110FB3E700D6740A /* BottomBannerController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BottomBannerController.xib; sourceTree = ""; }; + A6392A3111C9777500459FD4 /* adwhirlsample_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "adwhirlsample_icon@2x.png"; sourceTree = ""; }; + A63C952110A8762800E81577 /* TableController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableController.h; sourceTree = ""; }; + A63C952210A8762800E81577 /* TableController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableController.m; sourceTree = ""; }; + A63C952610A8CCFF00E81577 /* TableController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableController.xib; sourceTree = ""; }; + A63C959610A8D6C000E81577 /* SampleConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleConstants.h; sourceTree = ""; }; + A67869C41121E5C1008E55E8 /* JTAdWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JTAdWidget.h; sourceTree = ""; }; + A67869C51121E5C1008E55E8 /* JumpTapAppReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpTapAppReport.h; sourceTree = ""; }; + A67F2A601162949700E0278D /* MMAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMAdView.h; sourceTree = ""; }; + A6A7997B1120D36A00A00FD8 /* LocationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationController.h; sourceTree = ""; }; + A6A7997C1120D36A00A00FD8 /* LocationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationController.m; sourceTree = ""; }; + A6A7998C1120D69600A00FD8 /* LocationController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LocationController.xib; sourceTree = ""; }; + A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = adwhirlsample_icon.png; sourceTree = ""; }; + A6BF7001114B0F9A005C95B8 /* libMMSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libMMSDK.a; sourceTree = ""; }; + A6CB6843110E3B6800B24288 /* AdWhirlAdapterMdotM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMdotM.h; sourceTree = ""; }; + A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMdotM.m; sourceTree = ""; }; + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkAdapter.h; sourceTree = ""; }; + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlDelegateProtocol.h; sourceTree = ""; }; + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlView.h; sourceTree = ""; }; + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkConfig.h; sourceTree = ""; }; + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfig.m; sourceTree = ""; }; + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkRegistry.h; sourceTree = ""; }; + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkRegistry.m; sourceTree = ""; }; + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfig.h; sourceTree = ""; }; + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfig.m; sourceTree = ""; }; + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlCustomAdView.h; sourceTree = ""; }; + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlCustomAdView.m; sourceTree = ""; }; + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlError.h; sourceTree = ""; }; + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlError.m; sourceTree = ""; }; + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlLog.h; sourceTree = ""; }; + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlLog.m; sourceTree = ""; }; + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlView+.h"; sourceTree = ""; }; + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlView.m; sourceTree = ""; }; + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdWhirlWebBrowser.xib; sourceTree = ""; }; + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlWebBrowserController.h; sourceTree = ""; }; + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlWebBrowserController.m; sourceTree = ""; }; + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRollerView.m; sourceTree = ""; }; + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerProtocol.h; sourceTree = ""; }; + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerView.h; sourceTree = ""; }; + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; + A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + A6EC5C5210A4C4470091B7F9 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterJumpTap.h; sourceTree = ""; }; + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterJumpTap.m; sourceTree = ""; }; + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMillennial.h; sourceTree = ""; }; + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMillennial.m; sourceTree = ""; }; + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterQuattro.h; sourceTree = ""; }; + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterQuattro.m; sourceTree = ""; }; + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterVideoEgg.h; sourceTree = ""; }; + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterVideoEgg.m; sourceTree = ""; }; + A6EC5C7810A4D4500091B7F9 /* QWAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAd.h; sourceTree = ""; }; + A6EC5C7910A4D4500091B7F9 /* QWAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWAdView.h; sourceTree = ""; }; + A6EC5C7A10A4D4500091B7F9 /* QWTestMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QWTestMode.h; sourceTree = ""; }; + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterCustom.h; sourceTree = ""; }; + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterCustom.m; sourceTree = ""; }; + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGeneric.h; sourceTree = ""; }; + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGeneric.m; sourceTree = ""; }; + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkAdapter.m; sourceTree = ""; }; + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlAdNetworkAdapter+Helpers.h"; sourceTree = ""; }; + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AdWhirlAdNetworkAdapter+Helpers.m"; sourceTree = ""; }; + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleViewController.h; sourceTree = ""; }; + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleViewController.m; sourceTree = ""; }; + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SimpleViewController.xib; sourceTree = ""; }; + A6ED4912114F0131002C57E6 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = ""; }; + A6ED4913114F0131002C57E6 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = ""; }; + A6ED4915114F0131002C57E6 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = ""; }; + A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = ""; }; + A6ED4917114F0131002C57E6 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = ""; }; + A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = ""; }; + A6ED4919114F0131002C57E6 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = ""; }; + A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = ""; }; + A6ED491B114F0131002C57E6 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = ""; }; + A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = ""; }; + A6ED491E114F0131002C57E6 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = ""; }; + A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = ""; }; + A6ED4920114F0131002C57E6 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = ""; }; + A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = ""; }; + A6ED4922114F0131002C57E6 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = ""; }; + A6ED4923114F0131002C57E6 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = ""; }; + A6ED4924114F0131002C57E6 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = ""; }; + A6ED4925114F0131002C57E6 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = ""; }; + A6ED4926114F0131002C57E6 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = ""; }; + A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = ""; }; + A6F55C6A1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless-Simulator3.1.0-os3.0.a"; sourceTree = ""; }; + A6F55C6B1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libQuattroWireless3.1.0-os3.0.a"; sourceTree = ""; }; + A6F6CC771149A8B500DFFFEA /* ModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModalViewController.h; sourceTree = ""; }; + A6F6CC781149A8B500DFFFEA /* ModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalViewController.m; sourceTree = ""; }; + A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModalViewController.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 20F28CE213B00FD5006C724A /* MobileCoreServices.framework in Frameworks */, + 20F28CE013B00F87006C724A /* CFNetwork.framework in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, + A6EC5BA710A4B18F0091B7F9 /* CoreLocation.framework in Frameworks */, + A6EC5BCD10A4C30D0091B7F9 /* AddressBook.framework in Frameworks */, + A6EC5BDC10A4C3150091B7F9 /* MapKit.framework in Frameworks */, + A6EC5BE510A4C31C0091B7F9 /* MediaPlayer.framework in Frameworks */, + A6EC5BF310A4C3400091B7F9 /* MessageUI.framework in Frameworks */, + A6EC5BF810A4C3460091B7F9 /* QuartzCore.framework in Frameworks */, + A6EC5C0B10A4C34F0091B7F9 /* SystemConfiguration.framework in Frameworks */, + A6EC5C4F10A4C43F0091B7F9 /* libsqlite3.dylib in Frameworks */, + A6EC5C5310A4C4470091B7F9 /* libz.dylib in Frameworks */, + A61F580C110F698700444E50 /* AudioToolbox.framework in Frameworks */, + A61E1BA711B6213700D0DD65 /* AVFoundation.framework in Frameworks */, + A605200A11C7DF8400451D6F /* iAd.framework in Frameworks */, + 1B8B5F1811E7EEDF002762E3 /* libZestADZ.a in Frameworks */, + 1B3FC6ED11EB954700C890D2 /* libGreystripeSDK.a in Frameworks */, + 1B7CC27411EFB42C004F4937 /* libAdFrame.a in Frameworks */, + 1B7CC27511EFB44C004F4937 /* libMMSDK.a in Frameworks */, + 1B42692511FE258400910F21 /* jtUniversalLib.a in Frameworks */, + 6B42369012EA29EB001F5395 /* libOneRiot.a in Frameworks */, + 6B629D5E1332BC21000D019C /* libGoogleAdMobAds.a in Frameworks */, + 20840DAA13CE56780029064C /* libInMobi_iOS.a in Frameworks */, + 204AE1CF141984A50043AA76 /* libNexageSDK-Lite.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 28C286DF0D94DF7D0034E888 /* RootViewController.h */, + 28C286E00D94DF7D0034E888 /* RootViewController.m */, + 1D3623240D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.h */, + 1D3623250D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m */, + A6EC5D1710A4EB710091B7F9 /* SimpleViewController.h */, + A6EC5D1810A4EB710091B7F9 /* SimpleViewController.m */, + A63C952110A8762800E81577 /* TableController.h */, + A63C952210A8762800E81577 /* TableController.m */, + A63C959610A8D6C000E81577 /* SampleConstants.h */, + A630FD5E110FABAB00D6740A /* BottomBannerController.h */, + A630FD5F110FABAB00D6740A /* BottomBannerController.m */, + A6A7997B1120D36A00A00FD8 /* LocationController.h */, + A6A7997C1120D36A00A00FD8 /* LocationController.m */, + A6F6CC771149A8B500DFFFEA /* ModalViewController.h */, + A6F6CC781149A8B500DFFFEA /* ModalViewController.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */, + ); + name = Products; + sourceTree = ""; + }; + 1B3FC6E811EB954700C890D2 /* Greystripe */ = { + isa = PBXGroup; + children = ( + 1B3FC6E911EB954700C890D2 /* GreystripeDelegate.h */, + 1B3FC6EA11EB954700C890D2 /* GSAdEngine.h */, + 1B3FC6EB11EB954700C890D2 /* GSAdView.h */, + 1B3FC6EC11EB954700C890D2 /* libGreystripeSDK.a */, + ); + name = Greystripe; + path = ../AdNetworkLibs/Greystripe; + sourceTree = SOURCE_ROOT; + }; + 1B7CC26F11EFB42C004F4937 /* VEAdFrames */ = { + isa = PBXGroup; + children = ( + 1B7CC27011EFB42C004F4937 /* include */, + 1B7CC27311EFB42C004F4937 /* libAdFrame.a */, + ); + name = VEAdFrames; + path = ../AdNetworkLibs/VEAdFrames; + sourceTree = SOURCE_ROOT; + }; + 1B7CC27011EFB42C004F4937 /* include */ = { + isa = PBXGroup; + children = ( + 1B7CC27111EFB42C004F4937 /* AdFrameConstants.h */, + 1B7CC27211EFB42C004F4937 /* AdFrameView.h */, + ); + path = include; + sourceTree = ""; + }; + 1B8B5F1411E7EEDF002762E3 /* ZestADZ */ = { + isa = PBXGroup; + children = ( + 1B8B5F1511E7EEDF002762E3 /* libZestADZ.a */, + 1B8B5F1611E7EEDF002762E3 /* ZestadzDelegateProtocal.h */, + 1B8B5F1711E7EEDF002762E3 /* ZestadzView.h */, + ); + name = ZestADZ; + path = ../AdNetworkLibs/ZestADZ; + sourceTree = SOURCE_ROOT; + }; + 1B91B4AD125557F600C665F7 /* InMobi */ = { + isa = PBXGroup; + children = ( + 20ED534C14687FD20080D52D /* IMAdError.h */, + 20ED534D14687FD20080D52D /* IMAdView.h */, + 20ED534E14687FD20080D52D /* IMAdDelegate.h */, + 20ED534F14687FD20080D52D /* IMSDKUtil.h */, + 20ED535014687FD20080D52D /* IMAdRequest.h */, + 20840DA913CE56780029064C /* libInMobi_iOS.a */, + ); + name = InMobi; + path = ../AdNetworkLibs/InMobi; + sourceTree = SOURCE_ROOT; + }; + 20F28C4513AC2FFC006C724A /* Nexage */ = { + isa = PBXGroup; + children = ( + 204AE1CE141984A50043AA76 /* libNexageSDK-Lite.a */, + 20F28C7013AC30BB006C724A /* includes */, + ); + name = Nexage; + path = ../AdNetworkLibs/Nexage; + sourceTree = SOURCE_ROOT; + }; + 20F28C7013AC30BB006C724A /* includes */ = { + isa = PBXGroup; + children = ( + 20F28C7113AC30BB006C724A /* NexageAdParameters.h */, + 20F28C7213AC30BB006C724A /* NexageAdViewController.h */, + 20F28C7313AC30BB006C724A /* NexageDelegateProtocol.h */, + ); + path = includes; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */, + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */, + A6ED4911114F0131002C57E6 /* TouchJSON */, + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 28A0AAE50D9B0CCF005BE974 /* AdWhirlSDK2_Sample_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + A6A7998C1120D69600A00FD8 /* LocationController.xib */, + A6B0CF2B10ACBD8900B29A14 /* adwhirlsample_icon.png */, + A6392A3111C9777500459FD4 /* adwhirlsample_icon@2x.png */, + A63C952610A8CCFF00E81577 /* TableController.xib */, + A6EC5D2D10A4EBAB0091B7F9 /* SimpleViewController.xib */, + A630FDA9110FB3E700D6740A /* BottomBannerController.xib */, + 28F335F01007B36200424DE2 /* RootViewController.xib */, + A6F6CC791149A8B500DFFFEA /* ModalViewController.xib */, + 28AD735F0D9D9599002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* AdWhirlSDK2_Sample-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 20F28CE113B00FD5006C724A /* MobileCoreServices.framework */, + 20F28CDF13B00F87006C724A /* CFNetwork.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, + A61E1BA611B6213700D0DD65 /* AVFoundation.framework */, + A6EC5BA610A4B18F0091B7F9 /* CoreLocation.framework */, + A6EC5BCC10A4C30D0091B7F9 /* AddressBook.framework */, + A61F580B110F698700444E50 /* AudioToolbox.framework */, + A6EC5BDB10A4C3150091B7F9 /* MapKit.framework */, + A6EC5BE410A4C31C0091B7F9 /* MediaPlayer.framework */, + A6EC5BF210A4C3400091B7F9 /* MessageUI.framework */, + A6EC5BF710A4C3460091B7F9 /* QuartzCore.framework */, + A6EC5C0A10A4C34F0091B7F9 /* SystemConfiguration.framework */, + A605200911C7DF8400451D6F /* iAd.framework */, + A6EC5C4E10A4C43F0091B7F9 /* libsqlite3.dylib */, + A6EC5C5210A4C4470091B7F9 /* libz.dylib */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6B42365712EA16EE001F5395 /* OneRiot */ = { + isa = PBXGroup; + children = ( + 6B42365812EA16FE001F5395 /* OneRiotAd.h */, + 6B42368F12EA29EB001F5395 /* libOneRiot.a */, + ); + name = OneRiot; + sourceTree = SOURCE_ROOT; + }; + 6B629D501332BAB9000D019C /* Google */ = { + isa = PBXGroup; + children = ( + 6B629D511332BAB9000D019C /* GADBannerView.h */, + 6B629D521332BAB9000D019C /* GADBannerViewDelegate.h */, + 6B629D531332BAB9000D019C /* GADInterstitial.h */, + 6B629D541332BAB9000D019C /* GADInterstitialDelegate.h */, + 6B629D551332BAB9000D019C /* GADRequest.h */, + 6B629D561332BAB9000D019C /* GADRequestError.h */, + 6B629D5D1332BC21000D019C /* libGoogleAdMobAds.a */, + ); + name = Google; + path = ../AdNetworkLibs/Google; + sourceTree = SOURCE_ROOT; + }; + A67869B91121E5C1008E55E8 /* JumptapApi */ = { + isa = PBXGroup; + children = ( + 1B42692411FE258400910F21 /* jtUniversalLib.a */, + A67869C41121E5C1008E55E8 /* JTAdWidget.h */, + A67869C51121E5C1008E55E8 /* JumpTapAppReport.h */, + ); + name = JumptapApi; + path = ../AdNetworkLibs/JumptapApi; + sourceTree = SOURCE_ROOT; + }; + A6EC5B3C10A4B0C60091B7F9 /* AdWhirl */ = { + isa = PBXGroup; + children = ( + A6EC5B3D10A4B0C60091B7F9 /* adapters */, + A6EC5B5210A4B0C60091B7F9 /* AdWhirlDelegateProtocol.h */, + A6EC5B5310A4B0C60091B7F9 /* AdWhirlView.h */, + A6EC5B5410A4B0C60091B7F9 /* internal */, + A6EC5B6710A4B0C60091B7F9 /* legacy */, + ); + name = AdWhirl; + path = ../AdWhirl; + sourceTree = SOURCE_ROOT; + }; + A6EC5B3D10A4B0C60091B7F9 /* adapters */ = { + isa = PBXGroup; + children = ( + 6B629D471332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.h */, + 6B629D481332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.m */, + 1BF8DFCF11EB855100C2284D /* AdWhirlAdapterGreystripe.h */, + 1BF8DFD011EB855100C2284D /* AdWhirlAdapterGreystripe.m */, + A6051FEE11C7DF6600451D6F /* AdWhirlAdapterIAd.h */, + A6051FEF11C7DF6600451D6F /* AdWhirlAdapterIAd.m */, + 1B91B4B51255596900C665F7 /* AdWhirlAdapterInMobi.h */, + 1B91B4B61255596900C665F7 /* AdWhirlAdapterInMobi.m */, + A6EC5C5610A4C9900091B7F9 /* AdWhirlAdapterJumpTap.h */, + A6EC5C5710A4C9900091B7F9 /* AdWhirlAdapterJumpTap.m */, + A6CB6843110E3B6800B24288 /* AdWhirlAdapterMdotM.h */, + A6CB6844110E3B6800B24288 /* AdWhirlAdapterMdotM.m */, + A6EC5C5810A4C9900091B7F9 /* AdWhirlAdapterMillennial.h */, + A6EC5C5910A4C9900091B7F9 /* AdWhirlAdapterMillennial.m */, + 20B2547113A03F8300F33931 /* AdWhirlAdapterNexage.h */, + 20B2547213A03F8300F33931 /* AdWhirlAdapterNexage.m */, + 6B42360312EA0D41001F5395 /* AdWhirlAdapterOneRiot.h */, + 6B42360412EA0D41001F5395 /* AdWhirlAdapterOneRiot.m */, + A6EC5C5A10A4C9900091B7F9 /* AdWhirlAdapterQuattro.h */, + A6EC5C5B10A4C9900091B7F9 /* AdWhirlAdapterQuattro.m */, + A6EC5C5C10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.h */, + A6EC5C5D10A4C9900091B7F9 /* AdWhirlAdapterVideoEgg.m */, + 1B8B5F0D11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.h */, + 1B8B5F0E11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.m */, + A6EC5B5010A4B0C60091B7F9 /* AdWhirlAdNetworkAdapter.h */, + ); + path = adapters; + sourceTree = ""; + }; + A6EC5B5410A4B0C60091B7F9 /* internal */ = { + isa = PBXGroup; + children = ( + 1B6898DB120C916A0080EAC1 /* AdWhirlClassWrapper.h */, + 1B6898DC120C916A0080EAC1 /* AdWhirlClassWrapper.m */, + A62A0D34118F7D810013A568 /* AdWhirlAdapterEvent.h */, + A62A0D35118F7D810013A568 /* AdWhirlAdapterEvent.m */, + A6EC5CB210A4DCA00091B7F9 /* AdWhirlAdapterCustom.h */, + A6EC5CB310A4DCA00091B7F9 /* AdWhirlAdapterCustom.m */, + A6EC5CB410A4DCA00091B7F9 /* AdWhirlAdapterGeneric.h */, + A6EC5CB510A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m */, + A6EC5CB610A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m */, + A6EC5CB710A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.h */, + A6EC5CB810A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m */, + A6EC5B5510A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.h */, + A6EC5B5610A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m */, + A6EC5B5710A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.h */, + A6EC5B5810A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m */, + A6EC5B5910A4B0C60091B7F9 /* AdWhirlConfig.h */, + A6EC5B5A10A4B0C60091B7F9 /* AdWhirlConfig.m */, + A6EC5B5B10A4B0C60091B7F9 /* AdWhirlCustomAdView.h */, + A6EC5B5C10A4B0C60091B7F9 /* AdWhirlCustomAdView.m */, + A6EC5B5D10A4B0C60091B7F9 /* AdWhirlError.h */, + A6EC5B5E10A4B0C60091B7F9 /* AdWhirlError.m */, + A6EC5B5F10A4B0C60091B7F9 /* AdWhirlLog.h */, + A6EC5B6010A4B0C60091B7F9 /* AdWhirlLog.m */, + A6EC5B6110A4B0C60091B7F9 /* AdWhirlView+.h */, + A6EC5B6210A4B0C60091B7F9 /* AdWhirlView.m */, + A6EC5B6310A4B0C60091B7F9 /* AdWhirlWebBrowser.xib */, + A6EC5B6410A4B0C60091B7F9 /* AdWhirlWebBrowserController.h */, + A6EC5B6510A4B0C60091B7F9 /* AdWhirlWebBrowserController.m */, + A6EC5B6610A4B0C60091B7F9 /* ARRollerView.m */, + 1B183AA61211C7C60026647E /* UIColor+AdWhirlConfig.h */, + 1B183AA71211C7C60026647E /* UIColor+AdWhirlConfig.m */, + 1B6CE7C8121498DA00E44A28 /* AdWhirlConfigStore.h */, + 1B6CE7C9121498DA00E44A28 /* AdWhirlConfigStore.m */, + 1B6CE8901214AA6A00E44A28 /* AWNetworkReachabilityWrapper.h */, + 1B6CE8911214AA6A00E44A28 /* AWNetworkReachabilityWrapper.m */, + 1B1973FD12415A1B0083FB36 /* AWNetworkReachabilityDelegate.h */, + ); + path = internal; + sourceTree = ""; + }; + A6EC5B6710A4B0C60091B7F9 /* legacy */ = { + isa = PBXGroup; + children = ( + A6EC5B6810A4B0C60091B7F9 /* ARRollerProtocol.h */, + A6EC5B6910A4B0C60091B7F9 /* ARRollerView.h */, + ); + path = legacy; + sourceTree = ""; + }; + A6EC5C6310A4C9A50091B7F9 /* AdNetworkLibs */ = { + isa = PBXGroup; + children = ( + 20F28C4513AC2FFC006C724A /* Nexage */, + 6B629D501332BAB9000D019C /* Google */, + 1B3FC6E811EB954700C890D2 /* Greystripe */, + 1B91B4AD125557F600C665F7 /* InMobi */, + A67869B91121E5C1008E55E8 /* JumptapApi */, + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */, + 6B42365712EA16EE001F5395 /* OneRiot */, + A6EC5C7510A4D4500091B7F9 /* QuattroWirelessLib */, + 1B7CC26F11EFB42C004F4937 /* VEAdFrames */, + 1B8B5F1411E7EEDF002762E3 /* ZestADZ */, + ); + name = AdNetworkLibs; + sourceTree = ""; + }; + A6EC5C7510A4D4500091B7F9 /* QuattroWirelessLib */ = { + isa = PBXGroup; + children = ( + A6F55C6A1121CB260062F368 /* libQuattroWireless-Simulator3.1.0-os3.0.a */, + A6F55C6B1121CB260062F368 /* libQuattroWireless3.1.0-os3.0.a */, + A6EC5C7810A4D4500091B7F9 /* QWAd.h */, + A6EC5C7910A4D4500091B7F9 /* QWAdView.h */, + A6EC5C7A10A4D4500091B7F9 /* QWTestMode.h */, + ); + name = QuattroWirelessLib; + path = ../AdNetworkLibs/QuattroWirelessLib; + sourceTree = SOURCE_ROOT; + }; + A6EC5C7D10A4D4BF0091B7F9 /* MillennialMedia */ = { + isa = PBXGroup; + children = ( + A67F2A601162949700E0278D /* MMAdView.h */, + A6BF7001114B0F9A005C95B8 /* libMMSDK.a */, + ); + name = MillennialMedia; + path = ../AdNetworkLibs/MillennialMedia; + sourceTree = SOURCE_ROOT; + }; + A6ED4911114F0131002C57E6 /* TouchJSON */ = { + isa = PBXGroup; + children = ( + A6ED4912114F0131002C57E6 /* CDataScanner.h */, + A6ED4913114F0131002C57E6 /* CDataScanner.m */, + A6ED4914114F0131002C57E6 /* Extensions */, + A6ED491D114F0131002C57E6 /* JSON */, + ); + name = TouchJSON; + path = ../TouchJSON; + sourceTree = SOURCE_ROOT; + }; + A6ED4914114F0131002C57E6 /* Extensions */ = { + isa = PBXGroup; + children = ( + A6ED4915114F0131002C57E6 /* CDataScanner_Extensions.h */, + A6ED4916114F0131002C57E6 /* CDataScanner_Extensions.m */, + A6ED4917114F0131002C57E6 /* NSCharacterSet_Extensions.h */, + A6ED4918114F0131002C57E6 /* NSCharacterSet_Extensions.m */, + A6ED4919114F0131002C57E6 /* NSDictionary_JSONExtensions.h */, + A6ED491A114F0131002C57E6 /* NSDictionary_JSONExtensions.m */, + A6ED491B114F0131002C57E6 /* NSScanner_Extensions.h */, + A6ED491C114F0131002C57E6 /* NSScanner_Extensions.m */, + ); + path = Extensions; + sourceTree = ""; + }; + A6ED491D114F0131002C57E6 /* JSON */ = { + isa = PBXGroup; + children = ( + A6ED491E114F0131002C57E6 /* CJSONDataSerializer.h */, + A6ED491F114F0131002C57E6 /* CJSONDataSerializer.m */, + A6ED4920114F0131002C57E6 /* CJSONDeserializer.h */, + A6ED4921114F0131002C57E6 /* CJSONDeserializer.m */, + A6ED4922114F0131002C57E6 /* CJSONScanner.h */, + A6ED4923114F0131002C57E6 /* CJSONScanner.m */, + A6ED4924114F0131002C57E6 /* CJSONSerializer.h */, + A6ED4925114F0131002C57E6 /* CJSONSerializer.m */, + A6ED4926114F0131002C57E6 /* CSerializedJSONData.h */, + A6ED4927114F0131002C57E6 /* CSerializedJSONData.m */, + ); + path = JSON; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */; + buildPhases = ( + 1B049FDE122ED494006AE0C9 /* ShellScript */, + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AdWhirlSDK2_Sample; + productName = AdWhirlSDK2_Sample; + productReference = 1D6058910D05DD3D006BFB54 /* AdWhirlSDK2.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ../; + targets = ( + 1D6058900D05DD3D006BFB54 /* AdWhirlSDK2_Sample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, + 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */, + A6EC5B7B10A4B0C60091B7F9 /* AdWhirlWebBrowser.xib in Resources */, + A6EC5D2E10A4EBAB0091B7F9 /* SimpleViewController.xib in Resources */, + A63C952710A8CCFF00E81577 /* TableController.xib in Resources */, + A6B0CF2C10ACBD8900B29A14 /* adwhirlsample_icon.png in Resources */, + A630FDAA110FB3E700D6740A /* BottomBannerController.xib in Resources */, + A6A7998D1120D69600A00FD8 /* LocationController.xib in Resources */, + A6F6CC7B1149A8B500DFFFEA /* ModalViewController.xib in Resources */, + A6392A3211C9777500459FD4 /* adwhirlsample_icon@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1B049FDE122ED494006AE0C9 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f adwhirlsample_iconAT2x.png adwhirlsample_icon@2x.png"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AdWhirlSDK2_SampleAppDelegate.m in Sources */, + 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */, + A6EC5B7410A4B0C60091B7F9 /* AdWhirlAdNetworkConfig.m in Sources */, + A6EC5B7510A4B0C60091B7F9 /* AdWhirlAdNetworkRegistry.m in Sources */, + A6EC5B7610A4B0C60091B7F9 /* AdWhirlConfig.m in Sources */, + A6EC5B7710A4B0C60091B7F9 /* AdWhirlCustomAdView.m in Sources */, + A6EC5B7810A4B0C60091B7F9 /* AdWhirlError.m in Sources */, + A6EC5B7910A4B0C60091B7F9 /* AdWhirlLog.m in Sources */, + A6EC5B7A10A4B0C60091B7F9 /* AdWhirlView.m in Sources */, + A6EC5B7C10A4B0C60091B7F9 /* AdWhirlWebBrowserController.m in Sources */, + A6EC5B7D10A4B0C60091B7F9 /* ARRollerView.m in Sources */, + A6EC5CB910A4DCA00091B7F9 /* AdWhirlAdapterCustom.m in Sources */, + A6EC5CBA10A4DCA00091B7F9 /* AdWhirlAdapterGeneric.m in Sources */, + A6EC5CBB10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter.m in Sources */, + A6EC5CBC10A4DCA00091B7F9 /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */, + A6EC5D1A10A4EB710091B7F9 /* SimpleViewController.m in Sources */, + A63C952410A8762800E81577 /* TableController.m in Sources */, + A630FD61110FABAB00D6740A /* BottomBannerController.m in Sources */, + A6A7997D1120D36A00A00FD8 /* LocationController.m in Sources */, + A6F6CC7A1149A8B500DFFFEA /* ModalViewController.m in Sources */, + A6ED4928114F0131002C57E6 /* CDataScanner.m in Sources */, + A6ED4929114F0131002C57E6 /* CDataScanner_Extensions.m in Sources */, + A6ED492A114F0131002C57E6 /* NSCharacterSet_Extensions.m in Sources */, + A6ED492B114F0131002C57E6 /* NSDictionary_JSONExtensions.m in Sources */, + A6ED492C114F0131002C57E6 /* NSScanner_Extensions.m in Sources */, + A6ED492D114F0131002C57E6 /* CJSONDataSerializer.m in Sources */, + A6ED492E114F0131002C57E6 /* CJSONDeserializer.m in Sources */, + A6ED492F114F0131002C57E6 /* CJSONScanner.m in Sources */, + A6ED4930114F0131002C57E6 /* CJSONSerializer.m in Sources */, + A6ED4931114F0131002C57E6 /* CSerializedJSONData.m in Sources */, + A62A0D36118F7D810013A568 /* AdWhirlAdapterEvent.m in Sources */, + A6051FF011C7DF6600451D6F /* AdWhirlAdapterIAd.m in Sources */, + A605201311C7E20400451D6F /* AdWhirlAdapterMdotM.m in Sources */, + 1B8B5F0F11E7EE8D002762E3 /* AdWhirlAdapterZestADZ.m in Sources */, + 1BF8DFD111EB855100C2284D /* AdWhirlAdapterGreystripe.m in Sources */, + 1B7CC26C11EFB400004F4937 /* AdWhirlAdapterMillennial.m in Sources */, + 1B7CC26D11EFB403004F4937 /* AdWhirlAdapterVideoEgg.m in Sources */, + 1B42692611FE25A500910F21 /* AdWhirlAdapterJumpTap.m in Sources */, + 1B6898DD120C916A0080EAC1 /* AdWhirlClassWrapper.m in Sources */, + 1B183AA81211C7C60026647E /* UIColor+AdWhirlConfig.m in Sources */, + 1B6CE7CA121498DA00E44A28 /* AdWhirlConfigStore.m in Sources */, + 1B6CE8921214AA6A00E44A28 /* AWNetworkReachabilityWrapper.m in Sources */, + 1B91B4B71255596900C665F7 /* AdWhirlAdapterInMobi.m in Sources */, + 6B42360512EA0D41001F5395 /* AdWhirlAdapterOneRiot.m in Sources */, + 6B629D491332B9B7000D019C /* AdWhirlAdapterGoogleAdMobAds.m in Sources */, + 20B2547313A03F8300F33931 /* AdWhirlAdapterNexage.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/ZestADZ\"", + "\"$(SRCROOT)/../AdNetworkLibs/Greystripe\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi\"", + "\"$(SRCROOT)/../AdNetworkLibs/OneRiot\"", + "\"$(SRCROOT)/../AdNetworkLibs/Google\"", + "\"$(SRCROOT)/../AdNetworkLibs/InMobi\"", + "\"$(SRCROOT)/../AdNetworkLibs/Nexage\"", + ); + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlSDK2_Sample_Prefix.pch; + INFOPLIST_FILE = "AdWhirlSDK2_Sample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../AdNetworkLibs/MillennialMedia\"", + "\"$(SRCROOT)/../AdNetworkLibs/QuattroWirelessLib\"", + "\"$(SRCROOT)/../AdNetworkLibs/ZestADZ\"", + "\"$(SRCROOT)/../AdNetworkLibs/Greystripe\"", + "\"$(SRCROOT)/../AdNetworkLibs/VEAdFrames\"", + "\"$(SRCROOT)/../AdNetworkLibs/JumptapApi\"", + "\"$(SRCROOT)/../AdNetworkLibs/OneRiot\"", + "\"$(SRCROOT)/../AdNetworkLibs/Google\"", + "\"$(SRCROOT)/../AdNetworkLibs/InMobi\"", + "\"$(SRCROOT)/../AdNetworkLibs/Nexage\"", + ); + PRODUCT_NAME = AdWhirlSDK2; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = "ADWHIRL_DEBUG=1"; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.0; + OTHER_LDFLAGS = ( + "-ObjC", + "-all_load", + ); + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.0; + OTHER_LDFLAGS = ( + "-ObjC", + "-all_load", + ); + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "AdWhirlSDK2_Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlSDK2_Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample_Prefix.pch b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample_Prefix.pch new file mode 100644 index 000000000..411732755 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/AdWhirlSDK2_Sample_Prefix.pch @@ -0,0 +1,10 @@ +// +// Prefix header for all source files of the 'AdWhirlSDK2_Sample' target in the 'AdWhirlSDK2_Sample' project +// + +#import + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/BottomBannerController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/BottomBannerController.xib new file mode 100644 index 000000000..1623dc115 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/BottomBannerController.xib @@ -0,0 +1,555 @@ + + + + 768 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 87 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 295 + {{20, 20}, {280, 37}} + + NO + NO + 607701 + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + 1 + Request New Ad + + 3 + MQA + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + 3 + MC41AA + + + + + 295 + {{20, 85}, {280, 37}} + + NO + NO + 607702 + IBCocoaTouchFramework + 0 + 0 + + 1 + Roll Over + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + + + + 295 + {{20, 158}, {280, 153}} + + NO + YES + 1337 + NO + IBCocoaTouchFramework + Requesting Ad... + + Helvetica-Bold + 17 + 16 + + + 1 + MC4xMjc3MzcyMjYzIDAgMAA + + + 1 + 10 + 9 + 1 + + + {320, 416} + + + 10 + + 549453824 + {84, 1} + + YES + + YES + + + + TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB +AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + + + NO + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 12 + + + + requestNewAd: + + + 7 + + 13 + + + + rollOver: + + + 7 + + 14 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + + 9 + + + + + 10 + + + + + 11 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.IBPluginDependency + 11.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + BottomBannerController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{92, 165}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 14 + + + + YES + + BottomBannerController + SimpleViewController + + IBProjectSource + Classes/BottomBannerController.h + + + + SimpleViewController + UIViewController + + YES + + YES + requestNewAd: + rollOver: + showModalView: + toggleRefreshAd: + + + YES + id + id + id + id + + + + IBProjectSource + Classes/SimpleViewController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + 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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample-3_x.xcodeproj + 3 + 87 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.h new file mode 100644 index 000000000..d72597d31 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.h @@ -0,0 +1,30 @@ +/* + + AdWhirlSDK2_SampleAppDelegate.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +@interface AdWhirlSDK2_SampleAppDelegate : NSObject { + UIWindow *window; + UINavigationController *navigationController; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet UINavigationController *navigationController; + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.m new file mode 100644 index 000000000..eb3b22cb8 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/AdWhirlSDK2_SampleAppDelegate.m @@ -0,0 +1,59 @@ +/* + + AdWhirlSDK2_SampleAppDelegate.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlSDK2_SampleAppDelegate.h" +#import "RootViewController.h" +#import "AdWhirlLog.h" + +@implementation AdWhirlSDK2_SampleAppDelegate + +@synthesize window; +@synthesize navigationController; + + +#pragma mark - +#pragma mark Application lifecycle + +- (void)applicationDidFinishLaunching:(UIApplication *)application { +#ifdef ADWHIRL_DEBUG + AWLogSetLogLevel(AWLogLevelDebug); +#endif + [window addSubview:[navigationController view]]; + [window makeKeyAndVisible]; +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Save data if appropriate +} + + +#pragma mark - +#pragma mark Memory management + +- (void)dealloc { + [navigationController release]; + [window release]; + [super dealloc]; +} + + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.h new file mode 100644 index 000000000..d5029a372 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.h @@ -0,0 +1,16 @@ +// +// BottomBannerController.h +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 1/26/10. +// Copyright 2010 Admob. Inc.. All rights reserved. +// + +#import +#import "SimpleViewController.h" + +@interface BottomBannerController : SimpleViewController { + +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.m new file mode 100644 index 000000000..70e3f8354 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/BottomBannerController.m @@ -0,0 +1,116 @@ +// +// BottomBannerController.m +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 1/26/10. +// Copyright 2010 Admob. Inc.. All rights reserved. +// + +#import "BottomBannerController.h" +#import "AdWhirlView.h" + +#define BOTBVIEW_BUTTON_1_TAG 607701 +#define BOTBVIEW_BUTTON_2_TAG 607702 +#define BOTBVIEW_BUTTON_1_OFFSET 15 +#define BOTBVIEW_BUTTON_2_OFFSET 37 +#define BOTBVIEW_LABEL_OFFSET 67 +#define BOTBVIEW_LABEL_HDIFF 45 + +@implementation BottomBannerController + +- (id)init { + if (self = [super initWithNibName:@"BottomBannerController" bundle:nil]) { + currLayoutOrientation = UIInterfaceOrientationPortrait; // nib file defines a portrait view + self.title = @"Bottom Banner"; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation + duration:(NSTimeInterval)duration { + [self adjustLayoutToOrientation:interfaceOrientation]; +} + +- (void)adjustLayoutToOrientation:(UIInterfaceOrientation)newOrientation { + if (UIInterfaceOrientationIsPortrait(currLayoutOrientation) + && UIInterfaceOrientationIsLandscape(newOrientation)) { + UIView *button1 = [self.view viewWithTag:BOTBVIEW_BUTTON_1_TAG]; + UIView *button2 = [self.view viewWithTag:BOTBVIEW_BUTTON_2_TAG]; + assert(button1 != nil); + assert(button2 != nil); + CGPoint newCenter = button1.center; + newCenter.y -= BOTBVIEW_BUTTON_1_OFFSET; + button1.center = newCenter; + newCenter = button2.center; + newCenter.y -= BOTBVIEW_BUTTON_2_OFFSET; + button2.center = newCenter; + CGRect newFrame = self.label.frame; + newFrame.size.height -= 45; + newFrame.origin.y -= BOTBVIEW_LABEL_OFFSET; + self.label.frame = newFrame; + } + else if (UIInterfaceOrientationIsLandscape(currLayoutOrientation) + && UIInterfaceOrientationIsPortrait(newOrientation)) { + UIView *button1 = [self.view viewWithTag:BOTBVIEW_BUTTON_1_TAG]; + UIView *button2 = [self.view viewWithTag:BOTBVIEW_BUTTON_2_TAG]; + assert(button1 != nil); + assert(button2 != nil); + CGPoint newCenter = button1.center; + newCenter.y += BOTBVIEW_BUTTON_1_OFFSET; + button1.center = newCenter; + newCenter = button2.center; + newCenter.y += BOTBVIEW_BUTTON_2_OFFSET; + button2.center = newCenter; + CGRect newFrame = self.label.frame; + newFrame.size.height += 45; + newFrame.origin.y += BOTBVIEW_LABEL_OFFSET; + self.label.frame = newFrame; + } + CGRect adFrame = [adView frame]; + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + if (UIInterfaceOrientationIsPortrait(newOrientation)) { + adFrame.origin.y = screenBounds.size.height + - adFrame.size.height + - self.navigationController.navigationBar.frame.size.height + - [UIApplication sharedApplication].statusBarFrame.size.height; + [adView setFrame:adFrame]; + } + else if (UIInterfaceOrientationIsLandscape(newOrientation)) { + adFrame.origin.y = screenBounds.size.width + - adFrame.size.height + - self.navigationController.navigationBar.frame.size.height + - [UIApplication sharedApplication].statusBarFrame.size.width; + [adView setFrame:adFrame]; + } + currLayoutOrientation = newOrientation; +} + +- (void)adjustAdSize { + [UIView beginAnimations:@"AdResize" context:nil]; + [UIView setAnimationDuration:0.7]; + CGSize adSize = [adView actualAdSize]; + CGRect newFrame = adView.frame; + newFrame.size.height = adSize.height; + newFrame.size.width = adSize.width; + newFrame.origin.x = (self.view.bounds.size.width - adSize.width)/2; + newFrame.origin.y = self.view.bounds.size.height - adSize.height; + adView.frame = newFrame; + [UIView commitAnimations]; +} + +- (void)dealloc { + [super dealloc]; +} + +#pragma mark AdWhirlDelegate methods + +- (NSUInteger)millennialMediaAdType { + return 2; +} + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.h new file mode 100644 index 000000000..021fc3447 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.h @@ -0,0 +1,21 @@ +// +// LocationController.h +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 2/8/10. +// Copyright 2010 Admob. Inc.. All rights reserved. +// + +#import +#import "TableController.h" + +@interface LocationController : TableController { + CLLocationManager *locationManager; + UIInterfaceOrientation currLayoutOrientation; +} + +@property (nonatomic,readonly) UILabel *locLabel; + +- (void)adjustLayoutToOrientation:(UIInterfaceOrientation)newOrientation; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.m new file mode 100644 index 000000000..a10d4d9d0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/LocationController.m @@ -0,0 +1,104 @@ +// +// LocationController.m +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 2/8/10. +// Copyright 2010 Admob. Inc.. All rights reserved. +// + +#import "LocationController.h" +#import "AdWhirlLog.h" + +#define LOCVIEW_LOCLABEL_OFFSET 79 +#define LOCVIEW_LABEL_OFFSET 87 +#define LOCVIEW_LABEL_HDIFF 63 + +@implementation LocationController + +- (id)init { + if (self = [super initWithNibName:@"LocationController" bundle:nil]) { + locationManager = [[CLLocationManager alloc] init]; + locationManager.delegate = self; + [locationManager startUpdatingLocation]; + currLayoutOrientation = UIInterfaceOrientationPortrait; // nib file defines a portrait view + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self adjustLayoutToOrientation:self.interfaceOrientation]; +} + +- (UILabel *)locLabel { + return (UILabel *)[self.view viewWithTag:103]; +} + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation + duration:(NSTimeInterval)duration { + [self adjustLayoutToOrientation:interfaceOrientation]; +} + +- (void)adjustLayoutToOrientation:(UIInterfaceOrientation)newOrientation { + UILabel *ll = self.locLabel; + UILabel *label = self.label; + assert(ll != nil); + assert(label != nil); + if (UIInterfaceOrientationIsPortrait(currLayoutOrientation) + && UIInterfaceOrientationIsLandscape(newOrientation)) { + CGPoint newCenter = ll.center; + newCenter.y -= LOCVIEW_LOCLABEL_OFFSET; + ll.center = newCenter; + CGRect newFrame = label.frame; + newFrame.origin.y -= LOCVIEW_LABEL_OFFSET; + newFrame.size.height -= LOCVIEW_LABEL_HDIFF; + label.frame = newFrame; + } + else if (UIInterfaceOrientationIsLandscape(currLayoutOrientation) + && UIInterfaceOrientationIsPortrait(newOrientation)) { + CGPoint newCenter = ll.center; + newCenter.y += LOCVIEW_LOCLABEL_OFFSET; + ll.center = newCenter; + CGRect newFrame = label.frame; + newFrame.origin.y += LOCVIEW_LABEL_OFFSET; + newFrame.size.height += LOCVIEW_LABEL_HDIFF; + label.frame = newFrame; + } + currLayoutOrientation = newOrientation; +} + +- (void)dealloc { + locationManager.delegate = nil; + [locationManager release], locationManager = nil; + [super dealloc]; +} + + +#pragma mark AdWhirlDelegate methods + +- (CLLocation *)locationInfo { + CLLocation *loc = [locationManager location]; + AWLogDebug(@"AdWhirl asking for location: %@", loc); + return loc; +} + + +#pragma mark CLLocationManagerDelegate methods + +- (void)locationManager:(CLLocationManager *)manager + didFailWithError:(NSError *)error { + [locationManager stopUpdatingLocation]; + self.locLabel.text = [NSString stringWithFormat:@"Error getting location: %@", + [error localizedDescription]]; + AWLogError(@"Failed getting location: %@", error); +} + +- (void)locationManager:(CLLocationManager *)manager + didUpdateToLocation:(CLLocation *)newLocation + fromLocation:(CLLocation *)oldLocation { + self.locLabel.text = [NSString stringWithFormat:@"%lf %lf", + newLocation.coordinate.longitude, + newLocation.coordinate.latitude]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.h new file mode 100644 index 000000000..cf231196e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.h @@ -0,0 +1,18 @@ +// +// ModalViewController.h +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 3/11/10. +// Copyright 2010 Admob. Inc. All rights reserved. +// + +#import + + +@interface ModalViewController : UIViewController { + +} + +- (IBAction)dismiss:(id)sender; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.m new file mode 100644 index 000000000..041d0e72c --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/ModalViewController.m @@ -0,0 +1,68 @@ +// +// ModalViewController.m +// AdWhirlSDK2_Sample +// +// Created by Nigel Choi on 3/11/10. +// Copyright 2010 Admob. Inc. All rights reserved. +// + +#import "ModalViewController.h" + + +@implementation ModalViewController + +- (id)init { + if (self = [super initWithNibName:@"ModalViewController" bundle:nil]) { + self.title = @"Modal View"; + if ([self respondsToSelector:@selector(setModalTransitionStyle)]) { + [self setModalTransitionStyle:UIModalTransitionStyleCoverVertical]; + } + } + return self; +} + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +/* +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} +*/ + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return YES; +} + +- (IBAction)dismiss:(id)sender { + [self dismissModalViewControllerAnimated:YES]; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.h new file mode 100644 index 000000000..aaafd0854 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.h @@ -0,0 +1,27 @@ +/* + + RootViewController.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlDelegateProtocol.h" + +@interface RootViewController : UITableViewController { + BOOL configFetched; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.m new file mode 100644 index 000000000..57aedd65e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/RootViewController.m @@ -0,0 +1,244 @@ +/* + + RootViewController.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlSDK2_SampleAppDelegate.h" +#import "RootViewController.h" +#import "SimpleViewController.h" +#import "TableController.h" +#import "BottomBannerController.h" +#import "LocationController.h" +#import "AdWhirlView.h" +#import "SampleConstants.h" + +#define CONFIG_PREFETCH_ROW 4 + +@implementation RootViewController + +/* +- (void)viewDidLoad { + [super viewDidLoad]; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; +} +*/ + +/* +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} +*/ +/* +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} +*/ +/* +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; +} +*/ +/* +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} +*/ + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Release anything that can be recreated in viewDidLoad or on demand. + // e.g. self.myOutlet = nil; +} + + +#pragma mark Table view methods + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return CONFIG_PREFETCH_ROW+1; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + if ([UITableViewCell instancesRespondToSelector:@selector(initWithStyle:reuseIdentifier:)]) { + // iPhone SDK 3.0 + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + } + else { + // iPhone SDK 2.2.1 + cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; + } + } + + switch (indexPath.row) { + case 0: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Simple View"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Simple View"; + } + break; + case 1: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Table Integration"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Table Integration"; + } + break; + case 2: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Bottom Banner"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Bottom Banner"; + } + break; + case 3: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Table w/ Location Info"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Table w/ Location Info"; + } + break; + case CONFIG_PREFETCH_ROW: + { + NSString *configText; + if (configFetched) { + configText = @"Update Config"; + } + else { + configText = @"Prefetch Config"; + } + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = configText; + } + else { + // iPhone SDK 2.2.1 + cell.text = configText; + } + break; + } + } + + return cell; +} + + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + switch (indexPath.row) { + case 0: + { + SimpleViewController *simple = [[SimpleViewController alloc] init]; + [self.navigationController pushViewController:simple animated:YES]; + [simple release]; + break; + } + case 1: + { + TableController *table = [[TableController alloc] init]; + [self.navigationController pushViewController:table animated:YES]; + [table release]; + break; + } + case 2: + { + BottomBannerController *bbc = [[BottomBannerController alloc] init]; + [self.navigationController pushViewController:bbc animated:YES]; + [bbc release]; + break; + } + case 3: + { + LocationController *loc = [[LocationController alloc] init]; + [self.navigationController pushViewController:loc animated:YES]; + [loc release]; + break; + } + case CONFIG_PREFETCH_ROW: + if (configFetched) { + [AdWhirlView updateAdWhirlConfigWithDelegate:self]; + } + else { + [AdWhirlView startPreFetchingConfigurationDataWithDelegate:self]; + } + break; + } +} + + +- (void)dealloc { + [super dealloc]; +} + + +#pragma mark AdWhirlDelegate methods + +- (NSString *)adWhirlApplicationKey { + return kSampleAppKey; +} + +- (UIViewController *)viewControllerForPresentingModalView { + return [((AdWhirlSDK2_SampleAppDelegate *)[[UIApplication sharedApplication] delegate]) navigationController]; +} + +- (NSURL *)adWhirlConfigURL { + return [NSURL URLWithString:kSampleConfigURL]; +} + +- (void)adWhirlDidReceiveConfig:(AdWhirlView *)adWhirlView { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:CONFIG_PREFETCH_ROW inSection:0]; + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + configFetched = YES; + [self.tableView reloadData]; +} + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SampleConstants.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SampleConstants.h new file mode 100644 index 000000000..7eac74512 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SampleConstants.h @@ -0,0 +1,28 @@ +/* + + SampleConstants.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#if !defined(kSampleAppKey) + #error "You must define kSampleAppKey as your AdWhirl SDK Key" +#endif + +#define kSampleConfigURL @"http://mob.adwhirl.com/getInfo.php" +#define kSampleImpMetricURL @"http://met.adwhirl.com/exmet.php" +#define kSampleClickMetricURL @"http://met.adwhirl.com/exclick.php" +#define kSampleCustomAdURL @"http://mob.adwhirl.com/custom.php" diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.h new file mode 100644 index 000000000..526349c22 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.h @@ -0,0 +1,41 @@ +/* + + SimpleViewController.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import "AdWhirlDelegateProtocol.h" + +@class AdWhirlView; +@interface SimpleViewController : UIViewController { + AdWhirlView *adView; + UIInterfaceOrientation currLayoutOrientation; +} + +- (IBAction)requestNewAd:(id)sender; +- (IBAction)requestNewConfig:(id)sender; +- (IBAction)rollOver:(id)sender; +- (IBAction)showModalView:(id)sender; +- (IBAction)toggleRefreshAd:(id)sender; +- (void)adjustLayoutToOrientation:(UIInterfaceOrientation)newOrientation; +- (void)adjustAdSize; + +@property (nonatomic,retain) AdWhirlView *adView; +@property (nonatomic,readonly) UILabel *label; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.m new file mode 100644 index 000000000..1890cbe4e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/SimpleViewController.m @@ -0,0 +1,441 @@ +/* + + SimpleViewController.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlSDK2_SampleAppDelegate.h" +#import "SimpleViewController.h" +#import "AdWhirlView.h" +#import "AdWhirlView+.h" +#import "SampleConstants.h" +#import "ModalViewController.h" +#import "AdWhirlLog.h" + +#define SIMPVIEW_BUTTON_1_TAG 607701 +#define SIMPVIEW_BUTTON_2_TAG 607702 +#define SIMPVIEW_BUTTON_3_TAG 607703 +#define SIMPVIEW_BUTTON_4_TAG 607704 +#define SIMPVIEW_SWITCH_1_TAG 706613 +#define SIMPVIEW_LABEL_1_TAG 7066130 +#define SIMPVIEW_BUTTON_1_OFFSET 46 +#define SIMPVIEW_BUTTON_2_OFFSET 46 +#define SIMPVIEW_BUTTON_3_OFFSET 66 +#define SIMPVIEW_BUTTON_4_OFFSET 86 +#define SIMPVIEW_SWITCH_1_OFFSET 69 +#define SIMPVIEW_LABEL_1_OFFSET 43 +#define SIMPVIEW_LABEL_1_OFFSETX 60 +#define SIMPVIEW_LABEL_OFFSET 94 +#define SIMPVIEW_LABEL_HDIFF 45 + +@implementation SimpleViewController + +@synthesize adView; + +- (id)init { + if (self = [super initWithNibName:@"SimpleViewController" bundle:nil]) { + currLayoutOrientation = UIInterfaceOrientationPortrait; // nib file defines a portrait view + self.title = @"Simple View"; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.adView = [AdWhirlView requestAdWhirlViewWithDelegate:self]; + self.adView.autoresizingMask = + UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin; + [self.view addSubview:self.adView]; + + if (getenv("ADWHIRL_FAKE_DARTS")) { + // To make ad network selection deterministic + const char *dartcstr = getenv("ADWHIRL_FAKE_DARTS"); + NSArray *rawdarts = [[NSString stringWithCString:dartcstr] + componentsSeparatedByString:@" "]; + NSMutableArray *darts + = [[NSMutableArray alloc] initWithCapacity:[rawdarts count]]; + for (NSString *dartstr in rawdarts) { + if ([dartstr length] == 0) { + continue; + } + [darts addObject:[NSNumber numberWithDouble:[dartstr doubleValue]]]; + } + self.adView.testDarts = darts; + } + + UIDevice *device = [UIDevice currentDevice]; + if ([device respondsToSelector:@selector(isMultitaskingSupported)] && + [device isMultitaskingSupported]) { + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(enterForeground:) + name:UIApplicationWillEnterForegroundNotification + object:nil]; + } +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewDidAppear:animated]; + [self adjustLayoutToOrientation:self.interfaceOrientation]; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)io { + return YES; +} + +- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { + [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.adView rotateToOrientation:toInterfaceOrientation]; + [self adjustAdSize]; +} + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)io + duration:(NSTimeInterval)duration { + [self adjustLayoutToOrientation:io]; +} + +- (void)adjustLayoutToOrientation:(UIInterfaceOrientation)newOrientation { + UIView *button1 = [self.view viewWithTag:SIMPVIEW_BUTTON_1_TAG]; + UIView *button2 = [self.view viewWithTag:SIMPVIEW_BUTTON_2_TAG]; + UIView *button3 = [self.view viewWithTag:SIMPVIEW_BUTTON_3_TAG]; + UIView *button4 = [self.view viewWithTag:SIMPVIEW_BUTTON_4_TAG]; + UIView *switch1 = [self.view viewWithTag:SIMPVIEW_SWITCH_1_TAG]; + UIView *label1 = [self.view viewWithTag:SIMPVIEW_LABEL_1_TAG]; + assert(button1 != nil); + assert(button2 != nil); + assert(button3 != nil); + assert(button4 != nil); + assert(switch1 != nil); + assert(label1 != nil); + if (UIInterfaceOrientationIsPortrait(currLayoutOrientation) + && UIInterfaceOrientationIsLandscape(newOrientation)) { + CGPoint newCenter = button1.center; + newCenter.y -= SIMPVIEW_BUTTON_1_OFFSET; + button1.center = newCenter; + newCenter = button2.center; + newCenter.y -= SIMPVIEW_BUTTON_2_OFFSET; + button2.center = newCenter; + newCenter = button3.center; + newCenter.y -= SIMPVIEW_BUTTON_3_OFFSET; + button3.center = newCenter; + newCenter = button4.center; + newCenter.y -= SIMPVIEW_BUTTON_4_OFFSET; + button4.center = newCenter; + newCenter = switch1.center; + newCenter.y -= SIMPVIEW_SWITCH_1_OFFSET; + switch1.center = newCenter; + newCenter = label1.center; + newCenter.y -= SIMPVIEW_LABEL_1_OFFSET; + newCenter.x += SIMPVIEW_LABEL_1_OFFSETX; + label1.center = newCenter; + CGRect newFrame = self.label.frame; + newFrame.size.height -= 45; + newFrame.origin.y -= SIMPVIEW_LABEL_OFFSET; + self.label.frame = newFrame; + } + else if (UIInterfaceOrientationIsLandscape(currLayoutOrientation) + && UIInterfaceOrientationIsPortrait(newOrientation)) { + CGPoint newCenter = button1.center; + newCenter.y += SIMPVIEW_BUTTON_1_OFFSET; + button1.center = newCenter; + newCenter = button2.center; + newCenter.y += SIMPVIEW_BUTTON_2_OFFSET; + button2.center = newCenter; + newCenter = button3.center; + newCenter.y += SIMPVIEW_BUTTON_3_OFFSET; + button3.center = newCenter; + newCenter = button4.center; + newCenter.y += SIMPVIEW_BUTTON_4_OFFSET; + button4.center = newCenter; + newCenter = switch1.center; + newCenter.y += SIMPVIEW_SWITCH_1_OFFSET; + switch1.center = newCenter; + newCenter = label1.center; + newCenter.y += SIMPVIEW_LABEL_1_OFFSET; + newCenter.x -= SIMPVIEW_LABEL_1_OFFSETX; + label1.center = newCenter; + CGRect newFrame = self.label.frame; + newFrame.size.height += 45; + newFrame.origin.y += SIMPVIEW_LABEL_OFFSET; + self.label.frame = newFrame; + } + currLayoutOrientation = newOrientation; +} + +- (void)adjustAdSize { + [UIView beginAnimations:@"AdResize" context:nil]; + [UIView setAnimationDuration:0.7]; + CGSize adSize = [adView actualAdSize]; + CGRect newFrame = adView.frame; + newFrame.size.height = adSize.height; + newFrame.size.width = adSize.width; + newFrame.origin.x = (self.view.bounds.size.width - adSize.width)/2; + adView.frame = newFrame; + [UIView commitAnimations]; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // remove all notification for self + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (UILabel *)label { + return (UILabel *)[self.view viewWithTag:1337]; +} + +- (void)dealloc { + self.adView.delegate = nil; + self.adView = nil; + [super dealloc]; +} + +#pragma mark Button handlers + +- (IBAction)requestNewAd:(id)sender { + self.label.text = @"Request New Ad pressed! Requesting..."; + [adView requestFreshAd]; +} + +- (IBAction)requestNewConfig:(id)sender { + self.label.text = @"Request New Config pressed! Requesting..."; + [adView updateAdWhirlConfig]; +} + +- (IBAction)rollOver:(id)sender { + self.label.text = @"Roll Over pressed! Requesting..."; + [adView rollOver]; +} + +- (IBAction)showModalView:(id)sender { + ModalViewController *modalViewController = [[[ModalViewController alloc] init] autorelease]; + [self presentModalViewController:modalViewController animated:YES]; +} + +- (IBAction)toggleRefreshAd:(id)sender { + UISwitch *switch1 = (UISwitch *)[self.view viewWithTag:SIMPVIEW_SWITCH_1_TAG]; + if (switch1.on) { + [adView doNotIgnoreAutoRefreshTimer]; + } + else { + [adView ignoreAutoRefreshTimer]; + } +} + +#pragma mark AdWhirlDelegate methods + +- (NSString *)adWhirlApplicationKey { + return kSampleAppKey; +} + +- (UIViewController *)viewControllerForPresentingModalView { + return [((AdWhirlSDK2_SampleAppDelegate *)[[UIApplication sharedApplication] delegate]) navigationController]; +} + +- (NSURL *)adWhirlConfigURL { + return [NSURL URLWithString:kSampleConfigURL]; +} + +- (NSURL *)adWhirlImpMetricURL { + return [NSURL URLWithString:kSampleImpMetricURL]; +} + +- (NSURL *)adWhirlClickMetricURL { + return [NSURL URLWithString:kSampleClickMetricURL]; +} + +- (NSURL *)adWhirlCustomAdURL { + return [NSURL URLWithString:kSampleCustomAdURL]; +} + +- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView { + self.label.text = [NSString stringWithFormat: + @"Got ad from %@, size %@", + [adWhirlView mostRecentNetworkName], + NSStringFromCGSize([adWhirlView actualAdSize])]; + [self adjustAdSize]; +} + +- (void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo { + self.label.text = [NSString stringWithFormat: + @"Failed to receive ad from %@, %@. Error: %@", + [adWhirlView mostRecentNetworkName], + yesOrNo? @"will use backup" : @"will NOT use backup", + adWhirlView.lastError == nil? @"no error" : [adWhirlView.lastError localizedDescription]]; +} + +- (void)adWhirlReceivedRequestForDeveloperToFufill:(AdWhirlView *)adWhirlView { + UILabel *replacement = [[UILabel alloc] initWithFrame:kAdWhirlViewDefaultFrame]; + replacement.backgroundColor = [UIColor redColor]; + replacement.textColor = [UIColor whiteColor]; + replacement.textAlignment = UITextAlignmentCenter; + replacement.text = @"Generic Notification"; + [adWhirlView replaceBannerViewWith:replacement]; + [replacement release]; + [self adjustAdSize]; + self.label.text = @"Generic Notification"; +} + +- (void)adWhirlReceivedNotificationAdsAreOff:(AdWhirlView *)adWhirlView { + self.label.text = @"Ads are off"; +} + +- (void)adWhirlWillPresentFullScreenModal { + NSLog(@"SimpleView: will present full screen modal"); +} + +- (void)adWhirlDidDismissFullScreenModal { + NSLog(@"SimpleView: did dismiss full screen modal"); +} + +- (void)adWhirlDidReceiveConfig:(AdWhirlView *)adWhirlView { + self.label.text = @"Received config. Requesting ad..."; +} + +- (BOOL)adWhirlTestMode { + return NO; +} + +- (UIColor *)adWhirlAdBackgroundColor { + return [UIColor purpleColor]; +} + +- (UIColor *)adWhirlTextColor { + return [UIColor cyanColor]; +} + +- (CLLocation *)locationInfo { + CLLocationManager *locationManager = [[CLLocationManager alloc] init]; + CLLocation *location = [locationManager location]; + [locationManager release]; + return location; +} + +- (NSDate *)dateOfBirth { + NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSDateComponents *comps = [[NSDateComponents alloc] init]; + [comps setYear:1979]; + [comps setMonth:11]; + [comps setDay:6]; + NSDate *date = [gregorian dateFromComponents:comps]; + [gregorian release]; + [comps release]; + return date; +} + +- (NSString *)postalCode { + return @"31337"; +} + +- (NSUInteger)incomeLevel { + return 99999; +} + +- (NSString *)googleAdSenseCompanyName { + return @"Your Company"; +} + +- (NSString *)googleAdSenseAppName { + return @"AdWhirl Sample"; +} + +- (NSString *)googleAdSenseApplicationAppleID { + return @"0"; +} + +- (NSString *)googleAdSenseKeywords { + return @"iphone+development,ad+mediation"; +} + +- (NSURL *)googleAdSenseAppWebContentURL { + return [NSURL URLWithString:@"http://www.adwhirl.com"]; +} + +- (NSArray *)googleAdSenseChannelIDs { + return [NSArray arrayWithObjects:@"0282698142", nil]; +} + +//extern NSString* const kGADAdSenseTextImageAdType; +//- (NSString *)googleAdSenseAdType { +// return kGADAdSenseTextImageAdType; +//} + +- (NSString *)googleAdSenseHostID { + return @"HostID"; +} + +- (UIColor *)googleAdSenseAdTopBackgroundColor { + return [UIColor orangeColor]; +} + +- (UIColor *)googleAdSenseAdBorderColor { + return [UIColor redColor]; +} + +- (UIColor *)googleAdSenseAdLinkColor { + return [UIColor cyanColor]; +} + +- (UIColor *)googleAdSenseAdURLColor { + return [UIColor orangeColor]; +} + +- (UIColor *)googleAdSenseAlternateAdColor { + return [UIColor greenColor]; +} + +- (NSURL *)googleAdSenseAlternateAdURL { + return [NSURL URLWithString:@"http://www.adwhirl.com"]; +} + +- (NSNumber *)googleAdSenseAllowAdsafeMedium { + return [NSNumber numberWithBool:YES]; +} + +#pragma mark event methods + +- (void)performEvent { + self.label.text = @"Event performed"; +} + +- (void)performEvent2:(AdWhirlView *)adWhirlView { + UILabel *replacement = [[UILabel alloc] initWithFrame:kAdWhirlViewDefaultFrame]; + replacement.backgroundColor = [UIColor blackColor]; + replacement.textColor = [UIColor whiteColor]; + replacement.textAlignment = UITextAlignmentCenter; + replacement.text = [NSString stringWithFormat:@"Event performed, view %x", adWhirlView]; + [adWhirlView replaceBannerViewWith:replacement]; + [replacement release]; + [self adjustAdSize]; + self.label.text = [NSString stringWithFormat:@"Event performed, view %x", adWhirlView]; +} + +#pragma mark multitasking methods + +- (void)enterForeground:(NSNotification *)notification { + AWLogDebug(@"SimpleView entering foreground"); + [self.adView updateAdWhirlConfig]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.h new file mode 100644 index 000000000..07b8b1ff0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.h @@ -0,0 +1,34 @@ +/* + + TableController.h + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import +#import "AdWhirlDelegateProtocol.h" + +@interface TableController : UIViewController { + AdWhirlView *adView; +} + +@property (nonatomic,retain) AdWhirlView *adView; +@property (nonatomic,readonly) UILabel *label; +@property (nonatomic,readonly) UITableView *table; + +- (void)adjustAdSize; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.m new file mode 100644 index 000000000..86a8dc8bc --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/Classes/TableController.m @@ -0,0 +1,339 @@ +/* + + TableController.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import "AdWhirlSDK2_SampleAppDelegate.h" +#import "TableController.h" +#import "AdWhirlView.h" +#import "SampleConstants.h" + + +@implementation TableController + +@synthesize adView; + +- (id)init { + if (self = [super initWithNibName:@"TableController" bundle:nil]) { + self.title = @"Ad In Table"; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.adView = [AdWhirlView requestAdWhirlViewWithDelegate:self]; + self.adView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin; +} + +/* +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} +*/ +/* +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} +*/ +/* +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; +} +*/ +/* +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} +*/ + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return YES; +} + +- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { + [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.adView rotateToOrientation:toInterfaceOrientation]; + [self adjustAdSize]; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (UILabel *)label { + return (UILabel *)[self.view viewWithTag:1337]; +} + +- (UITableView *)table { + return (UITableView *)[self.view viewWithTag:3337]; +} + +- (void)adjustAdSize { + [UIView beginAnimations:@"AdResize" context:nil]; + [UIView setAnimationDuration:0.7]; + CGSize adSize = [adView actualAdSize]; + CGRect newFrame = adView.frame; + newFrame.size.height = adSize.height; + newFrame.size.width = adSize.width; + newFrame.origin.x = (self.view.bounds.size.width - adSize.width)/2; + adView.frame = newFrame; + [UIView commitAnimations]; +} + +- (void)dealloc { + self.adView.delegate = nil; + self.adView = nil; + [super dealloc]; +} + + +#pragma mark Table view methods + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 10; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"Cell"; + static NSString *AdCellIdentifier = @"AdCell"; + + NSString *cellId = CellIdentifier; + if (indexPath.row == 0) { + cellId = AdCellIdentifier; + } + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; + if (cell == nil) { + if ([UITableViewCell instancesRespondToSelector:@selector(initWithStyle:reuseIdentifier:)]) { + // iPhone SDK 3.0 + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId] autorelease]; + } + else { + // iPhone SDK 2.2.1 + cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellId] autorelease]; + } + if (cellId == AdCellIdentifier) { + [cell.contentView addSubview:adView]; + } + } + + switch (indexPath.row) { + case 0: + break; + case 1: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Request New Ad"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Request New Ad"; + } + break; + case 2: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = @"Roll Over"; + } + else { + // iPhone SDK 2.2.1 + cell.text = @"Roll Over"; + } + break; + default: + if ([cell respondsToSelector:@selector(textLabel)]) { + // iPhone SDK 3.0 + cell.textLabel.text = [NSString stringWithFormat:@"Cell %d", indexPath.row]; + } + else { + // iPhone SDK 2.2.1 + cell.text = [NSString stringWithFormat:@"Cell %d", indexPath.row]; + } + } + + return cell; +} + + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + switch (indexPath.row) { + case 1: + self.label.text = @"Request New Ad pressed! Requesting..."; + [adView requestFreshAd]; + break; + case 2: + self.label.text = @"Roll Over pressed! Requesting..."; + [adView rollOver]; + break; + } + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0 && indexPath.row == 0) { + return CGRectGetHeight(adView.bounds); + } + return self.table.rowHeight; +} + + +#pragma mark AdWhirlDelegate methods + +- (NSString *)adWhirlApplicationKey { + return kSampleAppKey; +} + +- (UIViewController *)viewControllerForPresentingModalView { + return [((AdWhirlSDK2_SampleAppDelegate *)[[UIApplication sharedApplication] delegate]) navigationController]; +} + +- (NSURL *)adWhirlConfigURL { + return [NSURL URLWithString:kSampleConfigURL]; +} + +- (NSURL *)adWhirlImpMetricURL { + return [NSURL URLWithString:kSampleImpMetricURL]; +} + +- (NSURL *)adWhirlClickMetricURL { + return [NSURL URLWithString:kSampleClickMetricURL]; +} + +- (NSURL *)adWhirlCustomAdURL { + return [NSURL URLWithString:kSampleCustomAdURL]; +} + +- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView { + self.label.text = [NSString stringWithFormat: + @"Got ad from %@, size %@", + [adWhirlView mostRecentNetworkName], + NSStringFromCGSize([adWhirlView actualAdSize])]; + [self adjustAdSize]; +} + +- (void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo { + self.label.text = [NSString stringWithFormat: + @"Failed to receive ad from %@, %@. Error: %@", + [adWhirlView mostRecentNetworkName], + yesOrNo? @"will use backup" : @"will NOT use backup", + adWhirlView.lastError == nil? @"no error" : [adWhirlView.lastError localizedDescription]]; +} + +- (void)adWhirlReceivedRequestForDeveloperToFufill:(AdWhirlView *)adWhirlView { + UILabel *replacement = [[UILabel alloc] initWithFrame:kAdWhirlViewDefaultFrame]; + replacement.backgroundColor = [UIColor redColor]; + replacement.textColor = [UIColor whiteColor]; + replacement.textAlignment = UITextAlignmentCenter; + replacement.text = @"Generic Notification"; + [adWhirlView replaceBannerViewWith:replacement]; + [replacement release]; + [self adjustAdSize]; + self.label.text = @"Generic Notification"; +} + +- (void)adWhirlDidAnimateToNewAdIn:(AdWhirlView *)adWhirlView { + [self.table reloadData]; +} + +- (void)adWhirlReceivedNotificationAdsAreOff:(AdWhirlView *)adWhirlView { + self.label.text = @"Ads are off"; +} + +- (void)adWhirlWillPresentFullScreenModal { + NSLog(@"TableView: will present full screen modal"); +} + +- (void)adWhirlDidDismissFullScreenModal { + NSLog(@"TableView: did dismiss full screen modal"); +} + +- (void)adWhirlDidReceiveConfig:(AdWhirlView *)adWhirlView { + self.label.text = @"Received config. Requesting ad..."; +} + +- (BOOL)adWhirlTestMode { + return NO; +} + +- (NSUInteger)jumptapTransitionType { + return 3; +} + +- (NSUInteger)quattroWirelessAdType { + return 2; +} + +- (NSString *)googleAdSenseCompanyName { + return @"Your Company"; +} + +- (NSString *)googleAdSenseAppName { + return @"AdWhirl Sample"; +} + +- (NSString *)googleAdSenseApplicationAppleID { + return @"0"; +} + +- (NSString *)googleAdSenseKeywords { + return @"apple,iphone,ipad,adwhirl"; +} + +//extern NSString* const kGADAdSenseImageAdType; +//- (NSString *)googleAdSenseAdType { +// return kGADAdSenseImageAdType; +//} + +#pragma mark event methods + +- (void)performEvent { + self.label.text = @"Event performed"; +} + +- (void)performEvent2:(AdWhirlView *)adWhirlView { + UILabel *replacement = [[UILabel alloc] initWithFrame:kAdWhirlViewDefaultFrame]; + replacement.backgroundColor = [UIColor blackColor]; + replacement.textColor = [UIColor whiteColor]; + replacement.textAlignment = UITextAlignmentCenter; + replacement.text = [NSString stringWithFormat:@"Event performed, view %x", adWhirlView]; + [adWhirlView replaceBannerViewWith:replacement]; + [replacement release]; + [self adjustAdSize]; + self.label.text = [NSString stringWithFormat:@"Event performed, view %x", adWhirlView]; +} + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/LocationController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/LocationController.xib new file mode 100644 index 000000000..df71bf8ce --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/LocationController.xib @@ -0,0 +1,513 @@ + + + + 768 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 87 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 301 + + YES + + + 311 + {320, 182} + + + 3 + MQA + + NO + YES + NO + 3337 + + IBCocoaTouchFramework + NO + 1 + 0 + 44 + 22 + 22 + + + + 295 + {{6, 242}, {304, 164}} + + + 3 + MCAwAA + + NO + YES + 1337 + NO + IBCocoaTouchFramework + Requesting Ad... + + Helvetica-Bold + 17 + 16 + + + 1 + MCAwIDAAA + + + 1 + 10 + 9 + 1 + + + + 295 + {{6, 191}, {304, 43}} + + + 1 + MC45ODMwMjc3NTYyIDEgMC43OTU2NDI2NzQAA + + NO + YES + 103 + NO + IBCocoaTouchFramework + + + + 1 + 10 + 2 + 1 + 0 + + + {320, 416} + + + 3 + MQA + + 2 + + + NO + + + NO + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 13 + + + + dataSource + + + + 14 + + + + delegate + + + + 15 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + + 4 + + + + + 9 + + + + + 16 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 16.IBPluginDependency + 4.IBEditorWindowLastContentRect + 4.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + 8.IBViewEditorWindowController.showingLayoutRectangles + 9.IBPluginDependency + + + YES + LocationController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{-934, 473}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{150, 163}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 16 + + + + YES + + LocationController + TableController + + IBProjectSource + Classes/LocationController.h + + + + TableController + UIViewController + + IBProjectSource + Classes/TableController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.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 + + + + 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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample-3_x.xcodeproj + 3 + 87 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/MainWindow.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/MainWindow.xib new file mode 100644 index 000000000..e7ad734bd --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/MainWindow.xib @@ -0,0 +1,525 @@ + + + + 768 + 10B504 + 740 + 1038.2 + 437.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + + 1316 + + {320, 480} + + 1 + MSAxIDEAA + + NO + NO + + + + + + + 256 + {0, 0} + NO + YES + YES + + + YES + + + + AdWhirl Samples + + + RootViewController + + + + + + + + YES + + + delegate + + + + 4 + + + + window + + + + 5 + + + + navigationController + + + + 15 + + + + + YES + + 0 + + + + + + 2 + + + YES + + + + + -1 + + + File's Owner + + + 3 + + + + + -2 + + + + + 9 + + + YES + + + + + + + 11 + + + + + 13 + + + YES + + + + + + 14 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 11.IBPluginDependency + 13.CustomClassName + 13.IBPluginDependency + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + 9.IBEditorWindowLastContentRect + 9.IBPluginDependency + + + YES + UIApplication + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + RootViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + YES + + + YES + + + {{673, 376}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AdWhirlSDK2_SampleAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{27, 281}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 15 + + + + YES + + AdWhirlSDK2_SampleAppDelegate + NSObject + + YES + + YES + navigationController + window + + + YES + UINavigationController + UIWindow + + + + IBProjectSource + Classes/AdWhirlSDK2_SampleAppDelegate.h + + + + RootViewController + UITableViewController + + IBProjectSource + Classes/RootViewController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UINavigationBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UINavigationBar.h + + + + UINavigationController + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UINavigationItem + NSObject + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.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 + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample.xcodeproj + 3 + 3.1 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/ModalViewController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/ModalViewController.xib new file mode 100644 index 000000000..ff4ae1c51 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/ModalViewController.xib @@ -0,0 +1,493 @@ + + + + 768 + 10C540 + 762 + 1038.25 + 458.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 87 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 301 + {{121, 192}, {57, 57}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA + + + 3 + MC41AA + + + NSImage + adwhirlsample_icon.png + + + + + 301 + {{20, 114}, {260, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Tap the logo to dismiss + + + 3 + MC45MDg3NTkxMjQxIDAuNzUAA + + {2, 2} + 1 + 10 + 1 + + + {300, 440} + + + 10 + + 549453824 + {84, 1} + + YES + + YES + + + + TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB +AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + NO + NO + IBCocoaTouchFramework + + + + + YES + + + view + + + + 3 + + + + dismiss: + + + 7 + + 6 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 5 + + + + + 7 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 5.IBPluginDependency + 7.IBPluginDependency + + + YES + ModalViewController + UIResponder + {{414, 346}, {300, 440}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 7 + + + + YES + + ModalViewController + UIViewController + + dismiss: + id + + + IBProjectSource + Classes/ModalViewController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + 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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample.xcodeproj + 3 + + adwhirlsample_icon.png + {57, 57} + + 87 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/RootViewController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/RootViewController.xib new file mode 100644 index 000000000..f5a5193c0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/RootViewController.xib @@ -0,0 +1,380 @@ + + + + 784 + 10A405 + 732 + 1031 + 432.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + {320, 247} + + + 3 + MQA + + NO + YES + NO + NO + 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 + RootViewController + UIResponder + {{0, 598}, {320, 247}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 5 + + + + YES + + RootViewController + UITableViewController + + IBProjectSource + Classes/RootViewController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample.xcodeproj + 3 + 3.1 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/SimpleViewController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/SimpleViewController.xib new file mode 100644 index 000000000..095cec22e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/SimpleViewController.xib @@ -0,0 +1,723 @@ + + + + 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 + + + + 293 + + YES + + + 295 + {{20, 106}, {136, 37}} + + NO + NO + 607701 + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + 1 + Request New Ad + + 3 + MQA + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + 3 + MC41AA + + + + + 295 + {{164, 106}, {136, 37}} + + NO + NO + 607702 + IBCocoaTouchFramework + 0 + 0 + + 1 + Roll Over + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + + + + 295 + {{20, 243}, {280, 153}} + + NO + YES + 1337 + NO + IBCocoaTouchFramework + Requesting Ad... + + Helvetica-Bold + 17 + 16 + + + 1 + MC4xMjc3MzcyMjYzIDAgMAA + + + 1 + 10 + 9 + 1 + + + + 295 + {{20, 153}, {136, 37}} + + NO + 607703 + IBCocoaTouchFramework + 0 + 0 + + 1 + Show Modal View + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + 293 + {{206, 177}, {94, 27}} + + NO + 706613 + IBCocoaTouchFramework + 0 + 0 + YES + + + + 292 + {{206, 154}, {66, 21}} + + NO + YES + 7 + 7066130 + NO + IBCocoaTouchFramework + Refresh: + + 1 + MCAwIDAAA + + + 1 + 10 + + + + 295 + {{20, 198}, {157, 37}} + + NO + 607704 + IBCocoaTouchFramework + 0 + 0 + + 1 + Request New Config + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + {320, 416} + + + 10 + + 549453824 + {84, 1} + + YES + + YES + + + + TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB +AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + + + NO + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 3 + + + + requestNewAd: + + + 7 + + 7 + + + + rollOver: + + + 7 + + 8 + + + + showModalView: + + + 7 + + 10 + + + + toggleRefreshAd: + + + 13 + + 16 + + + + requestNewConfig: + + + 7 + + 18 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 9 + + + + + 14 + + + + + 15 + + + + + 17 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 17.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 5.IBViewBoundsToFrameTransform + 6.IBPluginDependency + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + SimpleViewController + UIResponder + {{688, 498}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDJAAAww0AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAwzwAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 18 + + + + YES + + SimpleViewController + UIViewController + + YES + + YES + requestNewAd: + requestNewConfig: + rollOver: + showModalView: + toggleRefreshAd: + + + YES + id + id + id + id + id + + + + YES + + YES + requestNewAd: + requestNewConfig: + rollOver: + showModalView: + toggleRefreshAd: + + + YES + + requestNewAd: + id + + + requestNewConfig: + id + + + rollOver: + id + + + showModalView: + id + + + toggleRefreshAd: + id + + + + + IBProjectSource + Classes/SimpleViewController.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 + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UISwitch + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UISwitch.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + MediaPlayer.framework/Headers/MPMoviePlayerViewController.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 + AdWhirlSDK2_Sample.xcodeproj + 3 + 123 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/TableController.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/TableController.xib new file mode 100644 index 000000000..db5207404 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/TableController.xib @@ -0,0 +1,468 @@ + + + + 768 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 87 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 306 + {320, 255} + + + 3 + MQA + + NO + YES + NO + 3337 + + IBCocoaTouchFramework + NO + 1 + 0 + 44 + 22 + 22 + + + + 282 + {{20, 263}, {280, 147}} + + NO + YES + 1337 + NO + IBCocoaTouchFramework + Requesting Ad... + + Helvetica-Bold + 17 + 16 + + + 1 + MCAwIDAAA + + + 1 + 10 + 9 + 1 + + + {320, 416} + + + 3 + MQA + + 2 + + + NO + + + NO + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 13 + + + + dataSource + + + + 14 + + + + delegate + + + + 15 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + 4 + + + + + 9 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 4.IBEditorWindowLastContentRect + 4.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + TableController + UIResponder + {{-934, 473}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{159, 187}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 15 + + + + YES + + TableController + UIViewController + + IBProjectSource + Classes/TableController.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/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.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 + + + + 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/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + AdWhirlSDK2_Sample-3_x.xcodeproj + 3 + 87 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_icon.png b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_icon.png new file mode 100644 index 000000000..0deed98bf Binary files /dev/null and b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_icon.png differ diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_iconAT2x.png b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_iconAT2x.png new file mode 100644 index 000000000..a2fa9eb41 Binary files /dev/null and b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/adwhirlsample_iconAT2x.png differ diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/main.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/main.m new file mode 100644 index 000000000..0254298f5 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlSDK2_Sample/main.m @@ -0,0 +1,29 @@ +/* + + main.m + + Copyright 2009 AdMob, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests-Info.plist b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests-Info.plist new file mode 100644 index 000000000..da6b2f165 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests-Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow_iPhone + NSMainNibFile~ipad + MainWindow_iPad + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests.xcodeproj/project.pbxproj b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests.xcodeproj/project.pbxproj new file mode 100755 index 000000000..e90f817cb --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests.xcodeproj/project.pbxproj @@ -0,0 +1,766 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1B183C6A1212147C0026647E /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2860E327111B887F00E27156 /* MainWindow_iPhone.xib */; }; + 1B183C6B1212147C0026647E /* MainWindow_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2860E32D111B888700E27156 /* MainWindow_iPad.xib */; }; + 1B183C6C1212147C0026647E /* AdWhirlWebBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1B264C0A120B6E0000DB41AD /* AdWhirlWebBrowser.xib */; }; + 1B183C6D121214860026647E /* AppDelegate_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = 2860E326111B887F00E27156 /* AppDelegate_iPhone.m */; }; + 1B183C6E121214860026647E /* AppDelegate_iPad.m in Sources */ = {isa = PBXBuildFile; fileRef = 2860E32C111B888700E27156 /* AppDelegate_iPad.m */; }; + 1B183C6F121214860026647E /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BBC120B6D1600DB41AD /* GTMObjC2Runtime.m */; }; + 1B183C70121214860026647E /* GTMRegex.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BBE120B6D1600DB41AD /* GTMRegex.m */; }; + 1B183C71121214860026647E /* GTMIPhoneUnitTestDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BC2120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.m */; }; + 1B183C72121214860026647E /* GTMIPhoneUnitTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BC3120B6D1600DB41AD /* GTMIPhoneUnitTestMain.m */; }; + 1B183C73121214860026647E /* GTMSenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BC5120B6D1600DB41AD /* GTMSenTestCase.m */; }; + 1B183C74121214860026647E /* GTMUnitTestDevLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BC7120B6D1600DB41AD /* GTMUnitTestDevLog.m */; }; + 1B183C75121214860026647E /* AdWhirlAdapterCustom.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BF4120B6E0000DB41AD /* AdWhirlAdapterCustom.m */; }; + 1B183C76121214860026647E /* AdWhirlAdapterEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BF6120B6E0000DB41AD /* AdWhirlAdapterEvent.m */; }; + 1B183C77121214860026647E /* AdWhirlAdapterGeneric.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BF8120B6E0000DB41AD /* AdWhirlAdapterGeneric.m */; }; + 1B183C78121214860026647E /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BFA120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.m */; }; + 1B183C79121214860026647E /* AdWhirlAdNetworkAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BFB120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.m */; }; + 1B183C7A121214860026647E /* AdWhirlAdNetworkConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BFD120B6E0000DB41AD /* AdWhirlAdNetworkConfig.m */; }; + 1B183C7B121214860026647E /* AdWhirlAdNetworkRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264BFF120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.m */; }; + 1B183C7C121214860026647E /* AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C01120B6E0000DB41AD /* AdWhirlConfig.m */; }; + 1B183C7D121214860026647E /* AdWhirlCustomAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C03120B6E0000DB41AD /* AdWhirlCustomAdView.m */; }; + 1B183C7E121214860026647E /* AdWhirlError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C05120B6E0000DB41AD /* AdWhirlError.m */; }; + 1B183C7F121214860026647E /* AdWhirlLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C07120B6E0000DB41AD /* AdWhirlLog.m */; }; + 1B183C80121214860026647E /* AdWhirlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C09120B6E0000DB41AD /* AdWhirlView.m */; }; + 1B183C81121214860026647E /* AdWhirlWebBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C0C120B6E0000DB41AD /* AdWhirlWebBrowserController.m */; }; + 1B183C82121214860026647E /* ARRollerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B264C0D120B6E0000DB41AD /* ARRollerView.m */; }; + 1B183C83121214860026647E /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8128120B727200CCAD25 /* CDataScanner.m */; }; + 1B183C84121214860026647E /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA812B120B727200CCAD25 /* CDataScanner_Extensions.m */; }; + 1B183C85121214860026647E /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA812D120B727200CCAD25 /* NSCharacterSet_Extensions.m */; }; + 1B183C86121214860026647E /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA812F120B727200CCAD25 /* NSDictionary_JSONExtensions.m */; }; + 1B183C87121214860026647E /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8131120B727200CCAD25 /* NSScanner_Extensions.m */; }; + 1B183C88121214860026647E /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8134120B727200CCAD25 /* CJSONDataSerializer.m */; }; + 1B183C89121214860026647E /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8136120B727200CCAD25 /* CJSONDeserializer.m */; }; + 1B183C8A121214860026647E /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8138120B727200CCAD25 /* CJSONScanner.m */; }; + 1B183C8B121214860026647E /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA813A120B727200CCAD25 /* CJSONSerializer.m */; }; + 1B183C8C121214860026647E /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA813C120B727200CCAD25 /* CSerializedJSONData.m */; }; + 1B183C8D121214860026647E /* AdWhirlAdNetworkConfigTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BDA8250120B786500CCAD25 /* AdWhirlAdNetworkConfigTest.m */; }; + 1B183C8E121214860026647E /* AdWhirlClassWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6898AD120C8B7A0080EAC1 /* AdWhirlClassWrapper.m */; }; + 1B183C8F121214860026647E /* GTMDevLogUnitTestingBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BADCC45120CBF86005D60B5 /* GTMDevLogUnitTestingBridge.m */; }; + 1B183C90121214860026647E /* AdWhirlConfigTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B183A871211C22B0026647E /* AdWhirlConfigTest.m */; }; + 1B183C91121214860026647E /* UIColor+AdWhirlConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B183A901211C61B0026647E /* UIColor+AdWhirlConfig.m */; }; + 1B183C92121214860026647E /* UIColor+AdWhirlConfigTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B183AB71211C8E90026647E /* UIColor+AdWhirlConfigTest.m */; }; + 1B183D84121214910026647E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1B183D85121214910026647E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 1B183D86121214910026647E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 1B183D87121214910026647E /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BDA8195120B751500CCAD25 /* CoreLocation.framework */; }; + 1B183D88121214910026647E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BDA819F120B751500CCAD25 /* QuartzCore.framework */; }; + 1B183D89121214910026647E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BDA81A1120B751500CCAD25 /* SystemConfiguration.framework */; }; + 1B183D8A121214910026647E /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BADCBA8120CACBE005D60B5 /* libOCMock.a */; }; + 1B4905A81230815300BAECDE /* AdWhirlViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B4905A71230815300BAECDE /* AdWhirlViewTest.m */; }; + 1B6CE7DE12149A8200E44A28 /* AdWhirlConfigStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6CE7DD12149A8200E44A28 /* AdWhirlConfigStore.m */; }; + 1B6CE7E112149A9E00E44A28 /* AdWhirlConfigStoreTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6CE7E012149A9E00E44A28 /* AdWhirlConfigStoreTest.m */; }; + 1B6CE8891214A65800E44A28 /* AWNetworkReachabilityWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6CE8881214A65800E44A28 /* AWNetworkReachabilityWrapper.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1B183A871211C22B0026647E /* AdWhirlConfigTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigTest.m; sourceTree = ""; wrapsLines = 1; }; + 1B183A8F1211C61B0026647E /* UIColor+AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+AdWhirlConfig.h"; sourceTree = ""; }; + 1B183A901211C61B0026647E /* UIColor+AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AdWhirlConfig.m"; sourceTree = ""; }; + 1B183AB71211C8E90026647E /* UIColor+AdWhirlConfigTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AdWhirlConfigTest.m"; sourceTree = ""; }; + 1B183C5C121212B70026647E /* AdWhirlTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdWhirlTests.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1B264BBB120B6D1600DB41AD /* GTMObjC2Runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMObjC2Runtime.h; sourceTree = ""; }; + 1B264BBC120B6D1600DB41AD /* GTMObjC2Runtime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMObjC2Runtime.m; sourceTree = ""; }; + 1B264BBD120B6D1600DB41AD /* GTMRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMRegex.h; sourceTree = ""; }; + 1B264BBE120B6D1600DB41AD /* GTMRegex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMRegex.m; sourceTree = ""; }; + 1B264BBF120B6D1600DB41AD /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = ""; }; + 1B264BC1120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMIPhoneUnitTestDelegate.h; sourceTree = ""; }; + 1B264BC2120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMIPhoneUnitTestDelegate.m; sourceTree = ""; }; + 1B264BC3120B6D1600DB41AD /* GTMIPhoneUnitTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMIPhoneUnitTestMain.m; sourceTree = ""; }; + 1B264BC4120B6D1600DB41AD /* GTMSenTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMSenTestCase.h; sourceTree = ""; }; + 1B264BC5120B6D1600DB41AD /* GTMSenTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMSenTestCase.m; sourceTree = ""; }; + 1B264BC6120B6D1600DB41AD /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = ""; }; + 1B264BC7120B6D1600DB41AD /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = ""; }; + 1B264BC8120B6D1600DB41AD /* RunIPhoneUnitTest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = RunIPhoneUnitTest.sh; sourceTree = ""; }; + 1B264BD9120B6E0000DB41AD /* AdWhirlAdapterAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterAdMob.h; sourceTree = ""; }; + 1B264BDA120B6E0000DB41AD /* AdWhirlAdapterAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterAdMob.m; sourceTree = ""; }; + 1B264BDB120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGoogleAdSense.h; sourceTree = ""; }; + 1B264BDC120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGoogleAdSense.m; sourceTree = ""; }; + 1B264BDD120B6E0000DB41AD /* AdWhirlAdapterGreystripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGreystripe.h; sourceTree = ""; }; + 1B264BDE120B6E0000DB41AD /* AdWhirlAdapterGreystripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGreystripe.m; sourceTree = ""; }; + 1B264BDF120B6E0000DB41AD /* AdWhirlAdapterIAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterIAd.h; sourceTree = ""; }; + 1B264BE0120B6E0000DB41AD /* AdWhirlAdapterIAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterIAd.m; sourceTree = ""; }; + 1B264BE1120B6E0000DB41AD /* AdWhirlAdapterInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterInMobi.h; sourceTree = ""; }; + 1B264BE2120B6E0000DB41AD /* AdWhirlAdapterInMobi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterInMobi.m; sourceTree = ""; }; + 1B264BE3120B6E0000DB41AD /* AdWhirlAdapterJumpTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterJumpTap.h; sourceTree = ""; }; + 1B264BE4120B6E0000DB41AD /* AdWhirlAdapterJumpTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterJumpTap.m; sourceTree = ""; }; + 1B264BE5120B6E0000DB41AD /* AdWhirlAdapterMdotM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMdotM.h; sourceTree = ""; }; + 1B264BE6120B6E0000DB41AD /* AdWhirlAdapterMdotM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMdotM.m; sourceTree = ""; }; + 1B264BE7120B6E0000DB41AD /* AdWhirlAdapterMillennial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMillennial.h; sourceTree = ""; }; + 1B264BE8120B6E0000DB41AD /* AdWhirlAdapterMillennial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMillennial.m; sourceTree = ""; }; + 1B264BE9120B6E0000DB41AD /* AdWhirlAdapterQuattro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterQuattro.h; sourceTree = ""; }; + 1B264BEA120B6E0000DB41AD /* AdWhirlAdapterQuattro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterQuattro.m; sourceTree = ""; }; + 1B264BEB120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterVideoEgg.h; sourceTree = ""; }; + 1B264BEC120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterVideoEgg.m; sourceTree = ""; }; + 1B264BED120B6E0000DB41AD /* AdWhirlAdapterZestADZ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterZestADZ.h; sourceTree = ""; }; + 1B264BEE120B6E0000DB41AD /* AdWhirlAdapterZestADZ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterZestADZ.m; sourceTree = ""; }; + 1B264BEF120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkAdapter.h; sourceTree = ""; }; + 1B264BF0120B6E0000DB41AD /* AdWhirlDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlDelegateProtocol.h; sourceTree = ""; }; + 1B264BF1120B6E0000DB41AD /* AdWhirlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlView.h; sourceTree = ""; }; + 1B264BF3120B6E0000DB41AD /* AdWhirlAdapterCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterCustom.h; sourceTree = ""; }; + 1B264BF4120B6E0000DB41AD /* AdWhirlAdapterCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterCustom.m; sourceTree = ""; }; + 1B264BF5120B6E0000DB41AD /* AdWhirlAdapterEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterEvent.h; sourceTree = ""; }; + 1B264BF6120B6E0000DB41AD /* AdWhirlAdapterEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterEvent.m; sourceTree = ""; }; + 1B264BF7120B6E0000DB41AD /* AdWhirlAdapterGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGeneric.h; sourceTree = ""; }; + 1B264BF8120B6E0000DB41AD /* AdWhirlAdapterGeneric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGeneric.m; sourceTree = ""; }; + 1B264BF9120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlAdNetworkAdapter+Helpers.h"; sourceTree = ""; }; + 1B264BFA120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AdWhirlAdNetworkAdapter+Helpers.m"; sourceTree = ""; }; + 1B264BFB120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkAdapter.m; sourceTree = ""; }; + 1B264BFC120B6E0000DB41AD /* AdWhirlAdNetworkConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkConfig.h; sourceTree = ""; }; + 1B264BFD120B6E0000DB41AD /* AdWhirlAdNetworkConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfig.m; sourceTree = ""; }; + 1B264BFE120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkRegistry.h; sourceTree = ""; }; + 1B264BFF120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkRegistry.m; sourceTree = ""; }; + 1B264C00120B6E0000DB41AD /* AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfig.h; sourceTree = ""; }; + 1B264C01120B6E0000DB41AD /* AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfig.m; sourceTree = ""; }; + 1B264C02120B6E0000DB41AD /* AdWhirlCustomAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlCustomAdView.h; sourceTree = ""; }; + 1B264C03120B6E0000DB41AD /* AdWhirlCustomAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlCustomAdView.m; sourceTree = ""; }; + 1B264C04120B6E0000DB41AD /* AdWhirlError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlError.h; sourceTree = ""; }; + 1B264C05120B6E0000DB41AD /* AdWhirlError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlError.m; sourceTree = ""; }; + 1B264C06120B6E0000DB41AD /* AdWhirlLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlLog.h; sourceTree = ""; }; + 1B264C07120B6E0000DB41AD /* AdWhirlLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlLog.m; sourceTree = ""; }; + 1B264C08120B6E0000DB41AD /* AdWhirlView+.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlView+.h"; sourceTree = ""; }; + 1B264C09120B6E0000DB41AD /* AdWhirlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlView.m; sourceTree = ""; }; + 1B264C0A120B6E0000DB41AD /* AdWhirlWebBrowser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdWhirlWebBrowser.xib; sourceTree = ""; }; + 1B264C0B120B6E0000DB41AD /* AdWhirlWebBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlWebBrowserController.h; sourceTree = ""; }; + 1B264C0C120B6E0000DB41AD /* AdWhirlWebBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlWebBrowserController.m; sourceTree = ""; }; + 1B264C0D120B6E0000DB41AD /* ARRollerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRollerView.m; sourceTree = ""; }; + 1B264C0F120B6E0000DB41AD /* ARRollerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerProtocol.h; sourceTree = ""; }; + 1B264C10120B6E0000DB41AD /* ARRollerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerView.h; sourceTree = ""; }; + 1B4905A71230815300BAECDE /* AdWhirlViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlViewTest.m; sourceTree = ""; }; + 1B6898AC120C8B7A0080EAC1 /* AdWhirlClassWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlClassWrapper.h; sourceTree = ""; }; + 1B6898AD120C8B7A0080EAC1 /* AdWhirlClassWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlClassWrapper.m; sourceTree = ""; }; + 1B6CE7DC12149A8200E44A28 /* AdWhirlConfigStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfigStore.h; sourceTree = ""; }; + 1B6CE7DD12149A8200E44A28 /* AdWhirlConfigStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigStore.m; sourceTree = ""; }; + 1B6CE7E012149A9E00E44A28 /* AdWhirlConfigStoreTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigStoreTest.m; sourceTree = ""; }; + 1B6CE8871214A65800E44A28 /* AWNetworkReachabilityWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityWrapper.h; sourceTree = ""; }; + 1B6CE8881214A65800E44A28 /* AWNetworkReachabilityWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AWNetworkReachabilityWrapper.m; sourceTree = ""; }; + 1B6CE8D81214CE3600E44A28 /* AWNetworkReachabilityDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityDelegate.h; sourceTree = ""; }; + 1BADCBA2120CACBE005D60B5 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = ""; }; + 1BADCBA3120CACBE005D60B5 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = ""; }; + 1BADCBA4120CACBE005D60B5 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = ""; }; + 1BADCBA5120CACBE005D60B5 /* OCMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = ""; }; + 1BADCBA6120CACBE005D60B5 /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = ""; }; + 1BADCBA7120CACBE005D60B5 /* OCMockRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockRecorder.h; sourceTree = ""; }; + 1BADCBA8120CACBE005D60B5 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = ""; }; + 1BADCC45120CBF86005D60B5 /* GTMDevLogUnitTestingBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLogUnitTestingBridge.m; sourceTree = ""; }; + 1BDA8127120B727200CCAD25 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = ""; }; + 1BDA8128120B727200CCAD25 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = ""; }; + 1BDA812A120B727200CCAD25 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = ""; }; + 1BDA812B120B727200CCAD25 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = ""; }; + 1BDA812C120B727200CCAD25 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = ""; }; + 1BDA812D120B727200CCAD25 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = ""; }; + 1BDA812E120B727200CCAD25 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = ""; }; + 1BDA812F120B727200CCAD25 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = ""; }; + 1BDA8130120B727200CCAD25 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = ""; }; + 1BDA8131120B727200CCAD25 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = ""; }; + 1BDA8133120B727200CCAD25 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = ""; }; + 1BDA8134120B727200CCAD25 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = ""; }; + 1BDA8135120B727200CCAD25 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = ""; }; + 1BDA8136120B727200CCAD25 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = ""; }; + 1BDA8137120B727200CCAD25 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = ""; }; + 1BDA8138120B727200CCAD25 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = ""; }; + 1BDA8139120B727200CCAD25 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = ""; }; + 1BDA813A120B727200CCAD25 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = ""; }; + 1BDA813B120B727200CCAD25 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = ""; }; + 1BDA813C120B727200CCAD25 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = ""; }; + 1BDA8195120B751500CCAD25 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 1BDA819F120B751500CCAD25 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 1BDA81A1120B751500CCAD25 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 1BDA8250120B786500CCAD25 /* AdWhirlAdNetworkConfigTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfigTest.m; sourceTree = ""; }; + 1BED9B471210C7A100E06937 /* AdWhirlTests_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlTests_Prefix.pch; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 2860E325111B887F00E27156 /* AppDelegate_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPhone.h; sourceTree = ""; }; + 2860E326111B887F00E27156 /* AppDelegate_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate_iPhone.m; sourceTree = ""; }; + 2860E327111B887F00E27156 /* MainWindow_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPhone.xib; sourceTree = ""; }; + 2860E32B111B888700E27156 /* AppDelegate_iPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPad.h; sourceTree = ""; }; + 2860E32C111B888700E27156 /* AppDelegate_iPad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate_iPad.m; sourceTree = ""; }; + 2860E32D111B888700E27156 /* MainWindow_iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPad.xib; sourceTree = ""; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Shared/main.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* AdWhirlTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "AdWhirlTests-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1B183C5A121212B70026647E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B183D84121214910026647E /* Foundation.framework in Frameworks */, + 1B183D85121214910026647E /* UIKit.framework in Frameworks */, + 1B183D86121214910026647E /* CoreGraphics.framework in Frameworks */, + 1B183D87121214910026647E /* CoreLocation.framework in Frameworks */, + 1B183D88121214910026647E /* QuartzCore.framework in Frameworks */, + 1B183D89121214910026647E /* SystemConfiguration.framework in Frameworks */, + 1B183D8A121214910026647E /* libOCMock.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1B183C5C121212B70026647E /* AdWhirlTests.app */, + ); + name = Products; + sourceTree = ""; + }; + 1B264BB8120B6D0900DB41AD /* UnitTests */ = { + isa = PBXGroup; + children = ( + 1BDA8250120B786500CCAD25 /* AdWhirlAdNetworkConfigTest.m */, + 1B183A871211C22B0026647E /* AdWhirlConfigTest.m */, + 1B183AB71211C8E90026647E /* UIColor+AdWhirlConfigTest.m */, + 1B6CE7E012149A9E00E44A28 /* AdWhirlConfigStoreTest.m */, + 1B4905A71230815300BAECDE /* AdWhirlViewTest.m */, + ); + path = UnitTests; + sourceTree = ""; + }; + 1B264BB9120B6D1600DB41AD /* GoogleToolboxForMac */ = { + isa = PBXGroup; + children = ( + 1B264BBA120B6D1600DB41AD /* Foundation */, + 1B264BBF120B6D1600DB41AD /* GTMDefines.h */, + 1B264BC0120B6D1600DB41AD /* UnitTesting */, + ); + name = GoogleToolboxForMac; + path = ../GoogleToolboxForMac; + sourceTree = SOURCE_ROOT; + }; + 1B264BBA120B6D1600DB41AD /* Foundation */ = { + isa = PBXGroup; + children = ( + 1B264BBB120B6D1600DB41AD /* GTMObjC2Runtime.h */, + 1B264BBC120B6D1600DB41AD /* GTMObjC2Runtime.m */, + 1B264BBD120B6D1600DB41AD /* GTMRegex.h */, + 1B264BBE120B6D1600DB41AD /* GTMRegex.m */, + ); + path = Foundation; + sourceTree = ""; + }; + 1B264BC0120B6D1600DB41AD /* UnitTesting */ = { + isa = PBXGroup; + children = ( + 1BADCC45120CBF86005D60B5 /* GTMDevLogUnitTestingBridge.m */, + 1B264BC1120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.h */, + 1B264BC2120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.m */, + 1B264BC3120B6D1600DB41AD /* GTMIPhoneUnitTestMain.m */, + 1B264BC4120B6D1600DB41AD /* GTMSenTestCase.h */, + 1B264BC5120B6D1600DB41AD /* GTMSenTestCase.m */, + 1B264BC6120B6D1600DB41AD /* GTMUnitTestDevLog.h */, + 1B264BC7120B6D1600DB41AD /* GTMUnitTestDevLog.m */, + 1B264BC8120B6D1600DB41AD /* RunIPhoneUnitTest.sh */, + ); + path = UnitTesting; + sourceTree = ""; + }; + 1B264BD7120B6E0000DB41AD /* AdWhirl */ = { + isa = PBXGroup; + children = ( + 1B264BD8120B6E0000DB41AD /* adapters */, + 1B264BF0120B6E0000DB41AD /* AdWhirlDelegateProtocol.h */, + 1B264BF1120B6E0000DB41AD /* AdWhirlView.h */, + 1B264BF2120B6E0000DB41AD /* internal */, + 1B264C0E120B6E0000DB41AD /* legacy */, + ); + name = AdWhirl; + path = ../AdWhirl; + sourceTree = SOURCE_ROOT; + }; + 1B264BD8120B6E0000DB41AD /* adapters */ = { + isa = PBXGroup; + children = ( + 1B264BD9120B6E0000DB41AD /* AdWhirlAdapterAdMob.h */, + 1B264BDA120B6E0000DB41AD /* AdWhirlAdapterAdMob.m */, + 1B264BDB120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.h */, + 1B264BDC120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.m */, + 1B264BDD120B6E0000DB41AD /* AdWhirlAdapterGreystripe.h */, + 1B264BDE120B6E0000DB41AD /* AdWhirlAdapterGreystripe.m */, + 1B264BDF120B6E0000DB41AD /* AdWhirlAdapterIAd.h */, + 1B264BE0120B6E0000DB41AD /* AdWhirlAdapterIAd.m */, + 1B264BE1120B6E0000DB41AD /* AdWhirlAdapterInMobi.h */, + 1B264BE2120B6E0000DB41AD /* AdWhirlAdapterInMobi.m */, + 1B264BE3120B6E0000DB41AD /* AdWhirlAdapterJumpTap.h */, + 1B264BE4120B6E0000DB41AD /* AdWhirlAdapterJumpTap.m */, + 1B264BE5120B6E0000DB41AD /* AdWhirlAdapterMdotM.h */, + 1B264BE6120B6E0000DB41AD /* AdWhirlAdapterMdotM.m */, + 1B264BE7120B6E0000DB41AD /* AdWhirlAdapterMillennial.h */, + 1B264BE8120B6E0000DB41AD /* AdWhirlAdapterMillennial.m */, + 1B264BE9120B6E0000DB41AD /* AdWhirlAdapterQuattro.h */, + 1B264BEA120B6E0000DB41AD /* AdWhirlAdapterQuattro.m */, + 1B264BEB120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.h */, + 1B264BEC120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.m */, + 1B264BED120B6E0000DB41AD /* AdWhirlAdapterZestADZ.h */, + 1B264BEE120B6E0000DB41AD /* AdWhirlAdapterZestADZ.m */, + 1B264BEF120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.h */, + ); + path = adapters; + sourceTree = ""; + }; + 1B264BF2120B6E0000DB41AD /* internal */ = { + isa = PBXGroup; + children = ( + 1B264BF3120B6E0000DB41AD /* AdWhirlAdapterCustom.h */, + 1B264BF4120B6E0000DB41AD /* AdWhirlAdapterCustom.m */, + 1B264BF5120B6E0000DB41AD /* AdWhirlAdapterEvent.h */, + 1B264BF6120B6E0000DB41AD /* AdWhirlAdapterEvent.m */, + 1B264BF7120B6E0000DB41AD /* AdWhirlAdapterGeneric.h */, + 1B264BF8120B6E0000DB41AD /* AdWhirlAdapterGeneric.m */, + 1B264BF9120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.h */, + 1B264BFA120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.m */, + 1B264BFB120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.m */, + 1B264BFC120B6E0000DB41AD /* AdWhirlAdNetworkConfig.h */, + 1B264BFD120B6E0000DB41AD /* AdWhirlAdNetworkConfig.m */, + 1B264BFE120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.h */, + 1B264BFF120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.m */, + 1B264C00120B6E0000DB41AD /* AdWhirlConfig.h */, + 1B264C01120B6E0000DB41AD /* AdWhirlConfig.m */, + 1B264C02120B6E0000DB41AD /* AdWhirlCustomAdView.h */, + 1B264C03120B6E0000DB41AD /* AdWhirlCustomAdView.m */, + 1B264C04120B6E0000DB41AD /* AdWhirlError.h */, + 1B264C05120B6E0000DB41AD /* AdWhirlError.m */, + 1B264C06120B6E0000DB41AD /* AdWhirlLog.h */, + 1B264C07120B6E0000DB41AD /* AdWhirlLog.m */, + 1B264C08120B6E0000DB41AD /* AdWhirlView+.h */, + 1B264C09120B6E0000DB41AD /* AdWhirlView.m */, + 1B264C0A120B6E0000DB41AD /* AdWhirlWebBrowser.xib */, + 1B264C0B120B6E0000DB41AD /* AdWhirlWebBrowserController.h */, + 1B264C0C120B6E0000DB41AD /* AdWhirlWebBrowserController.m */, + 1B264C0D120B6E0000DB41AD /* ARRollerView.m */, + 1B6898AC120C8B7A0080EAC1 /* AdWhirlClassWrapper.h */, + 1B6898AD120C8B7A0080EAC1 /* AdWhirlClassWrapper.m */, + 1B183A8F1211C61B0026647E /* UIColor+AdWhirlConfig.h */, + 1B183A901211C61B0026647E /* UIColor+AdWhirlConfig.m */, + 1B6CE7DC12149A8200E44A28 /* AdWhirlConfigStore.h */, + 1B6CE7DD12149A8200E44A28 /* AdWhirlConfigStore.m */, + 1B6CE8871214A65800E44A28 /* AWNetworkReachabilityWrapper.h */, + 1B6CE8881214A65800E44A28 /* AWNetworkReachabilityWrapper.m */, + 1B6CE8D81214CE3600E44A28 /* AWNetworkReachabilityDelegate.h */, + ); + path = internal; + sourceTree = ""; + }; + 1B264C0E120B6E0000DB41AD /* legacy */ = { + isa = PBXGroup; + children = ( + 1B264C0F120B6E0000DB41AD /* ARRollerProtocol.h */, + 1B264C10120B6E0000DB41AD /* ARRollerView.h */, + ); + path = legacy; + sourceTree = ""; + }; + 1BADCB9F120CACBE005D60B5 /* OCMock Library */ = { + isa = PBXGroup; + children = ( + 1BADCBA0120CACBE005D60B5 /* Headers */, + 1BADCBA8120CACBE005D60B5 /* libOCMock.a */, + ); + name = "OCMock Library"; + path = OCMock/build/Debug/Library; + sourceTree = ""; + }; + 1BADCBA0120CACBE005D60B5 /* Headers */ = { + isa = PBXGroup; + children = ( + 1BADCBA1120CACBE005D60B5 /* OCMock */, + ); + path = Headers; + sourceTree = ""; + }; + 1BADCBA1120CACBE005D60B5 /* OCMock */ = { + isa = PBXGroup; + children = ( + 1BADCBA2120CACBE005D60B5 /* NSNotificationCenter+OCMAdditions.h */, + 1BADCBA3120CACBE005D60B5 /* OCMArg.h */, + 1BADCBA4120CACBE005D60B5 /* OCMConstraint.h */, + 1BADCBA5120CACBE005D60B5 /* OCMock.h */, + 1BADCBA6120CACBE005D60B5 /* OCMockObject.h */, + 1BADCBA7120CACBE005D60B5 /* OCMockRecorder.h */, + ); + path = OCMock; + sourceTree = ""; + }; + 1BDA8126120B727200CCAD25 /* TouchJSON */ = { + isa = PBXGroup; + children = ( + 1BDA8127120B727200CCAD25 /* CDataScanner.h */, + 1BDA8128120B727200CCAD25 /* CDataScanner.m */, + 1BDA8129120B727200CCAD25 /* Extensions */, + 1BDA8132120B727200CCAD25 /* JSON */, + ); + name = TouchJSON; + path = ../TouchJSON; + sourceTree = SOURCE_ROOT; + }; + 1BDA8129120B727200CCAD25 /* Extensions */ = { + isa = PBXGroup; + children = ( + 1BDA812A120B727200CCAD25 /* CDataScanner_Extensions.h */, + 1BDA812B120B727200CCAD25 /* CDataScanner_Extensions.m */, + 1BDA812C120B727200CCAD25 /* NSCharacterSet_Extensions.h */, + 1BDA812D120B727200CCAD25 /* NSCharacterSet_Extensions.m */, + 1BDA812E120B727200CCAD25 /* NSDictionary_JSONExtensions.h */, + 1BDA812F120B727200CCAD25 /* NSDictionary_JSONExtensions.m */, + 1BDA8130120B727200CCAD25 /* NSScanner_Extensions.h */, + 1BDA8131120B727200CCAD25 /* NSScanner_Extensions.m */, + ); + path = Extensions; + sourceTree = ""; + }; + 1BDA8132120B727200CCAD25 /* JSON */ = { + isa = PBXGroup; + children = ( + 1BDA8133120B727200CCAD25 /* CJSONDataSerializer.h */, + 1BDA8134120B727200CCAD25 /* CJSONDataSerializer.m */, + 1BDA8135120B727200CCAD25 /* CJSONDeserializer.h */, + 1BDA8136120B727200CCAD25 /* CJSONDeserializer.m */, + 1BDA8137120B727200CCAD25 /* CJSONScanner.h */, + 1BDA8138120B727200CCAD25 /* CJSONScanner.m */, + 1BDA8139120B727200CCAD25 /* CJSONSerializer.h */, + 1BDA813A120B727200CCAD25 /* CJSONSerializer.m */, + 1BDA813B120B727200CCAD25 /* CSerializedJSONData.h */, + 1BDA813C120B727200CCAD25 /* CSerializedJSONData.m */, + ); + path = JSON; + sourceTree = ""; + }; + 2860E324111B887F00E27156 /* iPhone */ = { + isa = PBXGroup; + children = ( + 2860E325111B887F00E27156 /* AppDelegate_iPhone.h */, + 2860E326111B887F00E27156 /* AppDelegate_iPhone.m */, + 2860E327111B887F00E27156 /* MainWindow_iPhone.xib */, + ); + path = iPhone; + sourceTree = ""; + }; + 2860E32A111B888700E27156 /* iPad */ = { + isa = PBXGroup; + children = ( + 2860E32B111B888700E27156 /* AppDelegate_iPad.h */, + 2860E32C111B888700E27156 /* AppDelegate_iPad.m */, + 2860E32D111B888700E27156 /* MainWindow_iPad.xib */, + ); + path = iPad; + sourceTree = ""; + }; + 28EEBF621118D79A00187D67 /* Shared */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* AdWhirlTests-Info.plist */, + ); + name = Shared; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 1BADCB9F120CACBE005D60B5 /* OCMock Library */, + 1BDA8126120B727200CCAD25 /* TouchJSON */, + 1B264BD7120B6E0000DB41AD /* AdWhirl */, + 1B264BB9120B6D1600DB41AD /* GoogleToolboxForMac */, + 1B264BB8120B6D0900DB41AD /* UnitTests */, + 2860E32A111B888700E27156 /* iPad */, + 2860E324111B887F00E27156 /* iPhone */, + 28EEBF621118D79A00187D67 /* Shared */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 1BED9B471210C7A100E06937 /* AdWhirlTests_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 1BDA8195120B751500CCAD25 /* CoreLocation.framework */, + 1BDA819F120B751500CCAD25 /* QuartzCore.framework */, + 1BDA81A1120B751500CCAD25 /* SystemConfiguration.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1B183C5B121212B70026647E /* AdWhirlTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1B183C61121212B80026647E /* Build configuration list for PBXNativeTarget "AdWhirlTests" */; + buildPhases = ( + 1B183C58121212B70026647E /* Resources */, + 1B183C59121212B70026647E /* Sources */, + 1B183C5A121212B70026647E /* Frameworks */, + 1B183DF9121219E60026647E /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AdWhirlTests; + productName = AdWhirlTestsApp; + productReference = 1B183C5C121212B70026647E /* AdWhirlTests.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlTests" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1B183C5B121212B70026647E /* AdWhirlTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1B183C58121212B70026647E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B183C6A1212147C0026647E /* MainWindow_iPhone.xib in Resources */, + 1B183C6B1212147C0026647E /* MainWindow_iPad.xib in Resources */, + 1B183C6C1212147C0026647E /* AdWhirlWebBrowser.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1B183DF9121219E60026647E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export GTM_DISABLE_ZOMBIES=1\nexport GTM_ENABLE_LEAKS=1\n$SRCROOT/../GoogleToolboxForMac/UnitTesting/RunIPhoneUnitTest.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1B183C59121212B70026647E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B183C6D121214860026647E /* AppDelegate_iPhone.m in Sources */, + 1B183C6E121214860026647E /* AppDelegate_iPad.m in Sources */, + 1B183C6F121214860026647E /* GTMObjC2Runtime.m in Sources */, + 1B183C70121214860026647E /* GTMRegex.m in Sources */, + 1B183C71121214860026647E /* GTMIPhoneUnitTestDelegate.m in Sources */, + 1B183C72121214860026647E /* GTMIPhoneUnitTestMain.m in Sources */, + 1B183C73121214860026647E /* GTMSenTestCase.m in Sources */, + 1B183C74121214860026647E /* GTMUnitTestDevLog.m in Sources */, + 1B183C75121214860026647E /* AdWhirlAdapterCustom.m in Sources */, + 1B183C76121214860026647E /* AdWhirlAdapterEvent.m in Sources */, + 1B183C77121214860026647E /* AdWhirlAdapterGeneric.m in Sources */, + 1B183C78121214860026647E /* AdWhirlAdNetworkAdapter+Helpers.m in Sources */, + 1B183C79121214860026647E /* AdWhirlAdNetworkAdapter.m in Sources */, + 1B183C7A121214860026647E /* AdWhirlAdNetworkConfig.m in Sources */, + 1B183C7B121214860026647E /* AdWhirlAdNetworkRegistry.m in Sources */, + 1B183C7C121214860026647E /* AdWhirlConfig.m in Sources */, + 1B183C7D121214860026647E /* AdWhirlCustomAdView.m in Sources */, + 1B183C7E121214860026647E /* AdWhirlError.m in Sources */, + 1B183C7F121214860026647E /* AdWhirlLog.m in Sources */, + 1B183C80121214860026647E /* AdWhirlView.m in Sources */, + 1B183C81121214860026647E /* AdWhirlWebBrowserController.m in Sources */, + 1B183C82121214860026647E /* ARRollerView.m in Sources */, + 1B183C83121214860026647E /* CDataScanner.m in Sources */, + 1B183C84121214860026647E /* CDataScanner_Extensions.m in Sources */, + 1B183C85121214860026647E /* NSCharacterSet_Extensions.m in Sources */, + 1B183C86121214860026647E /* NSDictionary_JSONExtensions.m in Sources */, + 1B183C87121214860026647E /* NSScanner_Extensions.m in Sources */, + 1B183C88121214860026647E /* CJSONDataSerializer.m in Sources */, + 1B183C89121214860026647E /* CJSONDeserializer.m in Sources */, + 1B183C8A121214860026647E /* CJSONScanner.m in Sources */, + 1B183C8B121214860026647E /* CJSONSerializer.m in Sources */, + 1B183C8C121214860026647E /* CSerializedJSONData.m in Sources */, + 1B183C8D121214860026647E /* AdWhirlAdNetworkConfigTest.m in Sources */, + 1B183C8E121214860026647E /* AdWhirlClassWrapper.m in Sources */, + 1B183C8F121214860026647E /* GTMDevLogUnitTestingBridge.m in Sources */, + 1B183C90121214860026647E /* AdWhirlConfigTest.m in Sources */, + 1B183C91121214860026647E /* UIColor+AdWhirlConfig.m in Sources */, + 1B183C92121214860026647E /* UIColor+AdWhirlConfigTest.m in Sources */, + 1B6CE7DE12149A8200E44A28 /* AdWhirlConfigStore.m in Sources */, + 1B6CE7E112149A9E00E44A28 /* AdWhirlConfigStoreTest.m in Sources */, + 1B6CE8891214A65800E44A28 /* AWNetworkReachabilityWrapper.m in Sources */, + 1B4905A81230815300BAECDE /* AdWhirlViewTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1B183C5F121212B80026647E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/OCMock/build/Debug/Library/Headers\""; + INFOPLIST_FILE = "AdWhirlTests-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/OCMock/build/Debug/Library\"", + ); + OTHER_LDFLAGS = ( + "-lgcov", + "-force_load", + "$(PROJECT_DIR)/OCMock/build/Debug/Library/libOCMock.a", + "-ObjC", + ); + PREBINDING = NO; + PRODUCT_NAME = AdWhirlTests; + }; + name = Debug; + }; + 1B183C60121212B80026647E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); + GCC_ENABLE_FIX_AND_CONTINUE = NO; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/OCMock/build/Debug/Library/Headers\""; + INFOPLIST_FILE = "AdWhirlTests-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/OCMock/build/Debug/Library\"", + ); + OTHER_LDFLAGS = ( + "-lgcov", + "-force_load", + "$(PROJECT_DIR)/OCMock/build/Debug/Library/libOCMock.a", + "-ObjC", + ); + PREBINDING = NO; + PRODUCT_NAME = AdWhirlTests; + ZERO_LINK = NO; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlTests_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "AWLogCrit=_GTMUnitTestDevLog", + "AWLogError=_GTMUnitTestDevLog", + "AWLogWarn=_GTMUnitTestDevLog", + "DEBUG=1", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; + PREBINDING = NO; + SDKROOT = iphoneos4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AdWhirlTests_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "AWLogCrit=_GTMUnitTestDevLog", + "AWLogError=_GTMUnitTestDevLog", + "AWLogWarn=_GTMUnitTestDevLog", + "DEBUG=1", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; + SDKROOT = iphoneos4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1B183C61121212B80026647E /* Build configuration list for PBXNativeTarget "AdWhirlTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B183C5F121212B80026647E /* Debug */, + 1B183C60121212B80026647E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AdWhirlTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests_Prefix.pch b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests_Prefix.pch new file mode 100644 index 000000000..27cea000d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/AdWhirlTests_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'AdWhirlTests' target in the 'AdWhirlTests' project +// + +// To silence build warnings when we swap AdWhirlLog* with this +@class NSString; +extern void _GTMUnitTestDevLog(NSString *format, ...); diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/Shared/main.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/Shared/main.m new file mode 100644 index 000000000..505928318 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/Shared/main.m @@ -0,0 +1,17 @@ +// +// main.m +// AdWhirlTests +// +// Created by Nigel Choi on 8/5/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlAdNetworkConfigTest.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlAdNetworkConfigTest.m new file mode 100644 index 000000000..0b2558705 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlAdNetworkConfigTest.m @@ -0,0 +1,305 @@ +/* + + AdWhirlAdNetworkConfigTest.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import "GTMSenTestCase.h" +#import "GTMUnitTestDevLog.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlError.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlClassWrapper.h" + + +@interface AdWhirlAdNetworkConfigTest : GTMTestCase { + id mockRegistry_; +} +@end + + +@implementation AdWhirlAdNetworkConfigTest + +-(void) setUp { + mockRegistry_ = [OCMockObject mockForClass:[AdWhirlAdNetworkRegistry class]]; +} + +- (void) tearDown { +} + +- (void) testGoodConfig { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"custom", AWAdNetworkConfigKeyName, + @"14.5", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"__CUSTOM__", AWAdNetworkConfigKeyCred, + @"9", AWAdNetworkConfigKeyType, + @"10", AWAdNetworkConfigKeyPriority, + nil]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry_ expect] andReturn:classWrapper] adapterClassFor:9]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(error, @"should have no error parsing ad network config"); + STAssertNotNil(config, @"config should be non-nil"); + STAssertEqualStrings(config.networkName, @"custom", @"network name"); + STAssertEquals(config.trafficPercentage, 14.5, @"percentage"); + STAssertEqualStrings(config.nid, @"2798463808b1234567890abcdef5c1e9", @"nid"); + STAssertNotNil(config.credentials, @"credentials exists"); + STAssertEqualStrings(config.pubId, @"__CUSTOM__", @"pubId"); + STAssertEquals(config.networkType, 9, @"network type"); + STAssertEquals(config.priority, 10, @"priority"); + STAssertNotNil([config description], @"has description"); + STAssertEquals(config.adapterClass, classWrapper.theClass, @"adapter class match"); + [config release]; + [classWrapper release]; +} + +- (void) testGoodConfigHashCred { + NSDictionary *cred = [NSDictionary dictionaryWithObjectsAndKeys: + @"site_id", @"siteID", + @"spot_id", @"spotID", + @"pub_id", @"publisherID", + nil]; + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"jumptap", AWAdNetworkConfigKeyName, + @"30", AWAdNetworkConfigKeyWeight, + @"1234567890a1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + cred, AWAdNetworkConfigKeyCred, + @"2", AWAdNetworkConfigKeyType, + @"2", AWAdNetworkConfigKeyPriority, + nil]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry_ expect] andReturn:classWrapper] adapterClassFor:2]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(error, @"should have no error parsing ad network config"); + STAssertNotNil(config, @"config should be non-nil"); + STAssertEqualStrings(config.networkName, @"jumptap", @"network name"); + STAssertEquals(config.trafficPercentage, 30.0, @"percentage"); + STAssertEqualStrings(config.nid, @"1234567890a1234567890abcdef5c1e9", @"nid"); + STAssertNotNil(config.credentials, @"credentials exists"); + STAssertTrue([config.credentials isKindOfClass:[NSDictionary class]], + @"credentials is a dictionary"); + STAssertNil(config.pubId, @"no single pubId"); + STAssertEqualStrings([config.credentials objectForKey:@"siteID"], + @"site_id", @"cred.siteId"); + STAssertEqualStrings([config.credentials objectForKey:@"spotID"], + @"spot_id", @"cred.spotId"); + STAssertEqualStrings([config.credentials objectForKey:@"publisherID"], + @"pub_id", @"cred.pubId"); + STAssertEquals(config.networkType, 2, @"network type"); + STAssertEquals(config.priority, 2, @"priority"); + STAssertNotNil([config description], @"has description"); + STAssertEquals(config.adapterClass, classWrapper.theClass, @"adapter class match"); + [config release]; + [classWrapper release]; +} + +- (void) testEmptyConfig { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys:nil]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNil(config, @"Bad config dict should yield nil network config"); + STAssertNotNil(error, @"Bad config dict should yield error"); + STAssertEquals([error localizedDescription], + @"Ad network config has no network type, network id, network name, or priority", + @"Bad config dict error message"); + STAssertEquals([error code], AdWhirlConfigDataError, + @"Bad config should give AdWhirlConfigDataError"); +} + +- (void) testEmptyConfigNilErrorObj { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys:nil]; + [GTMUnitTestDevLog expectString:@"Ad network config has no network type, network id, network name, or priority"]; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:nil]; + STAssertNil(config, @"Bad config dict should yield nil network config"); +} + +- (void) testNonExistentNetworkType { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"bogus", AWAdNetworkConfigKeyName, + @"50", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"x", AWAdNetworkConfigKeyCred, + @"1000000", AWAdNetworkConfigKeyType, + @"6", AWAdNetworkConfigKeyPriority, + nil]; + [[[mockRegistry_ expect] andReturn:nil] adapterClassFor:1000000]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(config, @"Config must be null for non-existent network type"); + STAssertNotNil(error, @"Must returned error for non-existent network type"); + STAssertEqualStrings([error localizedDescription], + @"Ad network type 1000000 not supported, no adapter found", + @"Non-existent network type error string"); + STAssertEquals([error code], AdWhirlConfigDataError, + @"Non-existent network type should give AdWhirlConfigDataError"); +} + +- (void) testNonExistentNetworkTypeNilErrorObj { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"bogus", AWAdNetworkConfigKeyName, + @"50", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"x", AWAdNetworkConfigKeyCred, + @"1000000", AWAdNetworkConfigKeyType, + @"6", AWAdNetworkConfigKeyPriority, + nil]; + [[[mockRegistry_ expect] andReturn:nil] adapterClassFor:1000000]; + [GTMUnitTestDevLog expectString:@"Ad network type 1000000 not supported, no adapter found"]; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:nil]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(config, @"Config must be null for non-existent network type"); +} + +- (void) testNilWeight { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"custom", AWAdNetworkConfigKeyName, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"__CUSTOM__", AWAdNetworkConfigKeyCred, + @"9", AWAdNetworkConfigKeyType, + @"10", AWAdNetworkConfigKeyPriority, + nil]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry_ expect] andReturn:classWrapper] adapterClassFor:9]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(error, @"should have no error parsing ad network config"); + STAssertNotNil(config, @"config should be non-nil"); + STAssertEqualStrings(config.networkName, @"custom", @"network name"); + STAssertEquals(config.trafficPercentage, 0.0, @"percentage should be 0"); + STAssertEqualStrings(config.nid, @"2798463808b1234567890abcdef5c1e9", @"nid"); + STAssertNotNil(config.credentials, @"credentials exists"); + STAssertEqualStrings(config.pubId, @"__CUSTOM__", @"pubId"); + STAssertEquals(config.networkType, 9, @"network type"); + STAssertEquals(config.priority, 10, @"priority"); + STAssertNotNil([config description], @"has description"); + STAssertEquals(config.adapterClass, classWrapper.theClass, @"adapter class match"); + [config release]; + [classWrapper release]; +} + +- (void) testNilCred { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"custom", AWAdNetworkConfigKeyName, + @"14.5", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"9", AWAdNetworkConfigKeyType, + @"10", AWAdNetworkConfigKeyPriority, + nil]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry_ expect] andReturn:classWrapper] adapterClassFor:9]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNoThrow([mockRegistry_ verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertNil(error, @"should have no error parsing ad network config"); + STAssertNotNil(config, @"config should be non-nil"); + STAssertEqualStrings(config.networkName, @"custom", @"network name"); + STAssertEquals(config.trafficPercentage, 14.5, @"percentage"); + STAssertEqualStrings(config.nid, @"2798463808b1234567890abcdef5c1e9", @"nid"); + STAssertNil(config.credentials, @"credentials exists"); + STAssertNil(config.pubId, @"credentials nil"); + STAssertEquals(config.networkType, 9, @"network type"); + STAssertEquals(config.priority, 10, @"priority"); + STAssertNotNil([config description], @"has description"); + STAssertEquals(config.adapterClass, classWrapper.theClass, @"adapter class match"); + [config release]; + [classWrapper release]; +} + +- (void) testNetworkTypeNotNumber { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"custom", AWAdNetworkConfigKeyName, + @"14.5", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"__CUSTOM__", AWAdNetworkConfigKeyCred, + @"somestring", AWAdNetworkConfigKeyType, + @"10", AWAdNetworkConfigKeyPriority, + nil]; + AdWhirlError *error = nil; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:&error]; + STAssertNil(config, @"Non-int network type should yield nil network config"); + STAssertNotNil(error, @"Non-int network type should yield error"); + STAssertEquals([error localizedDescription], + @"Ad network config has invalid network type, network id, network name or priority", + @"Non-int network type error message"); + STAssertEquals([error code], AdWhirlConfigDataError, + @"Non-int network type should give AdWhirlConfigDataError"); +} + +- (void) testNetworkTypeNotNumberNilErrObj { + NSDictionary *configDict = [NSDictionary dictionaryWithObjectsAndKeys: + @"custom", AWAdNetworkConfigKeyName, + @"14.5", AWAdNetworkConfigKeyWeight, + @"2798463808b1234567890abcdef5c1e9", AWAdNetworkConfigKeyNID, + @"__CUSTOM__", AWAdNetworkConfigKeyCred, + @"somestring", AWAdNetworkConfigKeyType, + @"10", AWAdNetworkConfigKeyPriority, + nil]; + [GTMUnitTestDevLog expectString:@"Ad network config has invalid network type, network id, network name or priority"]; + AdWhirlAdNetworkConfig *config + = [[AdWhirlAdNetworkConfig alloc] initWithDictionary:configDict + adNetworkRegistry:mockRegistry_ + error:nil]; + STAssertNil(config, @"Non-int network type should yield nil network config"); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigStoreTest.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigStoreTest.m new file mode 100644 index 000000000..b5389bc1f --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigStoreTest.m @@ -0,0 +1,410 @@ +/* + + AdWhirlConfigStoreTest.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import +#import "GTMSenTestCase.h" +#import "GTMUnitTestDevLog.h" +#import "AdWhirlConfigStore.h" +#import "AdWhirlConfig.h" +#import "AWNetworkReachabilityWrapper.h" +#import "AdWhirlView.h" +#import "AdWhirlClassWrapper.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlError.h" + + +@interface AdWhirlConfigStoreTest : GTMTestCase { +} +@end + + +// Need to be a concrete class instead of a protocol mock because +// we don't want tests to invoke performSelectorOnMainThread +@interface AdWhirlConfigDelegateConcrete : NSObject { +} +@end + + +@implementation AdWhirlConfigDelegateConcrete +@end + + +@implementation AdWhirlConfigStoreTest + +-(void)setUp { + [AdWhirlConfigStore resetStore]; +} + +- (void)tearDown { + // Reset to make sure no leaks + [AdWhirlConfigStore resetStore]; +} + +- (void)testSingleton { + STAssertEquals([AdWhirlConfigStore sharedStore], + [AdWhirlConfigStore sharedStore], + @"There should only be one shared AdWhirlConfigStore"); +} + +- (void)testFetchConfig { + AdWhirlConfigStore *store = [AdWhirlConfigStore sharedStore]; + + id mockReachability = + [OCMockObject mockForClass:[AWNetworkReachabilityWrapper class]]; + BOOL yesVal = YES; + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + + id mockURLConn = [OCMockObject mockForClass:[NSURLConnection class]]; + store.connection = mockURLConn; + + // First get call should trigger fetchConfig + NSString *configURLString = @"http://test.adwhirl.com/getInfo.php"; + NSString *appKey = @"1234567890abcdef"; + id mockConfigDelegate1 = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + [[[mockConfigDelegate1 expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + AdWhirlConfig *config1 = [store getConfig:appKey + delegate:mockConfigDelegate1]; + STAssertEqualStrings(config1.appKey, appKey, + @"returned config should have same appKey"); + STAssertEqualStrings([config1.configURL host], @"test.adwhirl.com", + @"returned config should have same configURL host"); + STAssertEqualStrings([config1.configURL path], @"/getInfo.php", + @"returned config should have same configURL path"); + NSString *expectedQuery = + [NSString stringWithFormat:@"appid=%@&appver=%d&client=1", + appKey, kAdWhirlAppVer]; + STAssertEqualStrings([config1.configURL query], expectedQuery, + @"returned config should have the right query"); + STAssertFalse(config1.hasConfig, @"returned config should not have config"); + + // Second get call for the same appKey while fetch in progress should get the + // delegate added to the list + id mockConfigDelegate2 = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + AdWhirlConfig *config2 = [store getConfig:appKey + delegate:mockConfigDelegate2]; + STAssertEquals(config1, config2, @"same config"); + + // Get call for a different appKey while fetch in progress should be rejected + NSString *configURLString3 = @"http://test3.adwhirl.com/getInfo.php"; + id mockConfigDelegate3 = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + [[[mockConfigDelegate3 expect] + andReturn:[NSURL URLWithString:configURLString3]] adWhirlConfigURL]; + [GTMUnitTestDevLog expectString: + @"Another fetch is in progress, wait until finished."]; + id nilConfig = [store getConfig:@"9876543210abcdef" + delegate:mockConfigDelegate3]; + STAssertNil(nilConfig, @"should get nil config for call to different appKey" + @" while fetch in progress"); + + // Simulate bad callback + id badReach = + [OCMockObject mockForClass:[AWNetworkReachabilityWrapper class]]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized reachability object" + @" called not reachable .*"]; + [store reachabilityNotReachable:badReach]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized reachability object" + @" called reachable .*"]; + [store reachabilityBecameReachable:badReach]; + + // Simulate reachability not yet ready. There should be a checkReachability + // method call scheduled in the current run loop to be executed after 10 + // seconds. But the run loop is not running here, so we have to + // simulate. + [[[mockReachability expect] andReturn:@"example.com"] hostname]; + [store reachabilityNotReachable:mockReachability]; + STAssertNil(store.reachability, + @"reachability should be nil after not reachable"); + + // Put the reachability object back + store.reachability = mockReachability; + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + + // Simulate run loop call of checkReachability + [store performSelector:@selector(checkReachability)]; + + // Simulate reachability ready callback in run loop + [store reachabilityBecameReachable:mockReachability]; + STAssertNil(store.reachability, + @"reachability should be nil after reachable"); + + // Simulate bad NSURLConnection callback + id badConn = [OCMockObject mockForClass:[NSURLConnection class]]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized connection object .*"]; + [store connection:badConn didReceiveResponse:nil]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized connection object .*"]; + [store connection:badConn didFailWithError:nil]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized connection object .*"]; + [store connectionDidFinishLoading:badConn]; + [GTMUnitTestDevLog expectPattern:@"Unrecognized connection object .*"]; + [store connection:badConn didReceiveData:nil]; + + // Simulate NSURLConnection callbacks + id mockResp = [OCMockObject mockForClass:[NSHTTPURLResponse class]]; + [[[mockResp expect] andReturnValue:OCMOCK_VALUE(yesVal)] + isKindOfClass:[NSHTTPURLResponse class]]; + int httpStatus = 200; + [[[mockResp expect] andReturnValue:OCMOCK_VALUE(httpStatus)] statusCode]; + [store connection:mockURLConn didReceiveResponse:mockResp]; + + // Config processing + id mockRegistry = [OCMockObject mockForClass:[AdWhirlAdNetworkRegistry class]]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:1]; // AdMob + config1.adNetworkRegistry = mockRegistry; + [[mockConfigDelegate1 expect] adWhirlConfigDidReceiveConfig:config1]; + [[mockConfigDelegate2 expect] adWhirlConfigDidReceiveConfig:config1]; + NSString *configRaw = + @"{\"extra\":{" + @"\"location_on\":0," + @"\"background_color_rgb\":{\"red\":7,\"green\":8,\"blue\":9,\"alpha\":0.5}," + @"\"text_color_rgb\":{\"red\":200,\"green\":150,\"blue\":100,\"alpha\":0.5}," + @"\"cycle_time\":45," + @"\"transition\":4}," + @"\"rations\":[{" + @"\"nid\":\"9976543210abcdefabcdef0000000001\"," + @"\"type\":1," + @"\"nname\":\"admob\"," + @"\"weight\":0," + @"\"priority\":1," + @"\"key\":\"ADMOB_KEY\"" + @"}]}"; + NSData *configData = [configRaw dataUsingEncoding:NSUTF8StringEncoding]; + [store connection:mockURLConn didReceiveData:configData]; + [store connectionDidFinishLoading:mockURLConn]; + STAssertNil(store.connection, @"connection nil after config loading"); + [classWrapper release], classWrapper = nil; + + // Test getting cached version + id mockConfigDelegate4 = + [OCMockObject mockForClass:[AdWhirlConfigDelegateConcrete class]]; + AdWhirlConfig *config4 = [store getConfig:appKey + delegate:mockConfigDelegate4]; + STAssertEquals(config4, config1, @"same cached config"); + + // Verify + STAssertNoThrow([mockReachability verify], @"Must call expected methods"); + STAssertNoThrow([mockConfigDelegate1 verify], @"Must call expected methods"); + STAssertNoThrow([mockConfigDelegate2 verify], @"Must call expected methods"); + + // During tearDown reachability's delegate will be set to nil + [[mockReachability expect] setDelegate:nil]; +} + +- (BOOL)checkReachabilityError:(id)arg1 { + if (![arg1 isKindOfClass:[AdWhirlError class]]) return NO; + AdWhirlError *err = arg1; + if ([err code] != AdWhirlConfigConnectionError) return NO; + NSString *errMsg = [err localizedDescription]; + if (errMsg == nil) return NO; + NSString *expectMsg = @"Error scheduling reachability"; + if ([errMsg rangeOfString:expectMsg].location != 0) return NO; + return YES; +} + +- (void)testFetchConfigReachabilityFail { + AdWhirlConfigStore *store = [AdWhirlConfigStore sharedStore]; + + id mockReachability = + [OCMockObject mockForClass:[AWNetworkReachabilityWrapper class]]; + BOOL noVal = NO; + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(noVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + + // First get call should trigger fetchConfig + NSString *configURLString = @"http://test.adwhirl.com/getInfo.php"; + NSString *appKey = @"abcdefabcdef"; + id mockConfigDelegate = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + [[[mockConfigDelegate expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + [[mockConfigDelegate expect] adWhirlConfigDidFail:[OCMArg any] + error: + [OCMArg checkWithSelector:@selector(checkReachabilityError:) onObject:self]]; + AdWhirlConfig *nilConfig = [store getConfig:appKey + delegate:mockConfigDelegate]; + STAssertNil(nilConfig, @"reachability failure result in nil config"); + + // Verify + STAssertNoThrow([mockReachability verify], @"Must call expected methods"); + STAssertNoThrow([mockConfigDelegate verify], @"Must call expected methods"); +} + +- (BOOL)checkFailedConnectionError:(id)arg1 { + STAssertTrue([arg1 isKindOfClass:[AdWhirlError class]], + @"arg1 should be AdWhirlError"); + AdWhirlError *err = arg1; + STAssertEquals([err code], AdWhirlConfigConnectionError, + @"Should be AdWhirlConfigConnectionError"); + NSString *errMsg = [err localizedDescription]; + STAssertNotNil(errMsg, @"Must have error message"); + NSString *expectMsg = @"Error connecting to config server"; + STAssertEqualStrings(errMsg, expectMsg, @"Error message content"); + return YES; +} + +- (void)testFetchConfigFailedConnection { + AdWhirlConfigStore *store = [AdWhirlConfigStore sharedStore]; + + id mockReachability = + [OCMockObject mockForClass:[AWNetworkReachabilityWrapper class]]; + BOOL yesVal = YES; + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + + id mockURLConn = [OCMockObject mockForClass:[NSURLConnection class]]; + store.connection = mockURLConn; + + // First get call should trigger fetchConfig + NSString *configURLString = @"http://test.adwhirl.com/getInfo.php"; + NSString *appKey = @"fedcbafedcbafedcba"; + id mockConfigDelegate = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + [[[mockConfigDelegate expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + AdWhirlConfig *config = [store getConfig:appKey + delegate:mockConfigDelegate]; + STAssertFalse(config.hasConfig, @"returned config should not have config"); + + // Simulate reachability ready callback in run loop + [store reachabilityBecameReachable:mockReachability]; + STAssertNil(store.reachability, + @"reachability should be nil after reachable"); + + // Simulate NSURLConnection callbacks for failed connection + [[mockConfigDelegate expect] adWhirlConfigDidFail:config + error: + [OCMArg checkWithSelector:@selector(checkFailedConnectionError:) + onObject:self]]; + [store connection:mockURLConn + didFailWithError:[NSError errorWithDomain:@"test" + code:1 + userInfo:nil]]; + + // After the failure, the config should not longer be cached, so getConfig + // should return a new config object + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + [[[mockConfigDelegate expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + AdWhirlConfig *config2 = [store getConfig:appKey + delegate:mockConfigDelegate]; + STAssertFalse(config2.hasConfig, @"returned config should not have config"); + STAssertNotEquals(config, config2, @"failed config should have been gone"); + + // Set reachability to nil + store.reachability = nil; + + // Verify + STAssertNoThrow([mockReachability verify], @"Must call expected methods"); + STAssertNoThrow([mockConfigDelegate verify], @"Must call expected methods"); +} + +- (BOOL)checkBadHTTPStatusError:(id)arg1 { + STAssertTrue([arg1 isKindOfClass:[AdWhirlError class]], + @"arg1 should be AdWhirlError"); + AdWhirlError *err = arg1; + STAssertEquals([err code], AdWhirlConfigStatusError, + @"Should be AdWhirlConfigStatusError"); + NSString *errMsg = [err localizedDescription]; + STAssertNotNil(errMsg, @"Must have error message"); + NSString *expectMsg = @"Config server did not return status 200"; + STAssertEqualStrings(errMsg, expectMsg, @"Error message content"); + return YES; +} + +- (void)testFetchConfigBadHTTPStatus { + AdWhirlConfigStore *store = [AdWhirlConfigStore sharedStore]; + + id mockReachability = + [OCMockObject mockForClass:[AWNetworkReachabilityWrapper class]]; + BOOL yesVal = YES; + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + + id mockURLConn = [OCMockObject mockForClass:[NSURLConnection class]]; + store.connection = mockURLConn; + + // First get call should trigger fetchConfig + NSString *configURLString = @"http://test.adwhirl.com/getInfo.php"; + NSString *appKey = @"fedcbafedcbafedcba"; + id mockConfigDelegate = + [OCMockObject mockForProtocol:@protocol(AdWhirlConfigDelegate)]; + [[[mockConfigDelegate expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + AdWhirlConfig *config = [store getConfig:appKey + delegate:mockConfigDelegate]; + STAssertFalse(config.hasConfig, @"returned config should not have config"); + + // Simulate reachability ready callback in run loop + [store reachabilityBecameReachable:mockReachability]; + STAssertNil(store.reachability, + @"reachability should be nil after reachable"); + + // Simulate NSURLConnection callbacks for bad HTTP status + id mockResp = [OCMockObject mockForClass:[NSHTTPURLResponse class]]; + [[[mockResp expect] andReturnValue:OCMOCK_VALUE(yesVal)] + isKindOfClass:[NSHTTPURLResponse class]]; + [[[mockResp expect] andReturn:@"http://xyz"] URL]; + int httpStatus = 500; + [[[mockResp expect] andReturnValue:OCMOCK_VALUE(httpStatus)] statusCode]; + [GTMUnitTestDevLog expectPattern: + @"AdWhirlConfig: HTTP 500, cancelling http://xyz"]; + [[mockURLConn expect] cancel]; + [[mockConfigDelegate expect] adWhirlConfigDidFail:config + error: + [OCMArg checkWithSelector:@selector(checkBadHTTPStatusError:) + onObject:self]]; + [store connection:mockURLConn didReceiveResponse:mockResp]; + + // After the failure, the config should not longer be cached, so getConfig + // should return a new config object + [[[mockReachability expect] andReturnValue:OCMOCK_VALUE(yesVal)] + scheduleInCurrentRunLoop]; + store.reachability = mockReachability; + [[[mockConfigDelegate expect] + andReturn:[NSURL URLWithString:configURLString]] adWhirlConfigURL]; + AdWhirlConfig *config2 = [store getConfig:appKey + delegate:mockConfigDelegate]; + STAssertFalse(config2.hasConfig, @"returned config should not have config"); + STAssertNotEquals(config, config2, @"failed config should have been gone"); + + // Verify + STAssertNoThrow([mockReachability verify], @"Must call expected methods"); + STAssertNoThrow([mockConfigDelegate verify], @"Must call expected methods"); + + // During tearDown reachability's delegate will be set to nil + [[mockReachability expect] setDelegate:nil]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigTest.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigTest.m new file mode 100644 index 000000000..418dd9616 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlConfigTest.m @@ -0,0 +1,901 @@ +/* + + AdWhirlConfigTest.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import +#import "GTMSenTestCase.h" +#import "GTMUnitTestDevLog.h" +#import "AdWhirlConfig.h" +#import "AdWhirlAdNetworkConfig.h" +#import "AdWhirlAdNetworkRegistry.h" +#import "AdWhirlClassWrapper.h" +#import "AdWhirlAdNetworkAdapter.h" +#import "AdWhirlView.h" + +@interface AdWhirlConfigTest : GTMTestCase { +} +@end + + +@interface AdWhirlConfigDelegateCustomURL : NSObject { +} +@end + + +@implementation AdWhirlConfigDelegateCustomURL + +- (NSURL *)adWhirlConfigURL { + return [NSURL URLWithString:@"http://mob.example.com/getInfo.php"]; +} + +@end + + +@interface AdWhirlConfigDelegateNoOp : NSObject { +} +@end + + +@implementation AdWhirlConfigDelegateNoOp + +@end + + +@implementation AdWhirlConfigTest + +-(void)setUp { +} + +- (void)tearDown { +} + +- (void)testDefaultConfig { + NSString *appKey = @"myappkey"; + AdWhirlConfigDelegateNoOp *delegate + = [[AdWhirlConfigDelegateNoOp alloc] init]; + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + STAssertNotNil(config, @"Config should not be nil"); + + // Test passed in values + STAssertEqualStrings(config.appKey, appKey, + @"App key should have been set in config"); + + // Test default values + NSURL *actualURL = config.configURL; + NSURL *defaultURL = [NSURL URLWithString:kAdWhirlDefaultConfigURL]; + STAssertNotNil(actualURL, @"configURL should not be nil"); + STAssertEqualStrings([actualURL scheme], [defaultURL scheme], + @"Scheme of config URL should match"); + STAssertEqualStrings([actualURL host], [defaultURL host], + @"Host name of config URL should match"); + STAssertEqualStrings([actualURL path], [defaultURL path], + @"Path of config URL should match"); + + STAssertFalse(config.adsAreOff, @"Ads are on by default"); + STAssertNotNil(config.adNetworkConfigs, + @"Config must have ad network config array"); + STAssertEquals([config.adNetworkConfigs count], 0U, + @"Config should have no ad network by default"); + STAssertNotNil(config.backgroundColor, + @"Config must have background color"); + const CGFloat *bkColComps + = CGColorGetComponents(config.backgroundColor.CGColor); + STAssertEquals(bkColComps[0], 0.3F, @"Config default background color red"); + STAssertEquals(bkColComps[1], 0.3F, @"Config default background color green"); + STAssertEquals(bkColComps[2], 0.3F, @"Config default background color blue"); + STAssertEquals(bkColComps[3], 1.0F, @"Config default background color alpha"); + STAssertNotNil(config.textColor, @"Config must have text color"); + STAssertEquals((void *)config.textColor, (void *)[UIColor whiteColor], + @"default text color"); + STAssertEquals(config.refreshInterval, (NSTimeInterval)60.0, + @"Default refresh interval"); + STAssertTrue(config.locationOn, @"Location query should be on by default"); + STAssertEquals(config.bannerAnimationType, AWBannerAnimationTypeRandom, + @"Default banner animation"); + STAssertEquals(config.fullscreenWaitInterval, 60, + @"Config default full screen wait interval"); + STAssertEquals(config.fullscreenMaxAds, 2, + @"Config default full screen max ads"); + STAssertEquals(config.adNetworkRegistry, + [AdWhirlAdNetworkRegistry sharedRegistry], + @"Config default ad network registry should be the sharedRegistry"); + STAssertNotNil([config description], + @"Config description should not be nil"); + STAssertFalse(config.hasConfig, @"Config has no actual config"); + + [config release]; + [delegate release]; +} + +- (void)testLegacyConfig { + NSString *legacyConfigRaw = + @"[{" + @"\"admob_ration\":5," + @"\"adrollo_ration\":6," + @"\"jumptap_ration\":7," + @"\"videoegg_ration\":8," + @"\"millennial_ration\":9," + @"\"quattro_ration\":11," + @"\"generic_ration\":12," + @"\"greystripe_ration\":13," + @"\"google_adsense_ration\":14," + @"\"custom_ration\":15" + @"},{" + @"\"admob_key\":\"ADMOB_KEY\"," + @"\"adrollo_key\":\"ADROLLO_KEY\"," + @"\"jumptap_key\":\"JT\"," + @"\"videoegg_key\":{\"publisher\":\"VE_PUB\",\"area\":\"VE_AREA\"}," + @"\"millennial_key\":\"54321\"," + @"\"quattro_key\":{\"siteID\":\"Q_SITE\",\"publisherID\":\"Q_ID\"}," + @"\"generic_key\":\"__GENERIC__\"," + @"\"greystripe_key\":\"GREYSTRIPE_KEY\"," + @"\"google_adsense_key\":\"AFMA_KEY\"," + @"\"dontcare_key\":48" + @"},{" + @"\"admob_priority\":5," + @"\"adwhirl_12_priority\":6," + @"\"jumptap_priority\":4," + @"\"videoegg_priority\":10," + @"\"millennial_priority\":2," + @"\"quattro_priority\":1," + @"\"generic_priority\":14," + @"\"greystripe_priority\":8," + @"\"google_adsense_priority\":7," + @"\"custom_priority\":13" + @"},{" + @"\"background_color_rgb\":{\"red\":7,\"green\":8,\"blue\":9,\"alpha\":1}," + @"\"text_color_rgb\":{\"red\":200,\"green\":150,\"blue\":100,\"alpha\":1}," + @"\"refresh_interval\":45," + @"\"location_on\":0," + @"\"banner_animation_type\":4," + @"\"fullscreen_wait_interval\":55," + @"\"fullscreen_max_ads\":4," + @"\"metrics_url\":\"\"," + @"\"metrics_flag\":0" + @"}]"; + + NSString *appKey = @"myappkey"; + AdWhirlConfigDelegateCustomURL *delegate + = [[AdWhirlConfigDelegateCustomURL alloc] init]; + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + STAssertNotNil(config, @"Config should not be nil"); + + // setup mock registry + id mockRegistry = [OCMockObject mockForClass:[AdWhirlAdNetworkRegistry class]]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:1]; // AdMob + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:2]; // JT + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:3]; // VE + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:6]; // MM + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:7]; // GreyS + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:8]; // Qua + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:9]; // Custom + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:12]; // MdotM + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:14]; // AFMA + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:16]; // G-ric + config.adNetworkRegistry = mockRegistry; + + // parse this thing + NSData *configData = [legacyConfigRaw dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error = nil; + STAssertFalse(config.hasConfig, @"Config has no actual config"); + STAssertTrue([config parseConfig:configData error:&error], + @"Should parse legacy config properly, error: %@", error); + STAssertNoThrow([mockRegistry verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertTrue(config.hasConfig, @"Config parsed successfully"); + + // check passed-in values + STAssertEqualStrings(config.appKey, appKey, + @"App key should have been set in config"); + NSURL *actualURL = config.configURL; + NSURL *delegateURL = [delegate adWhirlConfigURL]; + STAssertNotNil(actualURL, @"configURL should not be nil"); + STAssertNotNil(delegateURL, @"delegate should return config URL"); + STAssertEqualStrings([actualURL scheme], [delegateURL scheme], + @"Scheme of config URL should match"); + STAssertEqualStrings([actualURL host], [delegateURL host], + @"Host name of config URL should match"); + STAssertEqualStrings([actualURL path], [delegateURL path], + @"Path of config URL should match"); + + // check parsed values + STAssertFalse(config.adsAreOff, @"Ads should not be off"); + STAssertNotNil(config.adNetworkConfigs, + @"Ad net config array should not be nil"); + STAssertEquals([config.adNetworkConfigs count], 10U, + @"Right number of ad networks"); + STAssertNotNil(config.backgroundColor, + @"Config must have background color"); + const CGFloat *bkColComps + = CGColorGetComponents(config.backgroundColor.CGColor); + STAssertEquals(bkColComps[0], (CGFloat)(7.0/255.0), + @"Config background color red"); + STAssertEquals(bkColComps[1], (CGFloat)(8.0/255.0), + @"Config background color green"); + STAssertEquals(bkColComps[2], (CGFloat)(9.0/255.0), + @"Config background color blue"); + STAssertEquals(bkColComps[3], 1.0F, @"Config background color alpha"); + STAssertNotNil(config.textColor, @"Config must have text color"); + const CGFloat *txtColComps + = CGColorGetComponents(config.textColor.CGColor); + STAssertEquals(txtColComps[0], (CGFloat)(200.0/255.0), @"Config text color red"); + STAssertEquals(txtColComps[1], (CGFloat)(150.0/255.0), @"Config text color green"); + STAssertEquals(txtColComps[2], (CGFloat)(100.0/255.0), @"Config text color blue"); + STAssertEquals(txtColComps[3], 1.0F, @"Config text color alpha"); + + STAssertEquals(config.refreshInterval, (NSTimeInterval)45.0, + @"Refresh interval"); + STAssertFalse(config.locationOn, @"Location query setting"); + STAssertEquals(config.bannerAnimationType, AWBannerAnimationTypeCurlDown, + @"Banner animation"); + STAssertEquals(config.fullscreenWaitInterval, 55, + @"Full screen wait interval"); + STAssertEquals(config.fullscreenMaxAds, 4, @"Full screen max ads"); + STAssertEquals(config.adNetworkRegistry, mockRegistry, + @"Ad network registry"); + + // check ad network configs + NSMutableDictionary *seenNetworks + = [NSMutableDictionary dictionaryWithCapacity:20]; + for (id netCfg in config.adNetworkConfigs) { + STAssertTrue([netCfg isKindOfClass:[AdWhirlAdNetworkConfig class]], + @"netCfg config must be of class AdWhirlAdNetworkConfig"); + AdWhirlAdNetworkConfig *cfg = netCfg; + STAssertNil([seenNetworks + objectForKey:[NSNumber numberWithInt:cfg.networkType]], + @"Must not have seen network type: %d", cfg.networkType); + NSString *netTypeString = [NSString stringWithFormat:@"%d",cfg.networkType]; + STAssertEqualStrings(cfg.nid, netTypeString, + @"Legacy netCfg nid should be string of network type"); + STAssertEquals(cfg.adapterClass, classWrapper.theClass, @"Adapter class"); + switch (cfg.networkType) { + case AdWhirlAdNetworkTypeAdMob: + STAssertEqualStrings(cfg.networkName, @"admob", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)5.0, @"ration"); + STAssertEquals(cfg.priority, 5, @"priority"); + STAssertEqualStrings(cfg.pubId, @"ADMOB_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeJumpTap: + STAssertEqualStrings(cfg.networkName, @"jumptap", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)7.0, @"ration"); + STAssertEquals(cfg.priority, 4, @"priority"); + STAssertEqualStrings(cfg.pubId, @"JT", @"pubId"); + break; + case AdWhirlAdNetworkTypeVideoEgg: + STAssertEqualStrings(cfg.networkName, @"videoegg", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)8.0, @"ration"); + STAssertEquals(cfg.priority, 10, @"priority"); + STAssertEqualStrings([cfg.credentials objectForKey:@"publisher"], + @"VE_PUB", @"VideoEgg publisher"); + STAssertEqualStrings([cfg.credentials objectForKey:@"area"], + @"VE_AREA", @"VideoEgg area"); + break; + case AdWhirlAdNetworkTypeMillennial: + STAssertEqualStrings(cfg.networkName, @"millennial", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)9.0, @"ration"); + STAssertEquals(cfg.priority, 2, @"priority"); + STAssertEqualStrings(cfg.pubId, @"54321", @"pubId"); + break; + case AdWhirlAdNetworkTypeGreyStripe: + STAssertEqualStrings(cfg.networkName, @"greystripe", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)13.0, @"ration"); + STAssertEquals(cfg.priority, 8, @"priority"); + STAssertEqualStrings(cfg.pubId, @"GREYSTRIPE_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeQuattro: + STAssertEqualStrings(cfg.networkName, @"quattro", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)11.0, @"ration"); + STAssertEquals(cfg.priority, 1, @"priority"); + STAssertEqualStrings([cfg.credentials objectForKey:@"siteID"], + @"Q_SITE", @"Quattro site id"); + STAssertEqualStrings([cfg.credentials objectForKey:@"publisherID"], + @"Q_ID", @"Quattro publisher id"); + break; + case AdWhirlAdNetworkTypeCustom: + STAssertEqualStrings(cfg.networkName, @"custom", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)15.0, @"ration"); + STAssertEquals(cfg.priority, 13, @"priority"); + STAssertNil(cfg.pubId, @"Custom "); + break; + case AdWhirlAdNetworkTypeMdotM: + // exercises the adrollo strange logic + STAssertEqualStrings(cfg.networkName, @"adwhirl_12", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)6.0, @"ration"); + STAssertEquals(cfg.priority, 6, @"priority"); + STAssertEqualStrings(cfg.pubId, @"ADROLLO_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeGoogleAdSense: + STAssertEqualStrings(cfg.networkName, @"google_adsense", + @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)14.0, @"ration"); + STAssertEquals(cfg.priority, 7, @"priority"); + STAssertEqualStrings(cfg.pubId, @"AFMA_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeGeneric: + STAssertEqualStrings(cfg.networkName, @"generic", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)12.0, @"ration"); + STAssertEquals(cfg.priority, 14, @"priority"); + STAssertEqualStrings(cfg.pubId, @"__GENERIC__", @"pubId"); + break; + default: + STFail(@"Ad network not recognized: %d", cfg.networkType); + break; + } + } + + // clean up + [config release]; + [delegate release]; + [classWrapper release]; +} + + +- (void)testConfig { + NSString *configRaw = + @"{\"extra\":{" + @"\"location_on\":0," + @"\"background_color_rgb\":{\"red\":7,\"green\":8,\"blue\":9,\"alpha\":0.5}," + @"\"text_color_rgb\":{\"red\":200,\"green\":150,\"blue\":100,\"alpha\":0.5}," + @"\"cycle_time\":45," + @"\"transition\":4}," + @"\"rations\":[{" + @"\"nid\":\"9876543210abcdefabcdef0000000001\"," + @"\"type\":1," + @"\"nname\":\"admob\"," + @"\"weight\":1," + @"\"priority\":5," + @"\"key\":\"ADMOB_KEY\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000002\"," + @"\"type\":12," + @"\"nname\":\"mdotm\"," + @"\"weight\":2," + @"\"priority\":6," + @"\"key\":\"MDOTM_KEY\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000003\"," + @"\"type\":2," + @"\"nname\":\"jumptap\"," + @"\"weight\":3," + @"\"priority\":4," + @"\"key\":{\"publisherID\":\"JT\",\"siteID\":\"JT_SITE\",\"spotID\":\"JT_SPOT\"}" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000004\"," + @"\"type\":3," + @"\"nname\":\"videoegg\"," + @"\"weight\":4," + @"\"priority\":10," + @"\"key\":{\"publisher\":\"VE_PUB\",\"area\":\"VE_AREA\"}" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000005\"," + @"\"type\":6," + @"\"nname\":\"millennial\"," + @"\"weight\":5," + @"\"priority\":2," + @"\"key\":\"54321\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000006\"," + @"\"type\":8," + @"\"nname\":\"quattro\"," + @"\"weight\":6," + @"\"priority\":1," + @"\"key\":{\"siteID\":\"Q_SITE\",\"publisherID\":\"Q_ID\"}" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000007\"," + @"\"type\":16," + @"\"nname\":\"generic\"," + @"\"weight\":7," + @"\"priority\":14," + @"\"key\":\"__GENERIC__\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000008\"," + @"\"type\":18," + @"\"nname\":\"inmobi\"," + @"\"weight\":8," + @"\"priority\":9," + @"\"key\":\"INMOBI_KEY\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000009\"," + @"\"type\":19," + @"\"nname\":\"iad\"," + @"\"weight\":9," + @"\"priority\":3," + @"\"key\":\"IAD_ID\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000010\"," + @"\"type\":9," + @"\"nname\":\"custom\"," + @"\"weight\":0.5," + @"\"priority\":13," + @"\"key\":\"__CUSTOM__\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000011\"," + @"\"type\":9," + @"\"nname\":\"custom\"," + @"\"weight\":0.5," + @"\"priority\":13," + @"\"key\":\"__CUSTOM__\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000012\"," + @"\"type\":9," + @"\"nname\":\"custom\"," + @"\"weight\":0.5," + @"\"priority\":13," + @"\"key\":\"__CUSTOM__\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000013\"," + @"\"type\":9," + @"\"nname\":\"custom\"," + @"\"weight\":0.5," + @"\"priority\":13," + @"\"key\":\"__CUSTOM__\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000014\"," + @"\"type\":17," + @"\"nname\":\"event\"," + @"\"weight\":10," + @"\"priority\":11," + @"\"key\":\"Test Event|;|performEvent\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000015\"," + @"\"type\":17," + @"\"nname\":\"event\"," + @"\"weight\":11," + @"\"priority\":12," + @"\"key\":\"Test Event 2|;|performEvent2\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000016\"," + @"\"type\":7," + @"\"nname\":\"greystripe\"," + @"\"weight\":12," + @"\"priority\":8," + @"\"key\":\"GREYSTRIPE_KEY\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000017\"," + @"\"type\":14," + @"\"nname\":\"google_adsense\"," + @"\"weight\":13," + @"\"priority\":7," + @"\"key\":\"AFMA_KEY\"" + @"},{" + @"\"nid\":\"9876543210abcdefabcdef0000000018\"," + @"\"type\":20," + @"\"nname\":\"zestadz\"," + @"\"weight\":5," + @"\"priority\":15," + @"\"key\":\"ZESTADZ_KEY\"}]}"; + + NSString *appKey = @"someappkey"; + AdWhirlConfigDelegateCustomURL *delegate + = [[AdWhirlConfigDelegateCustomURL alloc] init]; + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + STAssertNotNil(config, @"Config should not be nil"); + + // setup mock registry + id mockRegistry = [OCMockObject mockForClass:[AdWhirlAdNetworkRegistry class]]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:1]; // AdMob + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:2]; // JT + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:3]; // VE + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:6]; // MM + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:7]; // GreyS + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:8]; // Qua + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:9]; // Custom + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:9]; // Custom + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:9]; // Custom + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:9]; // Custom + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:12]; // MdotM + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:14]; // AFMA + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:16]; // G-ric + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:17]; // Events + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:17]; // Events + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:18]; // inMobi + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:19]; // iAd + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:20]; // Zest + config.adNetworkRegistry = mockRegistry; + + // parse this thing + NSData *configData = [configRaw dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error = nil; + STAssertFalse(config.hasConfig, @"Config has no actual config"); + STAssertTrue([config parseConfig:configData error:&error], + @"Should parse config properly, error: %@", error); + STAssertNoThrow([mockRegistry verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertTrue(config.hasConfig, @"Config parsed successfully"); + + // check passed-in values + STAssertEqualStrings(config.appKey, appKey, + @"App key should have been set in config"); + NSURL *actualURL = config.configURL; + NSURL *delegateURL = [delegate adWhirlConfigURL]; + STAssertNotNil(actualURL, @"configURL should not be nil"); + STAssertNotNil(delegateURL, @"delegate should return config URL"); + STAssertEqualStrings([actualURL scheme], [delegateURL scheme], + @"Scheme of config URL should match"); + STAssertEqualStrings([actualURL host], [delegateURL host], + @"Host name of config URL should match"); + STAssertEqualStrings([actualURL path], [delegateURL path], + @"Path of config URL should match"); + + // check parsed values + STAssertFalse(config.adsAreOff, @"Ads should not be off"); + STAssertNotNil(config.adNetworkConfigs, + @"Ad net config array should not be nil"); + STAssertEquals([config.adNetworkConfigs count], 18U, + @"Right number of ad networks"); + STAssertNotNil(config.backgroundColor, + @"Config must have background color"); + const CGFloat *bkColComps + = CGColorGetComponents(config.backgroundColor.CGColor); + STAssertEquals(bkColComps[0], (CGFloat)(7.0/255.0), + @"Config background color red"); + STAssertEquals(bkColComps[1], (CGFloat)(8.0/255.0), + @"Config background color green"); + STAssertEquals(bkColComps[2], (CGFloat)(9.0/255.0), + @"Config background color blue"); + STAssertEquals(bkColComps[3], 0.5F, @"Config background color alpha"); + STAssertNotNil(config.textColor, @"Config must have text color"); + const CGFloat *txtColComps + = CGColorGetComponents(config.textColor.CGColor); + STAssertEquals(txtColComps[0], (CGFloat)(200.0/255.0), @"Config text color red"); + STAssertEquals(txtColComps[1], (CGFloat)(150.0/255.0), @"Config text color green"); + STAssertEquals(txtColComps[2], (CGFloat)(100.0/255.0), @"Config text color blue"); + STAssertEquals(txtColComps[3], 0.5F, @"Config text color alpha"); + + STAssertEquals(config.refreshInterval, (NSTimeInterval)45.0, + @"Refresh interval"); + STAssertFalse(config.locationOn, @"Location query setting"); + STAssertEquals(config.bannerAnimationType, AWBannerAnimationTypeCurlDown, + @"Banner animation"); + STAssertEquals(config.fullscreenWaitInterval, 60, + @"Full screen wait interval"); + STAssertEquals(config.fullscreenMaxAds, 2, @"Full screen max ads"); + STAssertEquals(config.adNetworkRegistry, mockRegistry, + @"Ad network registry"); + + // check ad network configs + NSMutableDictionary *seenNetworks + = [NSMutableDictionary dictionaryWithCapacity:20]; + for (id netCfg in config.adNetworkConfigs) { + STAssertTrue([netCfg isKindOfClass:[AdWhirlAdNetworkConfig class]], + @"netCfg config must be of class AdWhirlAdNetworkConfig"); + AdWhirlAdNetworkConfig *cfg = netCfg; + STAssertNil([seenNetworks + objectForKey:[NSNumber numberWithInt:cfg.networkType]], + @"Must not have seen network type: %d", cfg.networkType); + STAssertEquals(cfg.adapterClass, classWrapper.theClass, @"Adapter class"); + switch (cfg.networkType) { + case AdWhirlAdNetworkTypeAdMob: + STAssertEqualStrings(cfg.networkName, @"admob", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000001", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)1.0, @"ration"); + STAssertEquals(cfg.priority, 5, @"priority"); + STAssertEqualStrings(cfg.pubId, @"ADMOB_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeJumpTap: + STAssertEqualStrings(cfg.networkName, @"jumptap", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000003", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)3.0, @"ration"); + STAssertEquals(cfg.priority, 4, @"priority"); + STAssertEqualStrings([cfg.credentials objectForKey:@"publisherID"], + @"JT", @"Jumptap publisher"); + STAssertEqualStrings([cfg.credentials objectForKey:@"siteID"], + @"JT_SITE", @"Jumptap area"); + STAssertEqualStrings([cfg.credentials objectForKey:@"spotID"], + @"JT_SPOT", @"Jumptap publisher"); + break; + case AdWhirlAdNetworkTypeVideoEgg: + STAssertEqualStrings(cfg.networkName, @"videoegg", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000004", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)4.0, @"ration"); + STAssertEquals(cfg.priority, 10, @"priority"); + STAssertEqualStrings([cfg.credentials objectForKey:@"publisher"], + @"VE_PUB", @"VideoEgg publisher"); + STAssertEqualStrings([cfg.credentials objectForKey:@"area"], + @"VE_AREA", @"VideoEgg area"); + break; + case AdWhirlAdNetworkTypeMillennial: + STAssertEqualStrings(cfg.networkName, @"millennial", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000005", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)5.0, @"ration"); + STAssertEquals(cfg.priority, 2, @"priority"); + STAssertEqualStrings(cfg.pubId, @"54321", @"pubId"); + break; + case AdWhirlAdNetworkTypeGreyStripe: + STAssertEqualStrings(cfg.networkName, @"greystripe", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000016", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)12.0, @"ration"); + STAssertEquals(cfg.priority, 8, @"priority"); + STAssertEqualStrings(cfg.pubId, @"GREYSTRIPE_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeQuattro: + STAssertEqualStrings(cfg.networkName, @"quattro", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000006", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)6.0, @"ration"); + STAssertEquals(cfg.priority, 1, @"priority"); + STAssertEqualStrings([cfg.credentials objectForKey:@"siteID"], + @"Q_SITE", @"Quattro site id"); + STAssertEqualStrings([cfg.credentials objectForKey:@"publisherID"], + @"Q_ID", @"Quattro publisher id"); + break; + case AdWhirlAdNetworkTypeCustom: + STAssertEqualStrings(cfg.networkName, @"custom", @"Network name"); + STAssertEquals(cfg.trafficPercentage, (double)0.5, @"ration"); + STAssertEquals(cfg.priority, 13, @"priority"); + STAssertEqualStrings(cfg.pubId, @"__CUSTOM__", @"pubId"); + if (![cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000010"] + && ![cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000011"] + && ![cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000012"] + && ![cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000013"]) { + STFail(@"Unrecognized Event nid: %@", cfg.nid); + } + STAssertEqualStrings(cfg.pubId, @"__CUSTOM__", @"Custom pub id"); + break; + case AdWhirlAdNetworkTypeMdotM: + // exercises the adrollo strange logic + STAssertEqualStrings(cfg.networkName, @"mdotm", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000002", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)2.0, @"ration"); + STAssertEquals(cfg.priority, 6, @"priority"); + STAssertEqualStrings(cfg.pubId, @"MDOTM_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeGoogleAdSense: + STAssertEqualStrings(cfg.networkName, @"google_adsense", + @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000017", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)13.0, @"ration"); + STAssertEquals(cfg.priority, 7, @"priority"); + STAssertEqualStrings(cfg.pubId, @"AFMA_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeGeneric: + STAssertEqualStrings(cfg.networkName, @"generic", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000007", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)7.0, @"ration"); + STAssertEquals(cfg.priority, 14, @"priority"); + STAssertEqualStrings(cfg.pubId, @"__GENERIC__", @"pubId"); + break; + case AdWhirlAdNetworkTypeEvent: + STAssertEqualStrings(cfg.networkName, @"event", @"Network name"); + if ([cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000014"]) { + STAssertEquals(cfg.trafficPercentage, (double)10.0, @"ration"); + STAssertEquals(cfg.priority, 11, @"priority"); + STAssertEqualStrings(cfg.pubId, @"Test Event|;|performEvent", @"pubId"); + } + else if ([cfg.nid isEqualToString:@"9876543210abcdefabcdef0000000015"]) { + STAssertEquals(cfg.trafficPercentage, (double)11.0, @"ration"); + STAssertEquals(cfg.priority, 12, @"priority"); + STAssertEqualStrings(cfg.pubId, @"Test Event 2|;|performEvent2", @"pubId"); + } + else { + STFail(@"Unrecognized Event nid: %@", cfg.nid); + } + break; + case AdWhirlAdNetworkTypeInMobi: + STAssertEqualStrings(cfg.networkName, @"inmobi", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000008", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)8.0, @"ration"); + STAssertEquals(cfg.priority, 9, @"priority"); + STAssertEqualStrings(cfg.pubId, @"INMOBI_KEY", @"pubId"); + break; + case AdWhirlAdNetworkTypeIAd: + STAssertEqualStrings(cfg.networkName, @"iad", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000009", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)9.0, @"ration"); + STAssertEquals(cfg.priority, 3, @"priority"); + STAssertEqualStrings(cfg.pubId, @"IAD_ID", @"pubId"); + break; + case AdWhirlAdNetworkTypeZestADZ: + STAssertEqualStrings(cfg.networkName, @"zestadz", @"Network name"); + STAssertEqualStrings(cfg.nid, @"9876543210abcdefabcdef0000000018", @"nid"); + STAssertEquals(cfg.trafficPercentage, (double)5.0, @"ration"); + STAssertEquals(cfg.priority, 15, @"priority"); + STAssertEqualStrings(cfg.pubId, @"ZESTADZ_KEY", @"pubId"); + break; + default: + STFail(@"Ad network not recognized: %d", cfg.networkType); + break; + } + } + + // clean up + [config release]; + [delegate release]; + [classWrapper release]; +} + +- (void)testAddRemoveDelegates { + NSString *appKey = @"myappkey"; + AdWhirlConfigDelegateNoOp *delegate + = [[AdWhirlConfigDelegateNoOp alloc] init]; + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + STAssertNotNil(config, @"Config should not be nil"); + STAssertFalse([config addDelegate:delegate], + @"addDelegate should be false if delegate has been added before"); + + AdWhirlConfigDelegateCustomURL *anotherDelegate + = [[AdWhirlConfigDelegateCustomURL alloc] init]; + STAssertFalse([config removeDelegate:anotherDelegate], + @"removeDelegate should be false for non-existent delegate"); + STAssertTrue([config addDelegate:anotherDelegate], + @"addDelegate should be OK when adding another delegate"); + STAssertTrue([config removeDelegate:delegate], + @"removeDelegate should be OK for existing delegates"); + + [delegate release]; + [anotherDelegate release]; + [config release]; +} + +- (void)testAwIntVal { + NSInteger out; + STAssertTrue(awIntVal(&out, [NSNumber numberWithInt:123]), + @"awIntVal with NSNumber with int"); + STAssertEquals(out, 123, @"awIntVal should convert NSNumber with int"); + + STAssertTrue(awIntVal(&out, [NSNumber numberWithFloat:788.9]), + @"awIntVal with NSNumber with float"); + STAssertEquals(out, 788, @"awIntVal should convert NSNumber with float"); + + STAssertTrue(awIntVal(&out, @"567"), @"awIntVal with NSString"); + STAssertEquals(out, 567, @"awIntVal should convert NSString"); + + STAssertFalse(awIntVal(&out, [NSValue valueWithPointer:@"dummy"]), + @"awIntVal should not able to convert NSValue"); +} + +- (void)testAwFloatVal { + float out; + STAssertTrue(awFloatVal(&out, [NSNumber numberWithInt:123]), + @"awFloatVal with NSNumber with int"); + STAssertEquals(out, 123.0F, + @"awFloatVal should convert NSNumber with int"); + + STAssertTrue(awFloatVal(&out, [NSNumber numberWithFloat:788.9]), + @"awFloatVal with NSNumber with float"); + STAssertEquals(out, 788.9F, + @"awFloatVal should convert NSNumber with float"); + + STAssertTrue(awFloatVal(&out, @"567.34"), @"awFloatVal with NSString"); + STAssertEquals(out, 567.34F, @"awFloatVal should convert NSString"); + + STAssertFalse(awFloatVal(&out, [NSValue valueWithPointer:@"dummy"]), + @"awFloatVal should not able to convert NSValue"); +} + +- (void)testAwDoubleVal { + double out; + STAssertTrue(awDoubleVal(&out, [NSNumber numberWithInt:123]), + @"awDoubleVal with NSNumber with int"); + STAssertEquals(out, (double)123.0, + @"awDoubleVal should convert NSNumber with int"); + + STAssertTrue(awDoubleVal(&out, [NSNumber numberWithFloat:2233.231]), + @"awDoubleVal with NSNumber with float"); + + // A bit is lost in the translation from float to double + STAssertEqualsWithAccuracy(out, (double)2233.231L, 0.001, + @"awDoubleVal should convert NSNumber with float"); + + STAssertTrue(awDoubleVal(&out, [NSNumber numberWithDouble:788.9]), + @"awDoubleVal with NSNumber with double"); + STAssertEquals(out, (double)788.9, + @"awDoubleVal should convert NSNumber with double"); + + STAssertTrue(awDoubleVal(&out, @"567.34"), @"awDoubleVal with NSString"); + STAssertEquals(out, (double)567.34, @"awDoubleVal should convert NSString"); + + STAssertFalse(awDoubleVal(&out, [NSValue valueWithPointer:@"dummy"]), + @"awDoubleVal should not able to convert NSValue"); +} + +- (void)testNonExistentAdapterAdsOff { + NSString *configRaw = + @"{\"extra\":{" + @"\"location_on\":0," + @"\"background_color_rgb\":{\"red\":7,\"green\":8,\"blue\":9,\"alpha\":0.5}," + @"\"text_color_rgb\":{\"red\":200,\"green\":150,\"blue\":100,\"alpha\":0.5}," + @"\"cycle_time\":45," + @"\"transition\":4}," + @"\"rations\":[{" + @"\"nid\":\"9976543210abcdefabcdef0000000001\"," + @"\"type\":1," + @"\"nname\":\"admob\"," + @"\"weight\":0," + @"\"priority\":1," + @"\"key\":\"ADMOB_KEY\"" + @"},{" + @"\"nid\":\"9976543210abcdefabcdef0000000002\"," + @"\"type\":12," + @"\"nname\":\"mdotm\"," + @"\"weight\":0," + @"\"priority\":2," + @"\"key\":\"MDOTM_KEY\"" + @"},{" + @"\"nid\":\"9976543210abcdefabcdef0000000003\"," + @"\"type\":2," + @"\"nname\":\"jumptap\"," + @"\"weight\":0," + @"\"priority\":3," + @"\"key\":{\"publisherID\":\"JT\",\"siteID\":\"JT_SITE\",\"spotID\":\"JT_SPOT\"}" + @"},{" + @"\"nid\":\"9976543210abcdefabcdef0000000007\"," + @"\"type\":16," + @"\"nname\":\"generic\"," + @"\"weight\":0," + @"\"priority\":4," + @"\"key\":\"__GENERIC__\"" + @"},{" + @"\"nid\":\"9976543210abcdefabcdef0000000009\"," + @"\"type\":19," + @"\"nname\":\"iad\"," + @"\"weight\":100," + @"\"priority\":5," + @"\"key\":\"IAD_ID\"" + @"}]}"; + + NSString *appKey = @"someappkey"; + AdWhirlConfigDelegateCustomURL *delegate + = [[AdWhirlConfigDelegateCustomURL alloc] init]; + AdWhirlConfig *config = [[AdWhirlConfig alloc] initWithAppKey:appKey + delegate:delegate]; + STAssertNotNil(config, @"Config should not be nil"); + + // setup mock registry + id mockRegistry = [OCMockObject mockForClass:[AdWhirlAdNetworkRegistry class]]; + AdWhirlClassWrapper *classWrapper + = [[AdWhirlClassWrapper alloc] initWithClass:[AdWhirlAdNetworkAdapter class]]; + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:1]; // AdMob + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:2]; // JT + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:12]; // MdotM + [[[mockRegistry expect] andReturn:classWrapper] adapterClassFor:16]; // G-ric + [[[mockRegistry expect] andReturn:nil] adapterClassFor:19]; // iAd + config.adNetworkRegistry = mockRegistry; + + // parse this thing + NSData *configData = [configRaw dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error = nil; + [GTMUnitTestDevLog expectPattern: + @"Cannot create ad network config.*Ad network type 19 not supported," + @" no adapter found"]; + STAssertFalse(config.hasConfig, @"Config has no actual config"); + STAssertTrue([config parseConfig:configData error:&error], + @"Should parse config properly, error: %@", error); + STAssertNoThrow([mockRegistry verify], + @"Must have called adapterClassFor of the ad network registry"); + STAssertTrue(config.hasConfig, @"Config parsed successfully"); + + // ads should be off + STAssertTrue(config.adsAreOff, @"Ads should be off when no adapter exists"); + + // clean up + [config release]; + [delegate release]; + [classWrapper release]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlViewTest.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlViewTest.m new file mode 100644 index 000000000..09803b23e --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/AdWhirlViewTest.m @@ -0,0 +1,56 @@ +/* + + AdWhirlViewTest.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import "GTMSenTestCase.h" +#import "GTMUnitTestDevLog.h" +#import "AdWhirlView.h" +#import "AdWhirlView+.h" +#import "AdWhirlLog.h" +#import "AdWhirlDelegateProtocol.h" + + +@interface AdWhirlViewTest : GTMTestCase { +} +@end + + +// Not specifying delegate here to avoid compiler warnings +@interface AdWhirlDelegateIncomplete : NSObject { +} +@end + + +@implementation AdWhirlDelegateIncomplete +@end + + +@implementation AdWhirlViewTest + +-(void)setUp { +} + +- (void)tearDown { +} + +- (void)testGoodRequest { +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/UIColor+AdWhirlConfigTest.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/UIColor+AdWhirlConfigTest.m new file mode 100644 index 000000000..0fdf7c59d --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/UnitTests/UIColor+AdWhirlConfigTest.m @@ -0,0 +1,214 @@ +/* + + UIColor+AdWhirlConfigTest.m + + Copyright 2010 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import "UIColor+AdWhirlConfig.h" +#import "GTMSenTestCase.h" + + +@interface UIColor_AdWhirlConfigTest : GTMTestCase { +} + +- (void)compareDict:(NSDictionary *)dict + withRed:(CGFloat)red + green:(CGFloat)green + blue:(CGFloat)blue + alpha:(CGFloat)alpha + message:(NSString *)message; + +@end + + +@implementation UIColor_AdWhirlConfigTest + +-(void)setUp { +} + +- (void)tearDown { +} + +- (void)compareDict:(NSDictionary *)dict + withRed:(CGFloat)red + green:(CGFloat)green + blue:(CGFloat)blue + alpha:(CGFloat)alpha + message:(NSString *)message { + STAssertNotNil(dict, @"Input dict is nil, message passed: %@", message); + UIColor *color = [[UIColor alloc] initWithDict:dict]; + STAssertNotNil(color, @"Dict should yield a UIColor. dict: %@ message: %@", + dict, message); + UIColor *compColor = [[UIColor alloc] initWithRed:red + green:green + blue:blue + alpha:alpha]; + STAssertNotNil(compColor, + @"Comparison color should not be nil." + @" r:%lf g:%lf b:%lf a:%lf message:%@", + red, green, blue, alpha, message); + STAssertTrue(CGColorEqualToColor(color.CGColor, compColor.CGColor), message); + [color release]; + [compColor release]; +} + +- (void)testGoodColors { + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + @"0.37", @"alpha", + nil]; + [self compareDict:dict + withRed:127.0/255 + green:133.0/255.0 + blue:122.0/255.0 + alpha:0.37 + message:@"Dict color with strings should be equal to colors"]; + + dict = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:127], @"red", + [NSNumber numberWithInt:133], @"green", + [NSNumber numberWithInt:122], @"blue", + [NSNumber numberWithDouble:0.37], @"alpha", + nil]; + [self compareDict:dict + withRed:127.0/255 + green:133.0/255.0 + blue:122.0/255.0 + alpha:0.37 + message:@"Dict color with NSNumber should be equal to colors"]; +} + +- (void)testMissingColors { + NSDictionary *dictMissingRed = [NSDictionary dictionaryWithObjectsAndKeys: + @"133", @"green", + @"122", @"blue", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictMissingRed], + @"Dict missing red should yield nil UIColor"); + + NSDictionary *dictMissingGreen = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"122", @"blue", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictMissingGreen], + @"Dict missing green should yield nil UIColor"); + + NSDictionary *dictMissingBlue = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictMissingBlue], + @"Dict missing blue should yield nil UIColor"); +} + +- (void)testBadAlpha { + NSDictionary *dictMissingAlpha = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + nil]; + [self compareDict:dictMissingAlpha + withRed:127.0/255.0 + green:133.0/255.0 + blue:122.0/255.0 + alpha:1.0 + message:@"Missing alpha should default to 1.0"]; + + NSDictionary *dictBadAlpha = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + @"blah", @"alpha", + nil]; + [self compareDict:dictBadAlpha + withRed:127.0/255.0 + green:133.0/255.0 + blue:122.0/255.0 + alpha:0.0 + message:@"Non-numeric alpha should make 0.0"]; + + NSDictionary *dictNegAlpha = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + @"-0.4", @"alpha", + nil]; + [self compareDict:dictNegAlpha + withRed:127.0/255.0 + green:133.0/255.0 + blue:122.0/255.0 + alpha:0.0 + message:@"Negative alpha should make 0.0"]; + + NSDictionary *dictTooBigAlpha = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + @"100", @"alpha", + nil]; + [self compareDict:dictTooBigAlpha + withRed:127.0/255.0 + green:133.0/255.0 + blue:122.0/255.0 + alpha:1.0 + message:@"Out of range alpha should default to 1.0"]; +} + +- (void)testBadDictValues { + NSValue *dummy = [NSValue valueWithPointer:"dummy"]; + + NSDictionary *dictBadRed = [NSDictionary dictionaryWithObjectsAndKeys: + dummy, @"red", + @"133", @"green", + @"122", @"blue", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictBadRed], + @"Dict with invalid red value should yield nil UIColor"); + + NSDictionary *dictBadGreen = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + dummy, @"green", + @"122", @"blue", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictBadGreen], + @"Dict with invalid green value should yield nil UIColor"); + + NSDictionary *dictBadBlue = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + dummy, @"blue", + nil]; + STAssertNil([[UIColor alloc] initWithDict:dictBadBlue], + @"Dict with invalid blue value should yield nil UIColor"); + + NSDictionary *dictBadAlphaType = [NSDictionary dictionaryWithObjectsAndKeys: + @"127", @"red", + @"133", @"green", + @"122", @"blue", + @"100", dummy, + nil]; + [self compareDict:dictBadAlphaType + withRed:127.0/255.0 + green:133.0/255.0 + blue:122.0/255.0 + alpha:1.0 + message:@"Alpha with invalid type should default to 1.0"]; +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.h new file mode 100644 index 000000000..a4b8c43b9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.h @@ -0,0 +1,19 @@ +// +// AppDelegate_iPad.h +// AdWhirlTests +// +// Created by Nigel Choi on 8/5/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import +#import + +@interface AppDelegate_iPad : NSObject { + UIWindow *window; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.m new file mode 100644 index 000000000..902820d99 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/AppDelegate_iPad.m @@ -0,0 +1,67 @@ +// +// AppDelegate_iPad.m +// AdWhirlTests +// +// Created by Nigel Choi on 8/5/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "AppDelegate_iPad.h" + +@implementation AppDelegate_iPad + +@synthesize window; + + +#pragma mark - +#pragma mark Application lifecycle + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + [window makeKeyAndVisible]; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. + */ +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/MainWindow_iPad.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/MainWindow_iPad.xib new file mode 100644 index 000000000..a9bea1325 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPad/MainWindow_iPad.xib @@ -0,0 +1,315 @@ + + + + 1024 + 10D573 + 782 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 105 + + + YES + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + {768, 1024} + + 1 + MSAxIDEAA + + NO + NO + + 2 + + IBIPadFramework + YES + + + IBIPadFramework + + + + + YES + + + window + + + + 7 + + + + delegate + + + + 8 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + 6 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 6.CustomClassName + 6.IBPluginDependency + + + YES + UIApplication + UIResponder + {{903, 55}, {768, 1024}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AppDelegate_iPad + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 9 + + + + YES + + AppDelegate_iPad + NSObject + + window + UIWindow + + + IBProjectSource + iPad/AppDelegate_iPad.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 + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIResponder + NSObject + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../AdWhirlTests.xcodeproj + 3 + 105 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.h new file mode 100644 index 000000000..f00535981 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.h @@ -0,0 +1,19 @@ +// +// AppDelegate_iPhone.h +// AdWhirlTests +// +// Created by Nigel Choi on 8/5/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import +#import + +@interface AppDelegate_iPhone : NSObject { + UIWindow *window; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; + +@end + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.m new file mode 100644 index 000000000..8a4cb92e4 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/AppDelegate_iPhone.m @@ -0,0 +1,83 @@ +// +// AppDelegate_iPhone.m +// AdWhirlTests +// +// Created by Nigel Choi on 8/5/10. +// Copyright __MyCompanyName__ 2010. All rights reserved. +// + +#import "AppDelegate_iPhone.h" + +@implementation AppDelegate_iPhone + +@synthesize window; + + +#pragma mark - +#pragma mark Application lifecycle + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + [window makeKeyAndVisible]; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/MainWindow_iPhone.xib b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/MainWindow_iPhone.xib new file mode 100644 index 000000000..e8af02797 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/AdWhirlTests/iPhone/MainWindow_iPhone.xib @@ -0,0 +1,327 @@ + + + + 1024 + 10D573 + 782 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 105 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + + 1316 + + {320, 480} + + + 1 + MSAxIDEAA + + NO + NO + + IBCocoaTouchFramework + YES + + + + + YES + + + delegate + + + + 5 + + + + window + + + + 6 + + + + + YES + + 0 + + + + + + 2 + + + YES + + + + + -1 + + + File's Owner + + + 4 + + + App Delegate + + + -2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 2.UIWindow.visibleAtLaunch + 4.CustomClassName + 4.IBPluginDependency + + + YES + UIApplication + UIResponder + + YES + + + YES + + + {{520, 376}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AppDelegate_iPhone + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 8 + + + + YES + + AppDelegate_iPhone + NSObject + + window + UIWindow + + + IBProjectSource + iPhone/AppDelegate_iPhone.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 + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIResponder + NSObject + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../AdWhirlTests.xcodeproj + 3 + 105 + + diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/Changelog.txt b/adwhirl/AdWhirlSDK_iOS_3.1.1/Changelog.txt new file mode 100644 index 000000000..926476bb9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/Changelog.txt @@ -0,0 +1,103 @@ +AdWhirl iPhone SDK Changelog + +For a full detailed change log visit http://code.google.com/p/adwhirl/source/list?repo=sdk + +*************************** +Version 3.1.0 (Nov 15 2011) +*************************** + +- Added support for Nexage network +- Updated InMobi adapter to be compliant with v300 +- Updated Millennial adapter to be compliant with v4.2.6 +- Updated JumpTap adapter to be compliant with v2.0.14.1 +- Fixed Reachability NPE (Issue #118) +- Fixed potential NSError null dereference (Issue #179) + +*************************** +Version 3.0.0 (Apr 1 2011) +*************************** + +- Added support for 640x100 house ads +- Added support for the new Google AdMob Ads SDK +- Updated Millennial Media adapters to support v4.2 of their SDK +- Fixed Issue #178: network activity indicator bug + +*************************** +Version 2.6.3 (Mar 1 2011) +*************************** + +- Modified iAd adapter to use new Portrait/Landscape size constants. +- Added OneRiot adapter. + +*************************** +Version 2.6.2 (Nov 29 2010) +*************************** + +- Fixed Issue #70 with patch from Greystripe +- Fixed Issue #77 by releasing Jumptap object +- Issue #121 updated MdotM Adapter with patch from MdotM +- Added support for BrightRoll (Issue #134) + +*************************** +Version 2.6.1 (Oct 8 2010) +*************************** + +- Fixed Issue #42: Get the appid from the config instead of the delegate when reporting impressions. The delegate may have been gone by then. +- Fixed Issue #104 and #106: Fixed race condition where AdWhirl's refresh timer coincides with iAd's refresh timer, and the old iAd calling back when transitioning to the new iAd. In the process, added stopBeingDelegate required method for ad network adapters. +- Fixed Issue #116: Don't choose next ad network by percent if the total available percentage is 0. +- Don't make new ad request if modal view is active in any case. +- Added InMobi support. +- Remove support for Google AdSense expandables. It does not work with AdWhirl. + +*************************** +Version 2.6.0 (Sep 17 2010) +*************************** + +- Rewrote ads refresh mechanism, which should make ad refreshes more robust (Issues #33, #61, #69, #87): + - Setup a recurring timer regardless of whether ad requests succeeded or not. + - Retries fetching config three times before declaring failure. + - More proactively checking reachability when fetching config (Issue #99). +- Fixed issues with crashes related to network connections and reachability checks (Issues #85, #86, #92) +- Refactored and added tests for AdWhirlConfigStore. +- Fixed Issue 89: Prevent using fade in transition for iAd. +- Fixed Issue 90: Use new class method locationServicesEnabled of CLLocationManager available for iOS 4 to prevent memory leaks and deprecation warnings. +- Fixed Issue 91: nil out adView.delegate in MdotM adapter's dealloc. + +*************************** +Version 2.5.5 (Aug 19 2010) +*************************** + +- Added a test framework and some unit tests, using Google Toolbox for Mac and OCMock +- Added Xcode file templates for new AdWhirl files +- Some code refactoring to facilitate testing +- Allows config refresh using the updateAdWhirlConfig method of AdWhirlView (Issue #73) +- Call disableAdRefresh on MMAdView on adaptor dealloc (Issue #67) +- totalWeight should be a double when checking total weight in AdWhirlConfig.m (Issue #72) + +*************************** +Version 2.5.0 (Jul 28 2010) +*************************** + +- Updated Jumptap adapter for latest Jumptap API (2.0.12.4, 7/13/2010) +- Support decimal rations (Issue #49) +- Reset UIWebView's delegate in AdWhirlWebBrowserController (Issue #64) +- Reseed random() only once (Issue #66) + +*************************** +Version 2.3.1 (Jul 16 2010) +*************************** + +- Added support for ZestAdz. +- Fixed issue #40. Tapping mailto: links in in-app browser now sends users to the Mail App. +- Accepted contribution from Greystripe for an adapter and tested to work. +- Tested with latest Millennial library with iPhone OS 4. +- Tested with latest VideoEgg library with iPhone OS 4. + +*************************** +Version 2.3.0 (Jun 17 2010) +*************************** + +- iAd adapter release. +- Added mechanisms for apps to handle ad size and orientation changes. +- Changed AdWhirlSDK2_Sample to compile with iPhone SDK 4.0 . +- Bug fixes. diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateIcon.icns b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateIcon.icns new file mode 100644 index 000000000..3796e8e18 Binary files /dev/null and b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateIcon.icns differ diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateInfo.plist b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 000000000..3fb7220bf --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,5 @@ +{ + MainTemplateFile = "class.m"; + CounterpartTemplateFile = "class.h"; + Description = "An Objective-C class file for AdWhirl development."; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.h new file mode 100644 index 000000000..d6848c064 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.h @@ -0,0 +1,28 @@ +/* + + «FILENAME» + + Copyright «YEAR» «ORGANIZATIONNAME» + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +«OPTIONALHEADERIMPORTLINE» + +@interface «FILEBASENAMEASIDENTIFIER» : NSObject { + +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.m new file mode 100644 index 000000000..238e74163 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlClass.pbfiletemplate/class.m @@ -0,0 +1,25 @@ +/* + + «FILENAME» + + Copyright «YEAR» «ORGANIZATIONNAME» + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +«OPTIONALHEADERIMPORTLINE» + +@implementation «FILEBASENAMEASIDENTIFIER» + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateIcon.icns b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateIcon.icns new file mode 100644 index 000000000..7cd6c389f Binary files /dev/null and b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateIcon.icns differ diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateInfo.plist b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateInfo.plist new file mode 100644 index 000000000..11058b12a --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/TemplateInfo.plist @@ -0,0 +1,4 @@ +{ + MainTemplateFile = "class.m"; + Description = "An Objective-C class containing an OCUnit test case, with an optional header which includes the \"GTMSenTestCase.h\" header."; +} diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/class.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/class.m new file mode 100644 index 000000000..37e204f79 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate/class.m @@ -0,0 +1,42 @@ +/* + + «FILENAME» + + Copyright «YEAR» «ORGANIZATIONNAME» + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +#import +#import "GTMSenTestCase.h" +«OPTIONALHEADERIMPORTLINE» + +@interface «FILEBASENAMEASIDENTIFIER» : GTMTestCase { +} +@end + + +@implementation «FILEBASENAMEASIDENTIFIER» + +-(void)setUp { +} + +- (void)tearDown { +} + +- (void)testX { + STAssertTrue((1+1)==2, @"Compiler isn't feeling well today :-(" ); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/README b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/README new file mode 100644 index 000000000..c0a2e2f95 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/FileTemplates/README @@ -0,0 +1,10 @@ +These are templates for new AdWhirl files. To use the test case template, link it like so: + +sudo ln -s "/iphone/FileTemplates/AdWhirlTestCaseClass.pbfiletemplate" \ + "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates/Cocoa Touch Class/" + +Once you link it, you will see "AdWhirlTestCaseClass" in the New File dialog in Coca Touch Class. Make sure the test class file name ends with "Test.m" + +Link Adwhirl class the same way for an empty class template with the standard Apache license. + +If you are seeing __MyCompanyName__ in the generated file, make sure to set the company field for your personal card in Address Book. diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/README b/adwhirl/AdWhirlSDK_iOS_3.1.1/README new file mode 100644 index 000000000..0d2eafdc9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/README @@ -0,0 +1 @@ +Please see http://www.adwhirl.com/doc/ios/AdWhirliOSSDKSetup.html for setup instructions, Changelog.txt for changes in this version and http://code.google.com/p/adwhirl for the latest news, releases and issue reports. diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.h new file mode 100644 index 000000000..b48982bab --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.h @@ -0,0 +1,68 @@ +// +// CDataScanner.h +// TouchCode +// +// Created by Jonathan Wight on 04/16/08. +// Copyright 2008 toxicsoftware.com. All rights reserved. +// +// 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 + +// NSScanner + +@interface CDataScanner : NSObject { + NSData *data; + + u_int8_t *start; + u_int8_t *end; + u_int8_t *current; + NSUInteger length; + + NSCharacterSet *doubleCharacters; +} + +@property (readwrite, nonatomic, retain) NSData *data; +@property (readwrite, nonatomic, assign) NSUInteger scanLocation; +@property (readonly, nonatomic, assign) BOOL isAtEnd; + ++ (id)scannerWithData:(NSData *)inData; + +- (unichar)currentCharacter; +- (unichar)scanCharacter; +- (BOOL)scanCharacter:(unichar)inCharacter; + +- (BOOL)scanUTF8String:(const char *)inString intoString:(NSString **)outValue; +- (BOOL)scanString:(NSString *)inString intoString:(NSString **)outValue; +- (BOOL)scanCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue; // inSet must only contain 7-bit ASCII characters + +- (BOOL)scanUpToString:(NSString *)string intoString:(NSString **)outValue; +- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)outValue; // inSet must only contain 7-bit ASCII characters + +- (BOOL)scanNumber:(NSNumber **)outValue; + +- (void)skipWhitespace; + +- (NSString *)remainingString; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.m new file mode 100644 index 000000000..50f3a6709 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/CDataScanner.m @@ -0,0 +1,270 @@ +// +// CDataScanner.m +// TouchCode +// +// Created by Jonathan Wight on 04/16/08. +// Copyright 2008 toxicsoftware.com. All rights reserved. +// +// 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 "CDataScanner.h" + +#import "CDataScanner_Extensions.h" + +@interface CDataScanner () +@property (readwrite, nonatomic, retain) NSCharacterSet *doubleCharacters; +@end + +#pragma mark - + +inline static unichar CharacterAtPointer(void *start, void *end) +{ +#pragma unused(end) + +const u_int8_t theByte = *(u_int8_t *)start; +if (theByte & 0x80) + { + // TODO -- UNICODE!!!! (well in theory nothing todo here) + } +const unichar theCharacter = theByte; +return(theCharacter); +} + +@implementation CDataScanner + +@dynamic data; +@dynamic scanLocation; +@dynamic isAtEnd; +@synthesize doubleCharacters; + ++ (id)scannerWithData:(NSData *)inData +{ +CDataScanner *theScanner = [[[self alloc] init] autorelease]; +theScanner.data = inData; +return(theScanner); +} + +- (id)init +{ +if ((self = [super init]) != nil) + { + self.doubleCharacters = [NSCharacterSet characterSetWithCharactersInString:@"0123456789eE-."]; + } +return(self); +} + +- (void)dealloc +{ +self.data = NULL; +self.doubleCharacters = NULL; +// +[super dealloc]; +} + +- (NSUInteger)scanLocation +{ +return(current - start); +} + +- (NSData *)data +{ +return(data); +} + +- (void)setData:(NSData *)inData +{ +if (data != inData) + { + if (data) + { + [data release]; + data = NULL; + } + + if (inData) + { + data = [inData retain]; + // + start = (u_int8_t *)data.bytes; + end = start + data.length; + current = start; + length = data.length; + } + } +} + +- (void)setScanLocation:(NSUInteger)inScanLocation +{ +current = start + inScanLocation; +} + +- (BOOL)isAtEnd +{ +return(self.scanLocation >= length); +} + +- (unichar)currentCharacter +{ +return(CharacterAtPointer(current, end)); +} + +#pragma mark - + +- (unichar)scanCharacter +{ +const unichar theCharacter = CharacterAtPointer(current++, end); +return(theCharacter); +} + +- (BOOL)scanCharacter:(unichar)inCharacter +{ +unichar theCharacter = CharacterAtPointer(current, end); +if (theCharacter == inCharacter) + { + ++current; + return(YES); + } +else + return(NO); +} + +- (BOOL)scanUTF8String:(const char *)inString intoString:(NSString **)outValue; +{ +const size_t theLength = strlen(inString); +if ((size_t)(end - current) < theLength) + return(NO); +if (strncmp((char *)current, inString, theLength) == 0) + { + current += theLength; + if (outValue) + *outValue = [NSString stringWithUTF8String:inString]; + return(YES); + } +return(NO); +} + +- (BOOL)scanString:(NSString *)inString intoString:(NSString **)outValue +{ +if ((size_t)(end - current) < inString.length) + return(NO); +if (strncmp((char *)current, [inString UTF8String], inString.length) == 0) + { + current += inString.length; + if (outValue) + *outValue = inString; + return(YES); + } +return(NO); +} + +- (BOOL)scanCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue +{ +u_int8_t *P; +for (P = current; P < end && [inSet characterIsMember:*P] == YES; ++P) + ; + +if (P == current) + { + return(NO); + } + +if (outValue) + { + *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; + } + +current = P; + +return(YES); +} + +- (BOOL)scanUpToString:(NSString *)inString intoString:(NSString **)outValue +{ +const char *theToken = [inString UTF8String]; +const char *theResult = strnstr((char *)current, theToken, end - current); +if (theResult == NULL) + { + return(NO); + } + +if (outValue) + { + *outValue = [[[NSString alloc] initWithBytes:current length:theResult - (char *)current encoding:NSUTF8StringEncoding] autorelease]; + } + +current = (u_int8_t *)theResult; + +return(YES); +} + +- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue +{ +u_int8_t *P; +for (P = current; P < end && [inSet characterIsMember:*P] == NO; ++P) + ; + +if (P == current) + { + return(NO); + } + +if (outValue) + { + *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; + } + +current = P; + +return(YES); +} + +- (BOOL)scanNumber:(NSNumber **)outValue +{ +// Replace all of this with a strtod call +NSString *theString = NULL; +if ([self scanCharactersFromSet:doubleCharacters intoString:&theString]) + { + if (outValue) + *outValue = [NSNumber numberWithDouble:[theString doubleValue]]; // TODO dont use doubleValue + return(YES); + } +return(NO); +} + +- (void)skipWhitespace +{ +u_int8_t *P; +for (P = current; P < end && (isspace(*P)); ++P) + ; + +current = P; +} + +- (NSString *)remainingString +{ +NSData *theRemainingData = [NSData dataWithBytes:current length:end - current]; +NSString *theString = [[[NSString alloc] initWithData:theRemainingData encoding:NSUTF8StringEncoding] autorelease]; +return(theString); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.h new file mode 100644 index 000000000..c7bf48be0 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.h @@ -0,0 +1,37 @@ +// +// CDataScanner_Extensions.h +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CDataScanner.h" + +@interface CDataScanner (CDataScanner_Extensions) + +- (BOOL)scanCStyleComment:(NSString **)outComment; +- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.m new file mode 100644 index 000000000..1dc338d84 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/CDataScanner_Extensions.m @@ -0,0 +1,80 @@ +// +// CDataScanner_Extensions.m +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CDataScanner_Extensions.h" + +#import "NSCharacterSet_Extensions.h" + +@implementation CDataScanner (CDataScanner_Extensions) + +- (BOOL)scanCStyleComment:(NSString **)outComment +{ +if ([self scanString:@"/*" intoString:NULL] == YES) + { + NSString *theComment = NULL; + if ([self scanUpToString:@"*/" intoString:&theComment] == NO) + [NSException raise:NSGenericException format:@"Started to scan a C style comment but it wasn't terminated."]; + + if ([theComment rangeOfString:@"/*"].location != NSNotFound) + [NSException raise:NSGenericException format:@"C style comments should not be nested."]; + + if ([self scanString:@"*/" intoString:NULL] == NO) + [NSException raise:NSGenericException format:@"C style comment did not end correctly."]; + + if (outComment != NULL) + *outComment = theComment; + + return(YES); + } +else + { + return(NO); + } +} + +- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment +{ +if ([self scanString:@"//" intoString:NULL] == YES) + { + NSString *theComment = NULL; + [self scanUpToCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:&theComment]; + [self scanCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:NULL]; + + if (outComment != NULL) + *outComment = theComment; + + return(YES); + } +else + { + return(NO); + } +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.h new file mode 100644 index 000000000..cfa9b2692 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.h @@ -0,0 +1,36 @@ +// +// NSCharacterSet_Extensions.h +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 + +@interface NSCharacterSet (NSCharacterSet_Extensions) + ++ (NSCharacterSet *)linebreaksCharacterSet; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.m new file mode 100644 index 000000000..5e62ab8b7 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSCharacterSet_Extensions.m @@ -0,0 +1,48 @@ +// +// NSCharacterSet_Extensions.m +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "NSCharacterSet_Extensions.h" + +@implementation NSCharacterSet (NSCharacterSet_Extensions) + +#define LF 0x000a // Line Feed +#define FF 0x000c // Form Feed +#define CR 0x000d // Carriage Return +#define NEL 0x0085 // Next Line +#define LS 0x2028 // Line Separator +#define PS 0x2029 // Paragraph Separator + ++ (NSCharacterSet *)linebreaksCharacterSet +{ +unichar theCharacters[] = { LF, FF, CR, NEL, LS, PS, }; + +return([NSCharacterSet characterSetWithCharactersInString:[NSString stringWithCharacters:theCharacters length:sizeof(theCharacters) / sizeof(*theCharacters)]]); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.h new file mode 100644 index 000000000..dccbd7c25 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.h @@ -0,0 +1,36 @@ +// +// NSDictionary_JSONExtensions.h +// TouchCode +// +// Created by Jonathan Wight on 04/17/08. +// Copyright 2008 toxicsoftware.com. All rights reserved. +// +// 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 + +@interface NSDictionary (NSDictionary_JSONExtensions) + ++ (id)dictionaryWithJSONData:(NSData *)inData error:(NSError **)outError; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.m new file mode 100644 index 000000000..7b50060ab --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSDictionary_JSONExtensions.m @@ -0,0 +1,41 @@ +// +// NSDictionary_JSONExtensions.m +// TouchCode +// +// Created by Jonathan Wight on 04/17/08. +// Copyright 2008 toxicsoftware.com. All rights reserved. +// +// 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 "NSDictionary_JSONExtensions.h" + +#import "CJSONDeserializer.h" + +@implementation NSDictionary (NSDictionary_JSONExtensions) + ++ (id)dictionaryWithJSONData:(NSData *)inData error:(NSError **)outError +{ +return([[CJSONDeserializer deserializer] deserialize:inData error:outError]); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.h new file mode 100644 index 000000000..142ec9549 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.h @@ -0,0 +1,44 @@ +// +// NSScanner_Extensions.h +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 + +@interface NSScanner (NSScanner_Extensions) + +- (NSString *)remainingString; + +- (unichar)currentCharacter; +- (unichar)scanCharacter; +- (BOOL)scanCharacter:(unichar)inCharacter; +- (void)backtrack:(unsigned)inCount; + +- (BOOL)scanCStyleComment:(NSString **)outComment; +- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.m new file mode 100644 index 000000000..f06534549 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/Extensions/NSScanner_Extensions.m @@ -0,0 +1,118 @@ +// +// NSScanner_Extensions.m +// TouchCode +// +// Created by Jonathan Wight on 12/08/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "NSScanner_Extensions.h" + +#import "NSCharacterSet_Extensions.h" + +@implementation NSScanner (NSScanner_Extensions) + +- (NSString *)remainingString +{ +return([[self string] substringFromIndex:[self scanLocation]]); +} + +- (unichar)currentCharacter +{ +return([[self string] characterAtIndex:[self scanLocation]]); +} + +- (unichar)scanCharacter +{ +unsigned theScanLocation = [self scanLocation]; +unichar theCharacter = [[self string] characterAtIndex:theScanLocation]; +[self setScanLocation:theScanLocation + 1]; +return(theCharacter); +} + +- (BOOL)scanCharacter:(unichar)inCharacter +{ +unsigned theScanLocation = [self scanLocation]; +if ([[self string] characterAtIndex:theScanLocation] == inCharacter) + { + [self setScanLocation:theScanLocation + 1]; + return(YES); + } +else + return(NO); +} + +- (void)backtrack:(unsigned)inCount +{ +unsigned theScanLocation = [self scanLocation]; +if (inCount > theScanLocation) + [NSException raise:NSGenericException format:@"Backtracked too far."]; +[self setScanLocation:theScanLocation - inCount]; +} + +- (BOOL)scanCStyleComment:(NSString **)outComment +{ +if ([self scanString:@"/*" intoString:NULL] == YES) + { + NSString *theComment = NULL; + if ([self scanUpToString:@"*/" intoString:&theComment] == NO) + [NSException raise:NSGenericException format:@"Started to scan a C style comment but it wasn't terminated."]; + + if ([theComment rangeOfString:@"/*"].location != NSNotFound) + [NSException raise:NSGenericException format:@"C style comments should not be nested."]; + + if ([self scanString:@"*/" intoString:NULL] == NO) + [NSException raise:NSGenericException format:@"C style comment did not end correctly."]; + + if (outComment != NULL) + *outComment = theComment; + + return(YES); + } +else + { + return(NO); + } +} + +- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment +{ +if ([self scanString:@"//" intoString:NULL] == YES) + { + NSString *theComment = NULL; + [self scanUpToCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:&theComment]; + [self scanCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:NULL]; + + if (outComment != NULL) + *outComment = theComment; + + return(YES); + } +else + { + return(NO); + } +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.h new file mode 100644 index 000000000..9ec39a582 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.h @@ -0,0 +1,46 @@ +// +// CJSONDataSerializer.h +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 + +@interface CJSONDataSerializer : NSObject { +} + ++ (id)serializer; + +/// Take any JSON compatible object (generally NSNull, NSNumber, NSString, NSArray and NSDictionary) and produce an NSData containing the serialized JSON. +- (NSData *)serializeObject:(id)inObject; + +- (NSData *)serializeNull:(NSNull *)inNull; +- (NSData *)serializeNumber:(NSNumber *)inNumber; +- (NSData *)serializeString:(NSString *)inString; +- (NSData *)serializeArray:(NSArray *)inArray; +- (NSData *)serializeDictionary:(NSDictionary *)inDictionary; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.m new file mode 100644 index 000000000..d470dc43c --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDataSerializer.m @@ -0,0 +1,225 @@ +// +// CJSONDataSerializer.m +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CJSONDataSerializer.h" + +#import "CSerializedJSONData.h" + +static NSData *kNULL = NULL; +static NSData *kFalse = NULL; +static NSData *kTrue = NULL; + +@implementation CJSONDataSerializer + ++ (void)initialize +{ +NSAutoreleasePool *thePool = [[NSAutoreleasePool alloc] init]; + +@synchronized(@"CJSONDataSerializer") + { + if (kNULL == NULL) + kNULL = [[NSData alloc] initWithBytesNoCopy:"null" length:4 freeWhenDone:NO]; + if (kFalse == NULL) + kFalse = [[NSData alloc] initWithBytesNoCopy:"false" length:5 freeWhenDone:NO]; + if (kTrue == NULL) + kTrue = [[NSData alloc] initWithBytesNoCopy:"true" length:4 freeWhenDone:NO]; + } + +[thePool release]; +} + ++ (id)serializer +{ +return([[[self alloc] init] autorelease]); +} + +- (NSData *)serializeObject:(id)inObject; +{ +NSData *theResult = NULL; + +if ([inObject isKindOfClass:[NSNull class]]) + { + theResult = [self serializeNull:inObject]; + } +else if ([inObject isKindOfClass:[NSNumber class]]) + { + theResult = [self serializeNumber:inObject]; + } +else if ([inObject isKindOfClass:[NSString class]]) + { + theResult = [self serializeString:inObject]; + } +else if ([inObject isKindOfClass:[NSArray class]]) + { + theResult = [self serializeArray:inObject]; + } +else if ([inObject isKindOfClass:[NSDictionary class]]) + { + theResult = [self serializeDictionary:inObject]; + } +else if ([inObject isKindOfClass:[NSData class]]) + { + NSString *theString = [[[NSString alloc] initWithData:inObject encoding:NSUTF8StringEncoding] autorelease]; + theResult = [self serializeString:theString]; + } +else if ([inObject isKindOfClass:[CSerializedJSONData class]]) + { + theResult = [inObject data]; + } +else + { + [NSException raise:NSGenericException format:@"Cannot serialize data of type '%@'", NSStringFromClass([inObject class])]; + } +if (theResult == NULL) + [NSException raise:NSGenericException format:@"Could not serialize object '%@'", inObject]; +return(theResult); +} + +- (NSData *)serializeNull:(NSNull *)inNull +{ +#pragma unused (inNull) +return(kNULL); +} + +- (NSData *)serializeNumber:(NSNumber *)inNumber +{ +NSData *theResult = NULL; +switch (CFNumberGetType((CFNumberRef)inNumber)) + { + case kCFNumberCharType: + { + int theValue = [inNumber intValue]; + if (theValue == 0) + theResult = kFalse; + else if (theValue == 1) + theResult = kTrue; + else + theResult = [[inNumber stringValue] dataUsingEncoding:NSASCIIStringEncoding]; + } + break; + case kCFNumberFloat32Type: + case kCFNumberFloat64Type: + case kCFNumberFloatType: + case kCFNumberDoubleType: + case kCFNumberSInt8Type: + case kCFNumberSInt16Type: + case kCFNumberSInt32Type: + case kCFNumberSInt64Type: + case kCFNumberShortType: + case kCFNumberIntType: + case kCFNumberLongType: + case kCFNumberLongLongType: + case kCFNumberCFIndexType: + default: + theResult = [[inNumber stringValue] dataUsingEncoding:NSASCIIStringEncoding]; + break; + } +return(theResult); +} + +- (NSData *)serializeString:(NSString *)inString +{ +NSMutableString *theMutableCopy = [[inString mutableCopy] autorelease]; +[theMutableCopy replaceOccurrencesOfString:@"\\" withString:@"\\\\" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\"" withString:@"\\\"" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"/" withString:@"\\/" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\b" withString:@"\\b" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\f" withString:@"\\f" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\n" withString:@"\\n" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\r" withString:@"\\r" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +[theMutableCopy replaceOccurrencesOfString:@"\t" withString:@"\\t" options:0 range:NSMakeRange(0, [theMutableCopy length])]; +/* + case 'u': + { + theCharacter = 0; + + int theShift; + for (theShift = 12; theShift >= 0; theShift -= 4) + { + int theDigit = HexToInt([self scanCharacter]); + if (theDigit == -1) + { + [self setScanLocation:theScanLocation]; + return(NO); + } + theCharacter |= (theDigit << theShift); + } + } +*/ +return([[NSString stringWithFormat:@"\"%@\"", theMutableCopy] dataUsingEncoding:NSUTF8StringEncoding]); +} + +- (NSData *)serializeArray:(NSArray *)inArray +{ +NSMutableData *theData = [NSMutableData data]; + +[theData appendBytes:"[" length:1]; + +NSEnumerator *theEnumerator = [inArray objectEnumerator]; +id theValue = NULL; +NSUInteger i = 0; +while ((theValue = [theEnumerator nextObject]) != NULL) + { + [theData appendData:[self serializeObject:theValue]]; + if (++i < [inArray count]) + [theData appendBytes:"," length:1]; + } + +[theData appendBytes:"]" length:1]; + +return(theData); +} + +- (NSData *)serializeDictionary:(NSDictionary *)inDictionary +{ +NSMutableData *theData = [NSMutableData data]; + +[theData appendBytes:"{" length:1]; + +NSArray *theKeys = [inDictionary allKeys]; +NSEnumerator *theEnumerator = [theKeys objectEnumerator]; +NSString *theKey = NULL; +while ((theKey = [theEnumerator nextObject]) != NULL) + { + id theValue = [inDictionary objectForKey:theKey]; + + [theData appendData:[self serializeString:theKey]]; + [theData appendBytes:":" length:1]; + [theData appendData:[self serializeObject:theValue]]; + + if (theKey != [theKeys lastObject]) + [theData appendData:[@"," dataUsingEncoding:NSASCIIStringEncoding]]; + } + +[theData appendBytes:"}" length:1]; + +return(theData); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.h new file mode 100755 index 000000000..3af96cc39 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.h @@ -0,0 +1,45 @@ +// +// CJSONDeserializer.h +// TouchCode +// +// Created by Jonathan Wight on 12/15/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 + +extern NSString *const kJSONDeserializerErrorDomain /* = @"CJSONDeserializerErrorDomain" */; + +@interface CJSONDeserializer : NSObject { + +} + ++ (id)deserializer; + +- (id)deserialize:(NSData *)inData error:(NSError **)outError; + +- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; +- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.m new file mode 100755 index 000000000..d5ba6573f --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONDeserializer.m @@ -0,0 +1,95 @@ +// +// CJSONDeserializer.m +// TouchCode +// +// Created by Jonathan Wight on 12/15/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CJSONDeserializer.h" + +#import "CJSONScanner.h" +#import "CDataScanner.h" + +NSString *const kJSONDeserializerErrorDomain = @"CJSONDeserializerErrorDomain"; + +@implementation CJSONDeserializer + ++ (id)deserializer +{ +return([[[self alloc] init] autorelease]); +} + +- (id)deserialize:(NSData *)inData error:(NSError **)outError +{ +if (inData == NULL || [inData length] == 0) + { + if (outError) + *outError = [NSError errorWithDomain:kJSONDeserializerErrorDomain code:-1 userInfo:NULL]; + + return(NULL); + } +CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData]; +id theObject = NULL; +if ([theScanner scanJSONObject:&theObject error:outError] == YES) + return(theObject); +else + return(NULL); +} + +- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; +{ +if (inData == NULL || [inData length] == 0) + { + if (outError) + *outError = [NSError errorWithDomain:kJSONDeserializerErrorDomain code:-1 userInfo:NULL]; + + return(NULL); + } +CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData]; +NSDictionary *theDictionary = NULL; +if ([theScanner scanJSONDictionary:&theDictionary error:outError] == YES) + return(theDictionary); +else + return(NULL); +} + +- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError; +{ +if (inData == NULL || [inData length] == 0) + { + if (outError) + *outError = [NSError errorWithDomain:kJSONDeserializerErrorDomain code:-1 userInfo:NULL]; + + return(NULL); + } +CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData]; +NSArray *theArray = NULL; +if ([theScanner scanJSONArray:&theArray error:outError] == YES) + return(theArray); +else + return(NULL); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.h new file mode 100644 index 000000000..9a53db974 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.h @@ -0,0 +1,44 @@ +// +// CJSONScanner.h +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CDataScanner.h" + +/// CDataScanner subclass that understands JSON syntax natively. You should generally use CJSONDeserializer instead of this class. (TODO - this could have been a category?) +@interface CJSONScanner : CDataScanner { +} + +- (BOOL)scanJSONObject:(id *)outObject error:(NSError **)outError; +- (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outError; +- (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError; +- (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)outError; +- (BOOL)scanJSONNumberConstant:(NSNumber **)outNumberConstant error:(NSError **)outError; + +@end + +extern NSString *const kJSONScannerErrorDomain /* = @"CJSONScannerErrorDomain" */; diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.m new file mode 100644 index 000000000..9f2b4770b --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONScanner.m @@ -0,0 +1,539 @@ +// +// CJSONScanner.m +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CJSONScanner.h" + +#import "NSCharacterSet_Extensions.h" +#import "CDataScanner_Extensions.h" + +#if !defined(TREAT_COMMENTS_AS_WHITESPACE) +#define TREAT_COMMENTS_AS_WHITESPACE 0 +#endif // !defined(TREAT_COMMENTS_AS_WHITESPACE) + +NSString *const kJSONScannerErrorDomain = @"CJSONScannerErrorDomain"; + +inline static int HexToInt(char inCharacter) +{ +int theValues[] = { 0x0 /* 48 '0' */, 0x1 /* 49 '1' */, 0x2 /* 50 '2' */, 0x3 /* 51 '3' */, 0x4 /* 52 '4' */, 0x5 /* 53 '5' */, 0x6 /* 54 '6' */, 0x7 /* 55 '7' */, 0x8 /* 56 '8' */, 0x9 /* 57 '9' */, -1 /* 58 ':' */, -1 /* 59 ';' */, -1 /* 60 '<' */, -1 /* 61 '=' */, -1 /* 62 '>' */, -1 /* 63 '?' */, -1 /* 64 '@' */, 0xa /* 65 'A' */, 0xb /* 66 'B' */, 0xc /* 67 'C' */, 0xd /* 68 'D' */, 0xe /* 69 'E' */, 0xf /* 70 'F' */, -1 /* 71 'G' */, -1 /* 72 'H' */, -1 /* 73 'I' */, -1 /* 74 'J' */, -1 /* 75 'K' */, -1 /* 76 'L' */, -1 /* 77 'M' */, -1 /* 78 'N' */, -1 /* 79 'O' */, -1 /* 80 'P' */, -1 /* 81 'Q' */, -1 /* 82 'R' */, -1 /* 83 'S' */, -1 /* 84 'T' */, -1 /* 85 'U' */, -1 /* 86 'V' */, -1 /* 87 'W' */, -1 /* 88 'X' */, -1 /* 89 'Y' */, -1 /* 90 'Z' */, -1 /* 91 '[' */, -1 /* 92 '\' */, -1 /* 93 ']' */, -1 /* 94 '^' */, -1 /* 95 '_' */, -1 /* 96 '`' */, 0xa /* 97 'a' */, 0xb /* 98 'b' */, 0xc /* 99 'c' */, 0xd /* 100 'd' */, 0xe /* 101 'e' */, 0xf /* 102 'f' */, }; +if (inCharacter >= '0' && inCharacter <= 'f') + return(theValues[inCharacter - '0']); +else + return(-1); +} + +@interface CJSONScanner () +- (BOOL)scanNotQuoteCharactersIntoString:(NSString **)outValue; +@end + +#pragma mark - + +@implementation CJSONScanner + +- (id)init +{ +if ((self = [super init]) != nil) + { + } +return(self); +} + +- (void)dealloc +{ +// +[super dealloc]; +} + +#pragma mark - + +- (void)setData:(NSData *)inData +{ +NSData *theData = inData; +if (theData && theData.length >= 4) + { + // This code is lame, but it works. Because the first character of any JSON string will always be a (ascii) control character we can work out the Unicode encoding by the bit pattern. See section 3 of http://www.ietf.org/rfc/rfc4627.txt + const char *theChars = theData.bytes; + NSStringEncoding theEncoding = NSUTF8StringEncoding; + if (theChars[0] != 0 && theChars[1] == 0) + { + if (theChars[2] != 0 && theChars[3] == 0) + theEncoding = NSUTF16LittleEndianStringEncoding; + else if (theChars[2] == 0 && theChars[3] == 0) + theEncoding = NSUTF32LittleEndianStringEncoding; + } + else if (theChars[0] == 0 && theChars[2] == 0 && theChars[3] != 0) + { + if (theChars[1] == 0) + theEncoding = NSUTF32BigEndianStringEncoding; + else if (theChars[1] != 0) + theEncoding = NSUTF16BigEndianStringEncoding; + } + + if (theEncoding != NSUTF8StringEncoding) + { + NSString *theString = [[NSString alloc] initWithData:theData encoding:theEncoding]; + theData = [theString dataUsingEncoding:NSUTF8StringEncoding]; + [theString release]; + } + } +[super setData:theData]; +} + +#pragma mark - + +- (BOOL)scanJSONObject:(id *)outObject error:(NSError **)outError +{ +BOOL theResult = YES; + +[self skipWhitespace]; + +id theObject = NULL; + +const unichar C = [self currentCharacter]; +switch (C) + { + case 't': + if ([self scanUTF8String:"true" intoString:NULL]) + { + theObject = [NSNumber numberWithBool:YES]; + } + break; + case 'f': + if ([self scanUTF8String:"false" intoString:NULL]) + { + theObject = [NSNumber numberWithBool:NO]; + } + break; + case 'n': + if ([self scanUTF8String:"null" intoString:NULL]) + { + theObject = [NSNull null]; + } + break; + case '\"': + case '\'': + theResult = [self scanJSONStringConstant:&theObject error:outError]; + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + theResult = [self scanJSONNumberConstant:&theObject error:outError]; + break; + case '{': + theResult = [self scanJSONDictionary:&theObject error:outError]; + break; + case '[': + theResult = [self scanJSONArray:&theObject error:outError]; + break; + default: + + break; + } + +if (outObject != NULL) + *outObject = theObject; + +return(theResult); +} + +- (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outError +{ +NSUInteger theScanLocation = [self scanLocation]; + +if ([self scanCharacter:'{'] == NO) + { + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Dictionary that does not start with '{' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-1 userInfo:theUserInfo]; + } + return(NO); + } + +NSMutableDictionary *theDictionary = [[NSMutableDictionary alloc] init]; + +while ([self currentCharacter] != '}') + { + [self skipWhitespace]; + + if ([self currentCharacter] == '}') + break; + + NSString *theKey = NULL; + if ([self scanJSONStringConstant:&theKey error:outError] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Failed to scan a key.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-2 userInfo:theUserInfo]; + } + [theDictionary release]; + return(NO); + } + + [self skipWhitespace]; + + if ([self scanCharacter:':'] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Key was not terminated with a ':' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-3 userInfo:theUserInfo]; + } + [theDictionary release]; + return(NO); + } + + id theValue = NULL; + if ([self scanJSONObject:&theValue error:outError] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Failed to scan a value.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-4 userInfo:theUserInfo]; + } + [theDictionary release]; + return(NO); + } + + [theDictionary setValue:theValue forKey:theKey]; + + [self skipWhitespace]; + if ([self scanCharacter:','] == NO) + { + if ([self currentCharacter] != '}') + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Key value pairs not delimited with a ',' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-5 userInfo:theUserInfo]; + } + [theDictionary release]; + return(NO); + } + break; + } + else + { + [self skipWhitespace]; + if ([self currentCharacter] == '}') + break; + } + } + +if ([self scanCharacter:'}'] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan dictionary. Dictionary not terminated by a '}' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-6 userInfo:theUserInfo]; + } + [theDictionary release]; + return(NO); + } + +if (outDictionary != NULL) + *outDictionary = [[theDictionary copy] autorelease]; + +[theDictionary release]; + +return(YES); +} + +- (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError +{ +NSUInteger theScanLocation = [self scanLocation]; + +if ([self scanCharacter:'['] == NO) + { + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan array. Array not started by a '{' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-7 userInfo:theUserInfo]; + } + return(NO); + } + +NSMutableArray *theArray = [[NSMutableArray alloc] init]; + +[self skipWhitespace]; +while ([self currentCharacter] != ']') + { + NSString *theValue = NULL; + if ([self scanJSONObject:&theValue error:outError] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan array. Could not scan a value.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-8 userInfo:theUserInfo]; + } + [theArray release]; + return(NO); + } + + [theArray addObject:theValue]; + + [self skipWhitespace]; + if ([self scanCharacter:','] == NO) + { + [self skipWhitespace]; + if ([self currentCharacter] != ']') + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan array. Array not terminated by a ']' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-9 userInfo:theUserInfo]; + } + [theArray release]; + return(NO); + } + + break; + } + [self skipWhitespace]; + } + +[self skipWhitespace]; + +if ([self scanCharacter:']'] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan array. Array not terminated by a ']' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-10 userInfo:theUserInfo]; + } + [theArray release]; + return(NO); + } + +if (outArray != NULL) + *outArray = [[theArray copy] autorelease]; + +[theArray release]; + +return(YES); +} + +- (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)outError +{ +NSUInteger theScanLocation = [self scanLocation]; + +[self skipWhitespace]; // TODO - i want to remove this method. But breaks unit tests. + +NSMutableString *theString = [[NSMutableString alloc] init]; + +if ([self scanCharacter:'"'] == NO) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan string constant. String not started by a '\"' character.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-11 userInfo:theUserInfo]; + } + [theString release]; + return(NO); + } + +while ([self scanCharacter:'"'] == NO) + { + NSString *theStringChunk = NULL; + if ([self scanNotQuoteCharactersIntoString:&theStringChunk]) + { + [theString appendString:theStringChunk]; + } + + if ([self scanCharacter:'\\'] == YES) + { + unichar theCharacter = [self scanCharacter]; + switch (theCharacter) + { + case '"': + case '\\': + case '/': + break; + case 'b': + theCharacter = '\b'; + break; + case 'f': + theCharacter = '\f'; + break; + case 'n': + theCharacter = '\n'; + break; + case 'r': + theCharacter = '\r'; + break; + case 't': + theCharacter = '\t'; + break; + case 'u': + { + theCharacter = 0; + + int theShift; + for (theShift = 12; theShift >= 0; theShift -= 4) + { + const int theDigit = HexToInt([self scanCharacter]); + if (theDigit == -1) + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan string constant. Unicode character could not be decoded.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-12 userInfo:theUserInfo]; + } + [theString release]; + return(NO); + } + theCharacter |= (theDigit << theShift); + } + } + break; + default: + { + [self setScanLocation:theScanLocation]; + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan string constant. Unknown escape code.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-13 userInfo:theUserInfo]; + } + [theString release]; + return(NO); + } + break; + } + CFStringAppendCharacters((CFMutableStringRef)theString, &theCharacter, 1); + } + } + +if (outStringConstant != NULL) + *outStringConstant = [[theString copy] autorelease]; + +[theString release]; + +return(YES); +} + +- (BOOL)scanJSONNumberConstant:(NSNumber **)outNumberConstant error:(NSError **)outError +{ +NSNumber *theNumber = NULL; +if ([self scanNumber:&theNumber] == YES) + { + if (outNumberConstant != NULL) + *outNumberConstant = theNumber; + return(YES); + } +else + { + if (outError) + { + NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: + @"Could not scan number constant.", NSLocalizedDescriptionKey, + NULL]; + *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-14 userInfo:theUserInfo]; + } + return(NO); + } +} + +#if TREAT_COMMENTS_AS_WHITESPACE +- (void)skipWhitespace +{ +[super skipWhitespace]; +[self scanCStyleComment:NULL]; +[self scanCPlusPlusStyleComment:NULL]; +[super skipWhitespace]; +} +#endif // TREAT_COMMENTS_AS_WHITESPACE + +#pragma mark - + +- (BOOL)scanNotQuoteCharactersIntoString:(NSString **)outValue +{ +u_int8_t *P; +for (P = current; P < end && *P != '\"' && *P != '\\'; ++P) + ; + +if (P == current) + { + return(NO); + } + +if (outValue) + { + *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; + } + +current = P; + +return(YES); +} + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.h new file mode 100644 index 000000000..43f75d0d9 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.h @@ -0,0 +1,47 @@ +// +// CJSONSerializer.h +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 + +@class CJSONDataSerializer; + +/// Serialize JSON compatible objects (NSNull, NSNumber, NSString, NSArray, NSDictionary) into a JSON formatted string. Note this class is just a wrapper around CJSONDataSerializer which you really should be using instead. +@interface CJSONSerializer : NSObject { + CJSONDataSerializer *serializer; +} + ++ (id)serializer; + +/// Take any JSON compatible object (generally NSNull, NSNumber, NSString, NSArray and NSDictionary) and produce a JSON string. +- (NSString *)serializeObject:(id)inObject; + +- (NSString *)serializeArray:(NSArray *)inArray; +- (NSString *)serializeDictionary:(NSDictionary *)inDictionary; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.m new file mode 100644 index 000000000..46baa98af --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CJSONSerializer.m @@ -0,0 +1,75 @@ +// +// CJSONSerializer.m +// TouchCode +// +// Created by Jonathan Wight on 12/07/2005. +// Copyright 2005 toxicsoftware.com. All rights reserved. +// +// 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 "CJSONSerializer.h" + +#import "CJSONDataSerializer.h" + +@implementation CJSONSerializer + ++ (id)serializer +{ +return([[[self alloc] init] autorelease]); +} + +- (id)init +{ +if ((self = [super init]) != NULL) + { + serializer = [[CJSONDataSerializer alloc] init]; + } +return(self); +} + +- (void)dealloc +{ +[serializer release]; +serializer = NULL; +// +[super dealloc]; +} + +- (NSString *)serializeObject:(id)inObject; +{ +NSData *theData = [serializer serializeObject:inObject]; +return([[[NSString alloc] initWithData:theData encoding:NSUTF8StringEncoding] autorelease]); +} + +- (NSString *)serializeArray:(NSArray *)inArray +{ +NSData *theData = [serializer serializeArray:inArray]; +return([[[NSString alloc] initWithData:theData encoding:NSUTF8StringEncoding] autorelease]); +} + +- (NSString *)serializeDictionary:(NSDictionary *)inDictionary; +{ +NSData *theData = [serializer serializeDictionary:inDictionary]; +return([[[NSString alloc] initWithData:theData encoding:NSUTF8StringEncoding] autorelease]); +} +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.h b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.h new file mode 100644 index 000000000..70f600d89 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.h @@ -0,0 +1,40 @@ +// +// CSerializedJSONData.h +// TouchCode +// +// Created by Jonathan Wight on 10/23/09. +// Copyright 2009 toxicsoftware.com. All rights reserved. +// +// 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 + +@interface CSerializedJSONData : NSObject { + NSData *data; +} + +@property (readonly, nonatomic, retain) NSData *data; + +- (id)initWithData:(NSData *)inData; + +@end diff --git a/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.m b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.m new file mode 100644 index 000000000..707cf2f32 --- /dev/null +++ b/adwhirl/AdWhirlSDK_iOS_3.1.1/TouchJSON/JSON/CSerializedJSONData.m @@ -0,0 +1,54 @@ +// +// CSerializedJSONData.m +// TouchCode +// +// Created by Jonathan Wight on 10/23/09. +// Copyright 2009 toxicsoftware.com. All rights reserved. +// +// 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 "CSerializedJSONData.h" + +@implementation CSerializedJSONData + +@synthesize data; + +- (id)initWithData:(NSData *)inData; +{ +if ((self = [self init]) != NULL) + { + data = inData; + } +return(self); +} + +- (void)dealloc +{ +[data release]; +data = NULL; +// +[super dealloc]; +} + + +@end