Skip to content

Commit

Permalink
Merge pull request #176 from ZeusWPI/ios/google-analytics-update
Browse files Browse the repository at this point in the history
Updated google analytics to 3.0 library
  • Loading branch information
feliciaan committed Sep 8, 2014
2 parents 6963567 + b325abc commit ed78978
Show file tree
Hide file tree
Showing 21 changed files with 186 additions and 93 deletions.
48 changes: 9 additions & 39 deletions iOS/Hydra-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-Small-iOS7</string>
<string>Icon-Small-iOS6</string>
<string>Icon-iOS7</string>
<string>Icon-iOS6</string>
<string>Icon.png</string>
<string>[email protected]</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
<key>Icon already includes gloss effects</key>
<true/>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>Icon already includes gloss effects</key>
<true/>
</dict>
<key>CFBundleIdentifier</key>
<string>be.ugent.zeus.${PRODUCT_NAME:rfc1034identifier}${CUSTOM_IDENTIFIER_SUFFIX}</string>
Expand All @@ -34,7 +27,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -47,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.69</string>
<string>1.1.4</string>
<key>FacebookAppID</key>
<string>146947948791011</string>
<key>LSRequiresIPhoneOS</key>
Expand All @@ -56,29 +49,6 @@
<array>
<string>audio</string>
</array>
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageName</key>
<string>ios7-Default</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{320, 568}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageName</key>
<string>ios7-Default</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{320, 480}</string>
</dict>
</array>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarHidden</key>
Expand Down
12 changes: 10 additions & 2 deletions iOS/Hydra.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
904BC46D17E2014A0000FED6 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 904BC46917E2014A0000FED6 /* [email protected] */; };
906C1D8917C8A4A600145CD3 /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 906C1D8817C8A4A600145CD3 /* MapViewController.m */; };
908DFF03188E932D00D526DC /* Pods-acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 908DFF02188E932D00D526DC /* Pods-acknowledgements.plist */; };
908E536519BE4F3900F1DA57 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 908E536419BE4F3900F1DA57 /* Images.xcassets */; };
90B1029717A85E9200669CCD /* kalender.css in Resources */ = {isa = PBXBuildFile; fileRef = 90B1029617A85E9200669CCD /* kalender.css */; };
90BAB266162749BD0043BA92 /* SchamperDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BAB265162749BC0043BA92 /* SchamperDetailViewController.m */; };
90C532AB16A325A200857EB0 /* FacebookEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 90C532AA16A325A200857EB0 /* FacebookEvent.m */; };
Expand Down Expand Up @@ -251,6 +252,7 @@
906C1D8717C8A4A600145CD3 /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = "<group>"; };
906C1D8817C8A4A600145CD3 /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = "<group>"; };
908DFF02188E932D00D526DC /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = "<group>"; };
908E536419BE4F3900F1DA57 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
90B1029617A85E9200669CCD /* kalender.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = kalender.css; sourceTree = "<group>"; };
90BAB264162749BC0043BA92 /* SchamperDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchamperDetailViewController.h; sourceTree = "<group>"; };
90BAB265162749BC0043BA92 /* SchamperDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SchamperDetailViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -856,6 +858,7 @@
F5EBF11F159E09C700EB5D26 /* Models */,
3B93FBA01630942500C962DC /* Services */,
F59CEE9716A189290038FD24 /* Social */,
908E536419BE4F3900F1DA57 /* Images.xcassets */,
);
path = Hydra;
sourceTree = "<group>";
Expand Down Expand Up @@ -1097,6 +1100,7 @@
F5BC3D8E162EBB5100E4A902 /* [email protected] in Resources */,
F5D3B612162EF02F00698C3E /* button-feedback.png in Resources */,
F5D3B613162EF02F00698C3E /* [email protected] in Resources */,
908E536519BE4F3900F1DA57 /* Images.xcassets in Resources */,
F533DABA16315E87001269A8 /* schamper.css in Resources */,
F533DABC163163E2001269A8 /* schamper-bg.png in Resources */,
F557EA46163431FC00635CDD /* [email protected] in Resources */,
Expand Down Expand Up @@ -1374,14 +1378,16 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 24046D4357E2426386B31283 /* Pods.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CUSTOM_BUNDLE_DISPLAY_NAME = "${PRODUCT_NAME} β";
CUSTOM_IDENTIFIER_SUFFIX = "-dev";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Hydra/Hydra-Prefix.pch";
INFOPLIST_FILE = "Hydra-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
Expand All @@ -1392,14 +1398,16 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 24046D4357E2426386B31283 /* Pods.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CUSTOM_BUNDLE_DISPLAY_NAME = "${PRODUCT_NAME}";
CUSTOM_IDENTIFIER_SUFFIX = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Hydra/Hydra-Prefix.pch";
INFOPLIST_FILE = "Hydra-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
Expand Down
18 changes: 11 additions & 7 deletions iOS/Hydra/ActivitiesController.m
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,11 @@ - (BOOL) filterActivity:(AssociationActivity*)activity fromString:(NSString*)sea
[activity.association.internalName rangeOfString:searchString options:option].location != NSNotFound) {
return YES;
}
for(NSString* categorie in activity.categories){
if([categorie rangeOfString:searchString options:option].location != NSNotFound){
return YES;
if (![activity.categories isEqual: @[[NSNull null]]]) {
for(NSString* categorie in activity.categories){
if([categorie rangeOfString:searchString options:option].location != NSNotFound){
return YES;
}
}
}
return NO;
Expand Down Expand Up @@ -419,12 +421,14 @@ - (AssociationActivity *)activityAfter:(AssociationActivity *)current
- (void)didSelectActivity:(AssociationActivity *)activity
{
NSDate *day = [activity.start dateAtStartOfDay];
NSUInteger row = [self.data[day] indexOfObject:activity];
NSUInteger section = [self.days indexOfObject:day];
NSUInteger row = [self.data[day] indexOfObject:activity];

NSIndexPath *selection = [NSIndexPath indexPathForRow:row inSection:section];
[self.tableView selectRowAtIndexPath:selection animated:NO
scrollPosition:UITableViewScrollPositionNone];
if (row != NSNotFound) {
NSIndexPath *selection = [NSIndexPath indexPathForRow:row inSection:section];
[self.tableView selectRowAtIndexPath:selection animated:NO
scrollPosition:UITableViewScrollPositionNone];
}
}

#pragma mark - Date button and UIPickerView
Expand Down
20 changes: 14 additions & 6 deletions iOS/Hydra/ActivityDetailController.m
Original file line number Diff line number Diff line change
Expand Up @@ -695,17 +695,25 @@ - (void)enableSegments:(UISegmentedControl *)control

- (void)segmentTapped:(UISegmentedControl *)control
{
AssociationActivity *activity;
if (control.selectedSegmentIndex == 0) {
self.activity = [self.listDelegate activityBefore:self.activity];
activity = [self.listDelegate activityBefore:self.activity];
}
else {
self.activity = [self.listDelegate activityAfter:self.activity];
activity = [self.listDelegate activityAfter:self.activity];
}

if (activity != nil) {
self.activity = activity;
[self reloadData];
[self enableSegments:control];
[self viewDidAppear:NO]; // Trigger analytics
[self.listDelegate didSelectActivity:self.activity];
} else {
[self enableSegments:control]; // disables segments
}

[self reloadData];
[self enableSegments:control];
[self viewDidAppear:NO]; // Trigger analytics
[self.listDelegate didSelectActivity:self.activity];

}

#pragma mark - Notifications
Expand Down
2 changes: 1 addition & 1 deletion iOS/Hydra/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
gai.trackUncaughtExceptions = YES;
gai.dispatchInterval = 30;
gai.defaultTracker = [gai trackerWithTrackingId:kGoogleAnalyticsToken];
gai.debug = DEBUG;
gai.defaultTracker.allowIDFACollection = NO;
#endif

#if DEBUG
Expand Down
9 changes: 7 additions & 2 deletions iOS/Hydra/Hydra-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <GAI.h>
#import <GAIDictionaryBuilder.h>
#import <GAIFields.h>
#import "UIColor+AppColors.h"
#endif

#define PUBLIC_RELEASE 0
#define PUBLIC_RELEASE 1
#define BETA_RELEASE !PUBLIC_RELEASE

#if PUBLIC_RELEASE
Expand All @@ -32,7 +34,10 @@
#endif

#if GoogleAnalyticsEnabled
#define GAI_Track(screen) [[GAI sharedInstance].defaultTracker trackView:(screen)];
#define GAI_Track(screen) { id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker]; \
[tracker set:kGAIScreenName value:screen]; \
[tracker send:[[GAIDictionaryBuilder createAppView] build]];\
}
#else
#define GAI_Track(screen) do { } while (0)
#endif
Expand Down
44 changes: 44 additions & 0 deletions iOS/Hydra/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"images" : [
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon-iOS6.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small-iOS6.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions iOS/Hydra/Images.xcassets/LaunchImage.launchimage/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"minimum-system-version" : "7.0",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default.png",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"subtype" : "retina4",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions iOS/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '5.0'
platform :ios, '6.0'

pod 'GoogleAnalytics-iOS-SDK', '~> 3.0'
pod 'TestFlightSDK', '~> 2.0'
Expand All @@ -12,4 +12,4 @@ pod 'RKXMLReaderSerialization', :podspec => 'External/RKXMLReaderSerialization.p
pod 'TUSafariActivity', :podspec => 'External/TUSafariActivity.podspec'
pod 'SMPageControl', '~> 1.1'
pod 'Reachability', '~> 3.1.1'
pod 'VTAcknowledgementsViewController', '~> 0.6'
pod 'VTAcknowledgementsViewController', '~> 0.6'
Loading

0 comments on commit ed78978

Please sign in to comment.