diff --git a/.gitmodules b/.gitmodules index ac7f3ec..74e09d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "libs/asi-http-request"] path = libs/asi-http-request url = https://github.com/pokeb/asi-http-request.git -[submodule "libs/facebook"] - path = libs/facebook - url = https://github.com/facebook/facebook-ios-sdk.git [submodule "libs/nimbus"] path = libs/nimbus url = https://github.com/mobomo/nimbus.git diff --git a/README.md b/README.md index 22fbab7..fc85a5f 100644 --- a/README.md +++ b/README.md @@ -51,28 +51,25 @@ The following libraries are included as submodules: * [SVPullToRefresh][] * [Nimbus][] -* [Facebook SDK for iOS][fb] To intialize submodules, run: git submodule update --init -To build Facebook, `cd` into `libs/facebook` and run -`./scripts/build_facebook_ios_sdk_static_lib.sh`. This will build the -static library used by the app. - ### Binary Libraries The following libraries must be downloaded and installed manually: -* [libUAirship][] - Urban Airship library for iOS +* [Urban Airship library for iOS][ua] * [Google Analytics SDK for iOS][ga] +* [Facebook SDK for iOS][fb] To install Urban Airship, download the SDK and place the entire `Airship` directory inside of `libs/`. -To install Google Analytics, download the SDK and place the entire -`Google Analytics SDK` directory inside of `libs/`. +To install Google Analytics, download the [Standalone SDK][gasdk], rename the `Library` directory to `GoogleAnalytics`, and place it inside of `libs/`. + +To install the Facebook SDK, download and install the package, copy the FacebookSDK.framework directory into `libs/`, and drag it into the the `Frameworks` group in your project. ### Feeds @@ -93,6 +90,17 @@ The optimal size for display is chosen depending on the context (e.g. 640px for article feeds on the iPhone 4, or ~70px for photo gallery thumbnails on the iPhone 3GS) and screen density. +### Search + +Search functionality on WhiteHouse.gov and in the White House for iOS +mobile app relies on USASearch, a hosted site search service provided by +the U.S. General Services Administration (GSA). Federal, state, local, +tribal, or territorial government websites may use this service at no cost. +For details on incorporating USASearch into .Gov sites, or for examples of +the API and how it functions, see [USASearch: About](http://usasearch.howto.gov/about-us) +and [USASearch: How (and When) to Use the Search API](http://usasearch.howto.gov/post/36743437542/how-and-when-to-use-the-search-api). + + NOTE: Setting up the application and configuring it for use in your organization's context requires iOS development experience. The @@ -156,15 +164,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -[libUAirship]: http://urbanairship.com/resources/ +[ua]: http://urbanairship.com/resources/developer-resources +[fb]: https://developers.facebook.com/docs/ios/ [ga]: https://developers.google.com/analytics/devguides/collection/ios/resources +[gasdk]: http://dl.google.com/dl/gaformobileapps/GoogleAnalyticsiOS_2.0beta4.zip [CustomBadge]: http://www.spaulus.com/2011/04/custombadge-2-0-retina-ready-scalable-light-reflex/ [Underscore.js]: http://underscorejs.org/ [Zepto.js]: http://zeptojs.com/ [DTCustomColoredAccessory]: http://www.cocoanetics.com/2010/10/custom-colored-disclosure-indicators/ [SVPullToRefresh]: https://github.com/samvermette/SVPullToRefresh -[fb]: https://github.com/facebook/facebook-ios-sdk [Nimbus]: https://github.com/jverkoey/nimbus - [forking]: https://help.github.com/articles/fork-a-repo [basic tutorial]: https://help.github.com/articles/set-up-git diff --git a/WhiteHouseApp.xcodeproj/project.pbxproj b/WhiteHouseApp.xcodeproj/project.pbxproj index 3405f16..7704ac4 100644 --- a/WhiteHouseApp.xcodeproj/project.pbxproj +++ b/WhiteHouseApp.xcodeproj/project.pbxproj @@ -7,10 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 4118EE43184FED0A00C43099 /* libGoogleAnalytics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4118EE42184FED0A00C43099 /* libGoogleAnalytics.a */; }; + 4129769A185001FA001FE8A2 /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41297699185001FA001FE8A2 /* FacebookSDK.framework */; }; + 41DF6661184FE993009B8821 /* libUAirship-3.0.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 41DF6660184FE993009B8821 /* libUAirship-3.0.2.a */; }; 5208905B15A775F4004CD40F /* WHLiveController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5208905A15A775F4004CD40F /* WHLiveController.m */; }; 5208905F15A77883004CD40F /* NSArray+WHAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5208905E15A77883004CD40F /* NSArray+WHAdditions.m */; }; 5208906215A78209004CD40F /* WHLiveBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5208906115A78209004CD40F /* WHLiveBarController.m */; }; - 5208F9BF160CEDEE00F2C4C2 /* libUAirship-1.3.3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5208F9BE160CEDEE00F2C4C2 /* libUAirship-1.3.3.a */; }; 5208F9C5160CF03500F2C4C2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5208F9C4160CF03500F2C4C2 /* Default-568h@2x.png */; }; 520A463A15C828C100547BAE /* AppConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = 520A463915C828C100547BAE /* AppConfig.plist */; }; 5221B01A157E44FE00265F1B /* NimbusWebController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5221B019157E44FE00265F1B /* NimbusWebController.bundle */; }; @@ -61,7 +63,7 @@ 5235CC1D155C5FF10095163C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5235CC1C155C5FF10095163C /* CoreGraphics.framework */; }; 5235CC23155C5FF10095163C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5235CC21155C5FF10095163C /* InfoPlist.strings */; }; 5235CC25155C5FF10095163C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5235CC24155C5FF10095163C /* main.m */; }; - 5235CC29155C5FF10095163C /* WHAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5235CC28155C5FF10095163C /* WHAppDelegate.m */; }; + 5235CC29155C5FF10095163C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5235CC28155C5FF10095163C /* AppDelegate.m */; }; 523A97AD1587E70700E6B9DA /* NIPhotoAlbumScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 523A97A21587E70700E6B9DA /* NIPhotoAlbumScrollView.m */; }; 523A97AE1587E70700E6B9DA /* NIPhotoScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 523A97A61587E70700E6B9DA /* NIPhotoScrollView.m */; }; 523A97AF1587E70700E6B9DA /* NIPhotoScrubberView.m in Sources */ = {isa = PBXBuildFile; fileRef = 523A97AA1587E70700E6B9DA /* NIPhotoScrubberView.m */; }; @@ -92,9 +94,6 @@ 5265E72615B865BE00173B1C /* embiggen@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5265E72515B865BE00173B1C /* embiggen@2x.png */; }; 5265E72915B865CE00173B1C /* shrinkify@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5265E72815B865CE00173B1C /* shrinkify@2x.png */; }; 5265E73715B8B01200173B1C /* AirshipConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5265E73615B8B01200173B1C /* AirshipConfig.plist */; }; - 5265E84215B8B09B00173B1C /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 5265E73A15B8B09B00173B1C /* CHANGELOG */; }; - 5265E84415B8B09B00173B1C /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 5265E79A15B8B09B00173B1C /* LICENSE */; }; - 5265E84515B8B09B00173B1C /* README.rst in Resources */ = {isa = PBXBuildFile; fileRef = 5265E79B15B8B09B00173B1C /* README.rst */; }; 5265E8AB15B8B13700173B1C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5265E8AA15B8B13700173B1C /* CoreLocation.framework */; }; 5265E8AD15B8B13D00173B1C /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5265E8AC15B8B13D00173B1C /* CoreTelephony.framework */; }; 5265E8AF15B8B15200173B1C /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5265E8AE15B8B15200173B1C /* StoreKit.framework */; }; @@ -124,8 +123,6 @@ 526D95BC16134DFB00D4796D /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526D95BB16134DFB00D4796D /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 526D95BE16134DFE00D4796D /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526D95BD16134DFE00D4796D /* Accounts.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 526D95C016134E0300D4796D /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526D95BF16134E0300D4796D /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 526D95C216134F5600D4796D /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526D95C116134F5600D4796D /* FacebookSDK.framework */; }; - 526D95CA161358E000D4796D /* libGoogleAnalytics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 526D95C9161358E000D4796D /* libGoogleAnalytics.a */; }; 526D95CC1614FE5000D4796D /* vignette.png in Resources */ = {isa = PBXBuildFile; fileRef = 526D95CB1614FE5000D4796D /* vignette.png */; }; 526D95CE1614FE9400D4796D /* noise800.png in Resources */ = {isa = PBXBuildFile; fileRef = 526D95CD1614FE9400D4796D /* noise800.png */; }; 527674F815BDB33F00BD9E16 /* WHSharingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 527674F715BDB33F00BD9E16 /* WHSharingUtilities.m */; }; @@ -164,17 +161,18 @@ 52FAEF0715D0BFC7004E514E /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 52FAEF0615D0BFC7004E514E /* Icon-Small.png */; }; 52FCB72215B99FA100B76924 /* play@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 52FCB72115B99FA100B76924 /* play@2x.png */; }; 52FCB72415B99FD100B76924 /* play.png in Resources */ = {isa = PBXBuildFile; fileRef = 52FCB72315B99FD100B76924 /* play.png */; }; - 52FCB73515B9A21200B76924 /* FBDialog.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 52FCB72815B9A21200B76924 /* FBDialog.bundle */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 4118EE42184FED0A00C43099 /* libGoogleAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGoogleAnalytics.a; path = libs/GoogleAnalytics/libGoogleAnalytics.a; sourceTree = ""; }; + 41297699185001FA001FE8A2 /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = libs/FacebookSDK.framework; sourceTree = ""; }; + 41DF6660184FE993009B8821 /* libUAirship-3.0.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libUAirship-3.0.2.a"; path = "libs/Airship/libUAirship-3.0.2.a"; sourceTree = ""; }; 5208905915A775F4004CD40F /* WHLiveController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHLiveController.h; sourceTree = ""; }; 5208905A15A775F4004CD40F /* WHLiveController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHLiveController.m; sourceTree = ""; }; 5208905D15A77883004CD40F /* NSArray+WHAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+WHAdditions.h"; sourceTree = ""; }; 5208905E15A77883004CD40F /* NSArray+WHAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+WHAdditions.m"; sourceTree = ""; }; 5208906015A78209004CD40F /* WHLiveBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHLiveBarController.h; sourceTree = ""; }; 5208906115A78209004CD40F /* WHLiveBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHLiveBarController.m; sourceTree = ""; }; - 5208F9BE160CEDEE00F2C4C2 /* libUAirship-1.3.3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libUAirship-1.3.3.a"; path = "libs/Airship/libUAirship-1.3.3.a"; sourceTree = ""; }; 5208F9C4160CF03500F2C4C2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 520A463915C828C100547BAE /* AppConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AppConfig.plist; sourceTree = ""; }; 5221B019157E44FE00265F1B /* NimbusWebController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = NimbusWebController.bundle; path = libs/nimbus/src/webcontroller/resources/NimbusWebController.bundle; sourceTree = SOURCE_ROOT; }; @@ -211,41 +209,6 @@ 5222BB0D158A5B2D0073DCFA /* WHReaderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHReaderViewController.m; sourceTree = ""; }; 5222BB15158A85760073DCFA /* WHReaderPanelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHReaderPanelView.h; sourceTree = ""; }; 5222BB16158A85760073DCFA /* WHReaderPanelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHReaderPanelView.m; sourceTree = ""; }; - 5223A571161E320E00B25877 /* Facebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Facebook.h; sourceTree = ""; }; - 5223A572161E320E00B25877 /* FacebookSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookSDK.h; sourceTree = ""; }; - 5223A573161E320E00B25877 /* FBCacheDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBCacheDescriptor.h; sourceTree = ""; }; - 5223A574161E320E00B25877 /* FBConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBConnect.h; sourceTree = ""; }; - 5223A575161E320E00B25877 /* FBDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDialog.h; sourceTree = ""; }; - 5223A576161E320E00B25877 /* FBError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBError.h; sourceTree = ""; }; - 5223A577161E320E00B25877 /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBFrictionlessRequestSettings.h; sourceTree = ""; }; - 5223A578161E320E00B25877 /* FBFriendPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBFriendPickerViewController.h; sourceTree = ""; }; - 5223A579161E320E00B25877 /* FBGraphLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBGraphLocation.h; sourceTree = ""; }; - 5223A57A161E320E00B25877 /* FBGraphObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBGraphObject.h; sourceTree = ""; }; - 5223A57B161E320E00B25877 /* FBGraphPlace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBGraphPlace.h; sourceTree = ""; }; - 5223A57C161E320E00B25877 /* FBGraphUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBGraphUser.h; sourceTree = ""; }; - 5223A57D161E320E00B25877 /* FBLoginDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginDialog.h; sourceTree = ""; }; - 5223A57E161E320E00B25877 /* FBLoginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginView.h; sourceTree = ""; }; - 5223A57F161E320E00B25877 /* FBOpenGraphAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBOpenGraphAction.h; sourceTree = ""; }; - 5223A580161E320E00B25877 /* FBPlacePickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBPlacePickerViewController.h; sourceTree = ""; }; - 5223A581161E320E00B25877 /* FBProfilePictureView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBProfilePictureView.h; sourceTree = ""; }; - 5223A582161E320E00B25877 /* FBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBRequest.h; sourceTree = ""; }; - 5223A583161E320E00B25877 /* FBRequestConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBRequestConnection.h; sourceTree = ""; }; - 5223A584161E320E00B25877 /* FBSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBSession.h; sourceTree = ""; }; - 5223A585161E320E00B25877 /* FBSessionManualTokenCachingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBSessionManualTokenCachingStrategy.h; sourceTree = ""; }; - 5223A586161E320E00B25877 /* FBSessionTokenCachingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBSessionTokenCachingStrategy.h; sourceTree = ""; }; - 5223A587161E320E00B25877 /* FBSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBSettings.h; sourceTree = ""; }; - 5223A588161E320E00B25877 /* FBTestSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTestSession.h; sourceTree = ""; }; - 5223A589161E320E00B25877 /* FBUserSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBUserSettingsViewController.h; sourceTree = ""; }; - 5223A58A161E320E00B25877 /* FBViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBViewController.h; sourceTree = ""; }; - 5223A58B161E320E00B25877 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = ""; }; - 5223A58C161E320E00B25877 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = ""; }; - 5223A58D161E320E00B25877 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = ""; }; - 5223A58E161E320E00B25877 /* SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJSON.h; sourceTree = ""; }; - 5223A58F161E320E00B25877 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonBase.h; sourceTree = ""; }; - 5223A590161E320E00B25877 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = ""; }; - 5223A591161E320E00B25877 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = ""; }; - 52256433157E8E22004922B5 /* GANTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GANTracker.h; path = "libs/Google Analytics SDK/Library/GANTracker.h"; sourceTree = SOURCE_ROOT; }; - 52256434157E8E22004922B5 /* libGoogleAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGoogleAnalytics.a; path = "libs/Google Analytics SDK/Library/libGoogleAnalytics.a"; sourceTree = SOURCE_ROOT; }; 52256437157E9571004922B5 /* config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = config.json; sourceTree = ""; }; 52256439157EA234004922B5 /* WHThumbnailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHThumbnailView.h; sourceTree = ""; }; 5225643A157EA234004922B5 /* WHThumbnailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHThumbnailView.m; sourceTree = ""; }; @@ -286,12 +249,12 @@ 5235CC18155C5FF10095163C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 5235CC1A155C5FF10095163C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 5235CC1C155C5FF10095163C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 5235CC20155C5FF10095163C /* WhiteHouseApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WhiteHouseApp-Info.plist"; sourceTree = ""; }; + 5235CC20155C5FF10095163C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5235CC22155C5FF10095163C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 5235CC24155C5FF10095163C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 5235CC26155C5FF10095163C /* WhiteHouseApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WhiteHouseApp-Prefix.pch"; sourceTree = ""; }; - 5235CC27155C5FF10095163C /* WHAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHAppDelegate.h; sourceTree = ""; }; - 5235CC28155C5FF10095163C /* WHAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WHAppDelegate.m; sourceTree = ""; }; + 5235CC26155C5FF10095163C /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 5235CC27155C5FF10095163C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 5235CC28155C5FF10095163C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 523A979F1587E70700E6B9DA /* NimbusPhotos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NimbusPhotos.h; path = libs/nimbus/src/photos/src/NimbusPhotos.h; sourceTree = SOURCE_ROOT; }; 523A97A01587E70700E6B9DA /* NimbusPhotos+Namespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NimbusPhotos+Namespace.h"; path = "libs/nimbus/src/photos/src/NimbusPhotos+Namespace.h"; sourceTree = SOURCE_ROOT; }; 523A97A11587E70700E6B9DA /* NIPhotoAlbumScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIPhotoAlbumScrollView.h; path = libs/nimbus/src/photos/src/NIPhotoAlbumScrollView.h; sourceTree = SOURCE_ROOT; }; @@ -343,91 +306,6 @@ 5265E72515B865BE00173B1C /* embiggen@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "embiggen@2x.png"; sourceTree = ""; }; 5265E72815B865CE00173B1C /* shrinkify@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shrinkify@2x.png"; sourceTree = ""; }; 5265E73615B8B01200173B1C /* AirshipConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AirshipConfig.plist; sourceTree = ""; }; - 5265E73A15B8B09B00173B1C /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = ""; }; - 5265E73C15B8B09B00173B1C /* UAAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAAnalytics.h; sourceTree = ""; }; - 5265E73D15B8B09B00173B1C /* UAAnalyticsDBManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAAnalyticsDBManager.h; sourceTree = ""; }; - 5265E73E15B8B09B00173B1C /* UAAsycImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAAsycImageView.h; sourceTree = ""; }; - 5265E73F15B8B09B00173B1C /* UABarButtonSegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UABarButtonSegmentedControl.h; sourceTree = ""; }; - 5265E74015B8B09B00173B1C /* UABaseLocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UABaseLocationProvider.h; sourceTree = ""; }; - 5265E74115B8B09B00173B1C /* UAContentURLCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAContentURLCache.h; sourceTree = ""; }; - 5265E74215B8B09B00173B1C /* UADateUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UADateUtils.h; sourceTree = ""; }; - 5265E74315B8B09B00173B1C /* UADownloadContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UADownloadContent.h; sourceTree = ""; }; - 5265E74415B8B09B00173B1C /* UADownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UADownloadManager.h; sourceTree = ""; }; - 5265E74515B8B09B00173B1C /* UAEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAEvent.h; sourceTree = ""; }; - 5265E74615B8B09B00173B1C /* UAGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGlobal.h; sourceTree = ""; }; - 5265E74715B8B09B00173B1C /* UAHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAHTTPConnection.h; sourceTree = ""; }; - 5265E74815B8B09B00173B1C /* UAKeychainUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAKeychainUtils.h; sourceTree = ""; }; - 5265E74915B8B09B00173B1C /* UALocalStorageDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocalStorageDirectory.h; sourceTree = ""; }; - 5265E74A15B8B09B00173B1C /* UALocationCommonValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocationCommonValues.h; sourceTree = ""; }; - 5265E74B15B8B09B00173B1C /* UALocationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocationEvent.h; sourceTree = ""; }; - 5265E74C15B8B09B00173B1C /* UALocationProviderDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocationProviderDelegate.h; sourceTree = ""; }; - 5265E74D15B8B09B00173B1C /* UALocationProviderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocationProviderProtocol.h; sourceTree = ""; }; - 5265E74E15B8B09B00173B1C /* UALocationService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UALocationService.h; sourceTree = ""; }; - 5265E74F15B8B09B00173B1C /* UAObservable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAObservable.h; sourceTree = ""; }; - 5265E75015B8B09B00173B1C /* UASignificantChangeProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASignificantChangeProvider.h; sourceTree = ""; }; - 5265E75115B8B09B00173B1C /* UASQLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASQLite.h; sourceTree = ""; }; - 5265E75215B8B09B00173B1C /* UAStandardLocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStandardLocationProvider.h; sourceTree = ""; }; - 5265E75315B8B09B00173B1C /* UATagUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UATagUtils.h; sourceTree = ""; }; - 5265E75415B8B09B00173B1C /* UAUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAUser.h; sourceTree = ""; }; - 5265E75515B8B09B00173B1C /* UAUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAUtils.h; sourceTree = ""; }; - 5265E75615B8B09B00173B1C /* UAViewUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAViewUtils.h; sourceTree = ""; }; - 5265E75915B8B09B00173B1C /* UA_ASIAuthenticationDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIAuthenticationDialog.h; sourceTree = ""; }; - 5265E75A15B8B09B00173B1C /* UA_ASICacheDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASICacheDelegate.h; sourceTree = ""; }; - 5265E75B15B8B09B00173B1C /* UA_ASIDataCompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIDataCompressor.h; sourceTree = ""; }; - 5265E75C15B8B09B00173B1C /* UA_ASIDataDecompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIDataDecompressor.h; sourceTree = ""; }; - 5265E75D15B8B09B00173B1C /* UA_ASIDownloadCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIDownloadCache.h; sourceTree = ""; }; - 5265E75E15B8B09B00173B1C /* UA_ASIFormDataRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIFormDataRequest.h; sourceTree = ""; }; - 5265E75F15B8B09B00173B1C /* UA_ASIHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIHTTPRequest.h; sourceTree = ""; }; - 5265E76015B8B09B00173B1C /* UA_ASIHTTPRequestConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIHTTPRequestConfig.h; sourceTree = ""; }; - 5265E76115B8B09B00173B1C /* UA_ASIHTTPRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIHTTPRequestDelegate.h; sourceTree = ""; }; - 5265E76215B8B09B00173B1C /* UA_ASIInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIInputStream.h; sourceTree = ""; }; - 5265E76315B8B09B00173B1C /* UA_ASINetworkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASINetworkQueue.h; sourceTree = ""; }; - 5265E76415B8B09B00173B1C /* UA_ASIProgressDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ASIProgressDelegate.h; sourceTree = ""; }; - 5265E76515B8B09B00173B1C /* UA_Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_Base64.h; sourceTree = ""; }; - 5265E76715B8B09B00173B1C /* UA_FMDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_FMDatabase.h; sourceTree = ""; }; - 5265E76815B8B09B00173B1C /* UA_FMResultSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_FMResultSet.h; sourceTree = ""; }; - 5265E76A15B8B09B00173B1C /* UA_SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_SBJSON.h; sourceTree = ""; }; - 5265E76B15B8B09B00173B1C /* UA_SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_SBJsonBase.h; sourceTree = ""; }; - 5265E76C15B8B09B00173B1C /* UA_SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_SBJsonParser.h; sourceTree = ""; }; - 5265E76D15B8B09B00173B1C /* UA_SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_SBJsonWriter.h; sourceTree = ""; }; - 5265E76E15B8B09B00173B1C /* UA_Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_Reachability.h; sourceTree = ""; }; - 5265E77015B8B09B00173B1C /* UA_crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_crypt.h; sourceTree = ""; }; - 5265E77215B8B09B00173B1C /* UA_ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ioapi.h; sourceTree = ""; }; - 5265E77315B8B09B00173B1C /* UA_mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_mztools.h; sourceTree = ""; }; - 5265E77415B8B09B00173B1C /* UA_unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_unzip.h; sourceTree = ""; }; - 5265E77515B8B09B00173B1C /* UA_zconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_zconf.h; sourceTree = ""; }; - 5265E77615B8B09B00173B1C /* UA_zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_zip.h; sourceTree = ""; }; - 5265E77715B8B09B00173B1C /* UA_ZipArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UA_ZipArchive.h; sourceTree = ""; }; - 5265E77A15B8B09B00173B1C /* UAirship.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAirship.h; sourceTree = ""; }; - 5265E77C15B8B09B00173B1C /* UAInbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInbox.h; sourceTree = ""; }; - 5265E77D15B8B09B00173B1C /* UAInboxDBManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxDBManager.h; sourceTree = ""; }; - 5265E77E15B8B09B00173B1C /* UAInboxDefaultJSDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxDefaultJSDelegate.h; sourceTree = ""; }; - 5265E77F15B8B09B00173B1C /* UAInboxMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxMessage.h; sourceTree = ""; }; - 5265E78015B8B09B00173B1C /* UAInboxMessageList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxMessageList.h; sourceTree = ""; }; - 5265E78115B8B09B00173B1C /* UAInboxMessageListObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxMessageListObserver.h; sourceTree = ""; }; - 5265E78215B8B09B00173B1C /* UAInboxPushHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxPushHandler.h; sourceTree = ""; }; - 5265E78315B8B09B00173B1C /* UAInboxURLCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInboxURLCache.h; sourceTree = ""; }; - 5265E78515B8B09B00173B1C /* UAPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAPush.h; sourceTree = ""; }; - 5265E78715B8B09B00173B1C /* UAInventory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAInventory.h; sourceTree = ""; }; - 5265E78815B8B09B00173B1C /* UAProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAProduct.h; sourceTree = ""; }; - 5265E78915B8B09B00173B1C /* UAStoreFront.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStoreFront.h; sourceTree = ""; }; - 5265E78A15B8B09B00173B1C /* UAStoreFrontAlertProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStoreFrontAlertProtocol.h; sourceTree = ""; }; - 5265E78B15B8B09B00173B1C /* UAStoreFrontDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStoreFrontDelegate.h; sourceTree = ""; }; - 5265E78C15B8B09B00173B1C /* UAStoreFrontDownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStoreFrontDownloadManager.h; sourceTree = ""; }; - 5265E78D15B8B09B00173B1C /* UAStoreKitObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAStoreKitObserver.h; sourceTree = ""; }; - 5265E78F15B8B09B00173B1C /* UAContentInventory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAContentInventory.h; sourceTree = ""; }; - 5265E79015B8B09B00173B1C /* UAProductInventory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAProductInventory.h; sourceTree = ""; }; - 5265E79115B8B09B00173B1C /* UASubscription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscription.h; sourceTree = ""; }; - 5265E79215B8B09B00173B1C /* UASubscriptionAlertProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionAlertProtocol.h; sourceTree = ""; }; - 5265E79315B8B09B00173B1C /* UASubscriptionContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionContent.h; sourceTree = ""; }; - 5265E79415B8B09B00173B1C /* UASubscriptionDownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionDownloadManager.h; sourceTree = ""; }; - 5265E79515B8B09B00173B1C /* UASubscriptionInventory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionInventory.h; sourceTree = ""; }; - 5265E79615B8B09B00173B1C /* UASubscriptionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionManager.h; sourceTree = ""; }; - 5265E79715B8B09B00173B1C /* UASubscriptionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionObserver.h; sourceTree = ""; }; - 5265E79815B8B09B00173B1C /* UASubscriptionProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UASubscriptionProduct.h; sourceTree = ""; }; - 5265E79915B8B09B00173B1C /* libUAirship-1.2.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libUAirship-1.2.2.a"; sourceTree = ""; }; - 5265E79A15B8B09B00173B1C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 5265E79B15B8B09B00173B1C /* README.rst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.rst; sourceTree = ""; }; 5265E8AA15B8B13700173B1C /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 5265E8AC15B8B13D00173B1C /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 5265E8AE15B8B15200173B1C /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; @@ -486,9 +364,6 @@ 526D95BB16134DFB00D4796D /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 526D95BD16134DFE00D4796D /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; }; 526D95BF16134E0300D4796D /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; - 526D95C116134F5600D4796D /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = ../../FacebookSDK/build/FacebookSDK.framework; sourceTree = ""; }; - 526D95C8161358E000D4796D /* GANTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GANTracker.h; sourceTree = ""; }; - 526D95C9161358E000D4796D /* libGoogleAnalytics.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGoogleAnalytics.a; sourceTree = ""; }; 526D95CB1614FE5000D4796D /* vignette.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = vignette.png; sourceTree = ""; }; 526D95CD1614FE9400D4796D /* noise800.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noise800.png; sourceTree = ""; }; 527674F615BDB33F00BD9E16 /* WHSharingUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHSharingUtilities.h; sourceTree = ""; }; @@ -547,21 +422,6 @@ 52FAEF0615D0BFC7004E514E /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = ""; }; 52FCB72115B99FA100B76924 /* play@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "play@2x.png"; sourceTree = ""; }; 52FCB72315B99FD100B76924 /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = ""; }; - 52FCB72615B9A21200B76924 /* Facebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Facebook.h; sourceTree = ""; }; - 52FCB72715B9A21200B76924 /* FBConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBConnect.h; sourceTree = ""; }; - 52FCB72815B9A21200B76924 /* FBDialog.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FBDialog.bundle; sourceTree = ""; }; - 52FCB72915B9A21200B76924 /* FBDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDialog.h; sourceTree = ""; }; - 52FCB72A15B9A21200B76924 /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBFrictionlessRequestSettings.h; sourceTree = ""; }; - 52FCB72B15B9A21200B76924 /* FBLoginDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginDialog.h; sourceTree = ""; }; - 52FCB72C15B9A21200B76924 /* FBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBRequest.h; sourceTree = ""; }; - 52FCB72D15B9A21200B76924 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = ""; }; - 52FCB72E15B9A21200B76924 /* libfacebook_ios_sdk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfacebook_ios_sdk.a; sourceTree = ""; }; - 52FCB72F15B9A21200B76924 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = ""; }; - 52FCB73015B9A21200B76924 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = ""; }; - 52FCB73115B9A21200B76924 /* SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJSON.h; sourceTree = ""; }; - 52FCB73215B9A21200B76924 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonBase.h; sourceTree = ""; }; - 52FCB73315B9A21200B76924 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = ""; }; - 52FCB73415B9A21200B76924 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -569,9 +429,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 4118EE43184FED0A00C43099 /* libGoogleAnalytics.a in Frameworks */, + 41DF6661184FE993009B8821 /* libUAirship-3.0.2.a in Frameworks */, 526D95C016134E0300D4796D /* Social.framework in Frameworks */, 526D95BE16134DFE00D4796D /* Accounts.framework in Frameworks */, 526D95BC16134DFB00D4796D /* AdSupport.framework in Frameworks */, + 4129769A185001FA001FE8A2 /* FacebookSDK.framework in Frameworks */, 5265E8AF15B8B15200173B1C /* StoreKit.framework in Frameworks */, 5265E8AD15B8B13D00173B1C /* CoreTelephony.framework in Frameworks */, 5265E8AB15B8B13700173B1C /* CoreLocation.framework in Frameworks */, @@ -590,9 +453,6 @@ 5235CC19155C5FF10095163C /* UIKit.framework in Frameworks */, 5235CC1B155C5FF10095163C /* Foundation.framework in Frameworks */, 5235CC1D155C5FF10095163C /* CoreGraphics.framework in Frameworks */, - 5208F9BF160CEDEE00F2C4C2 /* libUAirship-1.3.3.a in Frameworks */, - 526D95C216134F5600D4796D /* FacebookSDK.framework in Frameworks */, - 526D95CA161358E000D4796D /* libGoogleAnalytics.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -657,66 +517,12 @@ path = "../libs/asi-http-request/Classes"; sourceTree = ""; }; - 5223A570161E320E00B25877 /* DeprecatedHeaders */ = { - isa = PBXGroup; - children = ( - 5223A571161E320E00B25877 /* Facebook.h */, - 5223A572161E320E00B25877 /* FacebookSDK.h */, - 5223A573161E320E00B25877 /* FBCacheDescriptor.h */, - 5223A574161E320E00B25877 /* FBConnect.h */, - 5223A575161E320E00B25877 /* FBDialog.h */, - 5223A576161E320E00B25877 /* FBError.h */, - 5223A577161E320E00B25877 /* FBFrictionlessRequestSettings.h */, - 5223A578161E320E00B25877 /* FBFriendPickerViewController.h */, - 5223A579161E320E00B25877 /* FBGraphLocation.h */, - 5223A57A161E320E00B25877 /* FBGraphObject.h */, - 5223A57B161E320E00B25877 /* FBGraphPlace.h */, - 5223A57C161E320E00B25877 /* FBGraphUser.h */, - 5223A57D161E320E00B25877 /* FBLoginDialog.h */, - 5223A57E161E320E00B25877 /* FBLoginView.h */, - 5223A57F161E320E00B25877 /* FBOpenGraphAction.h */, - 5223A580161E320E00B25877 /* FBPlacePickerViewController.h */, - 5223A581161E320E00B25877 /* FBProfilePictureView.h */, - 5223A582161E320E00B25877 /* FBRequest.h */, - 5223A583161E320E00B25877 /* FBRequestConnection.h */, - 5223A584161E320E00B25877 /* FBSession.h */, - 5223A585161E320E00B25877 /* FBSessionManualTokenCachingStrategy.h */, - 5223A586161E320E00B25877 /* FBSessionTokenCachingStrategy.h */, - 5223A587161E320E00B25877 /* FBSettings.h */, - 5223A588161E320E00B25877 /* FBTestSession.h */, - 5223A589161E320E00B25877 /* FBUserSettingsViewController.h */, - 5223A58A161E320E00B25877 /* FBViewController.h */, - 5223A58B161E320E00B25877 /* JSON.h */, - 5223A58C161E320E00B25877 /* NSObject+SBJSON.h */, - 5223A58D161E320E00B25877 /* NSString+SBJSON.h */, - 5223A58E161E320E00B25877 /* SBJSON.h */, - 5223A58F161E320E00B25877 /* SBJsonBase.h */, - 5223A590161E320E00B25877 /* SBJsonParser.h */, - 5223A591161E320E00B25877 /* SBJsonWriter.h */, - ); - name = DeprecatedHeaders; - path = ../../../Documents/FacebookSDK/FacebookSDK.framework/Versions/A/DeprecatedHeaders; - sourceTree = ""; - }; - 52256432157E8E04004922B5 /* Google Analytics */ = { - isa = PBXGroup; - children = ( - 52256433157E8E22004922B5 /* GANTracker.h */, - 52256434157E8E22004922B5 /* libGoogleAnalytics.a */, - ); - name = "Google Analytics"; - path = "../libs/Google Analytics SDK/Library"; - sourceTree = ""; - }; 52256436157E929E004922B5 /* Libraries */ = { isa = PBXGroup; children = ( 5227D2F815C8D5730005C173 /* SVPullToRefresh */, 52AB9B0315C3345E00A8624A /* CustomBadge */, 52AB9AE415C19E2700A8624A /* Cocoanetics */, - 52FCB72515B9A21200B76924 /* facebook-ios-sdk */, - 5265E73915B8B09B00173B1C /* Airship */, - 52256432157E8E04004922B5 /* Google Analytics */, 5221B01C157E462000265F1B /* ASI-HTTP-Request */, 5267922A157E43DC002DE2C3 /* Nimbus */, ); @@ -831,13 +637,12 @@ 5235CC17155C5FF10095163C /* Frameworks */ = { isa = PBXGroup; children = ( - 5223A570161E320E00B25877 /* DeprecatedHeaders */, - 526D95C7161358E000D4796D /* Library */, - 526D95C116134F5600D4796D /* FacebookSDK.framework */, + 4118EE42184FED0A00C43099 /* libGoogleAnalytics.a */, + 41DF6660184FE993009B8821 /* libUAirship-3.0.2.a */, + 41297699185001FA001FE8A2 /* FacebookSDK.framework */, 526D95BF16134E0300D4796D /* Social.framework */, 526D95BD16134DFE00D4796D /* Accounts.framework */, 526D95BB16134DFB00D4796D /* AdSupport.framework */, - 5208F9BE160CEDEE00F2C4C2 /* libUAirship-1.3.3.a */, 5265E8AE15B8B15200173B1C /* StoreKit.framework */, 5265E8AC15B8B13D00173B1C /* CoreTelephony.framework */, 5265E8AA15B8B13700173B1C /* CoreLocation.framework */, @@ -876,10 +681,10 @@ children = ( 5265E59915B7BBEA00173B1C /* Localizable.strings */, 52256437157E9571004922B5 /* config.json */, - 5235CC20155C5FF10095163C /* WhiteHouseApp-Info.plist */, + 5235CC20155C5FF10095163C /* Info.plist */, 5235CC21155C5FF10095163C /* InfoPlist.strings */, 5235CC24155C5FF10095163C /* main.m */, - 5235CC26155C5FF10095163C /* WhiteHouseApp-Prefix.pch */, + 5235CC26155C5FF10095163C /* Prefix.pch */, 5265E73615B8B01200173B1C /* AirshipConfig.plist */, 520A463915C828C100547BAE /* AppConfig.plist */, ); @@ -924,203 +729,6 @@ name = PagingScrollView; sourceTree = ""; }; - 5265E73915B8B09B00173B1C /* Airship */ = { - isa = PBXGroup; - children = ( - 5265E73A15B8B09B00173B1C /* CHANGELOG */, - 5265E73B15B8B09B00173B1C /* Common */, - 5265E75715B8B09B00173B1C /* External */, - 5265E77815B8B09B00173B1C /* Library */, - 5265E79915B8B09B00173B1C /* libUAirship-1.2.2.a */, - 5265E79A15B8B09B00173B1C /* LICENSE */, - 5265E79B15B8B09B00173B1C /* README.rst */, - ); - name = Airship; - path = libs/Airship; - sourceTree = SOURCE_ROOT; - }; - 5265E73B15B8B09B00173B1C /* Common */ = { - isa = PBXGroup; - children = ( - 5265E73C15B8B09B00173B1C /* UAAnalytics.h */, - 5265E73D15B8B09B00173B1C /* UAAnalyticsDBManager.h */, - 5265E73E15B8B09B00173B1C /* UAAsycImageView.h */, - 5265E73F15B8B09B00173B1C /* UABarButtonSegmentedControl.h */, - 5265E74015B8B09B00173B1C /* UABaseLocationProvider.h */, - 5265E74115B8B09B00173B1C /* UAContentURLCache.h */, - 5265E74215B8B09B00173B1C /* UADateUtils.h */, - 5265E74315B8B09B00173B1C /* UADownloadContent.h */, - 5265E74415B8B09B00173B1C /* UADownloadManager.h */, - 5265E74515B8B09B00173B1C /* UAEvent.h */, - 5265E74615B8B09B00173B1C /* UAGlobal.h */, - 5265E74715B8B09B00173B1C /* UAHTTPConnection.h */, - 5265E74815B8B09B00173B1C /* UAKeychainUtils.h */, - 5265E74915B8B09B00173B1C /* UALocalStorageDirectory.h */, - 5265E74A15B8B09B00173B1C /* UALocationCommonValues.h */, - 5265E74B15B8B09B00173B1C /* UALocationEvent.h */, - 5265E74C15B8B09B00173B1C /* UALocationProviderDelegate.h */, - 5265E74D15B8B09B00173B1C /* UALocationProviderProtocol.h */, - 5265E74E15B8B09B00173B1C /* UALocationService.h */, - 5265E74F15B8B09B00173B1C /* UAObservable.h */, - 5265E75015B8B09B00173B1C /* UASignificantChangeProvider.h */, - 5265E75115B8B09B00173B1C /* UASQLite.h */, - 5265E75215B8B09B00173B1C /* UAStandardLocationProvider.h */, - 5265E75315B8B09B00173B1C /* UATagUtils.h */, - 5265E75415B8B09B00173B1C /* UAUser.h */, - 5265E75515B8B09B00173B1C /* UAUtils.h */, - 5265E75615B8B09B00173B1C /* UAViewUtils.h */, - ); - path = Common; - sourceTree = ""; - }; - 5265E75715B8B09B00173B1C /* External */ = { - isa = PBXGroup; - children = ( - 5265E75815B8B09B00173B1C /* UA_asi-http-request */, - 5265E76515B8B09B00173B1C /* UA_Base64.h */, - 5265E76615B8B09B00173B1C /* UA_fmdb */, - 5265E76915B8B09B00173B1C /* UA_json-framework */, - 5265E76E15B8B09B00173B1C /* UA_Reachability.h */, - 5265E76F15B8B09B00173B1C /* UA_ZipFile-OC */, - ); - path = External; - sourceTree = ""; - }; - 5265E75815B8B09B00173B1C /* UA_asi-http-request */ = { - isa = PBXGroup; - children = ( - 5265E75915B8B09B00173B1C /* UA_ASIAuthenticationDialog.h */, - 5265E75A15B8B09B00173B1C /* UA_ASICacheDelegate.h */, - 5265E75B15B8B09B00173B1C /* UA_ASIDataCompressor.h */, - 5265E75C15B8B09B00173B1C /* UA_ASIDataDecompressor.h */, - 5265E75D15B8B09B00173B1C /* UA_ASIDownloadCache.h */, - 5265E75E15B8B09B00173B1C /* UA_ASIFormDataRequest.h */, - 5265E75F15B8B09B00173B1C /* UA_ASIHTTPRequest.h */, - 5265E76015B8B09B00173B1C /* UA_ASIHTTPRequestConfig.h */, - 5265E76115B8B09B00173B1C /* UA_ASIHTTPRequestDelegate.h */, - 5265E76215B8B09B00173B1C /* UA_ASIInputStream.h */, - 5265E76315B8B09B00173B1C /* UA_ASINetworkQueue.h */, - 5265E76415B8B09B00173B1C /* UA_ASIProgressDelegate.h */, - ); - path = "UA_asi-http-request"; - sourceTree = ""; - }; - 5265E76615B8B09B00173B1C /* UA_fmdb */ = { - isa = PBXGroup; - children = ( - 5265E76715B8B09B00173B1C /* UA_FMDatabase.h */, - 5265E76815B8B09B00173B1C /* UA_FMResultSet.h */, - ); - path = UA_fmdb; - sourceTree = ""; - }; - 5265E76915B8B09B00173B1C /* UA_json-framework */ = { - isa = PBXGroup; - children = ( - 5265E76A15B8B09B00173B1C /* UA_SBJSON.h */, - 5265E76B15B8B09B00173B1C /* UA_SBJsonBase.h */, - 5265E76C15B8B09B00173B1C /* UA_SBJsonParser.h */, - 5265E76D15B8B09B00173B1C /* UA_SBJsonWriter.h */, - ); - path = "UA_json-framework"; - sourceTree = ""; - }; - 5265E76F15B8B09B00173B1C /* UA_ZipFile-OC */ = { - isa = PBXGroup; - children = ( - 5265E77015B8B09B00173B1C /* UA_crypt.h */, - 5265E77115B8B09B00173B1C /* UA_minizip */, - 5265E77715B8B09B00173B1C /* UA_ZipArchive.h */, - ); - path = "UA_ZipFile-OC"; - sourceTree = ""; - }; - 5265E77115B8B09B00173B1C /* UA_minizip */ = { - isa = PBXGroup; - children = ( - 5265E77215B8B09B00173B1C /* UA_ioapi.h */, - 5265E77315B8B09B00173B1C /* UA_mztools.h */, - 5265E77415B8B09B00173B1C /* UA_unzip.h */, - 5265E77515B8B09B00173B1C /* UA_zconf.h */, - 5265E77615B8B09B00173B1C /* UA_zip.h */, - ); - path = UA_minizip; - sourceTree = ""; - }; - 5265E77815B8B09B00173B1C /* Library */ = { - isa = PBXGroup; - children = ( - 5265E77915B8B09B00173B1C /* AirshipLib */, - 5265E77B15B8B09B00173B1C /* InboxLib */, - 5265E78415B8B09B00173B1C /* PushLib */, - 5265E78615B8B09B00173B1C /* StoreFrontLib */, - 5265E78E15B8B09B00173B1C /* SubscriptionLib */, - ); - path = Library; - sourceTree = ""; - }; - 5265E77915B8B09B00173B1C /* AirshipLib */ = { - isa = PBXGroup; - children = ( - 5265E77A15B8B09B00173B1C /* UAirship.h */, - ); - path = AirshipLib; - sourceTree = ""; - }; - 5265E77B15B8B09B00173B1C /* InboxLib */ = { - isa = PBXGroup; - children = ( - 5265E77C15B8B09B00173B1C /* UAInbox.h */, - 5265E77D15B8B09B00173B1C /* UAInboxDBManager.h */, - 5265E77E15B8B09B00173B1C /* UAInboxDefaultJSDelegate.h */, - 5265E77F15B8B09B00173B1C /* UAInboxMessage.h */, - 5265E78015B8B09B00173B1C /* UAInboxMessageList.h */, - 5265E78115B8B09B00173B1C /* UAInboxMessageListObserver.h */, - 5265E78215B8B09B00173B1C /* UAInboxPushHandler.h */, - 5265E78315B8B09B00173B1C /* UAInboxURLCache.h */, - ); - path = InboxLib; - sourceTree = ""; - }; - 5265E78415B8B09B00173B1C /* PushLib */ = { - isa = PBXGroup; - children = ( - 5265E78515B8B09B00173B1C /* UAPush.h */, - ); - path = PushLib; - sourceTree = ""; - }; - 5265E78615B8B09B00173B1C /* StoreFrontLib */ = { - isa = PBXGroup; - children = ( - 5265E78715B8B09B00173B1C /* UAInventory.h */, - 5265E78815B8B09B00173B1C /* UAProduct.h */, - 5265E78915B8B09B00173B1C /* UAStoreFront.h */, - 5265E78A15B8B09B00173B1C /* UAStoreFrontAlertProtocol.h */, - 5265E78B15B8B09B00173B1C /* UAStoreFrontDelegate.h */, - 5265E78C15B8B09B00173B1C /* UAStoreFrontDownloadManager.h */, - 5265E78D15B8B09B00173B1C /* UAStoreKitObserver.h */, - ); - path = StoreFrontLib; - sourceTree = ""; - }; - 5265E78E15B8B09B00173B1C /* SubscriptionLib */ = { - isa = PBXGroup; - children = ( - 5265E78F15B8B09B00173B1C /* UAContentInventory.h */, - 5265E79015B8B09B00173B1C /* UAProductInventory.h */, - 5265E79115B8B09B00173B1C /* UASubscription.h */, - 5265E79215B8B09B00173B1C /* UASubscriptionAlertProtocol.h */, - 5265E79315B8B09B00173B1C /* UASubscriptionContent.h */, - 5265E79415B8B09B00173B1C /* UASubscriptionDownloadManager.h */, - 5265E79515B8B09B00173B1C /* UASubscriptionInventory.h */, - 5265E79615B8B09B00173B1C /* UASubscriptionManager.h */, - 5265E79715B8B09B00173B1C /* UASubscriptionObserver.h */, - 5265E79815B8B09B00173B1C /* UASubscriptionProduct.h */, - ); - path = SubscriptionLib; - sourceTree = ""; - }; 5267922A157E43DC002DE2C3 /* Nimbus */ = { isa = PBXGroup; children = ( @@ -1198,16 +806,6 @@ name = WebController; sourceTree = ""; }; - 526D95C7161358E000D4796D /* Library */ = { - isa = PBXGroup; - children = ( - 526D95C8161358E000D4796D /* GANTracker.h */, - 526D95C9161358E000D4796D /* libGoogleAnalytics.a */, - ); - name = Library; - path = "libs/Google Analytics SDK/Library"; - sourceTree = ""; - }; 527674F915BDB45500BD9E16 /* Detail View Controllers */ = { isa = PBXGroup; children = ( @@ -1241,8 +839,8 @@ 5208905C15A7785A004CD40F /* Utilities */, 52B84B62156351570013E5B9 /* Model */, 52B84B5E156350CA0013E5B9 /* Business Logic */, - 5235CC27155C5FF10095163C /* WHAppDelegate.h */, - 5235CC28155C5FF10095163C /* WHAppDelegate.m */, + 5235CC27155C5FF10095163C /* AppDelegate.h */, + 5235CC28155C5FF10095163C /* AppDelegate.m */, ); name = Classes; sourceTree = ""; @@ -1354,29 +952,6 @@ name = UI; sourceTree = ""; }; - 52FCB72515B9A21200B76924 /* facebook-ios-sdk */ = { - isa = PBXGroup; - children = ( - 52FCB72615B9A21200B76924 /* Facebook.h */, - 52FCB72715B9A21200B76924 /* FBConnect.h */, - 52FCB72815B9A21200B76924 /* FBDialog.bundle */, - 52FCB72915B9A21200B76924 /* FBDialog.h */, - 52FCB72A15B9A21200B76924 /* FBFrictionlessRequestSettings.h */, - 52FCB72B15B9A21200B76924 /* FBLoginDialog.h */, - 52FCB72C15B9A21200B76924 /* FBRequest.h */, - 52FCB72D15B9A21200B76924 /* JSON.h */, - 52FCB72E15B9A21200B76924 /* libfacebook_ios_sdk.a */, - 52FCB72F15B9A21200B76924 /* NSObject+SBJSON.h */, - 52FCB73015B9A21200B76924 /* NSString+SBJSON.h */, - 52FCB73115B9A21200B76924 /* SBJSON.h */, - 52FCB73215B9A21200B76924 /* SBJsonBase.h */, - 52FCB73315B9A21200B76924 /* SBJsonParser.h */, - 52FCB73415B9A21200B76924 /* SBJsonWriter.h */, - ); - name = "facebook-ios-sdk"; - path = "libs/facebook/lib/facebook-ios-sdk"; - sourceTree = SOURCE_ROOT; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1404,7 +979,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = WH; - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0500; }; buildConfigurationList = 5235CC0E155C5FF10095163C /* Build configuration list for PBXProject "WhiteHouseApp" */; compatibilityVersion = "Xcode 3.2"; @@ -1461,12 +1036,8 @@ 5265E72615B865BE00173B1C /* embiggen@2x.png in Resources */, 5265E72915B865CE00173B1C /* shrinkify@2x.png in Resources */, 5265E73715B8B01200173B1C /* AirshipConfig.plist in Resources */, - 5265E84215B8B09B00173B1C /* CHANGELOG in Resources */, - 5265E84415B8B09B00173B1C /* LICENSE in Resources */, - 5265E84515B8B09B00173B1C /* README.rst in Resources */, 52FCB72215B99FA100B76924 /* play@2x.png in Resources */, 52FCB72415B99FD100B76924 /* play.png in Resources */, - 52FCB73515B9A21200B76924 /* FBDialog.bundle in Resources */, 5276752E15BEFEAE00BD9E16 /* photo-loading-image.png in Resources */, 5276752F15BEFEAE00BD9E16 /* photo-loading-image@2x.png in Resources */, 52AB9B1115C33A5100A8624A /* BarButtonBackground.png in Resources */, @@ -1496,7 +1067,7 @@ buildActionMask = 2147483647; files = ( 5235CC25155C5FF10095163C /* main.m in Sources */, - 5235CC29155C5FF10095163C /* WHAppDelegate.m in Sources */, + 5235CC29155C5FF10095163C /* AppDelegate.m in Sources */, 52B84B5D15634E160013E5B9 /* WHBlogViewController.m in Sources */, 52B84B68156353450013E5B9 /* WHFeedItem.m in Sources */, 52B84B6B156355920013E5B9 /* WHFeedParser.m in Sources */, @@ -1649,8 +1220,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; @@ -1663,10 +1239,19 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/libs/Airship", + ); IPHONEOS_DEPLOYMENT_TARGET = 5.1; + ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1677,16 +1262,28 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + ); IPHONEOS_DEPLOYMENT_TARGET = 5.1; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PROVISIONING_PROFILE = ""; @@ -1702,21 +1299,19 @@ buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../FacebookSDK/build\"", - ); + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/libs"; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "WhiteHouseApp/WhiteHouseApp-Prefix.pch"; + GCC_PREFIX_HEADER = "WhiteHouseApp/Prefix.pch"; HEADER_SEARCH_PATHS = ( "\"${SDK_DIR}/usr/include/libxml2\"", - "\"$(SRCROOT)/libs/Airship\"", + "$(SRCROOT)/libs/Airship/**", + "$(SRCROOT)/libs/GoogleAnalytics/**", ); - INFOPLIST_FILE = "WhiteHouseApp/WhiteHouseApp-Info.plist"; + INFOPLIST_FILE = "WhiteHouseApp/Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/libs/Airship\"", - "\"$(SRCROOT)/libs/Google Analytics SDK/Library\"", + "$(SRCROOT)/libs/Airship", + "$(SRCROOT)/libs/GoogleAnalytics", ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1731,21 +1326,19 @@ buildSettings = { CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../FacebookSDK/build\"", - ); + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/libs"; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "WhiteHouseApp/WhiteHouseApp-Prefix.pch"; + GCC_PREFIX_HEADER = "WhiteHouseApp/Prefix.pch"; HEADER_SEARCH_PATHS = ( "\"${SDK_DIR}/usr/include/libxml2\"", - "\"$(SRCROOT)/libs/Airship\"", + "$(SRCROOT)/libs/Airship/**", + "$(SRCROOT)/libs/GoogleAnalytics/**", ); - INFOPLIST_FILE = "WhiteHouseApp/WhiteHouseApp-Info.plist"; + INFOPLIST_FILE = "WhiteHouseApp/Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/libs/Airship\"", - "\"$(SRCROOT)/libs/Google Analytics SDK/Library\"", + "$(SRCROOT)/libs/Airship", + "$(SRCROOT)/libs/GoogleAnalytics", ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/WhiteHouseApp/AirshipConfig.plist b/WhiteHouseApp/AirshipConfig.plist index 1bff139..7ecfeda 100644 --- a/WhiteHouseApp/AirshipConfig.plist +++ b/WhiteHouseApp/AirshipConfig.plist @@ -2,15 +2,15 @@ - DEVELOPMENT_APP_KEY - your development key - DEVELOPMENT_APP_SECRET - your development secret - PRODUCTION_APP_KEY - your production key - PRODUCTION_APP_SECRET - your production secret - APP_STORE_OR_AD_HOC_BUILD - + inProduction + + developmentAppKey + Your Development App Key + developmentAppSecret + Your Development App Secret + productionAppKey + Your Production App Key + productionAppSecret + Your Production App Secret diff --git a/WhiteHouseApp/WHAppDelegate.h b/WhiteHouseApp/AppDelegate.h similarity index 89% rename from WhiteHouseApp/WHAppDelegate.h rename to WhiteHouseApp/AppDelegate.h index 53e6fd7..ebc60cd 100644 --- a/WhiteHouseApp/WHAppDelegate.h +++ b/WhiteHouseApp/AppDelegate.h @@ -25,28 +25,25 @@ */ // -// WHAppDelegate.h +// AppDelegate.h // WhiteHouseApp // // -#import - -#import "Facebook.h" +#import #import "WHRootMenuViewController.h" #import "WHLiveBarController.h" #import "WHRevealViewController.h" #import "WHFeedViewController.h" #import "WHLiveController.h" -@interface WHAppDelegate : UIResponder { +@interface AppDelegate : UIResponder { int liveSectionMenuIndex; } @property (strong, nonatomic) UIWindow *window; @property (nonatomic, strong) WHLiveBarController *liveBarController; -- (void)initFacebook; - (void)shareOnFacebook:(WHFeedItem *)item; @end diff --git a/WhiteHouseApp/WHAppDelegate.m b/WhiteHouseApp/AppDelegate.m similarity index 68% rename from WhiteHouseApp/WHAppDelegate.m rename to WhiteHouseApp/AppDelegate.m index ce19b65..0c7b118 100644 --- a/WhiteHouseApp/WHAppDelegate.m +++ b/WhiteHouseApp/AppDelegate.m @@ -25,12 +25,12 @@ */ // -// WHAppDelegate.m +// AppDelegate.m // WhiteHouseApp // // -#import "WHAppDelegate.h" +#import "AppDelegate.h" #import "WHRootMenuViewController.h" #import "WHFeedCollection.h" @@ -45,17 +45,19 @@ #import "UAPush.h" -@interface WHAppDelegate () +@interface AppDelegate () @property (nonatomic, strong) WHRevealViewController *reveal; @property (nonatomic, strong) WHRootMenuViewController *menu; @property (nonatomic, strong) WHFeedViewController *liveSectionViewController; @property (nonatomic, strong) WHLiveController *liveController; -@property (nonatomic, strong) Facebook *facebook; @property (nonatomic, strong) NSDictionary *pendingNotification; +- (void)initFacebook; +- (void)sessionStateChanged:(FBSession *)session state:(FBSessionState) state error:(NSError *)error; +- (NSDictionary*)parseURLParams:(NSString *)query; @end -@implementation WHAppDelegate +@implementation AppDelegate @synthesize window = _window; @synthesize reveal = _reveal; @@ -63,7 +65,6 @@ @implementation WHAppDelegate @synthesize liveSectionViewController = _liveViewController; @synthesize liveController; @synthesize liveBarController; -@synthesize facebook; @synthesize pendingNotification; - (void)configureAppearance @@ -86,7 +87,7 @@ - (void)configureAppearance - (WHMenuItem *)createMenuItem:(UIViewController *)viewController { UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; - navController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[WHStyle headingFontWithSize:22.0], UITextAttributeFont, nil]; + navController.navigationBar.titleTextAttributes = @{UITextAttributeFont: [WHStyle headingFontWithSize:22.0]}; UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"menu"] style:UIBarButtonItemStylePlain target:self action:@selector(revealToggle:)]; viewController.navigationItem.leftBarButtonItem = menuButton; return [[WHMenuItem alloc] initWithTitle:viewController.title icon:nil viewController:navController]; @@ -136,13 +137,13 @@ - (WHRootMenuViewController *)loadMenu NSDictionary *feedConfig = [self feedConfig]; - NSArray *menuItemsConfig = [feedConfig objectForKey:@"feeds"]; + NSArray *menuItemsConfig = feedConfig[@"feeds"]; int currentIndex = 0; for (NSDictionary *itemConfig in menuItemsConfig) { - NSString *title = [itemConfig objectForKey:@"title"]; - NSURL *feedURL = [NSURL URLWithString:[itemConfig objectForKey:@"feed-url"]]; - NSString *viewType = [itemConfig objectForKey:@"view-type"]; + NSString *title = itemConfig[@"title"]; + NSURL *feedURL = [NSURL URLWithString:itemConfig[@"feed-url"]]; + NSString *viewType = itemConfig[@"view-type"]; WHFeed *feed = nil; if (feedURL) { @@ -157,7 +158,7 @@ - (WHRootMenuViewController *)loadMenu if ([viewType isEqualToString:@"article-list"]) { if (NIIsPad()) { WHReaderViewController *reader = [[WHReaderViewController alloc] initWithFeed:feed]; - NSNumber *showAuthor = [itemConfig objectForKey:@"show-author"]; + NSNumber *showAuthor = itemConfig[@"show-author"]; reader.showAuthor = [showAuthor boolValue]; viewController = reader; } else { @@ -205,18 +206,21 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [self configureAppearance]; - // configure Google Analytics NSString *accountID = AppConfig(@"GANAccountID"); - GANTracker *tracker = [GANTracker sharedTracker]; + [GAI sharedInstance].dispatchInterval = 30; + + id tracker = [[GAI sharedInstance] trackerWithTrackingId:accountID]; + tracker.anonymize = YES; + [tracker sendView:@"/LAUNCH"]; - // do not send full IP addresses - tracker.anonymizeIp = YES; - [tracker startTrackerWithAccountID:accountID dispatchPeriod:30 delegate:nil]; - [tracker trackPageview:@"/LAUNCH" withError:nil]; + // check for cached facebook session + if (FBSession.activeSession.state == FBSessionStateCreatedTokenLoaded) { + [self initFacebook]; + } self.menu = [self loadMenu]; - UIViewController *defaultViewController = [[self.menu.menuItems objectAtIndex:0] viewController]; + UIViewController *defaultViewController = [(self.menu.menuItems)[0] viewController]; self.reveal = [[WHRevealViewController alloc] initWithMenuViewController:self.menu contentViewController:defaultViewController]; self.window.rootViewController = self.reveal; @@ -226,7 +230,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( self.menu.selectedMenuItemIndex = 0; // notifications MUST be handled after the menu is loaded - NSDictionary *note = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; + NSDictionary *note = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]; if (note) { [self handleNotification:note]; } @@ -243,22 +247,24 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( return YES; } - -- (void)initAirship:(UIApplication *)application -{ - [UAirship takeOff:[NSDictionary dictionary]]; - - // Register for notifications - [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | - UIRemoteNotificationTypeSound | - UIRemoteNotificationTypeAlert)]; +- (void)applicationDidBecomeActive:(UIApplication *)application { + [FBAppEvents activateApp]; + [FBSession.activeSession handleDidBecomeActive]; } - - (void)applicationWillTerminate:(UIApplication *)application { - [UAirship land]; + [FBSession.activeSession close]; } +- (void)initAirship:(UIApplication *)application +{ + [UAirship takeOff]; + + // Register for notifications + [UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge | + UIRemoteNotificationTypeSound | + UIRemoteNotificationTypeAlert); +} #pragma mark Push notification handling @@ -288,9 +294,9 @@ - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotif #ifdef DEBUG - (void)testNotification { - NSDictionary *aps = [NSDictionary dictionaryWithObjectsAndKeys:@"test DEBUG", @"alert", nil]; - NSDictionary *custom = [NSDictionary dictionaryWithObjectsAndKeys:@"http://google.com", @"video-url", nil]; - NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:aps, @"aps", custom, @"wh", nil]; + NSDictionary *aps = @{@"alert": @"test DEBUG"}; + NSDictionary *custom = @{@"video-url": @"http://google.com"}; + NSDictionary *userInfo = @{@"aps": aps, @"wh": custom}; [self application:[UIApplication sharedApplication] didReceiveRemoteNotification:userInfo]; } #endif @@ -298,15 +304,15 @@ - (void)testNotification + (id)customDataForNotification:(NSDictionary *)userInfo { - return [userInfo objectForKey:@"wh"]; + return userInfo[@"wh"]; } - (void)handleNotification:(NSDictionary *)userInfo { NSDictionary *custom = [[self class] customDataForNotification:userInfo]; - NSString *notificationURLString = [custom objectForKey:@"video-url"]; - if ([[custom objectForKey:@"action"] isEqualToString:@"go-live"] || notificationURLString != nil) { + NSString *notificationURLString = custom[@"video-url"]; + if ([custom[@"action"] isEqualToString:@"go-live"] || notificationURLString != nil) { self.menu.selectedMenuItemIndex = liveSectionMenuIndex; if (notificationURLString) { @@ -339,7 +345,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N self.pendingNotification = userInfo; // the aps.alert value is the only text displayed (the alert has no title) - NSString *message = [[userInfo objectForKey:@"aps"] objectForKey:@"alert"]; + NSString *message = userInfo[@"aps"][@"alert"]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:message @@ -349,7 +355,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N // if there's a video URL or action, the alert should have a "View" button NSDictionary *custom = [[self class] customDataForNotification:userInfo]; - if ([custom objectForKey:@"video-url"] || [custom objectForKey:@"action"]) + if (custom[@"video-url"] || custom[@"action"]) { [alert addButtonWithTitle:NSLocalizedString(@"PushNotificationViewButton", @"A button to view the content of a push notification")]; } @@ -381,102 +387,102 @@ - (void)revealToggle:(id)sender [self.reveal setMenuVisible:YES wantsFullWidth:NO]; } +//#pragma mark - Facebook methods -#pragma mark - Facebook methods - - -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { - return [self.facebook handleOpenURL:url]; +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation { + return [FBSession.activeSession handleOpenURL:url]; } - - (void)initFacebook { - if (self.facebook) { - return; - } - - NSString *fbID = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FacebookAppID"]; - if (fbID) { - // facebook - self.facebook = [[Facebook alloc] initWithAppId:fbID andDelegate:self]; - } - - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - if ([defaults objectForKey:@"FBAccessTokenKey"] - && [defaults objectForKey:@"FBExpirationDateKey"]) { - self.facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"]; - self.facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"]; - } - - self.facebook.sessionDelegate = self; - - [self.facebook authorize:nil]; -} - - -- (void)updateFacebookToken:(NSString *)accessToken expiresAt:(NSDate *)expiresAt -{ - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - [defaults setObject:accessToken forKey:@"FBAccessTokenKey"]; - [defaults setObject:expiresAt forKey:@"FBExpirationDateKey"]; - [defaults synchronize]; -} - - -- (void)fbDidLogin -{ - [self updateFacebookToken:facebook.accessToken expiresAt:facebook.expirationDate]; -} - - -- (void)fbDidNotLogin:(BOOL)cancelled -{ - NSLog(@"User did not log in to Facebook"); -} - - -- (void)fbDidLogout -{ - NSLog(@"User did log out from Facebook"); + [FBSession openActiveSessionWithReadPermissions:nil + allowLoginUI:NO + completionHandler: + ^(FBSession *session, + FBSessionState state, NSError *error) { + [self sessionStateChanged:session state:state error:error]; + }]; } - -- (void)fbSessionInvalidated +- (void)sessionStateChanged:(FBSession *)session + state:(FBSessionState)state + error:(NSError *)error { - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - [defaults removeObjectForKey:@"FBAccessTokenKey"]; - [defaults removeObjectForKey:@"FBExpirationDateKey"]; - [defaults synchronize]; + switch (state) { + case FBSessionStateOpen: + NSLog(@"User has logged in to Facebook (or cached token was available)"); + break; + case FBSessionStateOpenTokenExtended: + NSLog(@"Facebook token has been extended"); + break; + case FBSessionStateClosedLoginFailed: + NSLog(@"Facebook login attempt failed"); + [FBSession.activeSession closeAndClearTokenInformation]; + break; + case FBSessionStateClosed: + NSLog(@"Facebook session was closed"); + break; + default: + break; + } + + if (error) { + NSLog(@"Facebook session state change error: %@", error.localizedDescription); + } } - -- (void)fbDidExtendToken:(NSString*)accessToken - expiresAt:(NSDate*)expiresAt -{ - [self updateFacebookToken:accessToken expiresAt:expiresAt]; +- (NSDictionary*)parseURLParams:(NSString *)query { + NSArray *pairs = [query componentsSeparatedByString:@"&"]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; + for (NSString *pair in pairs) { + NSArray *kv = [pair componentsSeparatedByString:@"="]; + NSString *val = [kv[1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + params[kv[0]] = val; + } + return params; } - - (void)shareOnFacebook:(WHFeedItem *)item { - [self initFacebook]; - NSMutableDictionary *sharingParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:[item.link absoluteString], @"link", item.title, @"name", nil]; + if (!FBSession.activeSession.isOpen) { + [self initFacebook]; + } + + NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:[item.link absoluteString], @"link", item.title, @"name", nil]; // look for pictures in the post WHMediaElement *media = [item bestContentForWidth:0]; - if (media == nil) { media = [item bestThumbnailForWidth:0]; } - if (media) { - [sharingParams setObject:[media.URL absoluteString] forKey:@"picture"]; + params[@"picture"] = [media.URL absoluteString]; } - - [self.facebook dialog:@"feed" andParams:sharingParams andDelegate:self]; + + [FBWebDialogs presentFeedDialogModallyWithSession:nil + parameters:params + handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) { + if (error) { + // Error launching the dialog or publishing story + NSLog(@"Error publishing Facebook story: %@", error.localizedDescription); + return; + } + if (result == FBWebDialogResultDialogNotCompleted) { + // User clicked the "x" icon + NSLog(@"User canceled Facebook story publishing"); + return; + } + NSDictionary *urlParams = [self parseURLParams:[resultURL query]]; + if (![urlParams valueForKey:@"post_id"]) { + // User clicked the Cancel button + NSLog(@"User canceled Facebook story publishing"); + return; + } + NSLog(@"Posted Facebook story, id: %@", [urlParams valueForKey:@"post_id"]); + }]; } - @end diff --git a/WhiteHouseApp/WhiteHouseApp-Info.plist b/WhiteHouseApp/Info.plist similarity index 93% rename from WhiteHouseApp/WhiteHouseApp-Info.plist rename to WhiteHouseApp/Info.plist index d3c7f72..1890d37 100644 --- a/WhiteHouseApp/WhiteHouseApp-Info.plist +++ b/WhiteHouseApp/Info.plist @@ -32,7 +32,9 @@ CFBundleVersion 1010 FacebookAppID - Your Facebook App ID + Your Facebook app ID + FacebookDisplayName + Your Facebook app display name LSRequiresIPhoneOS UIPrerenderedIcon diff --git a/WhiteHouseApp/NSArray+WHAdditions.h b/WhiteHouseApp/NSArray+WHAdditions.h index b420489..bce0d60 100644 --- a/WhiteHouseApp/NSArray+WHAdditions.h +++ b/WhiteHouseApp/NSArray+WHAdditions.h @@ -30,8 +30,6 @@ // // -#import - @interface NSArray (WHAdditions) /** diff --git a/WhiteHouseApp/WhiteHouseApp-Prefix.pch b/WhiteHouseApp/Prefix.pch similarity index 95% rename from WhiteHouseApp/WhiteHouseApp-Prefix.pch rename to WhiteHouseApp/Prefix.pch index a0abd0f..b92cd17 100644 --- a/WhiteHouseApp/WhiteHouseApp-Prefix.pch +++ b/WhiteHouseApp/Prefix.pch @@ -12,7 +12,8 @@ #import #import #import "NimbusCore.h" - #import "GANTracker.h" + #import "GAI.h" + #import "GAITracker.h" #import "UAirship.h" #import "WHStyle.h" #import "NSArray+WHAdditions.h" diff --git a/WhiteHouseApp/UIViewController+WHFeedItemPresentation.h b/WhiteHouseApp/UIViewController+WHFeedItemPresentation.h index b3f880d..bd9f826 100644 --- a/WhiteHouseApp/UIViewController+WHFeedItemPresentation.h +++ b/WhiteHouseApp/UIViewController+WHFeedItemPresentation.h @@ -30,8 +30,6 @@ // // -#import - @class WHFeedItem; @interface UIViewController (WHFeedItemPresentation) diff --git a/WhiteHouseApp/UIViewController+WHFeedItemPresentation.m b/WhiteHouseApp/UIViewController+WHFeedItemPresentation.m index a86dbce..6ece67d 100644 --- a/WhiteHouseApp/UIViewController+WHFeedItemPresentation.m +++ b/WhiteHouseApp/UIViewController+WHFeedItemPresentation.m @@ -48,7 +48,7 @@ - (NSString *)trackingPathComponent - (void)displayFeedItem:(WHFeedItem *)item { - [[GANTracker sharedTracker] trackPageview:[NSString stringWithFormat:@"%@/%@", [self trackingPathComponent], [item trackingPathCompontent]] withError:nil]; + [[[GAI sharedInstance] defaultTracker] sendView:[NSString stringWithFormat:@"%@/%@", [self trackingPathComponent], [item trackingPathCompontent]]]; if (item.enclosureURL) { NSString *host = item.enclosureURL.host; @@ -80,9 +80,9 @@ - (void)unregister - (void)movieFinished:(NSNotification *)notification { DebugLog(@"movie finished: %@", notification.userInfo); - NSInteger reason = [[notification.userInfo objectForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; + NSInteger reason = [(notification.userInfo)[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; if (reason == MPMovieFinishReasonPlaybackError) { - NSError *error = [notification.userInfo objectForKey:@"error"]; + NSError *error = (notification.userInfo)[@"error"]; NSString *errorTitle = NSLocalizedString(@"VideoErrorTitle", @"Title for video playback error alert"); NSString *localizedErrorMessage = NSLocalizedString(@"VideoErrorMessage", @"Error shown when video fails to play"); diff --git a/WhiteHouseApp/WHAppConfig.h b/WhiteHouseApp/WHAppConfig.h index 3289321..e28bc20 100644 --- a/WhiteHouseApp/WHAppConfig.h +++ b/WhiteHouseApp/WHAppConfig.h @@ -30,8 +30,6 @@ // // -#import - /** * Represents the configuration found in AppConfig.plist, made * globally available through a shared instance diff --git a/WhiteHouseApp/WHAppConfig.m b/WhiteHouseApp/WHAppConfig.m index 3033899..473a05c 100644 --- a/WhiteHouseApp/WHAppConfig.m +++ b/WhiteHouseApp/WHAppConfig.m @@ -81,7 +81,7 @@ + (WHAppConfig *)sharedAppConfig - (id)objectForKey:(NSString *)key { - id result = [self.config objectForKey:key]; + id result = (self.config)[key]; if (!result) { [NSException raise:NSGenericException format:@"No value found for config key: %@", key]; } diff --git a/WhiteHouseApp/WHArticleViewController.h b/WhiteHouseApp/WHArticleViewController.h index 58a00f0..fe50aa9 100644 --- a/WhiteHouseApp/WHArticleViewController.h +++ b/WhiteHouseApp/WHArticleViewController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeedItem.h" @interface WHArticleViewController : UIViewController diff --git a/WhiteHouseApp/WHArticleViewController.m b/WhiteHouseApp/WHArticleViewController.m index c35e406..0a0ceac 100644 --- a/WhiteHouseApp/WHArticleViewController.m +++ b/WhiteHouseApp/WHArticleViewController.m @@ -32,7 +32,7 @@ #import "WHArticleViewController.h" -#import "WHAppDelegate.h" +#import "AppDelegate.h" #import "NIWebController.h" #import "WHSharingUtilities.h" @@ -89,13 +89,13 @@ - (void)loadArticleContent NSString *dateString = [dateFormatter stringFromDate:self.feedItem.pubDate]; NSMutableDictionary *pageInfo = [NSMutableDictionary dictionary]; - [pageInfo setObject:self.feedItem.descriptionHTML forKey:@"description"]; - [pageInfo setObject:[self.feedItem.link absoluteString] forKey:@"link"]; - [pageInfo setObject:self.feedItem.title forKey:@"title"]; - [pageInfo setObject:dateString forKey:@"date"]; - [pageInfo setObject:[NSNumber numberWithInt:[self.feedItem.pubDate timeIntervalSince1970]] forKey:@"timestamp"]; - [pageInfo setObject:self.feedItem.creator forKey:@"creator"]; - [pageInfo setObject:AppConfig(@"ArticleBaseURL") forKey:@"baseURL"]; + pageInfo[@"description"] = self.feedItem.descriptionHTML; + pageInfo[@"link"] = [self.feedItem.link absoluteString]; + pageInfo[@"title"] = self.feedItem.title; + pageInfo[@"date"] = dateString; + pageInfo[@"timestamp"] = [NSNumber numberWithInt:[self.feedItem.pubDate timeIntervalSince1970]]; + pageInfo[@"creator"] = self.feedItem.creator; + pageInfo[@"baseURL"] = AppConfig(@"ArticleBaseURL"); NSError *error = nil; NSData *pageInfoData = [NSJSONSerialization dataWithJSONObject:pageInfo options:0 error:&error]; @@ -173,7 +173,7 @@ - (void)viewDidLoad UIBarButtonItem *itemSmaller = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"shrinkify"] style:UIBarButtonItemStylePlain target:self action:@selector(textDown)]; UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; UIBarButtonItem *branding = [[UIBarButtonItem alloc] initWithCustomView:[self brandingView]]; - self.toolbar.items = [NSArray arrayWithObjects:item, itemSmaller, space, branding, space, nil]; + self.toolbar.items = @[item, itemSmaller, space, branding, space]; [self.view addSubview:self.toolbar]; diff --git a/WhiteHouseApp/WHBlogViewController.h b/WhiteHouseApp/WHBlogViewController.h index a0c2e56..134c8a6 100644 --- a/WhiteHouseApp/WHBlogViewController.h +++ b/WhiteHouseApp/WHBlogViewController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeedViewController.h" #import "WHArticleViewController.h" #import "NimbusNetworkImage.h" diff --git a/WhiteHouseApp/WHBlogViewController.m b/WhiteHouseApp/WHBlogViewController.m index 5836ae9..ba6a7dc 100644 --- a/WhiteHouseApp/WHBlogViewController.m +++ b/WhiteHouseApp/WHBlogViewController.m @@ -80,8 +80,9 @@ @implementation WHBlogViewController - (void)viewDidLoad { [super viewDidLoad]; + WHBlogViewController * __weak weakSelf = self; [self.tableView addPullToRefreshWithActionHandler:^{ - [self.feed fetch]; + [weakSelf.feed fetch]; }]; } @@ -107,7 +108,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - WHFeedItem *item = [[self.postsByDate objectAtIndex:section] firstObject]; + WHFeedItem *item = [(self.postsByDate)[section] firstObject]; NSDate *day = DayFromDate(item.pubDate); NSDate *today = DayFromDate([NSDate date]); @@ -127,12 +128,12 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [[self.postsByDate objectAtIndex:section] count]; + return [(self.postsByDate)[section] count]; } - (WHFeedItem *)feedItemForRowAtIndexPath:(NSIndexPath *)indexPath { - return [[self.postsByDate objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + return (self.postsByDate)[indexPath.section][indexPath.row]; } - (NSURL *)thumbnailURLForItem:(WHFeedItem *)item diff --git a/WhiteHouseApp/WHFavoritesViewController.h b/WhiteHouseApp/WHFavoritesViewController.h index 3931bc3..5be4f5c 100644 --- a/WhiteHouseApp/WHFavoritesViewController.h +++ b/WhiteHouseApp/WHFavoritesViewController.h @@ -30,8 +30,6 @@ // // -#import - @interface WHFavoritesViewController : UIViewController @end diff --git a/WhiteHouseApp/WHFavoritesViewController.m b/WhiteHouseApp/WHFavoritesViewController.m index 885779c..dc5d8b5 100644 --- a/WhiteHouseApp/WHFavoritesViewController.m +++ b/WhiteHouseApp/WHFavoritesViewController.m @@ -63,7 +63,7 @@ - (void)reloadFavorites DebugLog(@"Feed %@ has %i favorites", feed.feedURL, favorites.count); if ([favorites count]) { [feedsWithFavorites addObject:feed]; - [favoritesDict setObject:favorites forKey:feed.feedURL]; + favoritesDict[feed.feedURL] = favorites; } } @@ -141,14 +141,14 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - return ((WHFeed *)[self.sections objectAtIndex:section]).title; + return ((WHFeed *)(self.sections)[section]).title; } - (NSArray *)favesForSection:(NSInteger)section { - WHFeed *feed = [self.sections objectAtIndex:section]; - NSArray *itemArray = [[self.favoritesDict objectForKey:feed.feedURL] allObjects]; + WHFeed *feed = (self.sections)[section]; + NSArray *itemArray = [(self.favoritesDict)[feed.feedURL] allObjects]; return [itemArray sortedArrayUsingComparator:^NSComparisonResult(WHFeedItem *a, WHFeedItem *b) { return [b.pubDate compare:a.pubDate]; }]; @@ -157,7 +157,7 @@ - (NSArray *)favesForSection:(NSInteger)section - (WHFeedItem *)favoriteForRowAtIndexPath:(NSIndexPath *)indexPath { - return [[self favesForSection:indexPath.section] objectAtIndex:indexPath.row]; + return [self favesForSection:indexPath.section][indexPath.row]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section diff --git a/WhiteHouseApp/WHFeed.h b/WhiteHouseApp/WHFeed.h index bc6af93..d4a5bbf 100644 --- a/WhiteHouseApp/WHFeed.h +++ b/WhiteHouseApp/WHFeed.h @@ -30,7 +30,6 @@ // // -#import #import "WHFeedParser.h" /** diff --git a/WhiteHouseApp/WHFeedCache.h b/WhiteHouseApp/WHFeedCache.h index c681d89..9de3cd3 100644 --- a/WhiteHouseApp/WHFeedCache.h +++ b/WhiteHouseApp/WHFeedCache.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeed.h" #import "WHFeedItem.h" #import "sqlite3.h" diff --git a/WhiteHouseApp/WHFeedCache.m b/WhiteHouseApp/WHFeedCache.m index 7e9809a..30b2ced 100644 --- a/WhiteHouseApp/WHFeedCache.m +++ b/WhiteHouseApp/WHFeedCache.m @@ -92,7 +92,7 @@ - (NSURL *)databaseFileURL { NSFileManager *fileManager = [[NSFileManager alloc] init]; NSArray *paths = [fileManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask]; - NSURL *directoryURL = [paths objectAtIndex:0]; + NSURL *directoryURL = paths[0]; if (![fileManager fileExistsAtPath:directoryURL.path]) { [fileManager createDirectoryAtURL:directoryURL withIntermediateDirectories:YES attributes:nil error:nil]; } @@ -104,7 +104,7 @@ - (void)open { NSURL *fileURL =[self databaseFileURL]; NSError *backupExclusionError = nil; - if (![fileURL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&backupExclusionError]) { + if (![fileURL setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:&backupExclusionError]) { NSLog(@"Could not exclude DB from backup: %@", backupExclusionError.userInfo); } diff --git a/WhiteHouseApp/WHFeedCollection.h b/WhiteHouseApp/WHFeedCollection.h index a72798c..d7cf483 100644 --- a/WhiteHouseApp/WHFeedCollection.h +++ b/WhiteHouseApp/WHFeedCollection.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeed.h" /** diff --git a/WhiteHouseApp/WHFeedCollection.m b/WhiteHouseApp/WHFeedCollection.m index 9c98b72..ef9414e 100644 --- a/WhiteHouseApp/WHFeedCollection.m +++ b/WhiteHouseApp/WHFeedCollection.m @@ -64,10 +64,10 @@ - (id)init - (WHFeed *)feedForURL:(NSURL *)feedURL { - WHFeed *controller = [self.feeds objectForKey:feedURL]; + WHFeed *controller = (self.feeds)[feedURL]; if (controller == nil) { controller = [[WHFeed alloc] initWithFeedURL:feedURL]; - [self.feeds setObject:controller forKey:feedURL]; + (self.feeds)[feedURL] = controller; } return controller; diff --git a/WhiteHouseApp/WHFeedItem.h b/WhiteHouseApp/WHFeedItem.h index 14780a4..358fd16 100644 --- a/WhiteHouseApp/WHFeedItem.h +++ b/WhiteHouseApp/WHFeedItem.h @@ -30,8 +30,6 @@ // // -#import - /** * Represents the RSS , and elements */ diff --git a/WhiteHouseApp/WHFeedItem.m b/WhiteHouseApp/WHFeedItem.m index 5180477..5a3112c 100644 --- a/WhiteHouseApp/WHFeedItem.m +++ b/WhiteHouseApp/WHFeedItem.m @@ -123,7 +123,7 @@ - (void)encodeWithCoder:(NSCoder *)aCoder ENCODE_PROPERTY(mediaContents); ENCODE_PROPERTY(enclosureURL); ENCODE_PROPERTY(feedURL); - [aCoder encodeObject:[NSNumber numberWithBool:self.isFavorited] forKey:@"isFavorited"]; + [aCoder encodeObject:@(self.isFavorited) forKey:@"isFavorited"]; } #define DECODE_PROPERTY(name) self.name = [aDecoder decodeObjectForKey:@#name] diff --git a/WhiteHouseApp/WHFeedParser.h b/WhiteHouseApp/WHFeedParser.h index 09b227f..238a8aa 100644 --- a/WhiteHouseApp/WHFeedParser.h +++ b/WhiteHouseApp/WHFeedParser.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeedItem.h" typedef void (^ WHFeedParserCallback)(WHFeedItem *item); diff --git a/WhiteHouseApp/WHFeedParser.m b/WhiteHouseApp/WHFeedParser.m index 3aea798..d7a954d 100644 --- a/WhiteHouseApp/WHFeedParser.m +++ b/WhiteHouseApp/WHFeedParser.m @@ -95,7 +95,7 @@ - (void)parse:(WHFeedParserCallback)callback { - (NSString *)tagPath { NSMutableString *path = [NSMutableString string]; for (NSDictionary *context in self.tagStack) { - [path appendFormat:@"/%@", [context objectForKey:@"elementName"]]; + [path appendFormat:@"/%@", context[@"elementName"]]; } return path; } @@ -103,11 +103,9 @@ - (NSString *)tagPath { - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { - NSDictionary *tag = [NSDictionary dictionaryWithObjectsAndKeys: - elementName, @"elementName", - [NSMutableString string], @"text", - attributeDict, @"attributes", - nil]; + NSDictionary *tag = @{@"elementName": elementName, + @"text": [NSMutableString string], + @"attributes": attributeDict}; // push tag onto stack [self.tagStack addObject:tag]; @@ -119,17 +117,17 @@ - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName nam - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { - [[[self.tagStack lastObject] objectForKey:@"text"] appendString:string]; + [[self.tagStack lastObject][@"text"] appendString:string]; } - (WHMediaElement *)mediaElementFromAttributes:(NSDictionary *)attrs { WHMediaElement *media = [WHMediaElement new]; - NSString *stringURL = [attrs objectForKey:@"url"]; + NSString *stringURL = attrs[@"url"]; media.URL = [NSURL URLWithString:stringURL]; - media.size = CGSizeMake([[attrs objectForKey:@"width"] floatValue], [[attrs objectForKey:@"height"] floatValue]); - media.type = [attrs objectForKey:@"type"]; + media.size = CGSizeMake([attrs[@"width"] floatValue], [attrs[@"height"] floatValue]); + media.type = attrs[@"type"]; return media; } @@ -138,8 +136,8 @@ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName names { NSString *tagPath = [self tagPath]; NSDictionary *context = [self.tagStack lastObject]; - NSDictionary *attrs = [context objectForKey:@"attributes"]; - NSString *text = [context objectForKey:@"text"]; + NSDictionary *attrs = context[@"attributes"]; + NSString *text = context[@"text"]; if ([tagPath isEqualToString:@"/rss/channel/item"]) { self.callbackBlock(self.currentItem); @@ -167,13 +165,13 @@ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName names } else if ([tagPath hasSuffix:@"item/media:content"]) { [self.currentItem addMediaContent:[self mediaElementFromAttributes:attrs]]; } else if ([tagPath hasSuffix:@"item/enclosure"]) { - self.currentItem.enclosureURL = [NSURL URLWithString:[[context objectForKey:@"attributes"] objectForKey:@"url"]]; + self.currentItem.enclosureURL = [NSURL URLWithString:context[@"attributes"][@"url"]]; } else if ([tagPath hasSuffix:@"item/category"]) { NSArray *categories = self.currentItem.categories; if (categories) { self.currentItem.categories = [categories arrayByAddingObject:text]; } else { - self.currentItem.categories = [NSArray arrayWithObject:text]; + self.currentItem.categories = @[text]; } } else if ([tagPath hasSuffix:@"item/pubDate"]) { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; diff --git a/WhiteHouseApp/WHFeedViewController.h b/WhiteHouseApp/WHFeedViewController.h index 6ccb330..688c2f9 100644 --- a/WhiteHouseApp/WHFeedViewController.h +++ b/WhiteHouseApp/WHFeedViewController.h @@ -30,8 +30,6 @@ // // -#import - #import "UIViewController+WHFeedItemPresentation.h" #import "WHLiveBarController.h" #import "WHPullDownView.h" diff --git a/WhiteHouseApp/WHFeedViewController.m b/WhiteHouseApp/WHFeedViewController.m index 54553e9..398a291 100644 --- a/WhiteHouseApp/WHFeedViewController.m +++ b/WhiteHouseApp/WHFeedViewController.m @@ -36,7 +36,7 @@ #import "WHLiveBarController.h" #import "WHFeedCollection.h" #import "WHLiveController.h" -#import "WHAppDelegate.h" +#import "AppDelegate.h" #import "CustomBadge.h" NSDate *DayFromDate(NSDate *date) @@ -115,7 +115,7 @@ - (void)showLivePopover:(id)sender [self.popover dismissPopoverAnimated:YES]; self.popover = nil; } else { - WHLiveBarController *liveBarController = ((WHAppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; + WHLiveBarController *liveBarController = ((AppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; WHLivePopoverViewController *live = [[WHLivePopoverViewController alloc] initWithNibName:nil bundle:nil]; live.items = liveBarController.items; live.parentFeedViewController = self; @@ -154,7 +154,7 @@ - (void)addLiveButton [button sizeToFit]; // add our handy-dandy badge - WHLiveBarController *liveBarController = ((WHAppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; + WHLiveBarController *liveBarController = ((AppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; NSInteger n = liveBarController.items.count; NSString *badgeString = [NSString stringWithFormat:@"%i", n]; @@ -245,10 +245,10 @@ - (void)feedChanged:(NSNotification *)notification - (void)viewWillAppear:(BOOL)animated { - [[GANTracker sharedTracker] trackPageview:[self trackingPathComponent] withError:nil]; + [[[GAI sharedInstance] defaultTracker] sendView:[self trackingPathComponent]]; // get the root/shared live bar controller - WHLiveBarController *liveBarController = ((WHAppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; + WHLiveBarController *liveBarController = ((AppDelegate *)[UIApplication sharedApplication].delegate).liveBarController; [liveBarController.liveBarView removeFromSuperview]; if (!self.isLiveBarHidden) { diff --git a/WhiteHouseApp/WHLiveBarController.h b/WhiteHouseApp/WHLiveBarController.h index d6493dc..d4a699e 100644 --- a/WhiteHouseApp/WHLiveBarController.h +++ b/WhiteHouseApp/WHLiveBarController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHPullDownView.h" extern NSString * const WHLiveBarWillAppearNotification; diff --git a/WhiteHouseApp/WHLiveBarController.m b/WhiteHouseApp/WHLiveBarController.m index 840c8a0..5067472 100644 --- a/WhiteHouseApp/WHLiveBarController.m +++ b/WhiteHouseApp/WHLiveBarController.m @@ -75,7 +75,7 @@ - (WHPullDownView *)liveBarView - (void)setTitleLabel { if (self.items.count == 1) { - self.liveBarTitleLabel.text = [[self.items objectAtIndex:0] title]; + self.liveBarTitleLabel.text = [(self.items)[0] title]; } else if (self.items.count > 1) { self.liveBarTitleLabel.text = [NSString stringWithFormat:NSLocalizedString(@"LiveBarTitleFormat", @"%i events live now"), self.items.count]; } @@ -85,7 +85,7 @@ - (void)setTitleLabel - (void)liveFeedChanged:(NSNotification *)notification { DebugLog(@"got live items"); - self.items = [notification.userInfo objectForKey:WHLiveEventsChangedLiveItemsKey]; + self.items = (notification.userInfo)[WHLiveEventsChangedLiveItemsKey]; if (self.items.count) { [[NSNotificationCenter defaultCenter] postNotificationName:WHLiveBarWillAppearNotification object:self]; [self show]; @@ -217,7 +217,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.detailTextLabel.text = NSLocalizedString(@"LiveBarPrompting", @"Tap to watch now"); } - WHFeedItem *item = [self.items objectAtIndex:indexPath.row]; + WHFeedItem *item = (self.items)[indexPath.row]; cell.textLabel.text = item.title; return cell; @@ -231,7 +231,7 @@ - (void)deselect:(NSIndexPath *)path - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSelector:@selector(deselect:) withObject:indexPath afterDelay:0.01]; - WHFeedItem *item = [self.items objectAtIndex:indexPath.row]; + WHFeedItem *item = (self.items)[indexPath.row]; if (item.enclosureURL) { DebugLog(@"Playing video at %@", item.enclosureURL); @@ -251,9 +251,9 @@ - (void)unregister - (void)movieFinished:(NSNotification *)notification { DebugLog(@"movie finished: %@", notification.userInfo); - NSInteger reason = [[notification.userInfo objectForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; + NSInteger reason = [(notification.userInfo)[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; if (reason == MPMovieFinishReasonPlaybackError) { - NSError *error = [notification.userInfo objectForKey:@"error"]; + NSError *error = (notification.userInfo)[@"error"]; NSString *msg = NSLocalizedString(@"VideoErrorMessage", @"There was a problem playing this video. Please try again later."); NSString *errorMessage = [NSString stringWithFormat:@"%@\n\n(%@)", msg, [error localizedDescription]]; diff --git a/WhiteHouseApp/WHLiveController.h b/WhiteHouseApp/WHLiveController.h index aeabfad..24fbc88 100644 --- a/WhiteHouseApp/WHLiveController.h +++ b/WhiteHouseApp/WHLiveController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeed.h" extern NSString * const WHLiveEventsChangedNotification; diff --git a/WhiteHouseApp/WHLiveController.m b/WhiteHouseApp/WHLiveController.m index 9b92d6d..ab7d3f5 100644 --- a/WhiteHouseApp/WHLiveController.m +++ b/WhiteHouseApp/WHLiveController.m @@ -76,7 +76,7 @@ - (void)liveFeedChanged:(NSNotification *)notification DebugLog(@"%i items are actually live", liveItems.count); // show the live bar - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:liveItems forKey:WHLiveEventsChangedLiveItemsKey]; + NSDictionary *userInfo = @{WHLiveEventsChangedLiveItemsKey: liveItems}; [[NSNotificationCenter defaultCenter] postNotificationName:WHLiveEventsChangedNotification object:self userInfo:userInfo]; } diff --git a/WhiteHouseApp/WHLivePopoverViewController.h b/WhiteHouseApp/WHLivePopoverViewController.h index e129a71..2f30682 100644 --- a/WhiteHouseApp/WHLivePopoverViewController.h +++ b/WhiteHouseApp/WHLivePopoverViewController.h @@ -30,8 +30,6 @@ // // -#import - @interface WHLivePopoverViewController : UITableViewController @property (nonatomic, strong) NSArray *items; @property (nonatomic, strong) UIPopoverController *popoverController; diff --git a/WhiteHouseApp/WHLivePopoverViewController.m b/WhiteHouseApp/WHLivePopoverViewController.m index 5162920..c6fd5b1 100644 --- a/WhiteHouseApp/WHLivePopoverViewController.m +++ b/WhiteHouseApp/WHLivePopoverViewController.m @@ -88,7 +88,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.detailTextLabel.text = @"Tap to watch now"; } - WHFeedItem *item = [self.items objectAtIndex:indexPath.row]; + WHFeedItem *item = (self.items)[indexPath.row]; cell.textLabel.text = item.title; return cell; @@ -104,7 +104,7 @@ - (void)deselect:(NSIndexPath *)path - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSelector:@selector(deselect:) withObject:indexPath afterDelay:0.01]; - WHFeedItem *item = [self.items objectAtIndex:indexPath.row]; + WHFeedItem *item = (self.items)[indexPath.row]; if (item.enclosureURL) { DebugLog(@"Playing video at %@", item.enclosureURL); @@ -126,9 +126,9 @@ - (void)unregister - (void)movieFinished:(NSNotification *)notification { DebugLog(@"movie finished: %@", notification.userInfo); - NSInteger reason = [[notification.userInfo objectForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; + NSInteger reason = [(notification.userInfo)[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; if (reason == MPMovieFinishReasonPlaybackError) { - NSError *error = [notification.userInfo objectForKey:@"error"]; + NSError *error = (notification.userInfo)[@"error"]; NSString *msg = NSLocalizedString(@"VideoErrorMessage", @"There was a problem playing this video. Please try again later."); NSString *errorMessage = [NSString stringWithFormat:@"%@\n\n(%@)", msg, [error localizedDescription]]; diff --git a/WhiteHouseApp/WHMenuItem.h b/WhiteHouseApp/WHMenuItem.h index d70c746..9f1da0c 100644 --- a/WhiteHouseApp/WHMenuItem.h +++ b/WhiteHouseApp/WHMenuItem.h @@ -30,8 +30,6 @@ // // -#import - @interface WHMenuItem : NSObject @property NSString *title; diff --git a/WhiteHouseApp/WHPhotoGalleryViewController.h b/WhiteHouseApp/WHPhotoGalleryViewController.h index bcebaf8..2a8935b 100644 --- a/WhiteHouseApp/WHPhotoGalleryViewController.h +++ b/WhiteHouseApp/WHPhotoGalleryViewController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeedViewController.h" #import "WHFeed.h" #import "NimbusPhotos.h" diff --git a/WhiteHouseApp/WHPhotoGalleryViewController.m b/WhiteHouseApp/WHPhotoGalleryViewController.m index ad94642..a02d06f 100644 --- a/WhiteHouseApp/WHPhotoGalleryViewController.m +++ b/WhiteHouseApp/WHPhotoGalleryViewController.m @@ -80,8 +80,9 @@ - (void)calculateThumbnailSizes { - (void)viewDidLoad { [super viewDidLoad]; + WHPhotoGalleryViewController * __weak weakSelf = self; [self.tableView addPullToRefreshWithActionHandler:^{ - [self.feed fetch]; + [weakSelf.feed fetch]; }]; self.tableView.pullToRefreshView.textColor = [UIColor lightGrayColor]; @@ -155,7 +156,7 @@ - (WHFeedItem *)feedItemForRow:(NSInteger)row column:(NSInteger)col { int itemIndex = (row * _thumbnailsPerRow) + col; if (itemIndex < self.posts.count) { - return [self.posts objectAtIndex:itemIndex]; + return (self.posts)[itemIndex]; } return nil; @@ -203,7 +204,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)displayFeedItem:(WHFeedItem *)feedItem { - [[GANTracker sharedTracker] trackPageview:[NSString stringWithFormat:@"%@/%@", [self trackingPathComponent], [feedItem trackingPathCompontent]] withError:nil]; + [[[GAI sharedInstance] defaultTracker] sendView:[NSString stringWithFormat:@"%@/%@", [self trackingPathComponent], [feedItem trackingPathCompontent]]]; // handle the image selection here WHPhotoViewController *photoView = [[WHPhotoViewController alloc] initWithNibName:nil bundle:nil]; diff --git a/WhiteHouseApp/WHPhotoViewController.m b/WhiteHouseApp/WHPhotoViewController.m index 89f293a..b1ed526 100644 --- a/WhiteHouseApp/WHPhotoViewController.m +++ b/WhiteHouseApp/WHPhotoViewController.m @@ -71,7 +71,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)share:(id)sender { - WHFeedItem *item = [self.feedItems objectAtIndex:self.photoAlbumView.centerPageIndex]; + WHFeedItem *item = (self.feedItems)[self.photoAlbumView.centerPageIndex]; [self.sharing share:item]; } @@ -103,7 +103,7 @@ - (NSString *)cacheKeyForPhotoAtIndex:(NSInteger)photoIndex - (void)loadPhotoAtIndex:(NSInteger)photoIndex { - WHFeedItem *item = [self.feedItems objectAtIndex:photoIndex]; + WHFeedItem *item = (self.feedItems)[photoIndex]; WHMediaElement *mediaContent = [item bestContentForWidth:[UIScreen mainScreen].bounds.size.width]; NINetworkRequestOperation *loadOp = [[NINetworkRequestOperation alloc] initWithURL:mediaContent.URL]; loadOp.tag = photoIndex; @@ -119,7 +119,7 @@ - (void)loadPhotoAtIndex:(NSInteger)photoIndex - (void)loadThumbnailAtIndex:(NSInteger)photoIndex { - WHFeedItem *item = [self.feedItems objectAtIndex:photoIndex]; + WHFeedItem *item = (self.feedItems)[photoIndex]; // get the smallest thumbnail available WHMediaElement *mediaContent = [item bestThumbnailForWidth:0]; @@ -165,7 +165,7 @@ - (UIImage *)photoAlbumScrollView:(NIPhotoAlbumScrollView *)photoAlbumScrollView photoScrollView.zoomingAboveOriginalSizeIsEnabled = [self.photoAlbumView isZoomingAboveOriginalSizeEnabled]; WHCaptionedPhotoView* captionedView = (WHCaptionedPhotoView *)pageView; - WHFeedItem *item = [[self feedItems] objectAtIndex:pageIndex]; + WHFeedItem *item = [self feedItems][pageIndex]; [captionedView setCaption:item.descriptionText]; if (self.isChromeHidden) { diff --git a/WhiteHouseApp/WHPullDownView.h b/WhiteHouseApp/WHPullDownView.h index 899774b..2e9a1ec 100644 --- a/WhiteHouseApp/WHPullDownView.h +++ b/WhiteHouseApp/WHPullDownView.h @@ -30,8 +30,6 @@ // // -#import - /** * This pull-down view manages two subviews to present an interface that allows * a user to pull down the handle to display content. diff --git a/WhiteHouseApp/WHReaderPanelView.h b/WhiteHouseApp/WHReaderPanelView.h index ab179e0..ae73742 100644 --- a/WhiteHouseApp/WHReaderPanelView.h +++ b/WhiteHouseApp/WHReaderPanelView.h @@ -30,11 +30,8 @@ // // -#import - #import "WHFeedItem.h" - /** * Displays a single feed item in a panel suitable for a grid layout */ diff --git a/WhiteHouseApp/WHReaderViewController.m b/WhiteHouseApp/WHReaderViewController.m index 04ea9ab..a0f461d 100644 --- a/WhiteHouseApp/WHReaderViewController.m +++ b/WhiteHouseApp/WHReaderViewController.m @@ -81,8 +81,9 @@ - (void)viewDidLoad self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1.0]; + WHReaderViewController * __weak weakSelf = self; [self.tableView addPullToRefreshWithActionHandler:^{ - [self.feed fetch]; + [weakSelf.feed fetch]; }]; } @@ -158,7 +159,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N int itemIndex = (indexPath.row * READER_PANELS_PER_ROW) + ii; if (itemIndex < self.posts.count) { [panel setHidden:NO]; - WHFeedItem *item = [self.posts objectAtIndex:itemIndex]; + WHFeedItem *item = (self.posts)[itemIndex]; panel.feedItem = item; UITapGestureRecognizer *tapper = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(itemTapped:)]; diff --git a/WhiteHouseApp/WHRemoteFile.h b/WhiteHouseApp/WHRemoteFile.h index b336321..cdce1a7 100644 --- a/WhiteHouseApp/WHRemoteFile.h +++ b/WhiteHouseApp/WHRemoteFile.h @@ -30,12 +30,8 @@ // // -#import - - typedef BOOL (^ValidatorBlock)(NSData *remoteData); - /** * Represents a file backed by a local bundle resource and a remote * URL. The file data is loaded from either a cache of the remote diff --git a/WhiteHouseApp/WHRemoteFile.m b/WhiteHouseApp/WHRemoteFile.m index d5d8b88..7d8b9cb 100644 --- a/WhiteHouseApp/WHRemoteFile.m +++ b/WhiteHouseApp/WHRemoteFile.m @@ -57,7 +57,7 @@ - (NSString *)cacheDirectoryPath { NSFileManager *fm = [[NSFileManager alloc] init]; NSArray *appSupportURLs = [fm URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask]; - NSURL *directoryURL = [appSupportURLs objectAtIndex:0]; + NSURL *directoryURL = appSupportURLs[0]; NSString *directoryPath = [directoryURL path]; if (![fm fileExistsAtPath:directoryPath]) { DebugLog(@"Creating app support directory"); diff --git a/WhiteHouseApp/WHRevealViewController.h b/WhiteHouseApp/WHRevealViewController.h index acf0eb3..9628281 100644 --- a/WhiteHouseApp/WHRevealViewController.h +++ b/WhiteHouseApp/WHRevealViewController.h @@ -30,8 +30,6 @@ // // -#import - @interface WHRevealViewController : UIViewController @property (nonatomic, retain) UIViewController *contentViewController; diff --git a/WhiteHouseApp/WHRootMenuViewController.h b/WhiteHouseApp/WHRootMenuViewController.h index 286eba9..908b880 100644 --- a/WhiteHouseApp/WHRootMenuViewController.h +++ b/WhiteHouseApp/WHRootMenuViewController.h @@ -30,8 +30,6 @@ // // -#import - #import "WHMenuItem.h" #import "WHSearchController.h" diff --git a/WhiteHouseApp/WHRootMenuViewController.m b/WhiteHouseApp/WHRootMenuViewController.m index 26ae540..20f0c13 100644 --- a/WhiteHouseApp/WHRootMenuViewController.m +++ b/WhiteHouseApp/WHRootMenuViewController.m @@ -73,7 +73,7 @@ - (void)setSelectedMenuItemIndex:(NSUInteger)selectedMenuItemIndex _selectedMenuItemIndex = selectedMenuItemIndex; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:selectedMenuItemIndex inSection:0]; [self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; - self.revealViewController.contentViewController = [[self.menuItems objectAtIndex:indexPath.row] viewController]; + self.revealViewController.contentViewController = [(self.menuItems)[indexPath.row] viewController]; [self.revealViewController setMenuVisible:NO wantsFullWidth:NO]; } @@ -191,8 +191,8 @@ - (UITableViewCell *)searchResultsTableView:(UITableView *)tableView cellForRowA cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } - NSDictionary *searchItem = [self.searchController.results objectAtIndex:indexPath.row]; - cell.textLabel.text = [[searchItem objectForKey:@"title"] stringByRemovingSearchHighlight]; + NSDictionary *searchItem = (self.searchController.results)[indexPath.row]; + cell.textLabel.text = [searchItem[@"title"] stringByRemovingSearchHighlight]; return cell; } @@ -229,7 +229,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.accessoryView = [DTCustomColoredAccessory accessoryWithColor:cell.textLabel.textColor]; } - WHMenuItem *item = [self.menuItems objectAtIndex:indexPath.row]; + WHMenuItem *item = (self.menuItems)[indexPath.row]; cell.textLabel.text = item.title; return cell; @@ -246,7 +246,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath { DebugLog(@"selected row %i", indexPath.row); if (tableView == self.tableView) { - self.revealViewController.contentViewController = [[self.menuItems objectAtIndex:indexPath.row] viewController]; + self.revealViewController.contentViewController = [(self.menuItems)[indexPath.row] viewController]; [self.revealViewController setMenuVisible:NO wantsFullWidth:NO]; } else { NIWebController *browser = [[NIWebController alloc] initWithNibName:nil bundle:nil]; @@ -262,8 +262,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath [self.searchDisplayController setActive:NO]; [self.revealViewController setMenuVisible:NO wantsFullWidth:NO]; - NSDictionary *searchItem = [self.searchController.results objectAtIndex:indexPath.row]; - NSURL *theURL = [NSURL URLWithString:[searchItem objectForKey:@"unescapedUrl"]]; + NSDictionary *searchItem = (self.searchController.results)[indexPath.row]; + NSURL *theURL = [NSURL URLWithString:searchItem[@"unescapedUrl"]]; DebugLog(@"theURL = %@", theURL); [browser openURL:theURL]; diff --git a/WhiteHouseApp/WHSearchController.h b/WhiteHouseApp/WHSearchController.h index 4ec36e9..86988a0 100644 --- a/WhiteHouseApp/WHSearchController.h +++ b/WhiteHouseApp/WHSearchController.h @@ -30,8 +30,6 @@ // // -#import - @class WHSearchController; /** diff --git a/WhiteHouseApp/WHSearchController.m b/WhiteHouseApp/WHSearchController.m index d55d59d..97cd21e 100644 --- a/WhiteHouseApp/WHSearchController.m +++ b/WhiteHouseApp/WHSearchController.m @@ -84,11 +84,12 @@ - (void)fetchResults NINetworkRequestOperation *op = [[NINetworkRequestOperation alloc] initWithURL:searchURL]; // this block will be called with the operation itself + NINetworkRequestOperation * __weak weakOp = op; op.didFinishBlock = ^(id obj) { // cast it to access network-op-specific properties - id result = [NSJSONSerialization JSONObjectWithData:op.data options:0 error:nil]; + id result = [NSJSONSerialization JSONObjectWithData:weakOp.data options:0 error:nil]; DebugLog(@"API result = %@", result); - id results = [result objectForKey:@"results"]; + id results = result[@"results"]; if (results && [results respondsToSelector:@selector(objectAtIndex:)]) { if (self.results) { self.results = [self.results arrayByAddingObjectsFromArray:results]; diff --git a/WhiteHouseApp/WHSharingUtilities.h b/WhiteHouseApp/WHSharingUtilities.h index b91f7fd..fa451f1 100644 --- a/WhiteHouseApp/WHSharingUtilities.h +++ b/WhiteHouseApp/WHSharingUtilities.h @@ -30,7 +30,6 @@ // // -#import #import #import diff --git a/WhiteHouseApp/WHSharingUtilities.m b/WhiteHouseApp/WHSharingUtilities.m index a4e7664..f9d499b 100644 --- a/WhiteHouseApp/WHSharingUtilities.m +++ b/WhiteHouseApp/WHSharingUtilities.m @@ -32,7 +32,7 @@ #import "WHSharingUtilities.h" -#import "WHAppDelegate.h" +#import "AppDelegate.h" #import "WHFeedCache.h" typedef enum { @@ -96,7 +96,7 @@ - (void)tweetArticle - (void)shareOnFacebook { - WHAppDelegate *appDelegate = (WHAppDelegate *)[UIApplication sharedApplication].delegate; + AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; [appDelegate shareOnFacebook:self.feedItem]; } @@ -117,25 +117,25 @@ - (void)share:(WHFeedItem *)item NSMutableArray *actions = [NSMutableArray array]; NSString *safariTitle = NSLocalizedString(@"ShareSafari", @"Title for safari button in sharing action sheet"); - [actions addObject:[NSNumber numberWithInt:ArticleActionSafari]]; + [actions addObject:@(ArticleActionSafari)]; [sheet addButtonWithTitle:safariTitle]; if ([MFMailComposeViewController canSendMail]) { NSString *mailTitle = NSLocalizedString(@"ShareEmail", @"Title for email button in sharing action sheet"); - [actions addObject:[NSNumber numberWithInt:ArticleActionEmail]]; + [actions addObject:@(ArticleActionEmail)]; [sheet addButtonWithTitle:mailTitle]; } NSString *tweetTitle = NSLocalizedString(@"ShareTwitter", @"Title for twitter button in sharing action sheet"); - [actions addObject:[NSNumber numberWithInt:ArticleActionTweet]]; + [actions addObject:@(ArticleActionTweet)]; [sheet addButtonWithTitle:tweetTitle]; NSString *facebook = NSLocalizedString(@"ShareFacebook", @"Title for facebook button in sharing action sheet"); - [actions addObject:[NSNumber numberWithInt:ArticleActionFacebook]]; + [actions addObject:@(ArticleActionFacebook)]; [sheet addButtonWithTitle:facebook]; NSString *favoriteTitle = NSLocalizedString(@"AddToFavorites", @"Title for favorites button in sharing action sheet"); - [actions addObject:[NSNumber numberWithInt:ArticleActionFavorite]]; + [actions addObject:@(ArticleActionFavorite)]; [sheet addButtonWithTitle:favoriteTitle]; [sheet addButtonWithTitle:@"Cancel"]; @@ -153,7 +153,7 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger return; } - int actionID = [[self.actions objectAtIndex:buttonIndex] intValue]; + int actionID = [(self.actions)[buttonIndex] intValue]; switch (actionID) { case ArticleActionSafari: diff --git a/WhiteHouseApp/WHStyle.h b/WhiteHouseApp/WHStyle.h index 016672b..6e027e0 100644 --- a/WhiteHouseApp/WHStyle.h +++ b/WhiteHouseApp/WHStyle.h @@ -30,8 +30,6 @@ // // -#import - @interface WHStyle : NSObject + (UIFont *)headingFontWithSize:(CGFloat)size; diff --git a/WhiteHouseApp/WHThumbnailView.h b/WhiteHouseApp/WHThumbnailView.h index faff7aa..905ea53 100644 --- a/WhiteHouseApp/WHThumbnailView.h +++ b/WhiteHouseApp/WHThumbnailView.h @@ -30,8 +30,6 @@ // // -#import - #import "WHFeedItem.h" typedef void (^FeedItemBlock)(WHFeedItem *); diff --git a/WhiteHouseApp/WHThumbnailView.m b/WhiteHouseApp/WHThumbnailView.m index 4098f40..bd7caf9 100644 --- a/WhiteHouseApp/WHThumbnailView.m +++ b/WhiteHouseApp/WHThumbnailView.m @@ -76,7 +76,7 @@ - (void)configureEffects [layer insertSublayer:self.gradient atIndex:0]; } self.gradient.frame = self.bounds; - self.gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0.9 alpha:1.0] CGColor], (id)[[UIColor whiteColor] CGColor], nil]; + self.gradient.colors = @[(id)[[UIColor colorWithWhite:0.9 alpha:1.0] CGColor], (id)[[UIColor whiteColor] CGColor]]; // set up the drop shadow layer.shadowOffset = CGSizeMake(0, 3.0); diff --git a/WhiteHouseApp/WHTrendyView.h b/WhiteHouseApp/WHTrendyView.h index 0c63d8b..9515df4 100644 --- a/WhiteHouseApp/WHTrendyView.h +++ b/WhiteHouseApp/WHTrendyView.h @@ -30,8 +30,6 @@ // // -#import - /** * Displays a radial gradient with a subtle texture over a background color. */ diff --git a/WhiteHouseApp/WHVideoViewController.m b/WhiteHouseApp/WHVideoViewController.m index 9c77f57..a18790a 100644 --- a/WhiteHouseApp/WHVideoViewController.m +++ b/WhiteHouseApp/WHVideoViewController.m @@ -86,7 +86,7 @@ - (void)longPress:(UILongPressGestureRecognizer *)recognizer DebugLog(@"Long press detected..."); UITableViewCell *cell = (UITableViewCell *)recognizer.view; NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; - WHFeedItem *item = [[self.postsByDate objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + WHFeedItem *item = (self.postsByDate)[indexPath.section][indexPath.row]; [self.sharing share:item]; } } diff --git a/WhiteHouseApp/WHXMLUtils.h b/WhiteHouseApp/WHXMLUtils.h index e725dd1..46645f3 100644 --- a/WhiteHouseApp/WHXMLUtils.h +++ b/WhiteHouseApp/WHXMLUtils.h @@ -30,8 +30,6 @@ // // -#import - /** * A utility class for handling misc. XML parsing and extraction tasks. */ diff --git a/WhiteHouseApp/WHYouTubePlayerViewController.h b/WhiteHouseApp/WHYouTubePlayerViewController.h index 52b618a..64fe749 100644 --- a/WhiteHouseApp/WHYouTubePlayerViewController.h +++ b/WhiteHouseApp/WHYouTubePlayerViewController.h @@ -30,8 +30,6 @@ // // -#import - @interface WHYouTubePlayerViewController : UIViewController - (id)initWithVideoURL:(NSURL *)videoURL; diff --git a/WhiteHouseApp/config.json b/WhiteHouseApp/config.json index f787daa..c96e2ca 100644 --- a/WhiteHouseApp/config.json +++ b/WhiteHouseApp/config.json @@ -3,27 +3,27 @@ { "title":"BLOG", "view-type":"article-list", - "feed-url":"http://example.com/feed/mobile/blog" + "feed-url":"http://whitehouse.gov/feed/mobile/blog" }, { "title":"PRESS RELEASES", "view-type":"article-list", - "feed-url":"http://example.com/feed/mobile/press" + "feed-url":"http://whitehouse.gov/feed/press" }, { "title":"PHOTOS", "view-type":"photo-gallery", - "feed-url":"http://example.com/feed/mobile/photos" + "feed-url":"http://whitehouse.gov/feed/mobile/photos" }, { "title":"VIDEOS", "view-type":"video-gallery", - "feed-url":"http://example.com/feed/mobile/video" + "feed-url":"http://whitehouse.gov/feed/mobile/video" }, { "title":"LIVE", "view-type":"live", - "feed-url":"http://example.com/feed/mobile/live" + "feed-url":"http://whitehouse.gov/feed/mobile/live" } ] } diff --git a/WhiteHouseApp/main.m b/WhiteHouseApp/main.m index dfc07f1..5a8dda2 100644 --- a/WhiteHouseApp/main.m +++ b/WhiteHouseApp/main.m @@ -30,13 +30,11 @@ // // -#import - -#import "WHAppDelegate.h" +#import "AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([WHAppDelegate class])); + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } diff --git a/libs/.gitignore b/libs/.gitignore index 0afeffa..ff8d055 100644 --- a/libs/.gitignore +++ b/libs/.gitignore @@ -1,2 +1,3 @@ Airship/ -Google Analytics SDK/ +GoogleAnalytics/ +FacebookSDK.framework diff --git a/libs/facebook b/libs/facebook deleted file mode 160000 index af2fc3b..0000000 --- a/libs/facebook +++ /dev/null @@ -1 +0,0 @@ -Subproject commit af2fc3b98c045a6a4aa3b76681d8ff7e8aa7f69a