-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5b7ed68
Showing
36 changed files
with
1,822 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(CURRENT_PROJECT_VERSION)</string> | ||
</dict> | ||
</plist> |
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 @@ | ||
|
||
Pod::Spec.new do |spec| | ||
|
||
spec.name = "PapcornsAnalytics" | ||
spec.version = "1.0.0" | ||
spec.summary = "Papcorns Analytics Tool iOS SDK" | ||
|
||
spec.description = "Internal Papcorns Analytics Tool iOS SDK" | ||
|
||
spec.homepage = "https://www.papcorns.com" | ||
|
||
|
||
spec.license = { :type => "GNU", :file => "LICENSE" } | ||
|
||
|
||
spec.authors = { "Kaan" => "[email protected]" } | ||
|
||
|
||
spec.source = { :git => "https://github.com/papcorns/PapcornsAnalyticsiOSSDK.git", :tag => "#{spec.version}" } | ||
|
||
|
||
spec.swift_version = '5.0' | ||
spec.ios.deployment_target = '11.0' | ||
spec.source_files = "PapcornsAnalytics/**/*" | ||
|
||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
PapcornsAnalytics.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
PapcornsAnalytics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
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,8 @@ | ||
<?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>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+33.6 KB
...eproj/project.xcworkspace/xcuserdata/barbayrak.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
67 changes: 67 additions & 0 deletions
67
PapcornsAnalytics.xcodeproj/xcshareddata/xcschemes/PapcornsAnalytics.xcscheme
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,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1150" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BB99639D2477D7190004D9C7" | ||
BuildableName = "PapcornsAnalytics.framework" | ||
BlueprintName = "PapcornsAnalytics" | ||
ReferencedContainer = "container:PapcornsAnalytics.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BB99639D2477D7190004D9C7" | ||
BuildableName = "PapcornsAnalytics.framework" | ||
BlueprintName = "PapcornsAnalytics" | ||
ReferencedContainer = "container:PapcornsAnalytics.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
22 changes: 22 additions & 0 deletions
22
...nsAnalytics.xcodeproj/xcuserdata/barbayrak.xcuserdatad/xcschemes/xcschememanagement.plist
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,22 @@ | ||
<?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>SchemeUserState</key> | ||
<dict> | ||
<key>PapcornsAnalytics.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
<key>SuppressBuildableAutocreation</key> | ||
<dict> | ||
<key>BB99639D2477D7190004D9C7</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
PapcornsAnalytics.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
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,8 @@ | ||
<?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>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+17.8 KB
...ornsAnalytics.xcworkspace/xcuserdata/barbayrak.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
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,32 @@ | ||
// | ||
// PapcornsAPILogEvent.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class PapcornsAPILogEvent: PapcornsRequest<PapcornsAPISuccess> { | ||
|
||
convenience init(eventName : String,eventParameters : [String : Any]) { | ||
self.init() | ||
|
||
addBodyItem(name: "userId", value: PapcornsConfigManager.shared.config.userId) | ||
addBodyItem(name: "eventName", value: eventName) | ||
addBodyItem(name: "eventParameters", value: eventParameters) | ||
addBodyItem(name: "appId", value: PapcornsConfigManager.shared.config.appId) | ||
addBodyItem(name: "appVersion", value: PapcornsConfigManager.shared.config.appVersion) | ||
|
||
} | ||
|
||
override var httpMethod: HTTPMethod { | ||
return .POST | ||
} | ||
|
||
override var path: String { | ||
return "/logEvent" | ||
} | ||
|
||
} |
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,32 @@ | ||
// | ||
// PapcornsAPILogScreen.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class PapcornsAPILogScreen: PapcornsRequest<PapcornsAPISuccess> { | ||
|
||
convenience init(screenName : String,screenParameters : [String : Any]) { | ||
self.init() | ||
|
||
addBodyItem(name: "userId", value: PapcornsConfigManager.shared.config.userId) | ||
addBodyItem(name: "eventName", value: screenName) | ||
addBodyItem(name: "eventParameters", value: screenParameters) | ||
addBodyItem(name: "appId", value: PapcornsConfigManager.shared.config.appId) | ||
addBodyItem(name: "appVersion", value: PapcornsConfigManager.shared.config.appVersion) | ||
|
||
} | ||
|
||
override var httpMethod: HTTPMethod { | ||
return .POST | ||
} | ||
|
||
override var path: String { | ||
return "/screenLog" | ||
} | ||
|
||
} |
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,37 @@ | ||
// | ||
// PapcornsAPISetUser.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class PapcornsAPISetUser: PapcornsRequest<PapcornsAPISuccess> { | ||
|
||
convenience init(userId : String) { | ||
self.init() | ||
|
||
addBodyItem(name: "userId", value: PapcornsConfigManager.shared.config.userId) | ||
addBodyItem(name: "idfa", value: PapcornsConfigManager.shared.config.idfa ?? "") | ||
addBodyItem(name: "deviceId", value: PapcornsConfigManager.shared.config.deviceId ?? "") | ||
addBodyItem(name: "deviceModel", value: PapcornsConfigManager.shared.config.deviceModel ?? "") | ||
addBodyItem(name: "deviceVersion", value: PapcornsConfigManager.shared.config.osVersion ?? "") | ||
addBodyItem(name: "preferedLanguage", value: PapcornsConfigManager.shared.config.language ?? "") | ||
addBodyItem(name: "country", value: PapcornsConfigManager.shared.config.country ?? "") | ||
addBodyItem(name: "ip", value: PapcornsConfigManager.shared.config.ip ?? "") | ||
addBodyItem(name: "appId", value: PapcornsConfigManager.shared.config.appId) | ||
addBodyItem(name: "appVersion", value: PapcornsConfigManager.shared.config.appVersion) | ||
|
||
} | ||
|
||
override var httpMethod: HTTPMethod { | ||
return .POST | ||
} | ||
|
||
override var path: String { | ||
return "/userLog" | ||
} | ||
|
||
} |
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,21 @@ | ||
// | ||
// PapcornsConfigManager.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
class PapcornsConfigManager { | ||
|
||
static let shared = PapcornsConfigManager() | ||
private (set) var config : PapcornsConfiguration | ||
|
||
private init() { | ||
config = PapcornsConfiguration() | ||
} | ||
|
||
} |
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,24 @@ | ||
// | ||
// PapcornsAPIError.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class PapcornsAPIError: Codable { | ||
|
||
var status:String? | ||
var message:String? | ||
|
||
private enum CodingKeys: String, CodingKey { | ||
case status = "status" | ||
case message = "message" | ||
} | ||
|
||
var error : PapcornsError { | ||
return .UnknownError | ||
} | ||
} |
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,21 @@ | ||
// | ||
// PapcornsAPISuccess.swift | ||
// PapcornsAnalytics | ||
// | ||
// Created by Kaan Baris BAYRAK on 22.05.2020. | ||
// Copyright © 2020 Papcorns. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class PapcornsAPISuccess: Codable { | ||
|
||
var status:String? | ||
var message:String? | ||
|
||
private enum CodingKeys: String, CodingKey { | ||
case status = "status" | ||
case message = "message" | ||
} | ||
|
||
} |
Oops, something went wrong.