-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev
- Loading branch information
Showing
586 changed files
with
460,269 additions
and
172 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
import Foundation | ||
import Google | ||
import FirebaseAnalytics | ||
|
||
class AnalyticsManager | ||
{ | ||
enum FroobAction:String | ||
{ | ||
case plusClose = "Plus/Close" | ||
case plusStore = "Plus/Store" | ||
} | ||
|
||
enum StoreAction:String | ||
{ | ||
case purchase = "Purchase" | ||
case restore = "Restore" | ||
} | ||
|
||
enum ShareAction:String | ||
{ | ||
case solutionImageComplete = "Solution/Image/Complete" | ||
case solutionImageStep = "Solution/Image/Step" | ||
case solutionTextComplete = "Solution/Text/Complete" | ||
case solutionTextStep = "Solution/Text/Step" | ||
case plot = "Plot" | ||
case app = "App" | ||
} | ||
|
||
static let sharedInstance:AnalyticsManager? = AnalyticsManager() | ||
private let kEventShare:String = "Share" | ||
private let kEventFroob:String = "Froob" | ||
private let kEventStore:String = "Store" | ||
private let kEventValue:NSNumber = 1 | ||
private let kDispatchInterval:TimeInterval = 30 | ||
|
||
private init?() | ||
{ | ||
var configurationError:NSError? | ||
|
||
GGLContext.sharedInstance().configureWithError(&configurationError) | ||
|
||
if let configurationError:NSError = configurationError | ||
{ | ||
print(configurationError.localizedDescription) | ||
|
||
return nil | ||
} | ||
} | ||
|
||
//MARK: public | ||
|
||
func startAnalytics() | ||
{ | ||
guard | ||
|
||
let gai:GAI = GAI.sharedInstance() | ||
|
||
else | ||
{ | ||
return | ||
} | ||
|
||
#if DEBUG | ||
|
||
gai.dryRun = true | ||
|
||
#endif | ||
|
||
gai.trackUncaughtExceptions = true | ||
gai.logger.logLevel = GAILogLevel.none | ||
gai.dispatchInterval = kDispatchInterval | ||
} | ||
|
||
func trackScreen(screen:UIViewController) | ||
{ | ||
DispatchQueue.global(qos:DispatchQoS.QoSClass.background).async | ||
{ | ||
guard | ||
|
||
let tracker:GAITracker = GAI.sharedInstance().defaultTracker | ||
|
||
else | ||
{ | ||
return | ||
} | ||
|
||
let screenName:String = String(describing:type(of:screen)) | ||
tracker.set(kGAIScreenName, value:screenName) | ||
let screenBuild:[NSObject:AnyObject] = GAIDictionaryBuilder.createScreenView().build() as [NSObject:AnyObject] | ||
tracker.send(screenBuild) | ||
} | ||
} | ||
|
||
func trackShare(action:ShareAction) | ||
{ | ||
DispatchQueue.global(qos:DispatchQoS.QoSClass.background).async | ||
{ | ||
guard | ||
|
||
let tracker:GAITracker = GAI.sharedInstance().defaultTracker | ||
|
||
else | ||
{ | ||
return | ||
} | ||
|
||
let eventBuild:[NSObject:AnyObject] = GAIDictionaryBuilder.createEvent( | ||
withCategory:self.kEventShare, | ||
action:action.rawValue, | ||
label:nil, | ||
value:self.kEventValue).build() as [NSObject:AnyObject] | ||
tracker.send(eventBuild) | ||
} | ||
} | ||
|
||
func trackFroob(action:FroobAction) | ||
{ | ||
DispatchQueue.global(qos:DispatchQoS.QoSClass.background).async | ||
{ | ||
guard | ||
|
||
let tracker:GAITracker = GAI.sharedInstance().defaultTracker | ||
|
||
else | ||
{ | ||
return | ||
} | ||
|
||
let eventBuild:[NSObject:AnyObject] = GAIDictionaryBuilder.createEvent( | ||
withCategory:self.kEventFroob, | ||
action:action.rawValue, | ||
label:nil, | ||
value:self.kEventValue).build() as [NSObject:AnyObject] | ||
tracker.send(eventBuild) | ||
} | ||
} | ||
|
||
func trackStore(action:StoreAction, purchase:String?) | ||
{ | ||
DispatchQueue.global(qos:DispatchQoS.QoSClass.background).async | ||
{ | ||
guard | ||
|
||
let tracker:GAITracker = GAI.sharedInstance().defaultTracker | ||
|
||
else | ||
{ | ||
return | ||
} | ||
|
||
let eventBuild:[NSObject:AnyObject] = GAIDictionaryBuilder.createEvent( | ||
withCategory:self.kEventStore, | ||
action:action.rawValue, | ||
label:purchase, | ||
value:self.kEventValue).build() as [NSObject:AnyObject] | ||
tracker.send(eventBuild) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>TRACKING_ID</key> | ||
<string>UA-72037850-13</string> | ||
<key>PLIST_VERSION</key> | ||
<string>1</string> | ||
<key>BUNDLE_ID</key> | ||
<string>iturbide.GaussSquad</string> | ||
<key>PROJECT_ID</key> | ||
<string>gausssquad</string> | ||
<key>IS_ADS_ENABLED</key> | ||
<false/> | ||
<key>IS_ANALYTICS_ENABLED</key> | ||
<true/> | ||
<key>IS_APPINVITE_ENABLED</key> | ||
<false/> | ||
<key>IS_GCM_ENABLED</key> | ||
<false/> | ||
<key>IS_SIGNIN_ENABLED</key> | ||
<false/> | ||
<key>GOOGLE_APP_ID</key> | ||
<string>1:966306692171:ios:73b8f0ab078eff11</string> | ||
</dict> | ||
</plist> |
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericBackWhite.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericBackWhite.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericBackWhite@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericBackWhite@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+203 Bytes
...ssets/generic.xcassets/assetGenericBackWhite.imageset/assetGenericBackWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+374 Bytes
...ts/generic.xcassets/assetGenericBackWhite.imageset/assetGenericBackWhite@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+479 Bytes
...ts/generic.xcassets/assetGenericBackWhite.imageset/assetGenericBackWhite@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericImportCalculator.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericImportCalculator.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericImportCalculator@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericImportCalculator@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+892 Bytes
...xcassets/assetGenericImportCalculator.imageset/assetGenericImportCalculator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.63 KB
...ssets/assetGenericImportCalculator.imageset/assetGenericImportCalculator@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.23 KB
...ssets/assetGenericImportCalculator.imageset/assetGenericImportCalculator@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericScanner.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericScanner.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericScanner@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericScanner@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+2.37 KB
...ad/Assets/generic.xcassets/assetGenericScanner.imageset/assetGenericScanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.31 KB
...Assets/generic.xcassets/assetGenericScanner.imageset/assetGenericScanner@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.12 KB
...Assets/generic.xcassets/assetGenericScanner.imageset/assetGenericScanner@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericShoot.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericShoot.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericShoot@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericShoot@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+1.09 KB
...sSquad/Assets/generic.xcassets/assetGenericShoot.imageset/assetGenericShoot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.3 KB
...uad/Assets/generic.xcassets/assetGenericShoot.imageset/assetGenericShoot@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.5 KB
...uad/Assets/generic.xcassets/assetGenericShoot.imageset/assetGenericShoot@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericThumb.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumb.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumb@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumb@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+294 Bytes
...sSquad/Assets/generic.xcassets/assetGenericThumb.imageset/assetGenericThumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+648 Bytes
...uad/Assets/generic.xcassets/assetGenericThumb.imageset/assetGenericThumb@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1008 Bytes
...uad/Assets/generic.xcassets/assetGenericThumb.imageset/assetGenericThumb@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericThumbSelected.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumbSelected.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumbSelected@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericThumbSelected@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+1.27 KB
...neric.xcassets/assetGenericThumbSelected.imageset/assetGenericThumbSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.7 KB
...ic.xcassets/assetGenericThumbSelected.imageset/assetGenericThumbSelected@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.22 KB
...ic.xcassets/assetGenericThumbSelected.imageset/assetGenericThumbSelected@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericTuring.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericTuring.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericTuring@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericTuring@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+13.7 KB
...quad/Assets/generic.xcassets/assetGenericTuring.imageset/assetGenericTuring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.1 KB
...d/Assets/generic.xcassets/assetGenericTuring.imageset/assetGenericTuring@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.2 KB
...d/Assets/generic.xcassets/assetGenericTuring.imageset/assetGenericTuring@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
GaussSquad/Assets/generic.xcassets/assetGenericUndoWhite.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericUndoWhite.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericUndoWhite@2x.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "assetGenericUndoWhite@3x.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+414 Bytes
...ssets/generic.xcassets/assetGenericUndoWhite.imageset/assetGenericUndoWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+759 Bytes
...ts/generic.xcassets/assetGenericUndoWhite.imageset/assetGenericUndoWhite@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
...ts/generic.xcassets/assetGenericUndoWhite.imageset/assetGenericUndoWhite@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.