adding adNetwork SDKs for AdWhirl and AdMob

This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-15 11:18:37 +00:00
parent dc7d52c48c
commit 9c10f47daa
160 changed files with 23482 additions and 0 deletions
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow_iPhone</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow_iPad</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -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 = "<group>"; wrapsLines = 1; };
1B183A8F1211C61B0026647E /* UIColor+AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+AdWhirlConfig.h"; sourceTree = "<group>"; };
1B183A901211C61B0026647E /* UIColor+AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AdWhirlConfig.m"; sourceTree = "<group>"; };
1B183AB71211C8E90026647E /* UIColor+AdWhirlConfigTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AdWhirlConfigTest.m"; sourceTree = "<group>"; };
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 = "<group>"; };
1B264BBC120B6D1600DB41AD /* GTMObjC2Runtime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMObjC2Runtime.m; sourceTree = "<group>"; };
1B264BBD120B6D1600DB41AD /* GTMRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMRegex.h; sourceTree = "<group>"; };
1B264BBE120B6D1600DB41AD /* GTMRegex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMRegex.m; sourceTree = "<group>"; };
1B264BBF120B6D1600DB41AD /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMDefines.h; sourceTree = "<group>"; };
1B264BC1120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMIPhoneUnitTestDelegate.h; sourceTree = "<group>"; };
1B264BC2120B6D1600DB41AD /* GTMIPhoneUnitTestDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMIPhoneUnitTestDelegate.m; sourceTree = "<group>"; };
1B264BC3120B6D1600DB41AD /* GTMIPhoneUnitTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMIPhoneUnitTestMain.m; sourceTree = "<group>"; };
1B264BC4120B6D1600DB41AD /* GTMSenTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMSenTestCase.h; sourceTree = "<group>"; };
1B264BC5120B6D1600DB41AD /* GTMSenTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMSenTestCase.m; sourceTree = "<group>"; };
1B264BC6120B6D1600DB41AD /* GTMUnitTestDevLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMUnitTestDevLog.h; sourceTree = "<group>"; };
1B264BC7120B6D1600DB41AD /* GTMUnitTestDevLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMUnitTestDevLog.m; sourceTree = "<group>"; };
1B264BC8120B6D1600DB41AD /* RunIPhoneUnitTest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = RunIPhoneUnitTest.sh; sourceTree = "<group>"; };
1B264BD9120B6E0000DB41AD /* AdWhirlAdapterAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterAdMob.h; sourceTree = "<group>"; };
1B264BDA120B6E0000DB41AD /* AdWhirlAdapterAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterAdMob.m; sourceTree = "<group>"; };
1B264BDB120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGoogleAdSense.h; sourceTree = "<group>"; };
1B264BDC120B6E0000DB41AD /* AdWhirlAdapterGoogleAdSense.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGoogleAdSense.m; sourceTree = "<group>"; };
1B264BDD120B6E0000DB41AD /* AdWhirlAdapterGreystripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGreystripe.h; sourceTree = "<group>"; };
1B264BDE120B6E0000DB41AD /* AdWhirlAdapterGreystripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGreystripe.m; sourceTree = "<group>"; };
1B264BDF120B6E0000DB41AD /* AdWhirlAdapterIAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterIAd.h; sourceTree = "<group>"; };
1B264BE0120B6E0000DB41AD /* AdWhirlAdapterIAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterIAd.m; sourceTree = "<group>"; };
1B264BE1120B6E0000DB41AD /* AdWhirlAdapterInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterInMobi.h; sourceTree = "<group>"; };
1B264BE2120B6E0000DB41AD /* AdWhirlAdapterInMobi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterInMobi.m; sourceTree = "<group>"; };
1B264BE3120B6E0000DB41AD /* AdWhirlAdapterJumpTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterJumpTap.h; sourceTree = "<group>"; };
1B264BE4120B6E0000DB41AD /* AdWhirlAdapterJumpTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterJumpTap.m; sourceTree = "<group>"; };
1B264BE5120B6E0000DB41AD /* AdWhirlAdapterMdotM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMdotM.h; sourceTree = "<group>"; };
1B264BE6120B6E0000DB41AD /* AdWhirlAdapterMdotM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMdotM.m; sourceTree = "<group>"; };
1B264BE7120B6E0000DB41AD /* AdWhirlAdapterMillennial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterMillennial.h; sourceTree = "<group>"; };
1B264BE8120B6E0000DB41AD /* AdWhirlAdapterMillennial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterMillennial.m; sourceTree = "<group>"; };
1B264BE9120B6E0000DB41AD /* AdWhirlAdapterQuattro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterQuattro.h; sourceTree = "<group>"; };
1B264BEA120B6E0000DB41AD /* AdWhirlAdapterQuattro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterQuattro.m; sourceTree = "<group>"; };
1B264BEB120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterVideoEgg.h; sourceTree = "<group>"; };
1B264BEC120B6E0000DB41AD /* AdWhirlAdapterVideoEgg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterVideoEgg.m; sourceTree = "<group>"; };
1B264BED120B6E0000DB41AD /* AdWhirlAdapterZestADZ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterZestADZ.h; sourceTree = "<group>"; };
1B264BEE120B6E0000DB41AD /* AdWhirlAdapterZestADZ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterZestADZ.m; sourceTree = "<group>"; };
1B264BEF120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkAdapter.h; sourceTree = "<group>"; };
1B264BF0120B6E0000DB41AD /* AdWhirlDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlDelegateProtocol.h; sourceTree = "<group>"; };
1B264BF1120B6E0000DB41AD /* AdWhirlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlView.h; sourceTree = "<group>"; };
1B264BF3120B6E0000DB41AD /* AdWhirlAdapterCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterCustom.h; sourceTree = "<group>"; };
1B264BF4120B6E0000DB41AD /* AdWhirlAdapterCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterCustom.m; sourceTree = "<group>"; };
1B264BF5120B6E0000DB41AD /* AdWhirlAdapterEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterEvent.h; sourceTree = "<group>"; };
1B264BF6120B6E0000DB41AD /* AdWhirlAdapterEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterEvent.m; sourceTree = "<group>"; };
1B264BF7120B6E0000DB41AD /* AdWhirlAdapterGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdapterGeneric.h; sourceTree = "<group>"; };
1B264BF8120B6E0000DB41AD /* AdWhirlAdapterGeneric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdapterGeneric.m; sourceTree = "<group>"; };
1B264BF9120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlAdNetworkAdapter+Helpers.h"; sourceTree = "<group>"; };
1B264BFA120B6E0000DB41AD /* AdWhirlAdNetworkAdapter+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AdWhirlAdNetworkAdapter+Helpers.m"; sourceTree = "<group>"; };
1B264BFB120B6E0000DB41AD /* AdWhirlAdNetworkAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkAdapter.m; sourceTree = "<group>"; };
1B264BFC120B6E0000DB41AD /* AdWhirlAdNetworkConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkConfig.h; sourceTree = "<group>"; };
1B264BFD120B6E0000DB41AD /* AdWhirlAdNetworkConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkConfig.m; sourceTree = "<group>"; };
1B264BFE120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlAdNetworkRegistry.h; sourceTree = "<group>"; };
1B264BFF120B6E0000DB41AD /* AdWhirlAdNetworkRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlAdNetworkRegistry.m; sourceTree = "<group>"; };
1B264C00120B6E0000DB41AD /* AdWhirlConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfig.h; sourceTree = "<group>"; };
1B264C01120B6E0000DB41AD /* AdWhirlConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfig.m; sourceTree = "<group>"; };
1B264C02120B6E0000DB41AD /* AdWhirlCustomAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlCustomAdView.h; sourceTree = "<group>"; };
1B264C03120B6E0000DB41AD /* AdWhirlCustomAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlCustomAdView.m; sourceTree = "<group>"; };
1B264C04120B6E0000DB41AD /* AdWhirlError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlError.h; sourceTree = "<group>"; };
1B264C05120B6E0000DB41AD /* AdWhirlError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlError.m; sourceTree = "<group>"; };
1B264C06120B6E0000DB41AD /* AdWhirlLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlLog.h; sourceTree = "<group>"; };
1B264C07120B6E0000DB41AD /* AdWhirlLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlLog.m; sourceTree = "<group>"; };
1B264C08120B6E0000DB41AD /* AdWhirlView+.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AdWhirlView+.h"; sourceTree = "<group>"; };
1B264C09120B6E0000DB41AD /* AdWhirlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlView.m; sourceTree = "<group>"; };
1B264C0A120B6E0000DB41AD /* AdWhirlWebBrowser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdWhirlWebBrowser.xib; sourceTree = "<group>"; };
1B264C0B120B6E0000DB41AD /* AdWhirlWebBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlWebBrowserController.h; sourceTree = "<group>"; };
1B264C0C120B6E0000DB41AD /* AdWhirlWebBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlWebBrowserController.m; sourceTree = "<group>"; };
1B264C0D120B6E0000DB41AD /* ARRollerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARRollerView.m; sourceTree = "<group>"; };
1B264C0F120B6E0000DB41AD /* ARRollerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerProtocol.h; sourceTree = "<group>"; };
1B264C10120B6E0000DB41AD /* ARRollerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARRollerView.h; sourceTree = "<group>"; };
1B4905A71230815300BAECDE /* AdWhirlViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlViewTest.m; sourceTree = "<group>"; };
1B6898AC120C8B7A0080EAC1 /* AdWhirlClassWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlClassWrapper.h; sourceTree = "<group>"; };
1B6898AD120C8B7A0080EAC1 /* AdWhirlClassWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlClassWrapper.m; sourceTree = "<group>"; };
1B6CE7DC12149A8200E44A28 /* AdWhirlConfigStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlConfigStore.h; sourceTree = "<group>"; };
1B6CE7DD12149A8200E44A28 /* AdWhirlConfigStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigStore.m; sourceTree = "<group>"; };
1B6CE7E012149A9E00E44A28 /* AdWhirlConfigStoreTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdWhirlConfigStoreTest.m; sourceTree = "<group>"; };
1B6CE8871214A65800E44A28 /* AWNetworkReachabilityWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityWrapper.h; sourceTree = "<group>"; };
1B6CE8881214A65800E44A28 /* AWNetworkReachabilityWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AWNetworkReachabilityWrapper.m; sourceTree = "<group>"; };
1B6CE8D81214CE3600E44A28 /* AWNetworkReachabilityDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWNetworkReachabilityDelegate.h; sourceTree = "<group>"; };
1BADCBA2120CACBE005D60B5 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = "<group>"; };
1BADCBA3120CACBE005D60B5 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = "<group>"; };
1BADCBA4120CACBE005D60B5 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; };
1BADCBA5120CACBE005D60B5 /* OCMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = "<group>"; };
1BADCBA6120CACBE005D60B5 /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = "<group>"; };
1BADCBA7120CACBE005D60B5 /* OCMockRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockRecorder.h; sourceTree = "<group>"; };
1BADCBA8120CACBE005D60B5 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
1BADCC45120CBF86005D60B5 /* GTMDevLogUnitTestingBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMDevLogUnitTestingBridge.m; sourceTree = "<group>"; };
1BDA8127120B727200CCAD25 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = "<group>"; };
1BDA8128120B727200CCAD25 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = "<group>"; };
1BDA812A120B727200CCAD25 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = "<group>"; };
1BDA812B120B727200CCAD25 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = "<group>"; };
1BDA812C120B727200CCAD25 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = "<group>"; };
1BDA812D120B727200CCAD25 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = "<group>"; };
1BDA812E120B727200CCAD25 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = "<group>"; };
1BDA812F120B727200CCAD25 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = "<group>"; };
1BDA8130120B727200CCAD25 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = "<group>"; };
1BDA8131120B727200CCAD25 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = "<group>"; };
1BDA8133120B727200CCAD25 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = "<group>"; };
1BDA8134120B727200CCAD25 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = "<group>"; };
1BDA8135120B727200CCAD25 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = "<group>"; };
1BDA8136120B727200CCAD25 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = "<group>"; };
1BDA8137120B727200CCAD25 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = "<group>"; };
1BDA8138120B727200CCAD25 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = "<group>"; };
1BDA8139120B727200CCAD25 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = "<group>"; };
1BDA813A120B727200CCAD25 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = "<group>"; };
1BDA813B120B727200CCAD25 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = "<group>"; };
1BDA813C120B727200CCAD25 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = "<group>"; };
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 = "<group>"; };
1BED9B471210C7A100E06937 /* AdWhirlTests_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdWhirlTests_Prefix.pch; sourceTree = "<group>"; };
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 = "<group>"; };
2860E326111B887F00E27156 /* AppDelegate_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate_iPhone.m; sourceTree = "<group>"; };
2860E327111B887F00E27156 /* MainWindow_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPhone.xib; sourceTree = "<group>"; };
2860E32B111B888700E27156 /* AppDelegate_iPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPad.h; sourceTree = "<group>"; };
2860E32C111B888700E27156 /* AppDelegate_iPad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate_iPad.m; sourceTree = "<group>"; };
2860E32D111B888700E27156 /* MainWindow_iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPad.xib; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
/* 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 = "<group>";
};
1B264BB8120B6D0900DB41AD /* UnitTests */ = {
isa = PBXGroup;
children = (
1BDA8250120B786500CCAD25 /* AdWhirlAdNetworkConfigTest.m */,
1B183A871211C22B0026647E /* AdWhirlConfigTest.m */,
1B183AB71211C8E90026647E /* UIColor+AdWhirlConfigTest.m */,
1B6CE7E012149A9E00E44A28 /* AdWhirlConfigStoreTest.m */,
1B4905A71230815300BAECDE /* AdWhirlViewTest.m */,
);
path = UnitTests;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
1B264C0E120B6E0000DB41AD /* legacy */ = {
isa = PBXGroup;
children = (
1B264C0F120B6E0000DB41AD /* ARRollerProtocol.h */,
1B264C10120B6E0000DB41AD /* ARRollerView.h */,
);
path = legacy;
sourceTree = "<group>";
};
1BADCB9F120CACBE005D60B5 /* OCMock Library */ = {
isa = PBXGroup;
children = (
1BADCBA0120CACBE005D60B5 /* Headers */,
1BADCBA8120CACBE005D60B5 /* libOCMock.a */,
);
name = "OCMock Library";
path = OCMock/build/Debug/Library;
sourceTree = "<group>";
};
1BADCBA0120CACBE005D60B5 /* Headers */ = {
isa = PBXGroup;
children = (
1BADCBA1120CACBE005D60B5 /* OCMock */,
);
path = Headers;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
2860E324111B887F00E27156 /* iPhone */ = {
isa = PBXGroup;
children = (
2860E325111B887F00E27156 /* AppDelegate_iPhone.h */,
2860E326111B887F00E27156 /* AppDelegate_iPhone.m */,
2860E327111B887F00E27156 /* MainWindow_iPhone.xib */,
);
path = iPhone;
sourceTree = "<group>";
};
2860E32A111B888700E27156 /* iPad */ = {
isa = PBXGroup;
children = (
2860E32B111B888700E27156 /* AppDelegate_iPad.h */,
2860E32C111B888700E27156 /* AppDelegate_iPad.m */,
2860E32D111B888700E27156 /* MainWindow_iPad.xib */,
);
path = iPad;
sourceTree = "<group>";
};
28EEBF621118D79A00187D67 /* Shared */ = {
isa = PBXGroup;
children = (
8D1107310486CEB800E47090 /* AdWhirlTests-Info.plist */,
);
name = Shared;
sourceTree = "<group>";
};
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 = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
1BED9B471210C7A100E06937 /* AdWhirlTests_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
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 = "<group>";
};
/* 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 */;
}
@@ -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, ...);
@@ -0,0 +1,17 @@
//
// main.m
// AdWhirlTests
//
// Created by Nigel Choi on 8/5/10.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
@@ -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 <OCMock/OCMock.h>
#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
@@ -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 <Foundation/Foundation.h>
#import <OCMock/OCMock.h>
#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<AdWhirlConfigDelegate> {
}
@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
@@ -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 <Foundation/Foundation.h>
#import <OCMock/OCMock.h>
#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 <AdWhirlConfigDelegate> {
}
@end
@implementation AdWhirlConfigDelegateCustomURL
- (NSURL *)adWhirlConfigURL {
return [NSURL URLWithString:@"http://mob.example.com/getInfo.php"];
}
@end
@interface AdWhirlConfigDelegateNoOp : NSObject <AdWhirlConfigDelegate> {
}
@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
@@ -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 <Foundation/Foundation.h>
#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
@@ -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
@@ -0,0 +1,19 @@
//
// AppDelegate_iPad.h
// AdWhirlTests
//
// Created by Nigel Choi on 8/5/10.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface AppDelegate_iPad : NSObject <UIApplicationDelegate> {
UIWindow *window;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@end
@@ -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
@@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1024</int>
<string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">782</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">105</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIWindow" id="62075450">
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{768, 1024}</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
<object class="IBUICustomObject" id="250404236">
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="250404236"/>
<reference key="destination" ref="62075450"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="250404236"/>
</object>
<int key="connectionID">8</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="62075450"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="250404236"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>6.CustomClassName</string>
<string>6.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>{{903, 55}, {768, 1024}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>AppDelegate_iPad</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">9</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppDelegate_iPad</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">window</string>
<string key="NS.object.0">UIWindow</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">iPad/AppDelegate_iPad.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="786211723">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="786211723"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="1024" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../AdWhirlTests.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">105</string>
</data>
</archive>
@@ -0,0 +1,19 @@
//
// AppDelegate_iPhone.h
// AdWhirlTests
//
// Created by Nigel Choi on 8/5/10.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface AppDelegate_iPhone : NSObject <UIApplicationDelegate> {
UIWindow *window;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@end
@@ -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
@@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1024</int>
<string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">782</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">105</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="450319686">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUICustomObject" id="987256611">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIWindow" id="380026005">
<reference key="NSNextResponder"/>
<int key="NSvFlags">1316</int>
<object class="NSPSMatrix" key="NSFrameMatrix"/>
<string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="987256611"/>
</object>
<int key="connectionID">5</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="987256611"/>
<reference key="destination" ref="380026005"/>
</object>
<int key="connectionID">6</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="380026005"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="987256611"/>
<reference key="parent" ref="0"/>
<string key="objectName">App Delegate</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="450319686"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>2.IBAttributePlaceholdersKey</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>2.UIWindow.visibleAtLaunch</string>
<string>4.CustomClassName</string>
<string>4.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<string>{{520, 376}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<integer value="1"/>
<string>AppDelegate_iPhone</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">8</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppDelegate_iPhone</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">window</string>
<string key="NS.object.0">UIWindow</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">iPhone/AppDelegate_iPhone.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="565734826">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="565734826"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="1024" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../AdWhirlTests.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">105</string>
</data>
</archive>