From 8bfc7fc6bca34ef3bb9a9ec3114de267c461dcaa Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Thu, 13 Apr 2023 11:48:16 -0500 Subject: [PATCH] UID2GoogleGMADevelopmentApp Created (#2) --- .../project.pbxproj | 446 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 68 +++ .../AppData/AppDataLoader.swift | 22 + .../AppData/Date+AppExtensions.swift | 16 + .../AppData/String+AppExtensions.swift | 14 + .../AppData/uid2identity.json | 10 + .../AppDelegate.swift | 37 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../Base.lproj/Main.storyboard | 48 ++ .../UID2GoogleGMADevelopmentApp/Info.plist | 162 +++++++ .../SceneDelegate.swift | 49 ++ .../ViewController.swift | 59 +++ README.md | 7 +- 18 files changed, 1004 insertions(+), 4 deletions(-) create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.pbxproj create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/AppDataLoader.swift create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/Date+AppExtensions.swift create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/String+AppExtensions.swift create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/uid2identity.json create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppDelegate.swift create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/Contents.json create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/LaunchScreen.storyboard create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/Main.storyboard create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Info.plist create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/SceneDelegate.swift create mode 100644 Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/ViewController.swift diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.pbxproj b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7241ba6 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.pbxproj @@ -0,0 +1,446 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + A217470F29E79B5600EC20DF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217470E29E79B5600EC20DF /* AppDelegate.swift */; }; + A217471129E79B5600EC20DF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217471029E79B5600EC20DF /* SceneDelegate.swift */; }; + A217471329E79B5600EC20DF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217471229E79B5600EC20DF /* ViewController.swift */; }; + A217471629E79B5600EC20DF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A217471429E79B5600EC20DF /* Main.storyboard */; }; + A217471829E79B5600EC20DF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A217471729E79B5600EC20DF /* Assets.xcassets */; }; + A217471B29E79B5600EC20DF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A217471929E79B5600EC20DF /* LaunchScreen.storyboard */; }; + A2E7019029E7A5DA00B9DFA1 /* UID2GMAPlugin in Frameworks */ = {isa = PBXBuildFile; productRef = A2E7018F29E7A5DA00B9DFA1 /* UID2GMAPlugin */; }; + E23A114C29E84C4800FAE364 /* Date+AppExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23A114829E84C4700FAE364 /* Date+AppExtensions.swift */; }; + E23A114D29E84C4800FAE364 /* uid2identity.json in Resources */ = {isa = PBXBuildFile; fileRef = E23A114929E84C4700FAE364 /* uid2identity.json */; }; + E23A114E29E84C4800FAE364 /* String+AppExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23A114A29E84C4800FAE364 /* String+AppExtensions.swift */; }; + E23A114F29E84C4800FAE364 /* AppDataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23A114B29E84C4800FAE364 /* AppDataLoader.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + A217470B29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UID2GoogleGMADevelopmentApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A217470E29E79B5600EC20DF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A217471029E79B5600EC20DF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + A217471229E79B5600EC20DF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A217471529E79B5600EC20DF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A217471729E79B5600EC20DF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A217471A29E79B5600EC20DF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A217471C29E79B5600EC20DF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A2E7018D29E7A5CA00B9DFA1 /* uid2-ios-plugin-google-gma */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "uid2-ios-plugin-google-gma"; path = ../..; sourceTree = ""; }; + E23A114829E84C4700FAE364 /* Date+AppExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+AppExtensions.swift"; sourceTree = ""; }; + E23A114929E84C4700FAE364 /* uid2identity.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = uid2identity.json; sourceTree = ""; }; + E23A114A29E84C4800FAE364 /* String+AppExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+AppExtensions.swift"; sourceTree = ""; }; + E23A114B29E84C4800FAE364 /* AppDataLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDataLoader.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A217470829E79B5600EC20DF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A2E7019029E7A5DA00B9DFA1 /* UID2GMAPlugin in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A217470229E79B5600EC20DF = { + isa = PBXGroup; + children = ( + A2E7018C29E7A5CA00B9DFA1 /* Packages */, + A217470D29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp */, + A217470C29E79B5600EC20DF /* Products */, + A2E7018E29E7A5DA00B9DFA1 /* Frameworks */, + ); + sourceTree = ""; + }; + A217470C29E79B5600EC20DF /* Products */ = { + isa = PBXGroup; + children = ( + A217470B29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp.app */, + ); + name = Products; + sourceTree = ""; + }; + A217470D29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp */ = { + isa = PBXGroup; + children = ( + E23A114729E84C2800FAE364 /* AppData */, + A217470E29E79B5600EC20DF /* AppDelegate.swift */, + A217471029E79B5600EC20DF /* SceneDelegate.swift */, + A217471229E79B5600EC20DF /* ViewController.swift */, + A217471429E79B5600EC20DF /* Main.storyboard */, + A217471729E79B5600EC20DF /* Assets.xcassets */, + A217471929E79B5600EC20DF /* LaunchScreen.storyboard */, + A217471C29E79B5600EC20DF /* Info.plist */, + ); + path = UID2GoogleGMADevelopmentApp; + sourceTree = ""; + }; + A2E7018C29E7A5CA00B9DFA1 /* Packages */ = { + isa = PBXGroup; + children = ( + A2E7018D29E7A5CA00B9DFA1 /* uid2-ios-plugin-google-gma */, + ); + name = Packages; + sourceTree = ""; + }; + A2E7018E29E7A5DA00B9DFA1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + E23A114729E84C2800FAE364 /* AppData */ = { + isa = PBXGroup; + children = ( + E23A114B29E84C4800FAE364 /* AppDataLoader.swift */, + E23A114829E84C4700FAE364 /* Date+AppExtensions.swift */, + E23A114A29E84C4800FAE364 /* String+AppExtensions.swift */, + E23A114929E84C4700FAE364 /* uid2identity.json */, + ); + path = AppData; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A217470A29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = A217471F29E79B5600EC20DF /* Build configuration list for PBXNativeTarget "UID2GoogleGMADevelopmentApp" */; + buildPhases = ( + A217470729E79B5600EC20DF /* Sources */, + A217470829E79B5600EC20DF /* Frameworks */, + A217470929E79B5600EC20DF /* Resources */, + E259D6F429E854C2008DAEF7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UID2GoogleGMADevelopmentApp; + packageProductDependencies = ( + A2E7018F29E7A5DA00B9DFA1 /* UID2GMAPlugin */, + ); + productName = UID2GoogleGMADevelopmentApp; + productReference = A217470B29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A217470329E79B5600EC20DF /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + A217470A29E79B5600EC20DF = { + CreatedOnToolsVersion = 14.2; + }; + }; + }; + buildConfigurationList = A217470629E79B5600EC20DF /* Build configuration list for PBXProject "UID2GoogleGMADevelopmentApp" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A217470229E79B5600EC20DF; + productRefGroup = A217470C29E79B5600EC20DF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A217470A29E79B5600EC20DF /* UID2GoogleGMADevelopmentApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A217470929E79B5600EC20DF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A217471B29E79B5600EC20DF /* LaunchScreen.storyboard in Resources */, + A217471829E79B5600EC20DF /* Assets.xcassets in Resources */, + A217471629E79B5600EC20DF /* Main.storyboard in Resources */, + E23A114D29E84C4800FAE364 /* uid2identity.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + E259D6F429E854C2008DAEF7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint > /dev/null; then\n swiftlint --config ../../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A217470729E79B5600EC20DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A217471329E79B5600EC20DF /* ViewController.swift in Sources */, + E23A114E29E84C4800FAE364 /* String+AppExtensions.swift in Sources */, + E23A114F29E84C4800FAE364 /* AppDataLoader.swift in Sources */, + E23A114C29E84C4800FAE364 /* Date+AppExtensions.swift in Sources */, + A217470F29E79B5600EC20DF /* AppDelegate.swift in Sources */, + A217471129E79B5600EC20DF /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + A217471429E79B5600EC20DF /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A217471529E79B5600EC20DF /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A217471929E79B5600EC20DF /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A217471A29E79B5600EC20DF /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A217471D29E79B5600EC20DF /* 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++20"; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + A217471E29E79B5600EC20DF /* 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++20"; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_LDFLAGS = "-ObjC"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A217472029E79B5600EC20DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 98VS3NV9WE; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = UID2GoogleGMADevelopmentApp/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.uidapi.UID2GoogleGMADevelopmentApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A217472129E79B5600EC20DF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 98VS3NV9WE; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = UID2GoogleGMADevelopmentApp/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.uidapi.UID2GoogleGMADevelopmentApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A217470629E79B5600EC20DF /* Build configuration list for PBXProject "UID2GoogleGMADevelopmentApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A217471D29E79B5600EC20DF /* Debug */, + A217471E29E79B5600EC20DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A217471F29E79B5600EC20DF /* Build configuration list for PBXNativeTarget "UID2GoogleGMADevelopmentApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A217472029E79B5600EC20DF /* Debug */, + A217472129E79B5600EC20DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + A2E7018F29E7A5DA00B9DFA1 /* UID2GMAPlugin */ = { + isa = XCSwiftPackageProductDependency; + productName = UID2GMAPlugin; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = A217470329E79B5600EC20DF /* Project object */; +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..6faf36d --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,68 @@ +{ + "pins" : [ + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "274428b83e063cd518b998555be0ec18abcbe9de", + "version" : "10.8.0" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "871d43135925cde39ef7421d8723ce47edfdcc39", + "version" : "7.11.1" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "ec957ccddbcc710ccc64c9dcbd4c7006fcf8b73a", + "version" : "2.2.0" + } + }, + { + "identity" : "swift-package-manager-google-mobile-ads", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", + "state" : { + "revision" : "886501bfff8bd8cc22899de2c1779e479c96f9ff", + "version" : "10.3.0" + } + }, + { + "identity" : "swift-package-manager-google-user-messaging-platform", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git", + "state" : { + "revision" : "3b924ce3313a5fd2fc6a8dc889a8c38f76890fe3", + "version" : "2.0.0" + } + }, + { + "identity" : "uid2-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/IABTechLab/uid2-ios-sdk.git", + "state" : { + "revision" : "9706cbc8959593a81e5aea82926bc41ac9bbb9d3", + "version" : "0.1.0" + } + } + ], + "version" : 2 +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/AppDataLoader.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/AppDataLoader.swift new file mode 100644 index 0000000..426c4f0 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/AppDataLoader.swift @@ -0,0 +1,22 @@ +// +// AppDataLoader.swift +// +// +// Created by Brad Leege on 3/21/23. +// + +import Foundation + +final class AppDataLoader { + + static func load(fileName: String, fileExtension: String) throws -> Data { + + guard let bundlePath = Bundle.main.path(forResource: fileName, ofType: fileExtension), + let stringData = try String(contentsOfFile: bundlePath).data(using: .utf8) else { + throw "Could not load data from file." + } + + return stringData + } + +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/Date+AppExtensions.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/Date+AppExtensions.swift new file mode 100644 index 0000000..6ca0165 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/Date+AppExtensions.swift @@ -0,0 +1,16 @@ +// +// Date+AppExtensions.swift +// +// +// Created by Brad Leege on 3/21/23. +// + +import Foundation + +extension Date { + + var millisecondsSince1970: Int64 { + Int64((self.timeIntervalSince1970 * 1000.0).rounded()) + } + +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/String+AppExtensions.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/String+AppExtensions.swift new file mode 100644 index 0000000..9fb862e --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/String+AppExtensions.swift @@ -0,0 +1,14 @@ +// +// String+AppExtensions.swift +// +// +// Created by Brad Leege on 3/21/23. +// + +import Foundation + +extension String: LocalizedError { + + public var errorDescription: String? { return self } + +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/uid2identity.json b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/uid2identity.json new file mode 100644 index 0000000..f62c0b5 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppData/uid2identity.json @@ -0,0 +1,10 @@ +{ + "advertising_token": "NewAdvertisingTokenIjb6u6KcMAtd0/4ZIAYkXvFrMdlZVqfb9LNf99B+1ysE/lBzYVt64pxYxjobJMGbh5q/HsKY7KC0Xo5Rb/Vo8HC4dYOoWXyuGUaL7Jmbw4bzh+3pgokelUGyTX19DfArTeIg7n+8cxWQ=", + "refresh_token": "NewRefreshTokenAAAF2c8H5dF8AAAF2c8H5dF8AAAADX393Vw94afoVLL6A+qjdSUEisEKx6t42fLgN+2dmTgUavagz0Q6Kp7ghM989hKhZDyAGjHyuAAwm+CX1cO7DWEtMeNUA9vkWDjcIc8yeDZ+jmBtEaw07x/cxoul6fpv2PQ==", + "identity_expires": 1633643601000, + "refresh_from": 1633643001000, + "refresh_expires": 1636322000000, + "refresh_response_key": "yptCUTBoZm1ffosgCrmuwg==", + "status": "success" +} + diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppDelegate.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppDelegate.swift new file mode 100644 index 0000000..8882c3e --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// UID2GoogleGMADevelopmentApp +// +// Created by Brad Leege on 4/12/23. +// + +import GoogleMobileAds +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + // Initialize Google Mobile Ads SDK + GADMobileAds.sharedInstance().start(completionHandler: nil) + + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AccentColor.colorset/Contents.json b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/Contents.json b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/LaunchScreen.storyboard b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/Main.storyboard b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/Main.storyboard new file mode 100644 index 0000000..a3995d3 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Base.lproj/Main.storyboard @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Info.plist b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Info.plist new file mode 100644 index 0000000..9848495 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/Info.plist @@ -0,0 +1,162 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + SKAdNetworkItems + + + SKAdNetworkIdentifier + cstr6suwn9.skadnetwork + + + SKAdNetworkIdentifier + 4fzdc2evr5.skadnetwork + + + SKAdNetworkIdentifier + 2fnua5tdw4.skadnetwork + + + SKAdNetworkIdentifier + ydx93a7ass.skadnetwork + + + SKAdNetworkIdentifier + 5a6flpkh64.skadnetwork + + + SKAdNetworkIdentifier + p78axxw29g.skadnetwork + + + SKAdNetworkIdentifier + v72qych5uu.skadnetwork + + + SKAdNetworkIdentifier + c6k4g5qg8m.skadnetwork + + + SKAdNetworkIdentifier + s39g8k73mm.skadnetwork + + + SKAdNetworkIdentifier + 3qy4746246.skadnetwork + + + SKAdNetworkIdentifier + 3sh42y64q3.skadnetwork + + + SKAdNetworkIdentifier + f38h382jlk.skadnetwork + + + SKAdNetworkIdentifier + hs6bdukanm.skadnetwork + + + SKAdNetworkIdentifier + prcb7njmu6.skadnetwork + + + SKAdNetworkIdentifier + wzmmz9fp6w.skadnetwork + + + SKAdNetworkIdentifier + yclnxrl5pm.skadnetwork + + + SKAdNetworkIdentifier + 4468km3ulz.skadnetwork + + + SKAdNetworkIdentifier + t38b2kh725.skadnetwork + + + SKAdNetworkIdentifier + 7ug5zh24hu.skadnetwork + + + SKAdNetworkIdentifier + 9rd848q2bz.skadnetwork + + + SKAdNetworkIdentifier + n6fk4nfna4.skadnetwork + + + SKAdNetworkIdentifier + kbd757ywx3.skadnetwork + + + SKAdNetworkIdentifier + 9t245vhmpl.skadnetwork + + + SKAdNetworkIdentifier + 2u9pt9hc89.skadnetwork + + + SKAdNetworkIdentifier + 8s468mfl3y.skadnetwork + + + SKAdNetworkIdentifier + av6w8kgt66.skadnetwork + + + SKAdNetworkIdentifier + klf5c3l5u5.skadnetwork + + + SKAdNetworkIdentifier + ppxm28t8ap.skadnetwork + + + SKAdNetworkIdentifier + 424m5254lk.skadnetwork + + + SKAdNetworkIdentifier + uw77j35x4d.skadnetwork + + + SKAdNetworkIdentifier + e5fvkxwrpn.skadnetwork + + + SKAdNetworkIdentifier + zq492l623r.skadnetwork + + + SKAdNetworkIdentifier + 3qcr597p9d.skadnetwork + + + + diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/SceneDelegate.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/SceneDelegate.swift new file mode 100644 index 0000000..6016bb4 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/SceneDelegate.swift @@ -0,0 +1,49 @@ +// +// SceneDelegate.swift +// UID2GoogleGMADevelopmentApp +// +// Created by Brad Leege on 4/12/23. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + +} diff --git a/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/ViewController.swift b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/ViewController.swift new file mode 100644 index 0000000..827c0a6 --- /dev/null +++ b/Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp/ViewController.swift @@ -0,0 +1,59 @@ +// +// ViewController.swift +// UID2GoogleGMADevelopmentApp +// +// See: https://github.com/googleads/googleads-mobile-ios-examples/tree/main/Swift/admob/BannerExample +// +// Created by Brad Leege on 4/12/23. +// + +import GoogleMobileAds +import UID2 +import UIKit + +class ViewController: UIViewController { + + /// The banner view. + @IBOutlet weak var bannerView: GADBannerView! + + override func viewDidLoad() { + super.viewDidLoad() + Task { + await loadUID2Identity() + print("Google Mobile Ads SDK version: \(GADMobileAds.sharedInstance().sdkVersion)") + bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716" + bannerView.rootViewController = self + bannerView.load(GADRequest()) + } + } + + private func loadUID2Identity() async { + + do { + let decoder = JSONDecoder() + decoder.keyDecodingStrategy = .convertFromSnakeCase + + // Sample UID2Identity data + let uid2IdentityData = try AppDataLoader.load(fileName: "uid2identity", fileExtension: "json") + let uid2IdentityFromFile = try decoder.decode(UID2Identity.self, from: uid2IdentityData) + + // Emulate A UID2Identity With Valid Times + let identityExpires = Date(timeIntervalSinceNow: 60 * 60).millisecondsSince1970 + let refreshFrom = Date(timeIntervalSinceNow: 60 * 40).millisecondsSince1970 + let refreshExpires = Date(timeIntervalSinceNow: 60 * 50).millisecondsSince1970 + + let uid2Identity = UID2Identity(advertisingToken: uid2IdentityFromFile.advertisingToken, + refreshToken: uid2IdentityFromFile.refreshToken, + identityExpires: identityExpires, + refreshFrom: refreshFrom, + refreshExpires: refreshExpires, + refreshResponseKey: uid2IdentityFromFile.refreshResponseKey) + + await UID2Manager.shared.setIdentity(uid2Identity) + } catch { + print("Error loading UID2Identity") + } + + } + +} diff --git a/README.md b/README.md index 40808d8..4373729 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ A plugin for integrating [UID2](https://github.com/IABTechLab/uid2docs) and [Goo ``` . ├── Development -│   ├── UID2GoogleIMADevelopmentApp -│   └── UID2GoogleIMADevelopmentApp.xcodeproj +│   ├── UID2GoogleGMADevelopmentApp +│   └── UID2GoogleGMADevelopmentApp.xcodeproj ├── Package.swift ├── LICENSE.md ├── README.md @@ -32,9 +32,8 @@ A plugin for integrating [UID2](https://github.com/IABTechLab/uid2docs) and [Goo ## Development -The UID2GMAPlugin is a standalone headless library defined and managed by the Swift Package Manager via `Package.swift`. As such the `UID2GoogleIMADevelopmentApp` is the primary way for developing the SDK. Use Xcode to open `Development/UID2GoogleIMADevelopmentApp/UID2GoogleIMADevelopmentApp.xcodeproj` to begin development. +The UID2GMAPlugin is a standalone headless library defined and managed by the Swift Package Manager via `Package.swift`. As such the `UID2GoogleGMADevelopmentApp` is the primary way for developing the SDK. Use Xcode to open `Development/UID2GoogleGMADevelopmentApp/UID2GoogleGMADevelopmentApp.xcodeproj` to begin development. ## License UID2 is released under the Apache V2 license. [See LICENSE](https://github.com/IABTechLab/uid2-ios-sdk/blob/main/LICENSE.md) for details. -