Skip to content

Commit 70e4b5b

Browse files
committed
include Podfile
1 parent f4bacb1 commit 70e4b5b

374 files changed

Lines changed: 44807 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Created by http://www.gitignore.io
2+
3+
### Xcode ###
4+
build
5+
*.xcodeproj/*
6+
!*.xcodeproj/project.pbxproj
7+
!*.xcworkspace/contents.xcworkspacedata
8+
9+
10+
### Objective-C ###
11+
# OS X
12+
.DS_Store
13+
14+
# Xcode
15+
build/
16+
*.pbxuser
17+
!default.pbxuser
18+
*.mode1v3
19+
!default.mode1v3
20+
*.mode2v3
21+
!default.mode2v3
22+
*.perspectivev3
23+
!default.perspectivev3
24+
xcuserdata
25+
*.xccheckout
26+
profile
27+
*.moved-aside
28+
DerivedData
29+
*.hmap
30+
*.ipa
31+
32+
# CocoaPods
33+
Pods

AnalyticsManagerExample.xcodeproj/project.pbxproj

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,64 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
CCB5990901768D823F7C3229 /* Pods_AnalyticsManagerExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C9392F4A3FBBE249A9164CE /* Pods_AnalyticsManagerExample.framework */; };
1011
D483BA1A25CB426D009EA879 /* AnalyticsManagerExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D483BA1925CB426D009EA879 /* AnalyticsManagerExampleApp.swift */; };
1112
D483BA1C25CB426D009EA879 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D483BA1B25CB426D009EA879 /* ContentView.swift */; };
1213
D483BA1E25CB426E009EA879 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D483BA1D25CB426E009EA879 /* Assets.xcassets */; };
1314
D483BA2125CB426E009EA879 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D483BA2025CB426E009EA879 /* Preview Assets.xcassets */; };
15+
D483BA2A25CB4322009EA879 /* Analytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D483BA2925CB4322009EA879 /* Analytics.swift */; };
1416
/* End PBXBuildFile section */
1517

1618
/* Begin PBXFileReference section */
19+
2C9392F4A3FBBE249A9164CE /* Pods_AnalyticsManagerExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AnalyticsManagerExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20+
68384EEECCE50070813C2B56 /* Pods-AnalyticsManagerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AnalyticsManagerExample.release.xcconfig"; path = "Target Support Files/Pods-AnalyticsManagerExample/Pods-AnalyticsManagerExample.release.xcconfig"; sourceTree = "<group>"; };
1721
D483BA1625CB426D009EA879 /* AnalyticsManagerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnalyticsManagerExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1822
D483BA1925CB426D009EA879 /* AnalyticsManagerExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsManagerExampleApp.swift; sourceTree = "<group>"; };
1923
D483BA1B25CB426D009EA879 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
2024
D483BA1D25CB426E009EA879 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2125
D483BA2025CB426E009EA879 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2226
D483BA2225CB426E009EA879 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27+
D483BA2925CB4322009EA879 /* Analytics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Analytics.swift; sourceTree = "<group>"; };
28+
FBA4EBCFE55753E31CFB1D82 /* Pods-AnalyticsManagerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AnalyticsManagerExample.debug.xcconfig"; path = "Target Support Files/Pods-AnalyticsManagerExample/Pods-AnalyticsManagerExample.debug.xcconfig"; sourceTree = "<group>"; };
2329
/* End PBXFileReference section */
2430

2531
/* Begin PBXFrameworksBuildPhase section */
2632
D483BA1325CB426C009EA879 /* Frameworks */ = {
2733
isa = PBXFrameworksBuildPhase;
2834
buildActionMask = 2147483647;
2935
files = (
36+
CCB5990901768D823F7C3229 /* Pods_AnalyticsManagerExample.framework in Frameworks */,
3037
);
3138
runOnlyForDeploymentPostprocessing = 0;
3239
};
3340
/* End PBXFrameworksBuildPhase section */
3441

