From b617d39e4a51538f792648e3864cffdc6bd9a6a8 Mon Sep 17 00:00:00 2001 From: Nickolas Dimitrakas Date: Fri, 20 Mar 2026 00:21:22 -0400 Subject: [PATCH 1/4] feat: add Urban Airship 19 kit targeting Airship SDK 19.x Add mParticle-UrbanAirship-19 kit following established kit patterns: - Package.swift (swift-tools-version 5.5, iOS 15.6+, Airship SDK ~> 19.0) - CocoaPods podspec (mParticle-UrbanAirship-19, iOS 15.6 deployment target) - Xcode project with scheme for CI builds - SPM Objc and Swift example apps - Update matrix.json with urbanairship-19 entry - Update Kits/README.md with Urban Airship 19 row Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 10 + Kits/README.md | 1 + Kits/matrix.json | 13 + .../urbanairship/urbanairship-19/CHANGELOG.md | 7 + .../project.pbxproj | 359 ++++++++ .../SPM-Objc-Example/AppDelegate.h | 6 + .../SPM-Objc-Example/AppDelegate.m | 35 + .../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 + .../project.pbxproj | 371 ++++++++ .../SPM-Swift-Example/AppDelegate.swift | 41 + .../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 + Kits/urbanairship/urbanairship-19/LICENSE | 191 ++++ .../urbanairship-19/Package.swift | 38 + Kits/urbanairship/urbanairship-19/README.md | 97 ++ .../urbanairship-19/Sources/Info.plist | 26 + .../MPKitUrbanAirship.h | 22 + .../MPKitUrbanAirship.m | 833 ++++++++++++++++++ .../PrivacyInfo.xcprivacy | 14 + .../mParticle_UrbanAirship.h | 2 + .../MPKitUrbanAirshipTests.swift | 13 + .../mParticle-UrbanAirship-19.podspec | 18 + .../project.pbxproj | 335 +++++++ .../xcschemes/mParticle-UrbanAirship.xcscheme | 76 ++ 40 files changed, 2895 insertions(+) create mode 100644 Kits/urbanairship/urbanairship-19/CHANGELOG.md create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/main.m create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift create mode 100644 Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift create mode 100755 Kits/urbanairship/urbanairship-19/LICENSE create mode 100644 Kits/urbanairship/urbanairship-19/Package.swift create mode 100644 Kits/urbanairship/urbanairship-19/README.md create mode 100644 Kits/urbanairship/urbanairship-19/Sources/Info.plist create mode 100755 Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.h create mode 100755 Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.m create mode 100644 Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy create mode 100644 Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/mParticle_UrbanAirship.h create mode 100644 Kits/urbanairship/urbanairship-19/Tests/mParticle-UrbanAirshipTests/MPKitUrbanAirshipTests.swift create mode 100644 Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec create mode 100644 Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj create mode 100644 Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/xcshareddata/xcschemes/mParticle-UrbanAirship.xcscheme diff --git a/CHANGELOG.md b/CHANGELOG.md index 458aa5cdf..c1ff2d9ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ All notable changes to the mParticle Apple SDK (core and integration kits) are d --- +# [Unreleased] + +### Kits + +#### Added + +- feat: Add Urban Airship 19 kit targeting Airship SDK 19.x (iOS 15.6+) + +--- + # [8.44.0](https://github.com/mParticle/mparticle-apple-sdk/compare/v8.43.1...v8.44.0) (2026-02-19) ### Bug Fixes diff --git a/Kits/README.md b/Kits/README.md index 7b54ac33a..a0fe580ad 100644 --- a/Kits/README.md +++ b/Kits/README.md @@ -50,6 +50,7 @@ Each kit has its own README with installation and configuration steps. | Radar 3 | [`mparticle-apple-integration-radar-3`](https://github.com/mparticle-integrations/mparticle-apple-integration-radar-3) | [Radar SDK 3.x](https://github.com/radarlabs/radar-sdk-ios-spm) | | Rokt | [`mparticle-apple-integration-rokt`](https://github.com/mparticle-integrations/mparticle-apple-integration-rokt) | [Rokt Widget SDK](https://github.com/ROKT/rokt-sdk-ios) | | Singular 12 | [`mparticle-apple-integration-singular-12`](https://github.com/mparticle-integrations/mparticle-apple-integration-singular-12) | [Singular SDK 12.x](https://github.com/singular-labs/Singular-iOS-SDK) | +| Urban Airship 19 | [`mparticle-apple-integration-urbanairship-19`](https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship-19) | [Airship SDK 19.x](https://github.com/urbanairship/ios-library) | | Urban Airship 20 | [`mparticle-apple-integration-urbanairship-20`](https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship-20) | [Airship SDK 20.x](https://github.com/urbanairship/ios-library) | ## Integrations Not in This Repository diff --git a/Kits/matrix.json b/Kits/matrix.json index 456698525..881096ae8 100644 --- a/Kits/matrix.json +++ b/Kits/matrix.json @@ -411,6 +411,19 @@ } ] }, + { + "name": "urbanairship-19", + "local_path": "Kits/urbanairship/urbanairship-19", + "podspec": "Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec", + "dest_repo": "mparticle-apple-integration-urbanairship-19", + "schemes": [ + { + "scheme": "mParticle-UrbanAirship", + "module": "mParticle_UrbanAirship", + "destination": "iOS" + } + ] + }, { "name": "urbanairship-20", "local_path": "Kits/urbanairship/urbanairship-20", diff --git a/Kits/urbanairship/urbanairship-19/CHANGELOG.md b/Kits/urbanairship/urbanairship-19/CHANGELOG.md new file mode 100644 index 000000000..f977cbb73 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +This integration is developed in the [mParticle Apple SDK](https://github.com/mParticle/mparticle-apple-sdk) monorepo. + +**Pull requests and issues** for this kit should be opened on the [mParticle/mparticle-apple-sdk](https://github.com/mParticle/mparticle-apple-sdk) repository. + +For changelog details for this integration, see the **Kits** section of the root [CHANGELOG.md](https://github.com/mParticle/mparticle-apple-sdk/blob/main/CHANGELOG.md) in that repo. diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..a772d75db --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19" */, + ); + 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-19" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../urbanairship-19"; + }; +/* 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-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h new file mode 100644 index 000000000..5e7f5cce8 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h @@ -0,0 +1,6 @@ +#import + +@interface AppDelegate : UIResponder + + +@end diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m new file mode 100644 index 000000000..9dde343bf --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m @@ -0,0 +1,35 @@ +#import "AppDelegate.h" +#import "mParticle.h" +#import "MPKitUrbanAirship.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-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Kits/urbanairship/urbanairship-19/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-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Kits/urbanairship/urbanairship-19/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-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..808a21ce7 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist new file mode 100644 index 000000000..81ed29b76 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h new file mode 100644 index 000000000..a19a1ce55 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m new file mode 100644 index 000000000..e5ae2c95c --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h new file mode 100644 index 000000000..a79652b56 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h @@ -0,0 +1,7 @@ +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m new file mode 100644 index 000000000..19161aa7a --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Objc-Example/SPM-Objc-Example/main.m b/Kits/urbanairship/urbanairship-19/Example/SPM-Objc-Example/SPM-Objc-Example/main.m new file mode 100644 index 000000000..dba295ebe --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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); +} diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..3fedcac6d --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19" */, + ); + 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-19" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../urbanairship-19"; + }; +/* 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-19/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift new file mode 100644 index 000000000..862c17cef --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift @@ -0,0 +1,41 @@ +import UIKit +import mParticle_Apple_SDK +import mParticle_UrbanAirship + +@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-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Kits/urbanairship/urbanairship-19/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-19/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-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Kits/urbanairship/urbanairship-19/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-19/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-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist new file mode 100644 index 000000000..dd3c9afda --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift new file mode 100644 index 000000000..a592daa1a --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/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-19/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift new file mode 100644 index 000000000..b9a63bbde --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift @@ -0,0 +1,4 @@ +import UIKit + +class ViewController: UIViewController { +} diff --git a/Kits/urbanairship/urbanairship-19/LICENSE b/Kits/urbanairship/urbanairship-19/LICENSE new file mode 100755 index 000000000..309b476d4 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/LICENSE @@ -0,0 +1,191 @@ +Copyright 2018 mParticle, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Kits/urbanairship/urbanairship-19/Package.swift b/Kits/urbanairship/urbanairship-19/Package.swift new file mode 100644 index 000000000..9a1c7ccea --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Package.swift @@ -0,0 +1,38 @@ +// swift-tools-version:5.5 +import PackageDescription + +let package = Package( + name: "mParticle-UrbanAirship", + platforms: [ .iOS(.v15) ], + products: [ + .library( + name: "mParticle-UrbanAirship", + targets: ["mParticle-UrbanAirship"] + ) + ], + dependencies: [ + .package( + url: "https://github.com/mParticle/mparticle-apple-sdk", + branch: "workstation/9.0-Release" + ), + .package(url: "https://github.com/urbanairship/ios-library", + .upToNextMajor(from: "19.0.0")) + ], + targets: [ + .target( + name: "mParticle-UrbanAirship", + dependencies: [ + .product(name: "mParticle-Apple-SDK", package: "mparticle-apple-sdk"), + .product(name: "AirshipObjectiveC", package: "ios-library") + ], + resources: [.process("PrivacyInfo.xcprivacy")], + publicHeadersPath: "." + ), + .testTarget( + name: "mParticle-UrbanAirshipTests", + dependencies: [ + "mParticle-UrbanAirship" + ] + ) + ] +) diff --git a/Kits/urbanairship/urbanairship-19/README.md b/Kits/urbanairship/urbanairship-19/README.md new file mode 100644 index 000000000..acb538ab2 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/README.md @@ -0,0 +1,97 @@ +# mParticle Urban Airship Kit (Airship SDK 19.x) + +This is the [Urban Airship](https://www.airship.com) integration for the [mParticle Apple SDK](https://github.com/mParticle/mparticle-apple-sdk), built against the [Airship SDK 19.x](https://github.com/urbanairship/ios-library). + +## Installation + +### Swift Package Manager + +Add the Urban Airship kit package dependency in Xcode or in your `Package.swift`. Swift Package Manager resolves the mParticle SDK automatically as a transitive dependency, so you do not need a separate `.package` entry for `mparticle-apple-sdk`. + +```swift +let mParticleVersion: Version = "9.0.0" + +.package( + url: "https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship-19", + .upToNextMajor(from: mParticleVersion) +), +``` + +Then add `mParticle-UrbanAirship` as a dependency of your target. + +### CocoaPods + +Add the kit dependency to your app's Podfile: + +```ruby +pod 'mParticle-UrbanAirship-19', '~> 9' +``` + +## Verifying the Integration + +After installing, rebuild and launch your app. With the mParticle log level set to Debug or higher, you should see the following in your Xcode console: + +```bash +Included kits: { UrbanAirship } +``` + +## Push Registration + +Push registration is not handled by the Airship SDK when the passive registration setting is enabled. This prevents out-of-the-box categories from being registered automatically. + +Registering out-of-the-box categories manually can be accomplished by accessing the defaultCategories class method on MPKitUrbanAirship and setting them on the UNNotificationCenter: + +```swift +UNUserNotificationCenter.current().requestAuthorization(options: [UNAuthorizationOptions.alert]) { (success, err) in + UNUserNotificationCenter.current().setNotificationCategories(MPKitUrbanAirship.defaultCategories()) +} +``` + +## Tag-Based Segmentation + +All mParticle user attributes are forwarded to Airship as [tags](https://docs.airship.com/platform/ios/segmentation/) which can be used to identify and segment your audience. + +Most clients prefer for all tags to remain constant if set. But, a tag can be removed manually by invoking removeTag directly on the Airship SDK as shown below. + +### Swift + +```swift +private func removeTag(key: String) { + if (!key.isEmpty) { + Airship.channel.editTags { editor in + editor.remove(key) + } + Airship.channel.updateRegistration() + } +} +``` + +### Objective-C + +```objective-c +- (void)removeTag:(nonnull NSString *)key { + if (key && (NSNull *)key != [NSNull null] && ![key isEqualToString:@""]) { + [[UAirship channel] editTags:^(UATagEditor * _Nonnull editor) { + [editor removeTag:key]; + [editor apply]; + }]; + [[UAirship channel] updateRegistration]; + } +} +``` + +## Platform Support + +| Platform | Minimum Version | +| -------- | --------------- | +| iOS | 15.6 | + +## Documentation + +- [mParticle Urban Airship Integration Guide](https://docs.mparticle.com/integrations/airship/event/) +- [mParticle iOS SDK Documentation](https://docs.mparticle.com/developers/sdk/ios/) +- [Airship iOS SDK Documentation](https://docs.airship.com/platform/ios/) + +## License + +[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/Kits/urbanairship/urbanairship-19/Sources/Info.plist b/Kits/urbanairship/urbanairship-19/Sources/Info.plist new file mode 100644 index 000000000..d3de8eefb --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Sources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.h b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.h new file mode 100755 index 000000000..5f6af201b --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.h @@ -0,0 +1,22 @@ +#import +#if defined(__has_include) && __has_include() + #import +#else + #import "mParticle.h" +#endif + +@interface MPKitUrbanAirship : NSObject + +@property (nonatomic, strong, nonnull) NSDictionary *configuration; +@property (nonatomic, strong, nullable) NSDictionary *launchOptions; +@property (nonatomic, unsafe_unretained, readonly) BOOL started; + +/** + * Default out-of-the-box categories. + * + * @note These notification categories need to be set on the current notification center to retain + * out-of-the-box categories functionality. + */ ++ (NSSet *_Nonnull)defaultCategories; + +@end diff --git a/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.m b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.m new file mode 100755 index 000000000..1452a7f91 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/MPKitUrbanAirship.m @@ -0,0 +1,833 @@ +#import "MPKitUrbanAirship.h" +#if AIRSHIP_COCOAPODS + @import AirshipKit; +#elif SWIFT_PACKAGE + @import AirshipCore; + @import AirshipObjectiveC; +#else + #if __has_include("AirshipLib.h") + #import "AirshipLib.h" + #else + @import AirshipCore; + @import AirshipObjectiveC; + #endif +#endif + +#if TARGET_OS_IOS == 1 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 +#import +#import +#endif + +NSString * const UAIdentityEmail = @"email"; +NSString * const UAIdentityFacebook = @"facebook_id"; +NSString * const UAIdentityTwitter = @"twitter_id"; +NSString * const UAIdentityGoogle = @"google_id"; +NSString * const UAIdentityMicrosoft = @"microsoft_id"; +NSString * const UAIdentityYahoo = @"yahoo_id"; +NSString * const UAIdentityFacebookCustomAudienceId = @"facebook_custom_audience_id"; +NSString * const UAIdentityCustomer = @"customer_id"; + +NSString * const UAConfigAppKey = @"applicationKey"; +NSString * const UAConfigAppSecret = @"applicationSecret"; +NSString * const UAConfigCustomDomainProxyUrl = @"customDomainProxyUrl"; +NSString * const UAConfigEnableTags = @"enableTags"; +NSString * const UAConfigIncludeUserAttributes = @"includeUserAttributes"; +NSString * const UAConfigNamedUserId = @"namedUserIdField"; + +// Possible values for UAConfigNamedUserId +NSString * const UAConfigNamedUserIdEmail = @"email"; +NSString * const UAConfigNamedUserIdCustomerdId = @"customerId"; +NSString * const UAConfigNamedUserIdOther = @"other"; +NSString * const UAConfigNamedUserIdNone = @"none"; + +NSString * const UAChannelIdIntegrationKey = @"com.urbanairship.channel_id"; + +NSString * const kMPUAEventTagKey = @"eventUserTags"; +NSString * const kMPUAEventAttributeTagKey = @"eventAttributeUserTags"; +NSString * const kMPUAMapTypeEventClass = @"EventClass.Id"; +NSString * const kMPUAMapTypeEventClassDetails = @"EventClassDetails.Id"; +NSString * const kMPUAMapTypeEventAttributeClass = @"EventAttributeClass.Id"; +NSString * const kMPUAMapTypeEventAttributeClassDetails = @"EventAttributeClassDetails.Id"; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - MPUATagMapping +@interface MPUATagMapping : NSObject + +@property (nonatomic, strong, readonly) NSString *mapType; +@property (nonatomic, strong, readonly) NSString *value; +@property (nonatomic, strong, readonly) NSString *mapHash; + +- (instancetype)initWithConfiguration:(NSDictionary *)configuration; + +@end + +@implementation MPUATagMapping + +- (instancetype)initWithConfiguration:(NSDictionary *)configuration { + self = [super init]; + if (self) { + _mapType = configuration[@"maptype"]; + _value = configuration[@"value"]; + _mapHash = configuration[@"map"]; + } + + if (!_mapType || (NSNull *)_mapType == [NSNull null] || + !_value || (NSNull *)_value == [NSNull null] || + !_mapHash || (NSNull *)_mapHash == [NSNull null]) + { + return nil; + } else { + return self; + } +} + +@end + + +#pragma mark - MPKitUrbanAirship +@interface MPKitUrbanAirship() + +@property (nonatomic, strong) NSMutableArray *eventTagsMapping; +@property (nonatomic, strong) NSMutableArray *eventAttributeTagsMapping; +@property (nonatomic, unsafe_unretained) BOOL enableTags; +@property (nonatomic, unsafe_unretained) BOOL includeUserAttributes; + +@end + + +@implementation MPKitUrbanAirship + ++ (NSNumber *)kitCode { + return @25; +} + ++ (void)load { + MPKitRegister *kitRegister = [[MPKitRegister alloc] initWithName:@"Urban Airship" + className:@"MPKitUrbanAirship"]; + [MParticle registerExtension:kitRegister]; +} + ++ (NSSet *)defaultCategories { + return [UANotificationCategories defaultCategories]; +} + +#pragma mark - MPKitInstanceProtocol methods + +#pragma mark Kit instance and lifecycle + +- (MPKitExecStatus *)didFinishLaunchingWithConfiguration:(NSDictionary *)configuration { + MPKitExecStatus *execStatus = nil; + + self.configuration = configuration; + + NSString *auxString = configuration[UAConfigEnableTags]; + _enableTags = auxString ? [auxString boolValue] : NO; + + auxString = configuration[UAConfigIncludeUserAttributes]; + _includeUserAttributes = auxString ? [auxString boolValue] : NO; + + [self start]; + + execStatus = [[MPKitExecStatus alloc] initWithSDKCode:[[self class] kitCode] returnCode:MPKitReturnCodeSuccess]; + return execStatus; +} + +- (void)start { + static dispatch_once_t kitPredicate; + + dispatch_once(&kitPredicate, ^{ + self->_started = YES; + + NSError *error = nil; + UAConfig *config = [UAConfig config]; + NSFileManager *fileManager = [NSFileManager defaultManager]; + NSString *pListPath = @"AirshipConfig.plist"; + if ([fileManager fileExistsAtPath:pListPath]) { + config = [UAConfig fromPlistWithContentsOfFile:pListPath error:&error]; + if (error) { + NSLog(@"Airship config failed to initialize based off AirshipConfig.plist: %@", error); + NSLog(@"mParticle will attempt to manually construct UA Config based off your Connection Settings"); + config = [UAConfig config]; + } + } + + config.isAutomaticSetupEnabled = NO; + + // Enable passive APNS registration + config.requestAuthorizationToUseNotifications = NO; + + // Enable custom domain proxy if provided + if (self.configuration[UAConfigCustomDomainProxyUrl]) { + config.initialConfigURL = self.configuration[UAConfigCustomDomainProxyUrl]; + config.URLAllowList = [config.URLAllowList arrayByAddingObject:self.configuration[UAConfigCustomDomainProxyUrl]]; + } + + if ([MParticle sharedInstance].environment == MPEnvironmentDevelopment) { + config.developmentAppKey = self.configuration[UAConfigAppKey]; + config.developmentAppSecret = self.configuration[UAConfigAppSecret]; + config.inProduction = @NO; + } else { + config.productionAppKey = self.configuration[UAConfigAppKey]; + config.productionAppSecret = self.configuration[UAConfigAppSecret]; + config.inProduction = @YES; + } + + [UAirship takeOff:config launchOptions:_launchOptions error:&error]; + if (error) { + NSLog(@"Airship.takeOff failed: %@", error); + } + + UAirship.push.userPushNotificationsEnabled = YES; + + NSDictionary *userInfo = @{mParticleKitInstanceKey:[[self class] kitCode]}; + + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter postNotificationName:mParticleKitDidBecomeActiveNotification + object:nil + userInfo:userInfo]; + + [notificationCenter addObserver:self + selector:@selector(updateChannelIntegration) + name:@"com.urbanairship.channel.channel_created" // https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship/pull/31#discussion_r2003658925 + object:nil]; + + [self updateChannelIntegration]; + }); +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (id const)providerKitInstance { + // Urban Airship no longer provides a shared instance. Instead their API's now all work as class methods on UAirship + return nil; +} + +- (void)setConfiguration:(NSDictionary *)configuration { + _configuration = configuration; + + // Configure event tags mapping + + NSString *tagMappingStr; + NSData *tagMappingData; + + if (configuration && configuration[kMPUAEventTagKey] != [NSNull null]) { + tagMappingStr = [configuration[kMPUAEventAttributeTagKey] stringByRemovingPercentEncoding]; + tagMappingData = [tagMappingStr dataUsingEncoding:NSUTF8StringEncoding]; + } + + NSError *error = nil; + NSArray *> *tagMappingConfig = nil; + + @try { + tagMappingConfig = [NSJSONSerialization JSONObjectWithData:tagMappingData options:kNilOptions error:&error]; + } @catch (NSException *exception) { + } + + if (tagMappingConfig && !error) { + [self configureEventTagsMapping:tagMappingConfig]; + } + + // Configure event attribute tags mapping + if (configuration && configuration[kMPUAEventAttributeTagKey] != [NSNull null]) { + tagMappingStr = [configuration[kMPUAEventAttributeTagKey] stringByRemovingPercentEncoding]; + tagMappingData = [tagMappingStr dataUsingEncoding:NSUTF8StringEncoding]; + } + error = nil; + tagMappingConfig = nil; + + @try { + tagMappingConfig = [NSJSONSerialization JSONObjectWithData:tagMappingData options:kNilOptions error:&error]; + } @catch (NSException *exception) { + } + + if (tagMappingConfig && !error) { + [self configureEventAttributeTagsMapping:tagMappingConfig]; + } +} + +- (NSMutableArray *)eventTagsMapping { + if (!_eventTagsMapping) { + _eventTagsMapping = [[NSMutableArray alloc] initWithCapacity:1]; + } + + return _eventTagsMapping; +} + +- (NSMutableArray *)eventAttributeTagsMapping { + if (!_eventAttributeTagsMapping) { + _eventAttributeTagsMapping = [[NSMutableArray alloc] initWithCapacity:1]; + } + + return _eventAttributeTagsMapping; +} + +#pragma mark e-Commerce + +- (MPKitExecStatus *)routeCommerceEvent:(MPCommerceEvent *)commerceEvent { + MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess forwardCount:0]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventClassDetails]; + NSArray *eventTagMappings = [self.eventTagsMapping filteredArrayUsingPredicate:predicate]; + + predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventAttributeClassDetails]; + NSArray *eventAttributeTagMappings = [self.eventAttributeTagsMapping filteredArrayUsingPredicate:predicate]; + + if ([self logAirshipRetailEventFromCommerceEvent:commerceEvent]) { + [self setTagMappings:eventTagMappings forCommerceEvent:commerceEvent]; + [self setTagMappings:eventAttributeTagMappings forAttributesInCommerceEvent:commerceEvent]; + + [execStatus incrementForwardCount]; + } else { + for (MPCommerceEventInstruction *commerceEventInstruction in [commerceEvent expandedInstructions]) { + [self logUrbanAirshipEvent:commerceEventInstruction.event]; + + NSNumber *eventType = @(commerceEventInstruction.event.type); + [self setTagMappings:eventTagMappings forEvent:commerceEventInstruction.event eventType:eventType]; + [self setTagMappings:eventAttributeTagMappings forAttributesInEvent:commerceEventInstruction.event eventType:eventType]; + + [execStatus incrementForwardCount]; + } + } + + return execStatus; +} + +- (MPKitExecStatus *)logLTVIncrease:(double)increaseAmount event:(MPEvent *)event { + UACustomEvent *customEvent = [[UACustomEvent alloc] initWithName:event.name value:increaseAmount]; + + [customEvent track]; + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + + +#pragma mark Events + +- (nonnull MPKitExecStatus *)logBaseEvent:(nonnull MPBaseEvent *)event { + if ([event isKindOfClass:[MPEvent class]]) { + return [self routeEvent:(MPEvent *)event]; + } else if ([event isKindOfClass:[MPCommerceEvent class]]) { + return [self routeCommerceEvent:(MPCommerceEvent *)event]; + } else { + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:MPKitReturnCodeUnavailable]; + } +} + +- (MPKitExecStatus *)routeEvent:(MPEvent *)event { + [self logUrbanAirshipEvent:event]; + + // Event class tags + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventClass]; + NSArray *tagMappings = [self.eventTagsMapping filteredArrayUsingPredicate:predicate]; + NSNumber *eventType = @(event.type); + [self setTagMappings:tagMappings forEvent:event eventType:eventType]; + + // Event attribute class tags + predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventAttributeClass]; + tagMappings = [self.eventAttributeTagsMapping filteredArrayUsingPredicate:predicate]; + [self setTagMappings:tagMappings forAttributesInEvent:event eventType:eventType]; + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)logScreen:(MPEvent *)event { + [UAirship.analytics trackScreen:event.name]; + + // Event class detail tags + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventClassDetails]; + NSArray *tagMappings = [self.eventTagsMapping filteredArrayUsingPredicate:predicate]; + NSNumber *eventType = @0; // logScreen does not have a corresponding event type + [self setTagMappings:tagMappings forEvent:event eventType:eventType]; + + // Event attribute class detail tags + predicate = [NSPredicate predicateWithFormat:@"mapType == %@", kMPUAMapTypeEventAttributeClassDetails]; + tagMappings = [self.eventAttributeTagsMapping filteredArrayUsingPredicate:predicate]; + [self setTagMappings:tagMappings forAttributesInEvent:event eventType:eventType]; + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + +#pragma mark User attributes and identities +- (MPKitExecStatus *)setUserAttribute:(NSString *)key value:(NSString *)value { + MPKitReturnCode returnCode; + + if (_enableTags && _includeUserAttributes) { + NSString *uaTag = nil; + + BOOL keyValid = key && (NSNull *)key != [NSNull null] && ![key isEqualToString:@""]; + BOOL valueValid = value && (NSNull *)value != [NSNull null] && ![value isEqualToString:@""]; + + if (keyValid && valueValid) { + uaTag = [NSString stringWithFormat:@"%@-%@", key, value]; + } + + if (uaTag) { + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:uaTag]; + [editor apply]; + returnCode = MPKitReturnCodeSuccess; + } else { + returnCode = MPKitReturnCodeRequirementsNotMet; + } + } else { + returnCode = MPKitReturnCodeCannotExecute; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:returnCode]; +} + +- (MPKitExecStatus *)setUserTag:(NSString *)tag { + MPKitReturnCode returnCode; + + if (_enableTags) { + NSString *uaTag = nil; + + if (tag && (NSNull *)tag != [NSNull null] && ![tag isEqualToString:@""]) { + uaTag = tag; + } + + if (uaTag) { + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:uaTag]; + [editor apply]; + returnCode = MPKitReturnCodeSuccess; + } else { + returnCode = MPKitReturnCodeRequirementsNotMet; + } + } else { + returnCode = MPKitReturnCodeCannotExecute; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:returnCode]; +} + +- (nonnull MPKitExecStatus *)removeUserAttribute:(nonnull NSString *)key { + MPKitReturnCode returnCode; + + if (_enableTags) { + NSString *uaTag = nil; + + if (key && (NSNull *)key != [NSNull null] && ![key isEqualToString:@""]) { + uaTag = key; + } + + if (uaTag) { + UATagEditor *editor = [UAirship.channel editTags]; + [editor removeTag:uaTag]; + [editor apply]; + returnCode = MPKitReturnCodeSuccess; + } else { + returnCode = MPKitReturnCodeRequirementsNotMet; + } + } else { + returnCode = MPKitReturnCodeCannotExecute; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:returnCode]; +} + +- (MPKitExecStatus *)setUserIdentity:(NSString *)identityString identityType:(MPUserIdentity)identityType { + BOOL namedUserSet = [self setNamedUser:identityString identityType:identityType]; + BOOL associatedIdentifierSet = [self setAssociatedIdentifier:identityString identityType:identityType]; + + if (namedUserSet || associatedIdentifierSet) { + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeUnavailable]; +} + +#pragma mark Assorted + +- (MPKitExecStatus *)setOptOut:(BOOL)optOut { + if(!optOut) { + UAirship.privacyManager.enabledFeatures = UAFeature.all; + } else { + UAirship.privacyManager.enabledFeatures = UAFeature.none; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + +#pragma mark Helpers + + + +/** + * Sets the named user. + * @param identityString The identifier. + * @param identityType The mParticle identifier type. + * @return `YES` if the named user was set, otherwise `NO`. + */ +- (BOOL)setNamedUser:(NSString *)identityString identityType:(MPUserIdentity)identityType { + NSString *namedUserConfig = self.configuration[UAConfigNamedUserId]; + if (!namedUserConfig || [namedUserConfig isEqualToString:UAConfigNamedUserIdNone]) { + return NO; + } + + MPUserIdentity mappedType; + if ([namedUserConfig isEqualToString:UAConfigNamedUserIdEmail]) { + mappedType = MPUserIdentityEmail; + } else if ([namedUserConfig isEqualToString:UAConfigNamedUserIdOther]) { + mappedType = MPUserIdentityOther; + } else if ([namedUserConfig isEqualToString:UAConfigNamedUserIdCustomerdId]) { + mappedType = MPUserIdentityCustomerId;; + } else { + return NO; + } + + if (mappedType != identityType) { + return NO; + } + + [UAirship.contact identify:identityString]; + return YES; +} + +/** + * Sets the associated identifier. + * @param identityString The identifier. + * @param identityType The mParticle identifier type. + * @return `YES` if the identifier was set, otherwise `NO`. + */ +- (BOOL)setAssociatedIdentifier:(NSString *)identityString identityType:(MPUserIdentity)identityType { + NSString *key; + switch (identityType) { + case MPUserIdentityCustomerId: + key = UAIdentityCustomer; + break; + + case MPUserIdentityFacebook: + key = UAIdentityFacebook; + break; + + case MPUserIdentityTwitter: + key = UAIdentityTwitter; + break; + + case MPUserIdentityGoogle: + key = UAIdentityGoogle; + break; + + case MPUserIdentityMicrosoft: + key = UAIdentityMicrosoft; + break; + + case MPUserIdentityYahoo: + key = UAIdentityYahoo; + break; + + case MPUserIdentityEmail: + key = UAIdentityEmail; + break; + + case MPUserIdentityFacebookCustomAudienceId: + key = UAIdentityFacebookCustomAudienceId; + break; + + default: + return false; + } + + UAAssociatedIdentifiers *identifiers = [UAirship.analytics currentAssociatedDeviceIdentifiers]; + [identifiers setWithIdentifier:identityString key:key]; + [UAirship.analytics associateDeviceIdentifier:identifiers]; + + return YES; +} + +- (void)logUrbanAirshipEvent:(MPEvent *)event { + UACustomEvent *customEvent = [[UACustomEvent alloc] initWithName:event.name]; + NSError *error = nil; + [customEvent setProperties:event.customAttributes error:&error]; + if (error) { + NSLog(@"Failed to set properties: %@\non Event: %@\n failed: %@", event.customAttributes, event.name, error); + } + + [customEvent track]; +} + +- (BOOL)logAirshipRetailEventFromCommerceEvent:(MPCommerceEvent *)commerceEvent { + if (commerceEvent.products < 0) { + return NO; + } + + switch (commerceEvent.action) { + case MPCommerceEventActionPurchase: + + for (id product in commerceEvent.products) { + UACustomEventRetailTemplate *template = [UACustomEventRetailTemplate purchased]; + UACustomEvent *customEvent = [self populateRetailEventTemplate:template commerceEvent:commerceEvent product:product]; + + NSString *transactionId = commerceEvent.transactionAttributes.transactionId; + customEvent.transactionID = transactionId; + + [customEvent track]; + } + + return YES; + + case MPCommerceEventActionAddToCart: + + for (id product in commerceEvent.products) { + UACustomEventRetailTemplate *template = [UACustomEventRetailTemplate addedToCart]; + UACustomEvent *customEvent = [self populateRetailEventTemplate:template commerceEvent:commerceEvent product:product]; + + [customEvent track]; + } + + return YES; + + case MPCommerceEventActionClick: + + for (id product in commerceEvent.products) { + UACustomEventRetailTemplate *template = [UACustomEventRetailTemplate browsed]; + UACustomEvent *customEvent = [self populateRetailEventTemplate:template commerceEvent:commerceEvent product:product]; + + [customEvent track]; + } + + return YES; + + case MPCommerceEventActionAddToWishList: + + for (id product in commerceEvent.products) { + UACustomEventRetailTemplate *template = [UACustomEventRetailTemplate starred]; + UACustomEvent *customEvent = [self populateRetailEventTemplate:template commerceEvent:commerceEvent product:product]; + [customEvent track]; + } + + return YES; + + default: + return NO; + } +} + +- (UACustomEvent *)populateRetailEventTemplate:(UACustomEventRetailTemplate *)template + commerceEvent:(MPCommerceEvent *)commerceEvent + product:(MPProduct *)product { + UACustomEventRetailProperties *properties = [[UACustomEventRetailProperties alloc] initWithId:product.sku category:product.category type:nil eventDescription:product.name isLTV:nil brand:product.brand isNewItem:nil currency:nil]; + + UACustomEvent *customEvent = [[UACustomEvent alloc] initWithRetailTemplate:template properties:properties]; + + NSDecimal eventValue; + if (product.price == nil) { + eventValue = [NSDecimalNumber zero].decimalValue; + } else if (product.quantity == nil) { + eventValue = [NSDecimalNumber decimalNumberWithDecimal:[product.price decimalValue]].decimalValue; + } else { + NSDecimalNumber *decimalPrice = [NSDecimalNumber decimalNumberWithDecimal:[product.price decimalValue]]; + NSDecimalNumber *decimalQuantity = [NSDecimalNumber decimalNumberWithDecimal:[product.quantity decimalValue]]; + eventValue = [decimalPrice decimalNumberByMultiplyingBy:decimalQuantity].decimalValue; + } + customEvent.eventValue = eventValue; + + return customEvent; +} + +- (void)updateChannelIntegration { + NSString *channelID = [UAirship channel].identifier; + + if (channelID.length) { + NSDictionary *integrationAttributes = @{UAChannelIdIntegrationKey:channelID}; + [[MParticle sharedInstance] setIntegrationAttributes:integrationAttributes forKit:[[self class] kitCode]]; + } +} + +- (void)configureEventTagsMapping:(NSArray *> *)config { + [config enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + MPUATagMapping *tagMapping = [[MPUATagMapping alloc] initWithConfiguration:obj]; + + if (tagMapping) { + [self.eventTagsMapping addObject:tagMapping]; + } + }]; +} + +- (void)configureEventAttributeTagsMapping:(NSArray *> *)config { + [config enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + MPUATagMapping *tagMapping = [[MPUATagMapping alloc] initWithConfiguration:obj]; + + if (tagMapping) { + [self.eventAttributeTagsMapping addObject:tagMapping]; + } + }]; +} + +- (NSString *)stringRepresentation:(id)value { + NSString *stringRepresentation = nil; + + if ([value isKindOfClass:[NSString class]]) { + stringRepresentation = value; + } else if ([value isKindOfClass:[NSNumber class]]) { + stringRepresentation = [(NSNumber *)value stringValue]; + } else if ([value isKindOfClass:[NSDate class]]) { + stringRepresentation = [MPKitAPI stringFromDateRFC3339:value]; + } else if ([value isKindOfClass:[NSData class]]) { + stringRepresentation = [[NSString alloc] initWithData:value encoding:NSUTF8StringEncoding]; + } else { + return nil; + } + + return stringRepresentation; +} + +- (void)setTagMappings:(NSArray *)tagMappings forCommerceEvent:(MPCommerceEvent *)commerceEvent { + if (!tagMappings) { + return; + } + + NSString *stringToHash = [[NSString stringWithFormat:@"%@", [@([commerceEvent type]) stringValue]] lowercaseString]; + NSString *hashedString = [MPKitAPI hashString:stringToHash]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapHash == %@", hashedString]; + NSArray *matchTagMappings = [tagMappings filteredArrayUsingPredicate:predicate]; + + if (matchTagMappings.count > 0) { + [matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) { + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:tagMapping.value]; + [editor apply]; + }]; + } +} + +- (void)setTagMappings:(NSArray *)tagMappings forEvent:(MPEvent *)event eventType:(NSNumber *)eventType { + if (!tagMappings) { + return; + } + + NSString *stringToHash = [[NSString stringWithFormat:@"%@%@", [eventType stringValue], event.name] lowercaseString]; + NSString *hashedString = [MPKitAPI hashString:stringToHash]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapHash == %@", hashedString]; + NSArray *matchTagMappings = [tagMappings filteredArrayUsingPredicate:predicate]; + + if (matchTagMappings.count > 0) { + [matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) { + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:tagMapping.value]; + [editor apply]; + }]; + } +} + +- (void)setTagMappings:(NSArray *)tagMappings forAttributesInCommerceEvent:(MPCommerceEvent *)commerceEvent { + if (!tagMappings) { + return; + } + + NSDictionary *beautifiedAtrributes = [commerceEvent beautifiedAttributes]; + NSDictionary *userDefinedAttributes = [commerceEvent customAttributes]; + NSMutableDictionary *commerceEventAttributes = [[NSMutableDictionary alloc] initWithCapacity:(beautifiedAtrributes.count + userDefinedAttributes.count)]; + + if (beautifiedAtrributes.count > 0) { + [commerceEventAttributes addEntriesFromDictionary:beautifiedAtrributes]; + } + + if (userDefinedAttributes.count > 0) { + [commerceEventAttributes addEntriesFromDictionary:userDefinedAttributes]; + } + + [commerceEventAttributes enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) { + NSString *stringToHash = [[NSString stringWithFormat:@"%@%@", [@([commerceEvent type]) stringValue], key] lowercaseString]; + NSString *hashedString = [MPKitAPI hashString:stringToHash]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapHash == %@", hashedString]; + NSArray *matchTagMappings = [tagMappings filteredArrayUsingPredicate:predicate]; + + if (matchTagMappings.count > 0) { + [matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) { + NSString *attributeString = [self stringRepresentation:obj]; + + if (attributeString) { + NSString *tagPlusAttributeValue = [NSString stringWithFormat:@"%@-%@", tagMapping.value, attributeString]; + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:tagPlusAttributeValue]; + [editor addTag:tagMapping.value]; + [editor apply]; + } + }]; + } + }]; +} + +- (void)setTagMappings:(NSArray *)tagMappings forAttributesInEvent:(MPEvent *)event eventType:(NSNumber *)eventType { + if (!tagMappings || event.customAttributes.count == 0) { + return; + } + + NSDictionary *eventInfo = event.customAttributes; + + [eventInfo enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) { + NSString *stringToHash = [[NSString stringWithFormat:@"%@%@%@", [eventType stringValue], event.name, key] lowercaseString]; + NSString *hashedString = [MPKitAPI hashString:stringToHash]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"mapHash == %@", hashedString]; + NSArray *matchTagMappings = [tagMappings filteredArrayUsingPredicate:predicate]; + + if (matchTagMappings.count > 0) { + [matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) { + NSString *attributeString = [self stringRepresentation:obj]; + + if (attributeString) { + NSString *tagPlusAttributeValue = [NSString stringWithFormat:@"%@-%@", tagMapping.value, attributeString]; + UATagEditor *editor = [UAirship.channel editTags]; + [editor addTag:tagPlusAttributeValue]; + [editor addTag:tagMapping.value]; + [editor apply]; + } + }]; + } + }]; +} + +#pragma mark App Delegate Integration + +- (MPKitExecStatus *)receivedUserNotification:(NSDictionary *)userInfo { + // Check for UA identifiers + if ([userInfo objectForKey:@"_"] || [userInfo objectForKey:@"com.urbanairship.metadata"]) { + [UAAppIntegration application:[UIApplication sharedApplication] didReceiveRemoteNotification:userInfo + fetchCompletionHandler:^(UIBackgroundFetchResult result) {}]; + } + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)setDeviceToken:(NSData *)deviceToken { + [UAAppIntegration application:[UIApplication sharedApplication] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; + + return [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] + returnCode:MPKitReturnCodeSuccess]; +} + +- (nonnull MPKitExecStatus *)userNotificationCenter:(nonnull UNUserNotificationCenter *)center willPresentNotification:(nonnull UNNotification *)notification API_AVAILABLE(ios(10.0)){ + [UAAppIntegration userNotificationCenter:center willPresentNotification:notification withCompletionHandler:^(UNNotificationPresentationOptions options) {}]; + + MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:MPKitReturnCodeSuccess]; + return execStatus; +} + +- (nonnull MPKitExecStatus *)userNotificationCenter:(nonnull UNUserNotificationCenter *)center didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response API_AVAILABLE(ios(10.0)){ + [UAAppIntegration userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:^{}]; + + MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:[MPKitUrbanAirship kitCode] returnCode:MPKitReturnCodeSuccess]; + return execStatus; +} + +@end + +#pragma clang diagnostic pop diff --git a/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..2009fb7a2 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyAccessedAPITypes + + + diff --git a/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/mParticle_UrbanAirship.h b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/mParticle_UrbanAirship.h new file mode 100644 index 000000000..aa1d0cb92 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Sources/mParticle-UrbanAirship/mParticle_UrbanAirship.h @@ -0,0 +1,2 @@ +#import +#import "MPKitUrbanAirship.h" diff --git a/Kits/urbanairship/urbanairship-19/Tests/mParticle-UrbanAirshipTests/MPKitUrbanAirshipTests.swift b/Kits/urbanairship/urbanairship-19/Tests/mParticle-UrbanAirshipTests/MPKitUrbanAirshipTests.swift new file mode 100644 index 000000000..66c5b3b23 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/Tests/mParticle-UrbanAirshipTests/MPKitUrbanAirshipTests.swift @@ -0,0 +1,13 @@ +import XCTest +@testable import mParticle_Apple_SDK +@testable import mParticle_UrbanAirship + +final class MPKitUrbanAirshipTests: XCTestCase { + + func testKitCode() { + let expectedKitCode: NSNumber = 25 + let actualKitCode = MPKitUrbanAirship.kitCode() + + XCTAssertEqual(actualKitCode, expectedKitCode, "Kit code should be 25") + } +} diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec new file mode 100644 index 000000000..bc7b55325 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |s| + s.name = "mParticle-UrbanAirship-19" + s.version = "8.5.1" + s.summary = "Airship integration for mParticle" + s.description = <<-DESC + This is the Airship (Urban Airship) integration for mParticle. + DESC + s.homepage = "https://www.mparticle.com" + s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } + s.author = { "mParticle" => "support@mparticle.com" } + s.source = { :git => "https://github.com/mparticle/mparticle-apple-sdk.git", :tag => s.version.to_s } + s.ios.deployment_target = "15.6" + s.ios.source_files = 'Sources/mParticle-UrbanAirship/**/*.{h,m,mm}' + s.ios.resource_bundles = { 'mParticle-UrbanAirship-19-Privacy' => ['Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy'] } + s.ios.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AIRSHIP_COCOAPODS=1' } + s.ios.dependency 'mParticle-Apple-SDK/mParticle', '~> 9.0' + s.ios.dependency 'Airship/ObjectiveC', '~> 19.0' +end diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj new file mode 100644 index 000000000..c546ba789 --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj @@ -0,0 +1,335 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + FF0003012A1805050000000A /* MPKitUrbanAirship.m in Sources */ = {isa = PBXBuildFile; fileRef = FF0003012A1805050000000B /* MPKitUrbanAirship.m */; }; + FF0003012A1805050000000C /* MPKitUrbanAirship.h in Headers */ = {isa = PBXBuildFile; fileRef = FF0003012A1805050000000D /* MPKitUrbanAirship.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FF0003012A1805050000000E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = FF0003012A1805050000000F /* PrivacyInfo.xcprivacy */; }; + FF0003012A18050500000010 /* AirshipCore in Frameworks */ = {isa = PBXBuildFile; productRef = FF0003012A18050500000011 /* AirshipCore */; }; + FF0003012A18050500000012 /* AirshipObjectiveC in Frameworks */ = {isa = PBXBuildFile; productRef = FF0003012A18050500000013 /* AirshipObjectiveC */; }; + FF0003012A18050500000014 /* mParticle-Apple-SDK in Frameworks */ = {isa = PBXBuildFile; productRef = FF0003012A18050500000015 /* mParticle-Apple-SDK */; }; + FF0003012A18050500000017 /* mParticle_UrbanAirship.h in Headers */ = {isa = PBXBuildFile; fileRef = FF0003012A18050500000018 /* mParticle_UrbanAirship.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + FF0003012A1805050000000B /* MPKitUrbanAirship.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MPKitUrbanAirship.m; path = "Sources/mParticle-UrbanAirship/MPKitUrbanAirship.m"; sourceTree = ""; }; + FF0003012A1805050000000D /* MPKitUrbanAirship.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MPKitUrbanAirship.h; path = "Sources/mParticle-UrbanAirship/MPKitUrbanAirship.h"; sourceTree = ""; }; + FF0003012A1805050000000F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = "Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy"; sourceTree = ""; }; + FF0003012A18050500000016 /* mParticle_UrbanAirship.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = mParticle_UrbanAirship.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FF0003012A18050500000018 /* mParticle_UrbanAirship.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mParticle_UrbanAirship.h; path = "Sources/mParticle-UrbanAirship/mParticle_UrbanAirship.h"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + FF0003012A18050500000020 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FF0003012A18050500000010 /* AirshipCore in Frameworks */, + FF0003012A18050500000012 /* AirshipObjectiveC in Frameworks */, + FF0003012A18050500000014 /* mParticle-Apple-SDK in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + FF0003012A18050500000021 = { + isa = PBXGroup; + children = ( + FF0003012A18050500000022 /* Sources */, + FF0003012A18050500000023 /* Products */, + FF0003012A18050500000024 /* Frameworks */, + ); + sourceTree = ""; + }; + FF0003012A18050500000022 /* Sources */ = { + isa = PBXGroup; + children = ( + FF0003012A1805050000000B /* MPKitUrbanAirship.m */, + FF0003012A1805050000000D /* MPKitUrbanAirship.h */, + FF0003012A18050500000018 /* mParticle_UrbanAirship.h */, + FF0003012A1805050000000F /* PrivacyInfo.xcprivacy */, + ); + name = Sources; + sourceTree = ""; + }; + FF0003012A18050500000023 /* Products */ = { + isa = PBXGroup; + children = ( + FF0003012A18050500000016 /* mParticle_UrbanAirship.framework */, + ); + name = Products; + sourceTree = ""; + }; + FF0003012A18050500000024 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + FF0003012A18050500000030 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + FF0003012A1805050000000C /* MPKitUrbanAirship.h in Headers */, + FF0003012A18050500000017 /* mParticle_UrbanAirship.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + FF0003012A18050500000001 /* mParticle-UrbanAirship */ = { + isa = PBXNativeTarget; + buildConfigurationList = FF0003012A18050500000042 /* Build configuration list for PBXNativeTarget "mParticle-UrbanAirship" */; + buildPhases = ( + FF0003012A18050500000031 /* Sources */, + FF0003012A18050500000020 /* Frameworks */, + FF0003012A18050500000030 /* Headers */, + FF0003012A18050500000032 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "mParticle-UrbanAirship"; + packageProductDependencies = ( + FF0003012A18050500000011 /* AirshipCore */, + FF0003012A18050500000013 /* AirshipObjectiveC */, + FF0003012A18050500000015 /* mParticle-Apple-SDK */, + ); + productName = "mParticle-UrbanAirship"; + productReference = FF0003012A18050500000016 /* mParticle_UrbanAirship.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + FF0003012A18050500000040 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1600; + TargetAttributes = { + FF0003012A18050500000001 = { + CreatedOnToolsVersion = 16.0; + }; + }; + }; + buildConfigurationList = FF0003012A18050500000041 /* Build configuration list for PBXProject "mParticle-UrbanAirship" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = FF0003012A18050500000021; + packageReferences = ( + FF0003012A18050500000050 /* XCRemoteSwiftPackageReference "ios-library" */, + FF0003012A18050500000051 /* XCRemoteSwiftPackageReference "mparticle-apple-sdk" */, + ); + productRefGroup = FF0003012A18050500000023 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + FF0003012A18050500000001 /* mParticle-UrbanAirship */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + FF0003012A18050500000032 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FF0003012A1805050000000E /* PrivacyInfo.xcprivacy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + FF0003012A18050500000031 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FF0003012A1805050000000A /* MPKitUrbanAirship.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + FF0003012A18050500000043 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "SWIFT_PACKAGE=1", + "$(inherited)", + ); + INFOPLIST_FILE = Sources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-UrbanAirship"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + FF0003012A18050500000044 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "SWIFT_PACKAGE=1", + "$(inherited)", + ); + INFOPLIST_FILE = Sources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-UrbanAirship"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + FF0003012A18050500000045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_OPTIMIZATION_LEVEL = 0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + FF0003012A18050500000046 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + FF0003012A18050500000041 /* Build configuration list for PBXProject "mParticle-UrbanAirship" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0003012A18050500000045 /* Debug */, + FF0003012A18050500000046 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FF0003012A18050500000042 /* Build configuration list for PBXNativeTarget "mParticle-UrbanAirship" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0003012A18050500000043 /* Debug */, + FF0003012A18050500000044 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + FF0003012A18050500000050 /* XCRemoteSwiftPackageReference "ios-library" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/urbanairship/ios-library"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 19.0.0; + }; + }; + FF0003012A18050500000051 /* XCRemoteSwiftPackageReference "mparticle-apple-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/mParticle/mparticle-apple-sdk"; + requirement = { + branch = "workstation/9.0-Release"; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + FF0003012A18050500000011 /* AirshipCore */ = { + isa = XCSwiftPackageProductDependency; + package = FF0003012A18050500000050 /* XCRemoteSwiftPackageReference "ios-library" */; + productName = AirshipCore; + }; + FF0003012A18050500000013 /* AirshipObjectiveC */ = { + isa = XCSwiftPackageProductDependency; + package = FF0003012A18050500000050 /* XCRemoteSwiftPackageReference "ios-library" */; + productName = AirshipObjectiveC; + }; + FF0003012A18050500000015 /* mParticle-Apple-SDK */ = { + isa = XCSwiftPackageProductDependency; + package = FF0003012A18050500000051 /* XCRemoteSwiftPackageReference "mparticle-apple-sdk" */; + productName = "mParticle-Apple-SDK"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = FF0003012A18050500000040 /* Project object */; +} diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/xcshareddata/xcschemes/mParticle-UrbanAirship.xcscheme b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/xcshareddata/xcschemes/mParticle-UrbanAirship.xcscheme new file mode 100644 index 000000000..a364a097c --- /dev/null +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/xcshareddata/xcschemes/mParticle-UrbanAirship.xcscheme @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 315545b7256418316c4464fbddfef399198c1a1b Mon Sep 17 00:00:00 2001 From: Nickolas Dimitrakas Date: Fri, 20 Mar 2026 00:32:49 -0400 Subject: [PATCH 2/4] fix: align urbanairship-19 config with urbanairship-20 (iOS 16, swift-tools 6.0) Only difference from urbanairship-20 is the Airship SDK version constraint pinned to major 19 (upToNextMajor from 19.0.0 / ~> 19.0). Co-Authored-By: Claude Sonnet 4.6 --- Kits/urbanairship/urbanairship-19/Package.swift | 4 ++-- .../urbanairship-19/mParticle-UrbanAirship-19.podspec | 2 +- .../mParticle-UrbanAirship.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Kits/urbanairship/urbanairship-19/Package.swift b/Kits/urbanairship/urbanairship-19/Package.swift index 9a1c7ccea..d3a605ad4 100644 --- a/Kits/urbanairship/urbanairship-19/Package.swift +++ b/Kits/urbanairship/urbanairship-19/Package.swift @@ -1,9 +1,9 @@ -// swift-tools-version:5.5 +// swift-tools-version:6.0 import PackageDescription let package = Package( name: "mParticle-UrbanAirship", - platforms: [ .iOS(.v15) ], + platforms: [ .iOS(.v16) ], products: [ .library( name: "mParticle-UrbanAirship", diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec index bc7b55325..a08161fe9 100644 --- a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } s.author = { "mParticle" => "support@mparticle.com" } s.source = { :git => "https://github.com/mparticle/mparticle-apple-sdk.git", :tag => s.version.to_s } - s.ios.deployment_target = "15.6" + s.ios.deployment_target = "16.0" s.ios.source_files = 'Sources/mParticle-UrbanAirship/**/*.{h,m,mm}' s.ios.resource_bundles = { 'mParticle-UrbanAirship-19-Privacy' => ['Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy'] } s.ios.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AIRSHIP_COCOAPODS=1' } diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj index c546ba789..7054790ea 100644 --- a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj @@ -188,7 +188,7 @@ ); INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -221,7 +221,7 @@ ); INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -248,7 +248,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -265,7 +265,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; From 9e9f612f3d73b1e9b6f3e4060e9ca7316502ac3e Mon Sep 17 00:00:00 2001 From: Nickolas Dimitrakas Date: Fri, 20 Mar 2026 00:50:33 -0400 Subject: [PATCH 3/4] chore: bump Airship SDK minimum to 19.1 for urbanairship-19 kit Co-Authored-By: Claude Sonnet 4.6 --- Kits/urbanairship/urbanairship-19/Package.swift | 2 +- .../urbanairship-19/mParticle-UrbanAirship-19.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kits/urbanairship/urbanairship-19/Package.swift b/Kits/urbanairship/urbanairship-19/Package.swift index d3a605ad4..d26ae29c8 100644 --- a/Kits/urbanairship/urbanairship-19/Package.swift +++ b/Kits/urbanairship/urbanairship-19/Package.swift @@ -16,7 +16,7 @@ let package = Package( branch: "workstation/9.0-Release" ), .package(url: "https://github.com/urbanairship/ios-library", - .upToNextMajor(from: "19.0.0")) + .upToNextMajor(from: "19.1.0")) ], targets: [ .target( diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec index a08161fe9..8bc9540ac 100644 --- a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec @@ -14,5 +14,5 @@ Pod::Spec.new do |s| s.ios.resource_bundles = { 'mParticle-UrbanAirship-19-Privacy' => ['Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy'] } s.ios.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AIRSHIP_COCOAPODS=1' } s.ios.dependency 'mParticle-Apple-SDK/mParticle', '~> 9.0' - s.ios.dependency 'Airship/ObjectiveC', '~> 19.0' + s.ios.dependency 'Airship/ObjectiveC', '~> 19.1' end From 7f320dfa07e984a8d907537485bb8f446ad1635e Mon Sep 17 00:00:00 2001 From: Nickolas Dimitrakas Date: Fri, 20 Mar 2026 00:56:18 -0400 Subject: [PATCH 4/4] fix: set iOS 15.6 deployment target for urbanairship-19 kit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Airship SDK 19.x supports iOS 15+, so the minimum deployment target should be 15.6 — not 16.0 (which was blindly copied from urbanairship-20). This is the primary reason urbanairship-19 exists as a separate kit. Co-Authored-By: Claude Sonnet 4.6 --- Kits/urbanairship/urbanairship-19/Package.swift | 2 +- .../urbanairship-19/mParticle-UrbanAirship-19.podspec | 2 +- .../mParticle-UrbanAirship.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Kits/urbanairship/urbanairship-19/Package.swift b/Kits/urbanairship/urbanairship-19/Package.swift index d26ae29c8..3488f34c0 100644 --- a/Kits/urbanairship/urbanairship-19/Package.swift +++ b/Kits/urbanairship/urbanairship-19/Package.swift @@ -3,7 +3,7 @@ import PackageDescription let package = Package( name: "mParticle-UrbanAirship", - platforms: [ .iOS(.v16) ], + platforms: [ .iOS(.v15) ], products: [ .library( name: "mParticle-UrbanAirship", diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec index 8bc9540ac..3f864dd52 100644 --- a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship-19.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } s.author = { "mParticle" => "support@mparticle.com" } s.source = { :git => "https://github.com/mparticle/mparticle-apple-sdk.git", :tag => s.version.to_s } - s.ios.deployment_target = "16.0" + s.ios.deployment_target = "15.6" s.ios.source_files = 'Sources/mParticle-UrbanAirship/**/*.{h,m,mm}' s.ios.resource_bundles = { 'mParticle-UrbanAirship-19-Privacy' => ['Sources/mParticle-UrbanAirship/PrivacyInfo.xcprivacy'] } s.ios.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AIRSHIP_COCOAPODS=1' } diff --git a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj index 7054790ea..c546ba789 100644 --- a/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj +++ b/Kits/urbanairship/urbanairship-19/mParticle-UrbanAirship.xcodeproj/project.pbxproj @@ -188,7 +188,7 @@ ); INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -221,7 +221,7 @@ ); INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -248,7 +248,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -265,7 +265,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; };