diff --git a/BaseTracking.podspec b/BaseTracking.podspec index 4374bce..2554ad7 100644 --- a/BaseTracking.podspec +++ b/BaseTracking.podspec @@ -1,14 +1,16 @@ Pod::Spec.new do |s| - s.name = "BaseTracking" - s.version = "1.0.5" - s.summary = "BaseTracking is the easiest way to setup your analytics in Swift" - s.requires_arc = true - s.homepage = "https://github.com/thejohnlima/BaseTracking" - s.license = "MIT" - s.author = { "John Lima" => "thejohnlima@icloud.com" } - s.social_media_url = "https://twitter.com/thejohnlima" - s.platform = :ios, "9.3" - s.source = { :git => "https://github.com/thejohnlima/BaseTracking.git", :tag => "#{s.version}" } - s.source_files = "Sources/BaseTracking/*.{swift}" - s.swift_version = "5.0" + s.name = "BaseTracking" + s.version = "1.0.5" + s.summary = "BaseTracking is the easiest way to setup your analytics in Swift" + s.requires_arc = true + s.homepage = "https://github.com/thejohnlima/BaseTracking" + s.license = "MIT" + s.author = { "John Lima" => "thejohnlima@icloud.com" } + s.social_media_url = "https://twitter.com/thejohnlima" + s.ios.deployment_target = "9.3" + s.tvos.deployment_target = "9.0" + s.watchos.deployment_target = "4.0" + s.source = { :git => "https://github.com/thejohnlima/BaseTracking.git", :tag => "#{s.version}" } + s.source_files = "Sources/BaseTracking/*.{swift}" + s.swift_version = "5.0" end diff --git a/Examples/FADemo/FADemo.xcodeproj/project.pbxproj b/Examples/iOS/FADemo/FADemo.xcodeproj/project.pbxproj similarity index 100% rename from Examples/FADemo/FADemo.xcodeproj/project.pbxproj rename to Examples/iOS/FADemo/FADemo.xcodeproj/project.pbxproj diff --git a/Examples/FADemo/FADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/iOS/FADemo/FADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/FADemo/FADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/FADemo/FADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Examples/FADemo/FADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/FADemo/FADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/FADemo/FADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/FADemo/FADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/FADemo/FADemo.xcodeproj/xcshareddata/xcschemes/FADemo.xcscheme b/Examples/iOS/FADemo/FADemo.xcodeproj/xcshareddata/xcschemes/FADemo.xcscheme similarity index 100% rename from Examples/FADemo/FADemo.xcodeproj/xcshareddata/xcschemes/FADemo.xcscheme rename to Examples/iOS/FADemo/FADemo.xcodeproj/xcshareddata/xcschemes/FADemo.xcscheme diff --git a/Examples/FADemo/FADemo.xcworkspace/contents.xcworkspacedata b/Examples/iOS/FADemo/FADemo.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/FADemo/FADemo.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/FADemo/FADemo.xcworkspace/contents.xcworkspacedata diff --git a/Examples/FADemo/FADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/FADemo/FADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/FADemo/FADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/FADemo/FADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/FADemo/FADemo/AppDelegate.swift b/Examples/iOS/FADemo/FADemo/AppDelegate.swift similarity index 100% rename from Examples/FADemo/FADemo/AppDelegate.swift rename to Examples/iOS/FADemo/FADemo/AppDelegate.swift diff --git a/Examples/FADemo/FADemo/AppSections/Home/Analytics/HomeTracking.swift b/Examples/iOS/FADemo/FADemo/AppSections/Home/Analytics/HomeTracking.swift similarity index 100% rename from Examples/FADemo/FADemo/AppSections/Home/Analytics/HomeTracking.swift rename to Examples/iOS/FADemo/FADemo/AppSections/Home/Analytics/HomeTracking.swift diff --git a/Examples/FADemo/FADemo/AppSections/Home/Controller/HomeViewController.swift b/Examples/iOS/FADemo/FADemo/AppSections/Home/Controller/HomeViewController.swift similarity index 100% rename from Examples/FADemo/FADemo/AppSections/Home/Controller/HomeViewController.swift rename to Examples/iOS/FADemo/FADemo/AppSections/Home/Controller/HomeViewController.swift diff --git a/Examples/FADemo/FADemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/iOS/FADemo/FADemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/FADemo/FADemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/iOS/FADemo/FADemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/FADemo/FADemo/Assets.xcassets/Contents.json b/Examples/iOS/FADemo/FADemo/Assets.xcassets/Contents.json similarity index 100% rename from Examples/FADemo/FADemo/Assets.xcassets/Contents.json rename to Examples/iOS/FADemo/FADemo/Assets.xcassets/Contents.json diff --git a/Examples/FADemo/FADemo/Base.lproj/LaunchScreen.storyboard b/Examples/iOS/FADemo/FADemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Examples/FADemo/FADemo/Base.lproj/LaunchScreen.storyboard rename to Examples/iOS/FADemo/FADemo/Base.lproj/LaunchScreen.storyboard diff --git a/Examples/FADemo/FADemo/Base.lproj/Main.storyboard b/Examples/iOS/FADemo/FADemo/Base.lproj/Main.storyboard similarity index 100% rename from Examples/FADemo/FADemo/Base.lproj/Main.storyboard rename to Examples/iOS/FADemo/FADemo/Base.lproj/Main.storyboard diff --git a/Examples/FADemo/FADemo/Common/Manager/TrackingManager.swift b/Examples/iOS/FADemo/FADemo/Common/Manager/TrackingManager.swift similarity index 100% rename from Examples/FADemo/FADemo/Common/Manager/TrackingManager.swift rename to Examples/iOS/FADemo/FADemo/Common/Manager/TrackingManager.swift diff --git a/Examples/FADemo/FADemo/GoogleService-Info.plist b/Examples/iOS/FADemo/FADemo/GoogleService-Info.plist similarity index 100% rename from Examples/FADemo/FADemo/GoogleService-Info.plist rename to Examples/iOS/FADemo/FADemo/GoogleService-Info.plist diff --git a/Examples/FADemo/FADemo/Info.plist b/Examples/iOS/FADemo/FADemo/Info.plist similarity index 100% rename from Examples/FADemo/FADemo/Info.plist rename to Examples/iOS/FADemo/FADemo/Info.plist diff --git a/Examples/FADemo/Podfile b/Examples/iOS/FADemo/Podfile similarity index 100% rename from Examples/FADemo/Podfile rename to Examples/iOS/FADemo/Podfile diff --git a/Examples/FADemo/Podfile.lock b/Examples/iOS/FADemo/Podfile.lock similarity index 100% rename from Examples/FADemo/Podfile.lock rename to Examples/iOS/FADemo/Podfile.lock diff --git a/Examples/GADemo/GADemo.xcodeproj/project.pbxproj b/Examples/iOS/GADemo/GADemo.xcodeproj/project.pbxproj similarity index 100% rename from Examples/GADemo/GADemo.xcodeproj/project.pbxproj rename to Examples/iOS/GADemo/GADemo.xcodeproj/project.pbxproj diff --git a/Examples/GADemo/GADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/iOS/GADemo/GADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/GADemo/GADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/GADemo/GADemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Examples/GADemo/GADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/GADemo/GADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/GADemo/GADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/GADemo/GADemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/GADemo/GADemo.xcodeproj/xcshareddata/xcschemes/GADemo.xcscheme b/Examples/iOS/GADemo/GADemo.xcodeproj/xcshareddata/xcschemes/GADemo.xcscheme similarity index 100% rename from Examples/GADemo/GADemo.xcodeproj/xcshareddata/xcschemes/GADemo.xcscheme rename to Examples/iOS/GADemo/GADemo.xcodeproj/xcshareddata/xcschemes/GADemo.xcscheme diff --git a/Examples/GADemo/GADemo.xcworkspace/contents.xcworkspacedata b/Examples/iOS/GADemo/GADemo.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/GADemo/GADemo.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/GADemo/GADemo.xcworkspace/contents.xcworkspacedata diff --git a/Examples/GADemo/GADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/GADemo/GADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/GADemo/GADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/GADemo/GADemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/GADemo/GADemo/AppDelegate.swift b/Examples/iOS/GADemo/GADemo/AppDelegate.swift similarity index 100% rename from Examples/GADemo/GADemo/AppDelegate.swift rename to Examples/iOS/GADemo/GADemo/AppDelegate.swift diff --git a/Examples/GADemo/GADemo/AppSections/Analytics/HomeTracking.swift b/Examples/iOS/GADemo/GADemo/AppSections/Analytics/HomeTracking.swift similarity index 100% rename from Examples/GADemo/GADemo/AppSections/Analytics/HomeTracking.swift rename to Examples/iOS/GADemo/GADemo/AppSections/Analytics/HomeTracking.swift diff --git a/Examples/GADemo/GADemo/AppSections/Controller/HomeViewController.swift b/Examples/iOS/GADemo/GADemo/AppSections/Controller/HomeViewController.swift similarity index 100% rename from Examples/GADemo/GADemo/AppSections/Controller/HomeViewController.swift rename to Examples/iOS/GADemo/GADemo/AppSections/Controller/HomeViewController.swift diff --git a/Examples/GADemo/GADemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/iOS/GADemo/GADemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/GADemo/GADemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/iOS/GADemo/GADemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/GADemo/GADemo/Assets.xcassets/Contents.json b/Examples/iOS/GADemo/GADemo/Assets.xcassets/Contents.json similarity index 100% rename from Examples/GADemo/GADemo/Assets.xcassets/Contents.json rename to Examples/iOS/GADemo/GADemo/Assets.xcassets/Contents.json diff --git a/Examples/GADemo/GADemo/Base.lproj/LaunchScreen.storyboard b/Examples/iOS/GADemo/GADemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Examples/GADemo/GADemo/Base.lproj/LaunchScreen.storyboard rename to Examples/iOS/GADemo/GADemo/Base.lproj/LaunchScreen.storyboard diff --git a/Examples/GADemo/GADemo/Base.lproj/Main.storyboard b/Examples/iOS/GADemo/GADemo/Base.lproj/Main.storyboard similarity index 100% rename from Examples/GADemo/GADemo/Base.lproj/Main.storyboard rename to Examples/iOS/GADemo/GADemo/Base.lproj/Main.storyboard diff --git a/Examples/GADemo/GADemo/BridgingHeader.h b/Examples/iOS/GADemo/GADemo/BridgingHeader.h similarity index 100% rename from Examples/GADemo/GADemo/BridgingHeader.h rename to Examples/iOS/GADemo/GADemo/BridgingHeader.h diff --git a/Examples/GADemo/GADemo/Common/Manager/TrackingManager.swift b/Examples/iOS/GADemo/GADemo/Common/Manager/TrackingManager.swift similarity index 100% rename from Examples/GADemo/GADemo/Common/Manager/TrackingManager.swift rename to Examples/iOS/GADemo/GADemo/Common/Manager/TrackingManager.swift diff --git a/Examples/GADemo/GADemo/Info.plist b/Examples/iOS/GADemo/GADemo/Info.plist similarity index 100% rename from Examples/GADemo/GADemo/Info.plist rename to Examples/iOS/GADemo/GADemo/Info.plist diff --git a/Examples/GADemo/Podfile b/Examples/iOS/GADemo/Podfile similarity index 100% rename from Examples/GADemo/Podfile rename to Examples/iOS/GADemo/Podfile diff --git a/Examples/GADemo/Podfile.lock b/Examples/iOS/GADemo/Podfile.lock similarity index 100% rename from Examples/GADemo/Podfile.lock rename to Examples/iOS/GADemo/Podfile.lock diff --git a/Examples/SEDemo/Podfile b/Examples/iOS/SEDemo/Podfile similarity index 83% rename from Examples/SEDemo/Podfile rename to Examples/iOS/SEDemo/Podfile index 53d0506..f4fb0d9 100644 --- a/Examples/SEDemo/Podfile +++ b/Examples/iOS/SEDemo/Podfile @@ -7,7 +7,7 @@ target 'SEDemo' do # Pods for SEDemo pod 'Analytics' - pod 'BaseTracking', :path => '../../' + pod 'BaseTracking', :path => '../../../' pod 'LMStorage' end diff --git a/Examples/SEDemo/Podfile.lock b/Examples/iOS/SEDemo/Podfile.lock similarity index 57% rename from Examples/SEDemo/Podfile.lock rename to Examples/iOS/SEDemo/Podfile.lock index d1f8a9e..06a3cf0 100644 --- a/Examples/SEDemo/Podfile.lock +++ b/Examples/iOS/SEDemo/Podfile.lock @@ -1,13 +1,13 @@ PODS: - Analytics (4.1.4) - - BaseTracking (1.0.4) + - BaseTracking (1.0.5) - KeychainSwift (19.0.0) - - LMStorage (1.0.1): + - LMStorage (1.0.4): - KeychainSwift DEPENDENCIES: - Analytics - - BaseTracking (from `../../`) + - BaseTracking (from `../../../`) - LMStorage SPEC REPOS: @@ -18,14 +18,14 @@ SPEC REPOS: EXTERNAL SOURCES: BaseTracking: - :path: "../../" + :path: "../../../" SPEC CHECKSUMS: Analytics: 7bdc735c456434b4eaa2eacdcf122bb03d51ede7 - BaseTracking: 43a0d8806d3b0beb12ec9ace05c7fc43e197f90f + BaseTracking: a0e8176653970920285365a33e3c416f6449f0ca KeychainSwift: a06190cf933ad46b1e0abc3d77d29c06331715c7 - LMStorage: 2ecbdb40eeda05e6a5d324c282b2ff5d684c3387 + LMStorage: 53fb8c656345fce168266771db73c0b1690df3b5 -PODFILE CHECKSUM: 3e5bb8cab8bc4860abc4b8f446f1e165b50f4249 +PODFILE CHECKSUM: cdf4d924ce4794765dea0f5079abd8edaf81e8ee COCOAPODS: 1.10.1 diff --git a/Examples/SEDemo/SEDemo.xcodeproj/project.pbxproj b/Examples/iOS/SEDemo/SEDemo.xcodeproj/project.pbxproj similarity index 100% rename from Examples/SEDemo/SEDemo.xcodeproj/project.pbxproj rename to Examples/iOS/SEDemo/SEDemo.xcodeproj/project.pbxproj diff --git a/Examples/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/iOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Examples/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata b/Examples/iOS/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata rename to Examples/iOS/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata diff --git a/Examples/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/iOS/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/iOS/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/SEDemo/SEDemo/AppDelegate.swift b/Examples/iOS/SEDemo/SEDemo/AppDelegate.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppDelegate.swift rename to Examples/iOS/SEDemo/SEDemo/AppDelegate.swift diff --git a/Examples/SEDemo/SEDemo/AppSections/Home/Analytics/HomeTracking.swift b/Examples/iOS/SEDemo/SEDemo/AppSections/Home/Analytics/HomeTracking.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppSections/Home/Analytics/HomeTracking.swift rename to Examples/iOS/SEDemo/SEDemo/AppSections/Home/Analytics/HomeTracking.swift diff --git a/Examples/SEDemo/SEDemo/AppSections/Home/Controller/HomeController.swift b/Examples/iOS/SEDemo/SEDemo/AppSections/Home/Controller/HomeController.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppSections/Home/Controller/HomeController.swift rename to Examples/iOS/SEDemo/SEDemo/AppSections/Home/Controller/HomeController.swift diff --git a/Examples/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift b/Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift rename to Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift diff --git a/Examples/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift b/Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift rename to Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift diff --git a/Examples/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift b/Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift similarity index 100% rename from Examples/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift rename to Examples/iOS/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift diff --git a/Examples/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/iOS/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Examples/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json rename to Examples/iOS/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Examples/SEDemo/SEDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/iOS/SEDemo/SEDemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/SEDemo/SEDemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/iOS/SEDemo/SEDemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/SEDemo/SEDemo/Assets.xcassets/Contents.json b/Examples/iOS/SEDemo/SEDemo/Assets.xcassets/Contents.json similarity index 100% rename from Examples/SEDemo/SEDemo/Assets.xcassets/Contents.json rename to Examples/iOS/SEDemo/SEDemo/Assets.xcassets/Contents.json diff --git a/Examples/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard b/Examples/iOS/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Examples/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard rename to Examples/iOS/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard diff --git a/Examples/SEDemo/SEDemo/Base.lproj/Main.storyboard b/Examples/iOS/SEDemo/SEDemo/Base.lproj/Main.storyboard similarity index 100% rename from Examples/SEDemo/SEDemo/Base.lproj/Main.storyboard rename to Examples/iOS/SEDemo/SEDemo/Base.lproj/Main.storyboard diff --git a/Examples/SEDemo/SEDemo/Common/Manager/TrackingManager.swift b/Examples/iOS/SEDemo/SEDemo/Common/Manager/TrackingManager.swift similarity index 100% rename from Examples/SEDemo/SEDemo/Common/Manager/TrackingManager.swift rename to Examples/iOS/SEDemo/SEDemo/Common/Manager/TrackingManager.swift diff --git a/Examples/SEDemo/SEDemo/Info.plist b/Examples/iOS/SEDemo/SEDemo/Info.plist similarity index 100% rename from Examples/SEDemo/SEDemo/Info.plist rename to Examples/iOS/SEDemo/SEDemo/Info.plist diff --git a/Examples/SEDemo/SEDemo/SceneDelegate.swift b/Examples/iOS/SEDemo/SEDemo/SceneDelegate.swift similarity index 100% rename from Examples/SEDemo/SEDemo/SceneDelegate.swift rename to Examples/iOS/SEDemo/SEDemo/SceneDelegate.swift diff --git a/Examples/tvOS/SEDemo/Podfile b/Examples/tvOS/SEDemo/Podfile new file mode 100644 index 0000000..9397f6e --- /dev/null +++ b/Examples/tvOS/SEDemo/Podfile @@ -0,0 +1,14 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'SEDemo' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + inhibit_all_warnings! + + # Pods for SEDemo + pod 'Analytics' + pod 'BaseTracking', :path => '../../../' + pod 'LMStorage' + +end diff --git a/Examples/tvOS/SEDemo/Podfile.lock b/Examples/tvOS/SEDemo/Podfile.lock new file mode 100644 index 0000000..946d6b3 --- /dev/null +++ b/Examples/tvOS/SEDemo/Podfile.lock @@ -0,0 +1,31 @@ +PODS: + - Analytics (4.1.4) + - BaseTracking (1.0.5) + - KeychainSwift (19.0.0) + - LMStorage (1.0.4): + - KeychainSwift + +DEPENDENCIES: + - Analytics + - BaseTracking (from `../../../`) + - LMStorage + +SPEC REPOS: + trunk: + - Analytics + - KeychainSwift + - LMStorage + +EXTERNAL SOURCES: + BaseTracking: + :path: "../../../" + +SPEC CHECKSUMS: + Analytics: 7bdc735c456434b4eaa2eacdcf122bb03d51ede7 + BaseTracking: a0e8176653970920285365a33e3c416f6449f0ca + KeychainSwift: a06190cf933ad46b1e0abc3d77d29c06331715c7 + LMStorage: 53fb8c656345fce168266771db73c0b1690df3b5 + +PODFILE CHECKSUM: fda27e22fa735115aa01ae00639d2cd46571dbdd + +COCOAPODS: 1.10.1 diff --git a/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.pbxproj b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3ddf2fb --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.pbxproj @@ -0,0 +1,478 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 1B6E23852691348E00FA96EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B6E23842691348E00FA96EB /* AppDelegate.swift */; }; + 1B6E238A2691348E00FA96EB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B6E23882691348E00FA96EB /* Main.storyboard */; }; + 1B6E238C2691348F00FA96EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1B6E238B2691348F00FA96EB /* Assets.xcassets */; }; + 1B6E238F2691348F00FA96EB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B6E238D2691348F00FA96EB /* LaunchScreen.storyboard */; }; + 1BBAA5992691370600FA685D /* ProfileController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BBAA5942691370600FA685D /* ProfileController.swift */; }; + 1BBAA59A2691370600FA685D /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BBAA5962691370600FA685D /* Profile.swift */; }; + 1BBAA59B2691370600FA685D /* ProfileTracking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BBAA5982691370600FA685D /* ProfileTracking.swift */; }; + 1BBAA59F2691370E00FA685D /* TrackingManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BBAA59E2691370E00FA685D /* TrackingManager.swift */; }; + 4D344A903699B2D454B79623 /* Pods_SEDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9832D1B2B46EEBB5A6E7016E /* Pods_SEDemo.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1B6E23812691348E00FA96EB /* SEDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SEDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1B6E23842691348E00FA96EB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 1B6E23892691348E00FA96EB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1B6E238B2691348F00FA96EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1B6E238E2691348F00FA96EB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 1B6E23902691348F00FA96EB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1BBAA5942691370600FA685D /* ProfileController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileController.swift; sourceTree = ""; }; + 1BBAA5962691370600FA685D /* Profile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = ""; }; + 1BBAA5982691370600FA685D /* ProfileTracking.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileTracking.swift; sourceTree = ""; }; + 1BBAA59E2691370E00FA685D /* TrackingManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingManager.swift; sourceTree = ""; }; + 30745BDB1EF94092BC2AEC77 /* Pods-SEDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SEDemo.debug.xcconfig"; path = "Target Support Files/Pods-SEDemo/Pods-SEDemo.debug.xcconfig"; sourceTree = ""; }; + 71BB6F71A940401BD8F84CDD /* Pods-SEDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SEDemo.release.xcconfig"; path = "Target Support Files/Pods-SEDemo/Pods-SEDemo.release.xcconfig"; sourceTree = ""; }; + 9832D1B2B46EEBB5A6E7016E /* Pods_SEDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SEDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1B6E237E2691348E00FA96EB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4D344A903699B2D454B79623 /* Pods_SEDemo.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1B6E23782691348E00FA96EB = { + isa = PBXGroup; + children = ( + 1B6E23832691348E00FA96EB /* SEDemo */, + 1B6E23822691348E00FA96EB /* Products */, + 63C18588798D2609C6B55482 /* Pods */, + 506DC607388C31D4ABC8079C /* Frameworks */, + ); + sourceTree = ""; + }; + 1B6E23822691348E00FA96EB /* Products */ = { + isa = PBXGroup; + children = ( + 1B6E23812691348E00FA96EB /* SEDemo.app */, + ); + name = Products; + sourceTree = ""; + }; + 1B6E23832691348E00FA96EB /* SEDemo */ = { + isa = PBXGroup; + children = ( + 1B6E23842691348E00FA96EB /* AppDelegate.swift */, + 1B6E23882691348E00FA96EB /* Main.storyboard */, + 1B6E238D2691348F00FA96EB /* LaunchScreen.storyboard */, + 1B6E23902691348F00FA96EB /* Info.plist */, + 1B6E238B2691348F00FA96EB /* Assets.xcassets */, + 1BBAA59C2691370E00FA685D /* Common */, + 1BBAA5912691370600FA685D /* AppSections */, + ); + path = SEDemo; + sourceTree = ""; + }; + 1BBAA5912691370600FA685D /* AppSections */ = { + isa = PBXGroup; + children = ( + 1BBAA5922691370600FA685D /* Profile */, + ); + path = AppSections; + sourceTree = ""; + }; + 1BBAA5922691370600FA685D /* Profile */ = { + isa = PBXGroup; + children = ( + 1BBAA5932691370600FA685D /* Controller */, + 1BBAA5952691370600FA685D /* Model */, + 1BBAA5972691370600FA685D /* Analytics */, + ); + path = Profile; + sourceTree = ""; + }; + 1BBAA5932691370600FA685D /* Controller */ = { + isa = PBXGroup; + children = ( + 1BBAA5942691370600FA685D /* ProfileController.swift */, + ); + path = Controller; + sourceTree = ""; + }; + 1BBAA5952691370600FA685D /* Model */ = { + isa = PBXGroup; + children = ( + 1BBAA5962691370600FA685D /* Profile.swift */, + ); + path = Model; + sourceTree = ""; + }; + 1BBAA5972691370600FA685D /* Analytics */ = { + isa = PBXGroup; + children = ( + 1BBAA5982691370600FA685D /* ProfileTracking.swift */, + ); + path = Analytics; + sourceTree = ""; + }; + 1BBAA59C2691370E00FA685D /* Common */ = { + isa = PBXGroup; + children = ( + 1BBAA59D2691370E00FA685D /* Manager */, + ); + path = Common; + sourceTree = ""; + }; + 1BBAA59D2691370E00FA685D /* Manager */ = { + isa = PBXGroup; + children = ( + 1BBAA59E2691370E00FA685D /* TrackingManager.swift */, + ); + path = Manager; + sourceTree = ""; + }; + 506DC607388C31D4ABC8079C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9832D1B2B46EEBB5A6E7016E /* Pods_SEDemo.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 63C18588798D2609C6B55482 /* Pods */ = { + isa = PBXGroup; + children = ( + 30745BDB1EF94092BC2AEC77 /* Pods-SEDemo.debug.xcconfig */, + 71BB6F71A940401BD8F84CDD /* Pods-SEDemo.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1B6E23802691348E00FA96EB /* SEDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1B6E23932691348F00FA96EB /* Build configuration list for PBXNativeTarget "SEDemo" */; + buildPhases = ( + B8375739E37AFD7B63ECC024 /* [CP] Check Pods Manifest.lock */, + 1B6E237D2691348E00FA96EB /* Sources */, + 1B6E237E2691348E00FA96EB /* Frameworks */, + 1B6E237F2691348E00FA96EB /* Resources */, + 232324D6801A461F1AFA8C3C /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SEDemo; + productName = SEDemo; + productReference = 1B6E23812691348E00FA96EB /* SEDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1B6E23792691348E00FA96EB /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 1B6E23802691348E00FA96EB = { + CreatedOnToolsVersion = 12.5.1; + }; + }; + }; + buildConfigurationList = 1B6E237C2691348E00FA96EB /* Build configuration list for PBXProject "SEDemo" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1B6E23782691348E00FA96EB; + productRefGroup = 1B6E23822691348E00FA96EB /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1B6E23802691348E00FA96EB /* SEDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1B6E237F2691348E00FA96EB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B6E238F2691348F00FA96EB /* LaunchScreen.storyboard in Resources */, + 1B6E238C2691348F00FA96EB /* Assets.xcassets in Resources */, + 1B6E238A2691348E00FA96EB /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 232324D6801A461F1AFA8C3C /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SEDemo/Pods-SEDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SEDemo/Pods-SEDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SEDemo/Pods-SEDemo-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + B8375739E37AFD7B63ECC024 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SEDemo-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1B6E237D2691348E00FA96EB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1BBAA59F2691370E00FA685D /* TrackingManager.swift in Sources */, + 1BBAA59B2691370600FA685D /* ProfileTracking.swift in Sources */, + 1BBAA59A2691370600FA685D /* Profile.swift in Sources */, + 1B6E23852691348E00FA96EB /* AppDelegate.swift in Sources */, + 1BBAA5992691370600FA685D /* ProfileController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1B6E23882691348E00FA96EB /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1B6E23892691348E00FA96EB /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 1B6E238D2691348F00FA96EB /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1B6E238E2691348F00FA96EB /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1B6E23912691348F00FA96EB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = appletvos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TVOS_DEPLOYMENT_TARGET = 14.5; + }; + name = Debug; + }; + 1B6E23922691348F00FA96EB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = appletvos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TVOS_DEPLOYMENT_TARGET = 14.5; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1B6E23942691348F00FA96EB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 30745BDB1EF94092BC2AEC77 /* Pods-SEDemo.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = SEDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = thejohnlima.SEDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Debug; + }; + 1B6E23952691348F00FA96EB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 71BB6F71A940401BD8F84CDD /* Pods-SEDemo.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = SEDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = thejohnlima.SEDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1B6E237C2691348E00FA96EB /* Build configuration list for PBXProject "SEDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B6E23912691348F00FA96EB /* Debug */, + 1B6E23922691348F00FA96EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1B6E23932691348F00FA96EB /* Build configuration list for PBXNativeTarget "SEDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B6E23942691348F00FA96EB /* Debug */, + 1B6E23952691348F00FA96EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1B6E23792691348E00FA96EB /* Project object */; +} diff --git a/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Examples/tvOS/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata b/Examples/tvOS/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..889e2cb --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Examples/tvOS/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/tvOS/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Examples/tvOS/SEDemo/SEDemo/AppDelegate.swift b/Examples/tvOS/SEDemo/SEDemo/AppDelegate.swift new file mode 100644 index 0000000..9401292 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/AppDelegate.swift @@ -0,0 +1,20 @@ +// +// AppDelegate.swift +// SEDemo +// +// Created by John Lima on 7/3/21. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + TrackingManager.shared.configure() + return true + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift new file mode 100644 index 0000000..04c3130 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Analytics/ProfileTracking.swift @@ -0,0 +1,45 @@ +// +// ProfileTracking.swift +// SEDemo +// +// Created by John Lima on 6/2/21. +// + +import BaseTracking + +struct ProfileTracking: BaseTrackingEventLog { + typealias ClassName = CustomRawRepresentable + typealias EventParameters = CustomRawRepresentable + + enum ScreenName: String { + case profile + } + + enum EventName: String { + case update = "profile_update" + case reset = "profile_reset" + } +} + +extension ProfileTracking { + + /// Prepare the parameters using dynamic values + /// - Parameter value: Dynamic value + /// - Returns: Event Parameters + static func getParameters(_ profile: Profile?) -> EventParameters? { + guard let parameters = profile?.dictionary() else { return nil } + return EventParameters(rawValue: parameters) + } + + /// Request and track user info + /// - Parameter profile: User Profile + static func trackIdentity(_ profile: Profile?) { + guard let profile = profile else { return } + TrackingManager.shared.requestTrackingAuthorization(profile.id, info: profile.dictionary()) + } + + /// Tracking reset profile + static func resetProfile() { + TrackingManager.shared.reset(EventName.reset.rawValue) + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift new file mode 100644 index 0000000..30b6347 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Controller/ProfileController.swift @@ -0,0 +1,40 @@ +// +// ProfileController.swift +// SEDemo +// +// Created by John Lima on 6/2/21. +// + +import UIKit + +class ProfileController: UIViewController { + + @IBOutlet private weak var updateButton: UIButton! + @IBOutlet private weak var resetButton: UIButton! + + override func viewDidLoad() { + super.viewDidLoad() + setNeedsFocusUpdate() + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + ProfileTracking.trackView(name: .profile) + } + + override var preferredFocusedView: UIView? { + if updateButton.isFocused { + return resetButton + } + return updateButton + } + + @IBAction private func updateProfile() { + let parameters = ProfileTracking.getParameters(Profile.updated) + ProfileTracking.trackEvent(name: .update, parameters: parameters) + } + + @IBAction private func resetProfile() { + ProfileTracking.resetProfile() + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift new file mode 100644 index 0000000..ee5c7a4 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/AppSections/Profile/Model/Profile.swift @@ -0,0 +1,23 @@ +// +// Profile.swift +// SEDemo +// +// Created by John Lima on 6/2/21. +// + +import LMStorage + +struct Profile: LMCodable { + let id: String + let name: String + + static var current: Profile? { + let profile = Profile(id: "123", name: "John") + return profile + } + + static var updated: Profile? { + let profile = Profile(id: "12345", name: "John Lima") + return profile + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..2e00335 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000..de59d88 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..2e00335 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..2e00335 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..795cce1 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000..de59d88 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..795cce1 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..795cce1 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..f47ba43 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "filename" : "App Icon - App Store.imagestack", + "idiom" : "tv", + "role" : "primary-app-icon", + "size" : "1280x768" + }, + { + "filename" : "App Icon.imagestack", + "idiom" : "tv", + "role" : "primary-app-icon", + "size" : "400x240" + }, + { + "filename" : "Top Shelf Image Wide.imageset", + "idiom" : "tv", + "role" : "top-shelf-image-wide", + "size" : "2320x720" + }, + { + "filename" : "Top Shelf Image.imageset", + "idiom" : "tv", + "role" : "top-shelf-image", + "size" : "1920x720" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..b65f0cd --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..b65f0cd --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/Contents.json b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard b/Examples/tvOS/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..660ba53 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/tvOS/SEDemo/SEDemo/Base.lproj/Main.storyboard b/Examples/tvOS/SEDemo/SEDemo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..81e5ef7 --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Base.lproj/Main.storyboard @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/tvOS/SEDemo/SEDemo/Common/Manager/TrackingManager.swift b/Examples/tvOS/SEDemo/SEDemo/Common/Manager/TrackingManager.swift new file mode 100644 index 0000000..adcc62c --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Common/Manager/TrackingManager.swift @@ -0,0 +1,99 @@ +// +// TrackingManager.swift +// SEDemo +// +// Created by John Lima on 6/2/21. +// Copyright © 2021 thejohnlima. All rights reserved. +// + +import AppTrackingTransparency +import BaseTracking +import Segment + +final class TrackingManager: BaseTrackingProtocol { + // MARK: - Constants + private let segmentKey = "SEGMENT_KEY" + + // MARK: - Properties + static let shared = TrackingManager() + + var trackingAuthorized: Bool { + if #available(iOS 14, *) { + return ATTrackingManager.trackingAuthorizationStatus == .authorized + } else { + return true + } + } + + var trackingDenied: Bool { + if #available(iOS 14, *) { + return ATTrackingManager.trackingAuthorizationStatus == .denied + } else { + return false + } + } + + // MARK: - Public Methods + func requestTrackingAuthorization(_ id: String, info: [String: Any]?) { + if trackingAuthorized { + return identity(id, info: info) + } + + if #available(iOS 14, *) { + ATTrackingManager.requestTrackingAuthorization { status in + if case .authorized = status { + self.identity(id, info: info) + } + } + } + } + + func configure() { + let configuration = AnalyticsConfiguration(writeKey: segmentKey) + configuration.trackApplicationLifecycleEvents = true + configuration.recordScreenViews = false + + Analytics.setup(with: configuration) + } + + func track(view data: BaseTrackingViewData) { + print("📊 Analytics Screen - \(data.name)") + Analytics.shared().screen(data.name) + } + + func track(event log: BaseTrackingEventLogData) { + print("📊 Analytics Event - \(log.name)\n\(log.parameters ?? [:])") + Analytics.shared().track(log.name, properties: log.parameters) + } + + func identity(_ id: String, info: [String: Any]?) { + print("📊 Analytics Identify - \(id)\nInfo: \(info ?? [:])") + Analytics.shared().identify(id, traits: info) + } + + func reset(_ name: String) { + print("📊 Analytics Reset: \(name)") + Analytics.shared().track(name) + Analytics.shared().flush() + Analytics.shared().reset() + } +} + +// MARK: - BaseTrackingEventLog +extension BaseTrackingEventLog { + static func trackView(name: ScreenName, className: ClassName? = nil) { + let data = BaseTrackingViewData( + name: name.rawValue as? String ?? "", + className: className?.rawValue as? String + ) + TrackingManager.shared.track(view: data) + } + + static func trackEvent(name: EventName, parameters: EventParameters? = nil) { + let data = BaseTrackingEventLogData( + name: name.rawValue as? String ?? "", + parameters: parameters?.rawValue as? [String: Any] + ) + TrackingManager.shared.track(event: data) + } +} diff --git a/Examples/tvOS/SEDemo/SEDemo/Info.plist b/Examples/tvOS/SEDemo/SEDemo/Info.plist new file mode 100644 index 0000000..25869ef --- /dev/null +++ b/Examples/tvOS/SEDemo/SEDemo/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + UIUserInterfaceStyle + Automatic + +