3542
/* Begin PBXGroup section */
43+
08B1E7FA680574EB8A89A225 /* Frameworks */ = {
44+
isa = PBXGroup;
45+
children = (
46+
2C9392F4A3FBBE249A9164CE /* Pods_AnalyticsManagerExample.framework */,
47+
);
48+
name = Frameworks;
49+
sourceTree = "<group>";
50+
};
51+
BD762F10D2415001E19E0331 /* Pods */ = {
52+
isa = PBXGroup;
53+
children = (
54+
FBA4EBCFE55753E31CFB1D82 /* Pods-AnalyticsManagerExample.debug.xcconfig */,
55+
68384EEECCE50070813C2B56 /* Pods-AnalyticsManagerExample.release.xcconfig */,
56+
);
57+
name = Pods;
58+
path = Pods;
59+
sourceTree = "<group>";
60+
};
3661
D483BA0D25CB426C009EA879 = {
3762
isa = PBXGroup;
3863
children = (
3964
D483BA1825CB426D009EA879 /* AnalyticsManagerExample */,
4065
D483BA1725CB426D009EA879 /* Products */,
66+
BD762F10D2415001E19E0331 /* Pods */,
67+
08B1E7FA680574EB8A89A225 /* Frameworks */,
4168
);
4269
sourceTree = "<group>";
4370
};
@@ -54,6 +81,7 @@
5481
children = (
5582
D483BA1925CB426D009EA879 /* AnalyticsManagerExampleApp.swift */,
5683
D483BA1B25CB426D009EA879 /* ContentView.swift */,
84+
D483BA2925CB4322009EA879 /* Analytics.swift */,
5785
D483BA1D25CB426E009EA879 /* Assets.xcassets */,
5886
D483BA2225CB426E009EA879 /* Info.plist */,
5987
D483BA1F25CB426E009EA879 /* Preview Content */,
@@ -76,9 +104,11 @@
76104
isa = PBXNativeTarget;
77105
buildConfigurationList = D483BA2525CB426E009EA879 /* Build configuration list for PBXNativeTarget "AnalyticsManagerExample" */;
78106
buildPhases = (
107+
F3D441E55AE08E13C516CF70 /* [CP] Check Pods Manifest.lock */,
79108
D483BA1225CB426C009EA879 /* Sources */,
80109
D483BA1325CB426C009EA879 /* Frameworks */,
81110
D483BA1425CB426C009EA879 /* Resources */,
111+
CA7B781A0466797F3A0D2DCD /* [CP] Embed Pods Frameworks */,
82112
);
83113
buildRules = (
84114
);
@@ -133,13 +163,56 @@
133163
};
134164
/* End PBXResourcesBuildPhase section */
135165

