From 3dfaf70e056107faaea5aa493b37ec3d04abe116 Mon Sep 17 00:00:00 2001 From: Denis Chilik Date: Wed, 18 Feb 2026 12:11:43 -0500 Subject: [PATCH 1/3] feat: Add SPM-Swift-Exmple app --- .../project.pbxproj | 371 ++++++++++++++++++ .../SPM-Swift-Example/AppDelegate.swift | 40 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 ++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 24 ++ .../SPM-Swift-Example/Info.plist | 25 ++ .../SPM-Swift-Example/SceneDelegate.swift | 40 ++ .../SPM-Swift-Example/ViewController.swift | 4 + 10 files changed, 581 insertions(+) create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..db9d0138a --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj @@ -0,0 +1,371 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 35A07B902F46295E00EAB7C5 /* mParticle-UrbanAirship in Frameworks */ = {isa = PBXBuildFile; productRef = 35A07B8F2F46295E00EAB7C5 /* mParticle-UrbanAirship */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 35A07B762F46291300EAB7C5 /* SPM-Swift-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SPM-Swift-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 35A07B882F46291500EAB7C5 /* Exceptions for "SPM-Swift-Example" folder in "SPM-Swift-Example" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 35A07B752F46291300EAB7C5 /* SPM-Swift-Example */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 35A07B782F46291300EAB7C5 /* SPM-Swift-Example */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 35A07B882F46291500EAB7C5 /* Exceptions for "SPM-Swift-Example" folder in "SPM-Swift-Example" target */, + ); + path = "SPM-Swift-Example"; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 35A07B732F46291300EAB7C5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 35A07B902F46295E00EAB7C5 /* mParticle-UrbanAirship in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 35A07B6D2F46291300EAB7C5 = { + isa = PBXGroup; + children = ( + 35A07B782F46291300EAB7C5 /* SPM-Swift-Example */, + 35A07B772F46291300EAB7C5 /* Products */, + ); + sourceTree = ""; + }; + 35A07B772F46291300EAB7C5 /* Products */ = { + isa = PBXGroup; + children = ( + 35A07B762F46291300EAB7C5 /* SPM-Swift-Example.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 35A07B752F46291300EAB7C5 /* SPM-Swift-Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 35A07B892F46291500EAB7C5 /* Build configuration list for PBXNativeTarget "SPM-Swift-Example" */; + buildPhases = ( + 35A07B722F46291300EAB7C5 /* Sources */, + 35A07B732F46291300EAB7C5 /* Frameworks */, + 35A07B742F46291300EAB7C5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 35A07B782F46291300EAB7C5 /* SPM-Swift-Example */, + ); + name = "SPM-Swift-Example"; + packageProductDependencies = ( + 35A07B8F2F46295E00EAB7C5 /* mParticle-UrbanAirship */, + ); + productName = "SPM-Swift-Example"; + productReference = 35A07B762F46291300EAB7C5 /* SPM-Swift-Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 35A07B6E2F46291300EAB7C5 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2620; + LastUpgradeCheck = 2620; + TargetAttributes = { + 35A07B752F46291300EAB7C5 = { + CreatedOnToolsVersion = 26.2; + }; + }; + }; + buildConfigurationList = 35A07B712F46291300EAB7C5 /* Build configuration list for PBXProject "SPM-Swift-Example" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 35A07B6D2F46291300EAB7C5; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 35A07B8E2F46295E00EAB7C5 /* XCLocalSwiftPackageReference "../../../urbanairship-20" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 35A07B772F46291300EAB7C5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 35A07B752F46291300EAB7C5 /* SPM-Swift-Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 35A07B742F46291300EAB7C5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 35A07B722F46291300EAB7C5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 35A07B8A2F46291500EAB7C5 /* 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 = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "SPM-Swift-Example/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.mparticle.mParticle.SPM-Swift-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 35A07B8B2F46291500EAB7C5 /* 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 = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "SPM-Swift-Example/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.mparticle.mParticle.SPM-Swift-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 35A07B8C2F46291500EAB7C5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 26.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 35A07B8D2F46291500EAB7C5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 26.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 35A07B712F46291300EAB7C5 /* Build configuration list for PBXProject "SPM-Swift-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 35A07B8C2F46291500EAB7C5 /* Debug */, + 35A07B8D2F46291500EAB7C5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 35A07B892F46291500EAB7C5 /* Build configuration list for PBXNativeTarget "SPM-Swift-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 35A07B8A2F46291500EAB7C5 /* Debug */, + 35A07B8B2F46291500EAB7C5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 35A07B8E2F46295E00EAB7C5 /* XCLocalSwiftPackageReference "../../../urbanairship-20" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../urbanairship-20"; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 35A07B8F2F46295E00EAB7C5 /* mParticle-UrbanAirship */ = { + isa = XCSwiftPackageProductDependency; + productName = "mParticle-UrbanAirship"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 35A07B6E2F46291300EAB7C5 /* Project object */; +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift new file mode 100644 index 000000000..c63afd0b8 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift @@ -0,0 +1,40 @@ +import UIKit +import mParticle_Apple_SDK + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + let mparticle = MParticle.sharedInstance() + mparticle.start(with: .init( + key: "REPLACE WITH YOUR MPARTICLE API KEY", + secret: "REPLACE WITH YOUR MPARTICLE API SECRET" + )) + mparticle.logLevel = .verbose + if let event = MPEvent(name: "foo", type: .other) { + mparticle.logEvent(event) + } + + 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/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..0afb3cf0e --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors": [ + { + "idiom": "universal" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..c70a5bff1 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images": [ + { + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + }, + { + "appearances": [ + { + "appearance": "luminosity", + "value": "dark" + } + ], + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + }, + { + "appearances": [ + { + "appearance": "luminosity", + "value": "tinted" + } + ], + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist new file mode 100644 index 000000000..dd3c9afda --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift new file mode 100644 index 000000000..a592daa1a --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift @@ -0,0 +1,40 @@ +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). + } + + 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/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift new file mode 100644 index 000000000..b9a63bbde --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift @@ -0,0 +1,4 @@ +import UIKit + +class ViewController: UIViewController { +} From caa767dee7ace84848007d05aaa947233d3917be Mon Sep 17 00:00:00 2001 From: Denis Chilik Date: Wed, 18 Feb 2026 12:22:52 -0500 Subject: [PATCH 2/3] Add SPM-Objc-Example App --- .../project.pbxproj | 359 ++++++++++++++++++ .../SPM-Objc-Example/AppDelegate.h | 6 + .../SPM-Objc-Example/AppDelegate.m | 34 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 ++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 24 ++ .../SPM-Objc-Example/Info.plist | 25 ++ .../SPM-Objc-Example/SceneDelegate.h | 8 + .../SPM-Objc-Example/SceneDelegate.m | 50 +++ .../SPM-Objc-Example/ViewController.h | 7 + .../SPM-Objc-Example/ViewController.m | 15 + .../SPM-Objc-Example/SPM-Objc-Example/main.m | 11 + 14 files changed, 616 insertions(+) create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m create mode 100644 kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/main.m diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..4b8791c0c --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj @@ -0,0 +1,359 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 35A07BD92F462C7C00EAB7C5 /* mParticle-UrbanAirship in Frameworks */ = {isa = PBXBuildFile; productRef = 35A07BD82F462C7C00EAB7C5 /* mParticle-UrbanAirship */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 35A07BBA2F462C2100EAB7C5 /* SPM-Objc-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SPM-Objc-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 35A07BD12F462C2200EAB7C5 /* Exceptions for "SPM-Objc-Example" folder in "SPM-Objc-Example" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 35A07BB92F462C2100EAB7C5 /* SPM-Objc-Example */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 35A07BBC2F462C2100EAB7C5 /* SPM-Objc-Example */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 35A07BD12F462C2200EAB7C5 /* Exceptions for "SPM-Objc-Example" folder in "SPM-Objc-Example" target */, + ); + path = "SPM-Objc-Example"; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 35A07BB72F462C2100EAB7C5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 35A07BD92F462C7C00EAB7C5 /* mParticle-UrbanAirship in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 35A07BB12F462C2100EAB7C5 = { + isa = PBXGroup; + children = ( + 35A07BBC2F462C2100EAB7C5 /* SPM-Objc-Example */, + 35A07BBB2F462C2100EAB7C5 /* Products */, + ); + sourceTree = ""; + }; + 35A07BBB2F462C2100EAB7C5 /* Products */ = { + isa = PBXGroup; + children = ( + 35A07BBA2F462C2100EAB7C5 /* SPM-Objc-Example.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 35A07BB92F462C2100EAB7C5 /* SPM-Objc-Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 35A07BD22F462C2200EAB7C5 /* Build configuration list for PBXNativeTarget "SPM-Objc-Example" */; + buildPhases = ( + 35A07BB62F462C2100EAB7C5 /* Sources */, + 35A07BB72F462C2100EAB7C5 /* Frameworks */, + 35A07BB82F462C2100EAB7C5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 35A07BBC2F462C2100EAB7C5 /* SPM-Objc-Example */, + ); + name = "SPM-Objc-Example"; + packageProductDependencies = ( + 35A07BD82F462C7C00EAB7C5 /* mParticle-UrbanAirship */, + ); + productName = "SPM-Objc-Example"; + productReference = 35A07BBA2F462C2100EAB7C5 /* SPM-Objc-Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 35A07BB22F462C2100EAB7C5 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 2620; + TargetAttributes = { + 35A07BB92F462C2100EAB7C5 = { + CreatedOnToolsVersion = 26.2; + }; + }; + }; + buildConfigurationList = 35A07BB52F462C2100EAB7C5 /* Build configuration list for PBXProject "SPM-Objc-Example" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 35A07BB12F462C2100EAB7C5; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 35A07BD72F462C7C00EAB7C5 /* XCLocalSwiftPackageReference "../../../urbanairship-20" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 35A07BBB2F462C2100EAB7C5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 35A07BB92F462C2100EAB7C5 /* SPM-Objc-Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 35A07BB82F462C2100EAB7C5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 35A07BB62F462C2100EAB7C5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 35A07BD32F462C2200EAB7C5 /* 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 = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "SPM-Objc-Example/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.mparticle.mParticle.SPM-Objc-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 35A07BD42F462C2200EAB7C5 /* 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 = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "SPM-Objc-Example/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.mparticle.mParticle.SPM-Objc-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 35A07BD52F462C2200EAB7C5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 26.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 35A07BD62F462C2200EAB7C5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 26.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 35A07BB52F462C2100EAB7C5 /* Build configuration list for PBXProject "SPM-Objc-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 35A07BD52F462C2200EAB7C5 /* Debug */, + 35A07BD62F462C2200EAB7C5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 35A07BD22F462C2200EAB7C5 /* Build configuration list for PBXNativeTarget "SPM-Objc-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 35A07BD32F462C2200EAB7C5 /* Debug */, + 35A07BD42F462C2200EAB7C5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 35A07BD72F462C7C00EAB7C5 /* XCLocalSwiftPackageReference "../../../urbanairship-20" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../urbanairship-20"; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 35A07BD82F462C7C00EAB7C5 /* mParticle-UrbanAirship */ = { + isa = XCSwiftPackageProductDependency; + productName = "mParticle-UrbanAirship"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 35A07BB22F462C2100EAB7C5 /* Project object */; +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h new file mode 100644 index 000000000..5e7f5cce8 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h @@ -0,0 +1,6 @@ +#import + +@interface AppDelegate : UIResponder + + +@end diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m new file mode 100644 index 000000000..514f4608d --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m @@ -0,0 +1,34 @@ +#import "AppDelegate.h" +#import "mParticle.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [[MParticle sharedInstance] startWithOptions:[MParticleOptions optionsWithKey:@"REPLACE WITH YOUR MPARTICLE API KEY" secret:@"REPLACE WITH YOUR MPARTICLE API SECRET"]]; + [MParticle sharedInstance].logLevel = MPILogLevelVerbose; + + [[MParticle sharedInstance] logEvent:[[MPEvent alloc] initWithName:@"foo" type:MPEventTypeOther]]; + + return YES; +} + +#pragma mark - UISceneSession lifecycle + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // 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. +} + +@end diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..0afb3cf0e --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors": [ + { + "idiom": "universal" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..c70a5bff1 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images": [ + { + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + }, + { + "appearances": [ + { + "appearance": "luminosity", + "value": "dark" + } + ], + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + }, + { + "appearances": [ + { + "appearance": "luminosity", + "value": "tinted" + } + ], + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..808a21ce7 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist new file mode 100644 index 000000000..81ed29b76 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h new file mode 100644 index 000000000..a19a1ce55 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h @@ -0,0 +1,8 @@ +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m new file mode 100644 index 000000000..e5ae2c95c --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m @@ -0,0 +1,50 @@ +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)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). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // 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). +} + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // 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. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // 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). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // 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. +} + + +@end diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h new file mode 100644 index 000000000..a79652b56 --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h @@ -0,0 +1,7 @@ +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m new file mode 100644 index 000000000..19161aa7a --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m @@ -0,0 +1,15 @@ +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + + +@end diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/main.m b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/main.m new file mode 100644 index 000000000..dba295ebe --- /dev/null +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/main.m @@ -0,0 +1,11 @@ +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} From 19abd21702daed6a0f393168bc206f2e80217f1a Mon Sep 17 00:00:00 2001 From: Denis Chilik Date: Wed, 18 Feb 2026 13:28:43 -0500 Subject: [PATCH 3/3] Kit should be imported to be Initialized --- .../Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m | 1 + .../SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m index 514f4608d..9dde343bf 100644 --- a/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m @@ -1,5 +1,6 @@ #import "AppDelegate.h" #import "mParticle.h" +#import "MPKitUrbanAirship.h" @interface AppDelegate () diff --git a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift index c63afd0b8..862c17cef 100644 --- a/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift +++ b/kits/urbanairship/urbanairship-20/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift @@ -1,5 +1,6 @@ import UIKit import mParticle_Apple_SDK +import mParticle_UrbanAirship @main class AppDelegate: UIResponder, UIApplicationDelegate {