166+
/* Begin PBXShellScriptBuildPhase section */
167+
CA7B781A0466797F3A0D2DCD /* [CP] Embed Pods Frameworks */ = {
168+
isa = PBXShellScriptBuildPhase;
169+
buildActionMask = 2147483647;
170+
files = (
171+
);
172+
inputFileListPaths = (
173+
"${PODS_ROOT}/Target Support Files/Pods-AnalyticsManagerExample/Pods-AnalyticsManagerExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
174+
);
175+
name = "[CP] Embed Pods Frameworks";
176+
outputFileListPaths = (
177+
"${PODS_ROOT}/Target Support Files/Pods-AnalyticsManagerExample/Pods-AnalyticsManagerExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
178+
);
179+
runOnlyForDeploymentPostprocessing = 0;
180+
shellPath = /bin/sh;
181+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AnalyticsManagerExample/Pods-AnalyticsManagerExample-frameworks.sh\"\n";
182+
showEnvVarsInLog = 0;
183+
};
184+
F3D441E55AE08E13C516CF70 /* [CP] Check Pods Manifest.lock */ = {
185+
isa = PBXShellScriptBuildPhase;
186+
buildActionMask = 2147483647;
187+
files = (
188+
);
189+
inputFileListPaths = (
190+
);
191+
inputPaths = (
192+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
193+
"${PODS_ROOT}/Manifest.lock",
194+
);
195+
name = "[CP] Check Pods Manifest.lock";
196+
outputFileListPaths = (
197+
);
198+
outputPaths = (
199+
"$(DERIVED_FILE_DIR)/Pods-AnalyticsManagerExample-checkManifestLockResult.txt",
200+
);
201+
runOnlyForDeploymentPostprocessing = 0;
202+
shellPath = /bin/sh;
203+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
204+
showEnvVarsInLog = 0;
205+
};
206+
/* End PBXShellScriptBuildPhase section */
207+
136208
/* Begin PBXSourcesBuildPhase section */
137209
D483BA1225CB426C009EA879 /* Sources */ = {
138210
isa = PBXSourcesBuildPhase;
139211
buildActionMask = 2147483647;
140212
files = (
141213
D483BA1C25CB426D009EA879 /* ContentView.swift in Sources */,
142214
D483BA1A25CB426D009EA879 /* AnalyticsManagerExampleApp.swift in Sources */,
215+
D483BA2A25CB4322009EA879 /* Analytics.swift in Sources */,
143216
);
144217
runOnlyForDeploymentPostprocessing = 0;
145218
};
@@ -264,6 +337,7 @@
264337
};
265338
D483BA2625CB426E009EA879 /* Debug */ = {
266339
isa = XCBuildConfiguration;
340+
baseConfigurationReference = FBA4EBCFE55753E31CFB1D82 /* Pods-AnalyticsManagerExample.debug.xcconfig */;
267341
buildSettings = {
268342
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
269343
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -286,6 +360,7 @@
286360
};
287361
D483BA2725CB426E009EA879 /* Release */ = {
288362
isa = XCBuildConfiguration;
363+
baseConfigurationReference = 68384EEECCE50070813C2B56 /* Pods-AnalyticsManagerExample.release.xcconfig */;
289364
buildSettings = {
290365
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291366
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "0FD4FA6D-F7D4-4195-9212-5F68EC6D097E"
4+
type = "1"
5+
version = "2.0">
6+
</Bucket>

AnalyticsManagerExample.xcodeproj/xcuserdata/fredlacis.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>AnalyticsManagerExample.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
10-
<integer>0</integer>
10+
<integer>11</integer>
1111
</dict>
1212
</dict>
1313
</dict>

AnalyticsManagerExample.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//
2+
// Events.swift
3+
// Ways
4+
//
5+
// Created by Marcos Vinicius Majeveski De Angeli on 26/01/21.
6+
//
7+
8+
import Foundation
9+
import Firebase
10+
11+
class AnalyticsManager{
12+
13+
/// Unique instance of EventManager (SINGLETON)
14+
static var shared: AnalyticsManager = AnalyticsManager()
15+
16+
17+
// --- Stored Properties
18+
// var authorizationHandlerTrigger: AuthorizationHandlerTrigger = .NotTraceable
19+
// --- Stored Properties
20+
21+
22+
fileprivate init(){}
23+
24+
/// Logs an app event in Firebase Analytics.
25+
/// - Parameters:
26+
/// - name: The name of the event.
27+
/// - parameters: The dictionary of event parameters. Passing nil indicates that the event has no parameters.
28+
static func logEvent(_ event: AnalyticsEvent) {
29+
// #if !DEBUG
30+
Analytics.logEvent(event.name, parameters: event.parameters)
31+
// #endif
32+
}
33+
34+
}
35+
36+
/// All events and its parameters
37+
enum AnalyticsEvent {
38+
case ButtonTapped
39+
case SliderNumber(number: Int)
40+
case PickerSelected(color: String)
41+
case FormSent(number: Int, color: String)
42+
}
43+
44+
extension AnalyticsEvent{
45+
/// The name sent to the Analyitics Dashboard
46+
var name: String {
47+
switch self {
48+
case .ButtonTapped:
49+
return "button_tapped"
50+
51+
case .SliderNumber:
52+
return "slider_number"
53+
54+
case .PickerSelected:
55+
return "picker_selected"
56+
57+
case .FormSent:
58+
return "form_sent"
59+
}
60+
}
61+
}
62+
63+
extension AnalyticsEvent{
64+
/// The parameters dictionary sent to the Analyitics Dashboard
65+
var parameters: [String : Any]? {
66+
switch self {
67+
case .SliderNumber(let number):
68+
return ["Number" : number]
69+
70+
case .PickerSelected(let color):
71+
return ["Color" : color]
72+
73+
case .FormSent(let number, let color):
74+
return ["Number" : number, "Color" : color]
75+
76+
default:
77+
return nil
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)