diff --git a/Kits/README.md b/Kits/README.md index 27a8803ec..6b8ffdb1f 100644 --- a/Kits/README.md +++ b/Kits/README.md @@ -28,6 +28,7 @@ Each kit has its own README with installation and configuration steps. | Adjust 5 | [`mparticle-apple-integration-adjust-5`](https://github.com/mparticle-integrations/mparticle-apple-integration-adjust-5) | [Adjust SDK 5.x](https://github.com/adjust/ios_sdk) | | AppsFlyer 6 | [`mparticle-apple-integration-appsflyer-6`](https://github.com/mparticle-integrations/mparticle-apple-integration-appsflyer-6) | [AppsFlyer SDK 6.x](https://github.com/AppsFlyerSDK/AppsFlyerFramework) | | Apptentive 6 | [`mparticle-apple-integration-apptentive-6`](https://github.com/mparticle-integrations/mparticle-apple-integration-apptentive-6) | [Apptentive SDK 6.x](https://github.com/apptentive/apptentive-kit-ios) | +| Apptentive 7 | [`mparticle-apple-integration-apptentive-7`](https://github.com/mparticle-integrations/mparticle-apple-integration-apptentive-7) | [Apptentive SDK 7.x](https://github.com/apptentive/apptentive-kit-ios) | | Apptimize 3 | [`mparticle-apple-integration-apptimize-3`](https://github.com/mparticle-integrations/mparticle-apple-integration-apptimize-3) | [Apptimize SDK 3.x](https://sdk.apptimize.com) | | Branch Metrics 3 | [`mparticle-apple-integration-branchmetrics-3`](https://github.com/mparticle-integrations/mparticle-apple-integration-branchmetrics-3) | [Branch SDK 3.x](https://github.com/BranchMetrics/ios-branch-sdk-spm) | | Braze 12 | [`mparticle-apple-integration-braze-12`](https://github.com/mparticle-integrations/mparticle-apple-integration-braze-12) | [Braze Swift SDK 12.x](https://github.com/braze-inc/braze-swift-sdk) | diff --git a/Kits/apptentive/apptentive-6/README.md b/Kits/apptentive/apptentive-6/README.md index 3327dc42c..4fa569e72 100644 --- a/Kits/apptentive/apptentive-6/README.md +++ b/Kits/apptentive/apptentive-6/README.md @@ -41,7 +41,6 @@ Included kits: { Apptentive } | Platform | Minimum Version | | -------- | --------------- | | iOS | 15.0 | -| tvOS | 15.0 | ## Documentation diff --git a/Kits/apptentive/apptentive-6/Sources/mParticle-Apptentive/MPKitApptentive.m b/Kits/apptentive/apptentive-6/Sources/mParticle-Apptentive/MPKitApptentive.m index a5df45ed7..b65d3a1a4 100644 --- a/Kits/apptentive/apptentive-6/Sources/mParticle-Apptentive/MPKitApptentive.m +++ b/Kits/apptentive/apptentive-6/Sources/mParticle-Apptentive/MPKitApptentive.m @@ -261,7 +261,7 @@ - (MPKitExecStatus *)setUserIdentity:(NSString *)identityString identityType:(MP #pragma mark Events - (nonnull MPKitExecStatus *)logBaseEvent:(nonnull MPBaseEvent *)event { - if ([event isKindOfClass:[MPBaseEvent class]]) { + if ([event isKindOfClass:[MPEvent class]]) { return [self routeEvent:(MPEvent *)event]; } else { return [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceApptentive) returnCode:MPKitReturnCodeUnavailable]; diff --git a/Kits/apptentive/apptentive-7/CHANGELOG.md b/Kits/apptentive/apptentive-7/CHANGELOG.md new file mode 100644 index 000000000..f977cbb73 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..e2fe43699 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example.xcodeproj/project.pbxproj @@ -0,0 +1,357 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 3506C0CD2F50DA3400BBD61D /* mParticle-Apptentive in Frameworks */ = {isa = PBXBuildFile; productRef = 3506C0CC2F50DA3400BBD61D /* mParticle-Apptentive */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3506C0AE2F50DA0100BBD61D /* 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 */ + 3506C0C52F50DA0200BBD61D /* Exceptions for "SPM-Objc-Example" folder in "SPM-Objc-Example" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 3506C0AD2F50DA0100BBD61D /* SPM-Objc-Example */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 3506C0B02F50DA0100BBD61D /* SPM-Objc-Example */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 3506C0C52F50DA0200BBD61D /* Exceptions for "SPM-Objc-Example" folder in "SPM-Objc-Example" target */, + ); + path = "SPM-Objc-Example"; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3506C0AB2F50DA0100BBD61D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3506C0CD2F50DA3400BBD61D /* mParticle-Apptentive in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3506C0A52F50DA0100BBD61D = { + isa = PBXGroup; + children = ( + 3506C0B02F50DA0100BBD61D /* SPM-Objc-Example */, + 3506C0AF2F50DA0100BBD61D /* Products */, + ); + sourceTree = ""; + }; + 3506C0AF2F50DA0100BBD61D /* Products */ = { + isa = PBXGroup; + children = ( + 3506C0AE2F50DA0100BBD61D /* SPM-Objc-Example.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3506C0AD2F50DA0100BBD61D /* SPM-Objc-Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3506C0C62F50DA0200BBD61D /* Build configuration list for PBXNativeTarget "SPM-Objc-Example" */; + buildPhases = ( + 3506C0AA2F50DA0100BBD61D /* Sources */, + 3506C0AB2F50DA0100BBD61D /* Frameworks */, + 3506C0AC2F50DA0100BBD61D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 3506C0B02F50DA0100BBD61D /* SPM-Objc-Example */, + ); + name = "SPM-Objc-Example"; + packageProductDependencies = ( + 3506C0CC2F50DA3400BBD61D /* mParticle-Apptentive */, + ); + productName = "SPM-Objc-Example"; + productReference = 3506C0AE2F50DA0100BBD61D /* SPM-Objc-Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3506C0A62F50DA0100BBD61D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 2620; + TargetAttributes = { + 3506C0AD2F50DA0100BBD61D = { + CreatedOnToolsVersion = 26.2; + }; + }; + }; + buildConfigurationList = 3506C0A92F50DA0100BBD61D /* Build configuration list for PBXProject "SPM-Objc-Example" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3506C0A52F50DA0100BBD61D; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 3506C0CB2F50DA3400BBD61D /* XCLocalSwiftPackageReference "../../../apptentive-7" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 3506C0AF2F50DA0100BBD61D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3506C0AD2F50DA0100BBD61D /* SPM-Objc-Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3506C0AC2F50DA0100BBD61D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3506C0AA2F50DA0100BBD61D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3506C0C72F50DA0200BBD61D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + 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; + }; + 3506C0C82F50DA0200BBD61D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + 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; + }; + 3506C0C92F50DA0200BBD61D /* 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; + }; + 3506C0CA2F50DA0200BBD61D /* 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 */ + 3506C0A92F50DA0100BBD61D /* Build configuration list for PBXProject "SPM-Objc-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3506C0C92F50DA0200BBD61D /* Debug */, + 3506C0CA2F50DA0200BBD61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3506C0C62F50DA0200BBD61D /* Build configuration list for PBXNativeTarget "SPM-Objc-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3506C0C72F50DA0200BBD61D /* Debug */, + 3506C0C82F50DA0200BBD61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 3506C0CB2F50DA3400BBD61D /* XCLocalSwiftPackageReference "../../../apptentive-7" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../apptentive-7"; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 3506C0CC2F50DA3400BBD61D /* mParticle-Apptentive */ = { + isa = XCSwiftPackageProductDependency; + productName = "mParticle-Apptentive"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 3506C0A62F50DA0100BBD61D /* Project object */; +} diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h new file mode 100644 index 000000000..d79858b97 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.h @@ -0,0 +1,7 @@ +#import + +@interface AppDelegate : UIResponder + + +@end + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m new file mode 100644 index 000000000..38801efaf --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/AppDelegate.m @@ -0,0 +1,39 @@ +#import "AppDelegate.h" +#import +@import mParticle_Apptentive; + +@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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..0afb3cf0e --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..c70a5bff1 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..808a21ce7 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/Info.plist new file mode 100644 index 000000000..81ed29b76 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.h new file mode 100644 index 000000000..a19a1ce55 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/SceneDelegate.m new file mode 100644 index 000000000..e5ae2c95c --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h new file mode 100644 index 000000000..a79652b56 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.h @@ -0,0 +1,7 @@ +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/ViewController.m new file mode 100644 index 000000000..19161aa7a --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/main.m b/Kits/apptentive/apptentive-7/Example/SPM-Objc-Example/SPM-Objc-Example/main.m new file mode 100644 index 000000000..dba295ebe --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj new file mode 100644 index 000000000..33a87e28a --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example.xcodeproj/project.pbxproj @@ -0,0 +1,369 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 3506C0F12F50DAF600BBD61D /* mParticle-Apptentive in Frameworks */ = {isa = PBXBuildFile; productRef = 3506C0F02F50DAF600BBD61D /* mParticle-Apptentive */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3506C0D72F50DADA00BBD61D /* 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 */ + 3506C0E92F50DADB00BBD61D /* Exceptions for "SPM-Swift-Example" folder in "SPM-Swift-Example" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 3506C0D62F50DADA00BBD61D /* SPM-Swift-Example */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 3506C0D92F50DADA00BBD61D /* SPM-Swift-Example */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 3506C0E92F50DADB00BBD61D /* Exceptions for "SPM-Swift-Example" folder in "SPM-Swift-Example" target */, + ); + path = "SPM-Swift-Example"; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3506C0D42F50DADA00BBD61D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3506C0F12F50DAF600BBD61D /* mParticle-Apptentive in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3506C0CE2F50DADA00BBD61D = { + isa = PBXGroup; + children = ( + 3506C0D92F50DADA00BBD61D /* SPM-Swift-Example */, + 3506C0D82F50DADA00BBD61D /* Products */, + ); + sourceTree = ""; + }; + 3506C0D82F50DADA00BBD61D /* Products */ = { + isa = PBXGroup; + children = ( + 3506C0D72F50DADA00BBD61D /* SPM-Swift-Example.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3506C0D62F50DADA00BBD61D /* SPM-Swift-Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3506C0EA2F50DADB00BBD61D /* Build configuration list for PBXNativeTarget "SPM-Swift-Example" */; + buildPhases = ( + 3506C0D32F50DADA00BBD61D /* Sources */, + 3506C0D42F50DADA00BBD61D /* Frameworks */, + 3506C0D52F50DADA00BBD61D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 3506C0D92F50DADA00BBD61D /* SPM-Swift-Example */, + ); + name = "SPM-Swift-Example"; + packageProductDependencies = ( + 3506C0F02F50DAF600BBD61D /* mParticle-Apptentive */, + ); + productName = "SPM-Swift-Example"; + productReference = 3506C0D72F50DADA00BBD61D /* SPM-Swift-Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3506C0CF2F50DADA00BBD61D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2620; + LastUpgradeCheck = 2620; + TargetAttributes = { + 3506C0D62F50DADA00BBD61D = { + CreatedOnToolsVersion = 26.2; + }; + }; + }; + buildConfigurationList = 3506C0D22F50DADA00BBD61D /* Build configuration list for PBXProject "SPM-Swift-Example" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3506C0CE2F50DADA00BBD61D; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 3506C0EF2F50DAF600BBD61D /* XCLocalSwiftPackageReference "../../../apptentive-7" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 3506C0D82F50DADA00BBD61D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3506C0D62F50DADA00BBD61D /* SPM-Swift-Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3506C0D52F50DADA00BBD61D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3506C0D32F50DADA00BBD61D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3506C0EB2F50DADB00BBD61D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + 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; + }; + 3506C0EC2F50DADB00BBD61D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + 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; + }; + 3506C0ED2F50DADB00BBD61D /* 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; + }; + 3506C0EE2F50DADB00BBD61D /* 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 */ + 3506C0D22F50DADA00BBD61D /* Build configuration list for PBXProject "SPM-Swift-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3506C0ED2F50DADB00BBD61D /* Debug */, + 3506C0EE2F50DADB00BBD61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3506C0EA2F50DADB00BBD61D /* Build configuration list for PBXNativeTarget "SPM-Swift-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3506C0EB2F50DADB00BBD61D /* Debug */, + 3506C0EC2F50DADB00BBD61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 3506C0EF2F50DAF600BBD61D /* XCLocalSwiftPackageReference "../../../apptentive-7" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../../apptentive-7"; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 3506C0F02F50DAF600BBD61D /* mParticle-Apptentive */ = { + isa = XCSwiftPackageProductDependency; + productName = "mParticle-Apptentive"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 3506C0CF2F50DADA00BBD61D /* Project object */; +} diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift new file mode 100644 index 000000000..1341d426d --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/AppDelegate.swift @@ -0,0 +1,43 @@ +import UIKit +import mParticle_Apple_SDK +import mParticle_Apptentive + +@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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..0afb3cf0e --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..c70a5bff1 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..74d6a722c --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/Info.plist new file mode 100644 index 000000000..dd3c9afda --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift new file mode 100644 index 000000000..78046c3d6 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/SceneDelegate.swift @@ -0,0 +1,41 @@ +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/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift new file mode 100644 index 000000000..b9a63bbde --- /dev/null +++ b/Kits/apptentive/apptentive-7/Example/SPM-Swift-Example/SPM-Swift-Example/ViewController.swift @@ -0,0 +1,4 @@ +import UIKit + +class ViewController: UIViewController { +} diff --git a/Kits/apptentive/apptentive-7/LICENSE b/Kits/apptentive/apptentive-7/LICENSE new file mode 100644 index 000000000..309b476d4 --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Package.swift b/Kits/apptentive/apptentive-7/Package.swift new file mode 100644 index 000000000..d5af39d52 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Package.swift @@ -0,0 +1,56 @@ +// swift-tools-version: 5.5 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import Foundation +import PackageDescription + +let version = "9.0.0" + +let useLocalVersion = ProcessInfo.processInfo.environment["USE_LOCAL_VERSION"] != nil + +let mParticleAppleSDK: Package.Dependency = { + if useLocalVersion { + return .package(path: "../../../") + } + + let url = "https://github.com/mParticle/mparticle-apple-sdk" + if version.isEmpty { + return .package(url: url, branch: "main") + } + return .package(url: url, .upToNextMajor(from: Version(version)!)) +}() + +let package = Package( + name: "mParticle-Apptentive", + platforms: [ .iOS(.v15) ], + products: [ + .library( + name: "mParticle-Apptentive", + targets: ["mParticle-Apptentive"] + ) + ], + dependencies: [ + mParticleAppleSDK, + .package( + url: "https://github.com/apptentive/apptentive-kit-ios", + .upToNextMajor(from: "7.0.0") + ) + ], + targets: [ + .target( + name: "mParticle-Apptentive", + dependencies: [ + .product(name: "mParticle-Apple-SDK", package: "mparticle-apple-sdk"), + .product(name: "ApptentiveKit", package: "apptentive-kit-ios") + ], + resources: [.process("PrivacyInfo.xcprivacy")], + publicHeadersPath: "include" + ), + .testTarget( + name: "mParticle-ApptentiveTests", + dependencies: [ + "mParticle-Apptentive" + ], + ) + ] +) diff --git a/Kits/apptentive/apptentive-7/README.md b/Kits/apptentive/apptentive-7/README.md new file mode 100644 index 000000000..db39493cb --- /dev/null +++ b/Kits/apptentive/apptentive-7/README.md @@ -0,0 +1,58 @@ +# mParticle Apptentive Kit (Apptentive SDK 7.x) + +This is the [Apptentive](https://www.apptentive.com) integration for the [mParticle Apple SDK](https://github.com/mParticle/mparticle-apple-sdk), built against the [Apptentive SDK 7.x](https://github.com/apptentive/apptentive-kit-ios). + +## Installation + +### Swift Package Manager + +Add the Apptentive 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-apptentive-7", + .upToNextMajor(from: mParticleVersion) +), +``` + +Then add `mParticle-Apptentive` as a dependency of your target. + +### CocoaPods + +Add the kit dependency to your app's Podfile: + +```ruby +pod 'mParticle-Apptentive-7', '~> 9.0' +``` + +## 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: { Apptentive } +``` + +## Platform Support + +| Platform | Minimum Version | +| -------- | --------------- | +| iOS | 15.0 | + +## Documentation + +- [mParticle Apptentive Integration Guide](https://docs.mparticle.com/integrations/apptentive/event/) +- [mParticle iOS SDK Documentation](https://docs.mparticle.com/developers/sdk/ios/) +- [Apptentive iOS SDK Documentation](https://github.com/apptentive/apptentive-kit-ios) +- [Apptentive iOS SDK 7 Migration Guide](https://help.alchemer.com/help/new-ios-sdk-6-native-alchemer-mobile-ios-sdk-migration-guide) + +## Issues + +Please report bugs and feature requests to the [mparticle-apple-sdk](https://github.com/mParticle/mparticle-apple-sdk/issues) repository. This mirror repository is not actively monitored for issues. + +## License + +[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/Kits/apptentive/apptentive-7/Sources/Info.plist b/Kits/apptentive/apptentive-7/Sources/Info.plist new file mode 100644 index 000000000..d3de8eefb --- /dev/null +++ b/Kits/apptentive/apptentive-7/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/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentive.m b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentive.m new file mode 100644 index 000000000..e43587a85 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentive.m @@ -0,0 +1,329 @@ +#import "MPKitApptentive.h" +#import "MPKitApptentiveUtils.h" + +#if SWIFT_PACKAGE + @import ApptentiveKit; +#else +#if __has_include() + #import +#else + #import "ApptentiveKit-Swift.h" +#endif +#endif + +static NSString * const apptentiveAppKeyKey = @"apptentiveAppKey"; +static NSString * const apptentiveAppSignatureKey = @"apptentiveAppSignature"; +static NSString * const apptentiveInitOnStart = @"apptentiveInitOnStart"; +static NSString * const apptentiveEnableTypeDetectionKey = @"enableTypeDetection"; + +// we need to keep the credentials in order to init the SDK later on +static NSString * _apptentiveKey = nil; +static NSString * _apptentiveSignature = nil; + +@interface MPKitApptentive () + +@property (strong, nonatomic) NSPersonNameComponents *nameComponents; +@property (strong, nonatomic) NSPersonNameComponentsFormatter *nameFormatter; +@property (assign, nonatomic) BOOL enableTypeDetection; + +@end + +@interface NSNumber (ApptentiveBoolean) + +- (BOOL)apptentive_isBoolean; + +@end + +@implementation NSNumber (ApptentiveBoolean) + +- (BOOL)apptentive_isBoolean { + CFTypeID boolID = CFBooleanGetTypeID(); + CFTypeID numID = CFGetTypeID((__bridge CFTypeRef)(self)); + return numID == boolID; +} + +@end + +static void MPKitApptentivePerformOnMain(void (^block)(void)) { + if (!block) { + return; + } + + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_async(dispatch_get_main_queue(), block); + } +} + +@implementation MPKitApptentive + ++ (NSNumber *)kitCode { + return @(97); +} + ++ (void)load { + MPKitRegister *kitRegister = [[MPKitRegister alloc] initWithName:@"Apptentive" className:@"MPKitApptentive"]; + [MParticle registerExtension:kitRegister]; +} + +- (MPKitExecStatus *)execStatus:(MPKitReturnCode)returnCode { + return [[MPKitExecStatus alloc] initWithSDKCode:self.class.kitCode returnCode:returnCode]; +} + +#pragma mark - MPKitInstanceProtocol methods + +#pragma mark Kit instance and lifecycle +- (MPKitExecStatus *)didFinishLaunchingWithConfiguration:(NSDictionary *)configuration { + NSString *appKey = configuration[apptentiveAppKeyKey]; + NSString *appSignature = configuration[apptentiveAppSignatureKey]; + + if (appKey == nil || appSignature == nil) { + if (appKey == nil) { + NSLog(@"mParticle -> No Apptentive App Key provided."); + } + + if (appSignature == nil) { + NSLog(@"mParticle -> No Apptentive App Signature provided."); + } + + NSLog(@"mParticle -> Please see the Apptentive mParticle integration guide: https://learn.apptentive.com/knowledge-base/mparticle-integration-ios/"); + } + + if (!appKey || !appSignature) { + return [self execStatus:MPKitReturnCodeRequirementsNotMet]; + } + + self.enableTypeDetection = [configuration objectForKey:apptentiveEnableTypeDetectionKey] != nil ? [configuration[apptentiveEnableTypeDetectionKey] boolValue] : YES; + + _configuration = configuration; + + [self start]; + + return [self execStatus:MPKitReturnCodeSuccess]; +} + +- (void)start { + static dispatch_once_t kitPredicate; + + dispatch_once(&kitPredicate, ^{ + _apptentiveKey = self.configuration[apptentiveAppKeyKey]; + _apptentiveSignature = self.configuration[apptentiveAppSignatureKey]; + + // do we need to init the SDK while the Kit starts + BOOL initOnStart = self.configuration[apptentiveInitOnStart] == nil || // if flag is missing + [self.configuration[apptentiveInitOnStart] boolValue]; // or set to 'YES' + + if (initOnStart) { + [[self class] registerSDK]; + } else { + NSLog(@"mParticle -> Apptentive SDK was not initialized on startup"); + } + + self->_started = YES; + + if ([NSPersonNameComponents class]) { + self->_nameFormatter = [[NSPersonNameComponentsFormatter alloc] init]; + self->_nameComponents = [[NSPersonNameComponents alloc] init]; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + NSDictionary *userInfo = @{mParticleKitInstanceKey:[[self class] kitCode]}; + + [[NSNotificationCenter defaultCenter] postNotificationName:mParticleKitDidBecomeActiveNotification + object:nil + userInfo:userInfo]; + + NSNumber *currentUserId = MParticle.sharedInstance.identity.currentUser.userId; + [Apptentive.shared setMParticleID:[currentUserId isEqualToNumber:@0] ? nil : currentUserId.stringValue]; + }); + }); +} + +- (id const)providerKitInstance { + return [self started] ? Apptentive.shared : nil; +} + ++ (BOOL)registerSDK { + if (_apptentiveKey.length == 0) { + NSLog(@"mParticle -> Unable to initialize Apptentive SDK: apptentive key is nil or empty"); + return NO; + } + + if (_apptentiveSignature.length == 0) { + NSLog(@"mParticle -> Unable to initialize Apptentive SDK: apptentive signature is nil or empty"); + return NO; + } + + __block BOOL registered = NO; + void (^registerBlock)(void) = ^{ + NSLog(@"mParticle -> Registering Apptentive SDK"); + + // ApptentiveKit 7 public APIs are MainActor-isolated; set distribution metadata + // on the shared instance before registering. + Apptentive.shared.distributionName = @"mParticle"; + Apptentive.shared.distributionVersion = [MParticle sharedInstance].version; + + ApptentiveConfiguration *apptentiveConfig = [ApptentiveConfiguration configurationWithApptentiveKey:_apptentiveKey apptentiveSignature:_apptentiveSignature]; + [Apptentive.shared registerWithConfiguration:apptentiveConfig completion:nil]; + registered = YES; + }; + + if ([NSThread isMainThread]) { + registerBlock(); + } else { + dispatch_sync(dispatch_get_main_queue(), registerBlock); + } + + return registered; +} + +#pragma mark Application + +// NOTE: Called when a remote notification is received +- (MPKitExecStatus *)receivedUserNotification:(NSDictionary *)userInfo { + MPKitApptentivePerformOnMain(^{ + BOOL handledByApptentive = [Apptentive.shared didReceiveRemoteNotification:userInfo fetchCompletionHandler:^(UIBackgroundFetchResult result) {}]; + NSLog(@"mParticle -> Apptentive %@ handle remote notification.", handledByApptentive ? @"did" : @"did not"); + }); + + return [self execStatus:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)setDeviceToken:(NSData *)deviceToken { + MPKitApptentivePerformOnMain(^{ + [Apptentive.shared setRemoteNotificationDeviceToken:deviceToken]; + }); + + return [self execStatus:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response { + MPKitApptentivePerformOnMain(^{ + BOOL handledByApptentive = [Apptentive.shared didReceveUserNotificationResponse:response withCompletionHandler:^{}]; + NSLog(@"mParticle -> Apptentive %@ handle user notification response.", handledByApptentive ? @"did" : @"did not"); + }); + + return [self execStatus:MPKitReturnCodeSuccess]; +} + +#pragma mark User attributes and identities + +- (MPKitExecStatus *)setUserAttribute:(NSString *)key value:(NSString *)value { + if ([key isEqualToString:mParticleUserAttributeFirstName]) { + self.nameComponents.givenName = value; + } else if ([key isEqualToString:mParticleUserAttributeLastName]) { + self.nameComponents.familyName = value; + } else { + BOOL enableTypeDetection = self.enableTypeDetection; + MPKitApptentivePerformOnMain(^{ + [Apptentive.shared addCustomPersonDataString:value withKey:key]; + if (enableTypeDetection) { + id typedValue = MPKitApptentiveParseValue(value); + if ([typedValue isKindOfClass:[NSNumber class]]) { + if ([typedValue apptentive_isBoolean]) { + [Apptentive.shared addCustomPersonDataBool:[typedValue boolValue] withKey:[NSString stringWithFormat:@"%@_flag", key]]; + } else { + [Apptentive.shared addCustomPersonDataNumber:typedValue withKey:[NSString stringWithFormat:@"%@_number", key]]; + } + } + } + }); + } + + NSString *name = [self.nameFormatter stringFromPersonNameComponents:self.nameComponents]; + + if (name) { + MPKitApptentivePerformOnMain(^{ + Apptentive.shared.personName = name; + }); + } + + return [self execStatus:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)removeUserAttribute:(NSString *)key { + MPKitApptentivePerformOnMain(^{ + [Apptentive.shared removeCustomPersonDataWithKey:key]; + }); + return [self execStatus:MPKitReturnCodeSuccess]; +} + +- (MPKitExecStatus *)setUserIdentity:(NSString *)identityString identityType:(MPUserIdentity)identityType { + MPKitReturnCode returnCode; + + if (identityType == MPUserIdentityEmail) { + MPKitApptentivePerformOnMain(^{ + Apptentive.shared.personEmailAddress = identityString; + }); + returnCode = MPKitReturnCodeSuccess; + } else if (identityType == MPUserIdentityCustomerId) { + MPKitApptentivePerformOnMain(^{ + if (Apptentive.shared.personName.length == 0) { + Apptentive.shared.personName = identityString; + } + }); + returnCode = MPKitReturnCodeSuccess; + } else { + returnCode = MPKitReturnCodeRequirementsNotMet; + } + + return [self execStatus:returnCode]; +} + +#pragma mark Events + +- (nonnull MPKitExecStatus *)logBaseEvent:(nonnull MPBaseEvent *)event { + if ([event isKindOfClass:[MPEvent class]]) { + return [self routeEvent:(MPEvent *)event]; + } else { + return [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceApptentive) returnCode:MPKitReturnCodeUnavailable]; + } +} + +#pragma mark Events + +- (MPKitExecStatus *)routeEvent:(MPEvent *)event { + NSDictionary *eventValues = event.customAttributes; + NSString *eventName = event.name; + NSDictionary *customData = ([eventValues count] > 0) ? [self parseEventInfoDictionary:eventValues] : nil; + + MPKitApptentivePerformOnMain(^{ + if (customData) { + [Apptentive.shared engage:eventName withCustomData:customData fromViewController:nil]; + } else { + [Apptentive.shared engage:eventName fromViewController:nil]; + } + }); + return [self execStatus:MPKitReturnCodeSuccess]; +} + +#pragma mark Screen Events + +- (MPKitExecStatus *)logScreen:(MPEvent *)event { + return [self logBaseEvent:event]; +} + +#pragma mark Helpers + +- (NSDictionary *)parseEventInfoDictionary:(NSDictionary *)info { + NSMutableDictionary *res = [[NSMutableDictionary alloc] init]; + for (id key in info) { + id value = info[key]; + res[key] = value; + + if (self.enableTypeDetection) { + id typedValue = MPKitApptentiveParseValue(value); + if ([typedValue isKindOfClass:[NSNumber class]]) { + if ([typedValue apptentive_isBoolean]) { + res[[NSString stringWithFormat:@"%@_flag", key]] = typedValue; + } else { + res[[NSString stringWithFormat:@"%@_number", key]] = typedValue; + } + } + } + } + return res; +} + +@end diff --git a/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentiveUtils.m b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentiveUtils.m new file mode 100644 index 000000000..a82aeec05 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/MPKitApptentiveUtils.m @@ -0,0 +1,35 @@ +// +// MPKitApptentiveUtils.m +// mParticle-Apptentive +// +// Created by Alex Lementuev on 5/2/21. +// Copyright © 2021 mParticle. All rights reserved. +// + +#import "MPKitApptentiveUtils.h" + +static NSNumber *parseNumber(NSString *str) { + static NSNumberFormatter *formatter = nil; + if (!formatter) { + formatter = [[NSNumberFormatter alloc] init]; + } + + return [formatter numberFromString:str]; +} + +id MPKitApptentiveParseValue(NSString *value) { + if ([value caseInsensitiveCompare:@"true"] == NSOrderedSame) { + return [NSNumber numberWithBool:YES]; + } + + if ([value caseInsensitiveCompare:@"false"] == NSOrderedSame) { + return [NSNumber numberWithBool:NO]; + } + + NSNumber *number = parseNumber(value); + if (number != nil) { + return number; + } + + return value; +} diff --git a/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/PrivacyInfo.xcprivacy b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..2009fb7a2 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyAccessedAPITypes + + + diff --git a/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentive.h b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentive.h new file mode 100644 index 000000000..cecf0c42e --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentive.h @@ -0,0 +1,26 @@ +#import +#if defined(__has_include) && __has_include() +@import mParticle_Apple_SDK; +#elif __has_feature(objc_modules) +@import mParticle_Apple_SDK_ObjC; +#else +#import +#endif + +@interface MPKitApptentive : NSObject + +@property (nonatomic, strong, nonnull) NSDictionary *configuration; +@property (nonatomic, strong, nullable) NSDictionary *launchOptions; +@property (nonatomic, unsafe_unretained, readonly) BOOL started; +@property (nonatomic, strong, nullable) NSDictionary *userAttributes; +@property (nonatomic, strong, nullable) NSArray *> *userIdentities; + + +/** + Begins Apptentive SDK initialization. Does nothing if the SDK is already initialized. + + @return YES if SDK initialization was successful. NO - if the SDK was already initialized or failed to initialize. + */ ++ (BOOL)registerSDK; + +@end diff --git a/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentiveUtils.h b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentiveUtils.h new file mode 100644 index 000000000..2f1806c94 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/MPKitApptentiveUtils.h @@ -0,0 +1,15 @@ +// +// MPKitApptentiveUtils.h +// mParticle-Apptentive +// +// Created by Alex Lementuev on 5/2/21. +// Copyright © 2021 mParticle. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +id MPKitApptentiveParseValue(NSString *value); + +NS_ASSUME_NONNULL_END diff --git a/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/mParticle_Apptentive.h b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/mParticle_Apptentive.h new file mode 100644 index 000000000..17a2a7c34 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Sources/mParticle-Apptentive/include/mParticle_Apptentive.h @@ -0,0 +1,15 @@ +#import + +//! Project version number for mParticle-Apptentive. +FOUNDATION_EXPORT double mParticle_ApptentiveVersionNumber; + +//! Project version string for mParticle-Apptentive. +FOUNDATION_EXPORT const unsigned char mParticle_ApptentiveVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#if defined(__has_include) && __has_include() + #import +#else + #import "MPKitApptentive.h" +#endif diff --git a/Kits/apptentive/apptentive-7/Tests/mParticle-ApptentiveTests/mParticle_ApptentiveTests.m b/Kits/apptentive/apptentive-7/Tests/mParticle-ApptentiveTests/mParticle_ApptentiveTests.m new file mode 100644 index 000000000..0b5ae01c4 --- /dev/null +++ b/Kits/apptentive/apptentive-7/Tests/mParticle-ApptentiveTests/mParticle_ApptentiveTests.m @@ -0,0 +1,74 @@ +// +// mParticle_ApptentiveTests.m +// mParticle-ApptentiveTests +// +// Created by Alex Lementuev on 5/2/21. +// Copyright © 2021 mParticle. All rights reserved. +// + +#import + +#import "MPKitApptentive.h" +#import "MPKitApptentiveUtils.h" + +@interface MPKitApptentive() + +- (NSDictionary *)parseEventInfoDictionary:(NSDictionary *)info; +@property (assign, nonatomic) BOOL enableTypeDetection; + +@end + +@interface mParticle_ApptentiveTests : XCTestCase + +@end + +@implementation mParticle_ApptentiveTests + +- (void)testMPKitApptentiveParseEventInfo { + NSDictionary *data = @{ + // boolean + @"key-1": @"true", + @"key-2": @"True", + @"key-3": @"false", + @"key-4": @"False", + + // integer + @"key-5": @"12345", + @"key-6": @"-12345", + + // double + @"key-7": @"3.14", + @"key-8": @"-3.14", + + // string + @"key-9": @"123test456" + + }; + + NSDictionary *expected = @{ + @"key-1": @"true", + @"key-2": @"True", + @"key-3": @"false", + @"key-4": @"False", + @"key-1_flag": @YES, + @"key-2_flag": @YES, + @"key-3_flag": @NO, + @"key-4_flag": @NO, + @"key-5": @"12345", + @"key-5_number": @12345, + @"key-6": @"-12345", + @"key-6_number": @(-12345), + @"key-7": @"3.14", + @"key-7_number": @3.14, + @"key-8": @"-3.14", + @"key-8_number": @(-3.14), + @"key-9": @"123test456" + }; + + MPKitApptentive *kit = [MPKitApptentive new]; + kit.enableTypeDetection = YES; + NSDictionary *actual = [kit parseEventInfoDictionary:data]; + XCTAssertEqualObjects(expected, actual); +} + +@end diff --git a/Kits/apptentive/apptentive-7/mParticle-Apptentive-7.podspec b/Kits/apptentive/apptentive-7/mParticle-Apptentive-7.podspec new file mode 100644 index 000000000..862d578a2 --- /dev/null +++ b/Kits/apptentive/apptentive-7/mParticle-Apptentive-7.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |s| + s.name = "mParticle-Apptentive-7" + s.module_name = 'mParticle_Apptentive' + s.version = "9.3.4" + s.summary = "Apptentive integration for mParticle" + s.description = <<-DESC + This is the Apptentive 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-integrations/mparticle-apple-integration-apptentive-7.git", :tag => "v" + s.version.to_s } + s.ios.deployment_target = "15.0" + s.ios.source_files = 'Sources/mParticle-Apptentive/**/*.{h,m}' + s.ios.resource_bundles = { 'mParticle-Apptentive-7-Privacy' => ['Sources/mParticle-Apptentive/PrivacyInfo.xcprivacy'] } + s.ios.dependency 'mParticle-Apple-SDK', '~> 9.0' + s.ios.dependency 'ApptentiveKit', '~> 7.0' +end diff --git a/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/project.pbxproj b/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/project.pbxproj new file mode 100644 index 000000000..ba2e4455c --- /dev/null +++ b/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/project.pbxproj @@ -0,0 +1,401 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 60; + objects = { + +/* Begin PBXBuildFile section */ + AT01FILE01MPKitApptentiveM /* MPKitApptentive.m in Sources */ = {isa = PBXBuildFile; fileRef = AT02FILEREF01 /* MPKitApptentive.m */; }; + AT01FILE02MPKitApptentiveUtilsM /* MPKitApptentiveUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = AT02FILEREF02 /* MPKitApptentiveUtils.m */; }; + AT01FILE03MPKitApptentiveH /* MPKitApptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = AT02FILEREF04 /* MPKitApptentive.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AT01FILE04MPKitApptentiveUtilsH /* MPKitApptentiveUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = AT02FILEREF05 /* MPKitApptentiveUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AT01FILE05mParticleApptentiveH /* mParticle_Apptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = AT02FILEREF06 /* mParticle_Apptentive.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AT01FILE06PrivacyInfo /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = AT02FILEREF07 /* PrivacyInfo.xcprivacy */; }; + 1AAAB9A1762CC7FFD5074424 /* mParticle-Apple-SDK in Frameworks */ = {isa = PBXBuildFile; productRef = A5D465BFB43D853EC6AE2112 /* mParticle-Apple-SDK */; }; + D2D39B1359471267C1070508 /* ApptentiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 54ED7A907C34540D8FCB3A0C /* ApptentiveKit */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AT02FILEREF01 /* MPKitApptentive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKitApptentive.m; sourceTree = ""; }; + AT02FILEREF02 /* MPKitApptentiveUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKitApptentiveUtils.m; sourceTree = ""; }; + AT02FILEREF04 /* MPKitApptentive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKitApptentive.h; sourceTree = ""; }; + AT02FILEREF05 /* MPKitApptentiveUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKitApptentiveUtils.h; sourceTree = ""; }; + AT02FILEREF06 /* mParticle_Apptentive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mParticle_Apptentive.h; sourceTree = ""; }; + AT02FILEREF07 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + D31A61BC0A3923E7FA0078E2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A465E6CECF2C0072A4D44B6D /* mParticle_Apptentive.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = mParticle_Apptentive.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 69A093DB4CAD4EB4C2C2739B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AAAB9A1762CC7FFD5074424 /* mParticle-Apple-SDK in Frameworks */, + D2D39B1359471267C1070508 /* ApptentiveKit in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 029451176EBA2BE300E31B02 /* Sources */ = { + isa = PBXGroup; + children = ( + D44F71271447851D4140568B /* mParticle-Apptentive */, + D31A61BC0A3923E7FA0078E2 /* Info.plist */, + ); + path = Sources; + sourceTree = ""; + }; + D44F71271447851D4140568B /* mParticle-Apptentive */ = { + isa = PBXGroup; + children = ( + A217D81E2D4BBB120BFA689C /* include */, + AT02FILEREF01 /* MPKitApptentive.m */, + AT02FILEREF02 /* MPKitApptentiveUtils.m */, + AT02FILEREF07 /* PrivacyInfo.xcprivacy */, + ); + path = "mParticle-Apptentive"; + sourceTree = ""; + }; + A217D81E2D4BBB120BFA689C /* include */ = { + isa = PBXGroup; + children = ( + AT02FILEREF04 /* MPKitApptentive.h */, + AT02FILEREF05 /* MPKitApptentiveUtils.h */, + AT02FILEREF06 /* mParticle_Apptentive.h */, + ); + path = include; + sourceTree = ""; + }; + 51B06150EABE4A3AB1E17519 = { + isa = PBXGroup; + children = ( + 029451176EBA2BE300E31B02 /* Sources */, + 605FD342D5158C8D4A655BB7 /* Products */, + ); + sourceTree = ""; + }; + 605FD342D5158C8D4A655BB7 /* Products */ = { + isa = PBXGroup; + children = ( + A465E6CECF2C0072A4D44B6D /* mParticle_Apptentive.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + AED212861C57DF25B28C27C9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + AT01FILE03MPKitApptentiveH /* MPKitApptentive.h in Headers */, + AT01FILE04MPKitApptentiveUtilsH /* MPKitApptentiveUtils.h in Headers */, + AT01FILE05mParticleApptentiveH /* mParticle_Apptentive.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2E361EF84FB26C0A57490741 /* mParticle-Apptentive */ = { + isa = PBXNativeTarget; + buildConfigurationList = E3AF07F3FA176B20687C11C3 /* Build configuration list for PBXNativeTarget "mParticle-Apptentive" */; + buildPhases = ( + 2D288C43FE2FED272DE6B3DC /* Sources */, + 69A093DB4CAD4EB4C2C2739B /* Frameworks */, + AED212861C57DF25B28C27C9 /* Headers */, + 7E19098BE0434BB4EDFF0713 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "mParticle-Apptentive"; + packageProductDependencies = ( + A5D465BFB43D853EC6AE2112 /* mParticle-Apple-SDK */, + 54ED7A907C34540D8FCB3A0C /* ApptentiveKit */, + ); + productName = "mParticle-Apptentive"; + productReference = A465E6CECF2C0072A4D44B6D /* mParticle_Apptentive.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0D7F00B78C0C285BE5F9C50B /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1200; + ORGANIZATIONNAME = mParticle; + TargetAttributes = { + 2E361EF84FB26C0A57490741 = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = 1147F6BD30D93F609A5E4B26 /* Build configuration list for PBXProject "mParticle-Apptentive" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 51B06150EABE4A3AB1E17519; + packageReferences = ( + 5B599BDE6D9BA5E80A7F2534 /* XCLocalSwiftPackageReference "../../.." */, + 57F22F2DEE52FC447FA86FE6 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */, + ); + productRefGroup = 605FD342D5158C8D4A655BB7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2E361EF84FB26C0A57490741 /* mParticle-Apptentive */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7E19098BE0434BB4EDFF0713 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AT01FILE06PrivacyInfo /* PrivacyInfo.xcprivacy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2D288C43FE2FED272DE6B3DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AT01FILE01MPKitApptentiveM /* MPKitApptentive.m in Sources */, + AT01FILE02MPKitApptentiveUtilsM /* MPKitApptentiveUtils.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + AF3B9915C64C2C9637108134 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = 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_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 = NO; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = ""; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E0A234E9C4720E66E8CB49DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = 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_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 = NO; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = ""; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 4BF48C6EA1F23FFD624C5BBB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_IDENTITY = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "SWIFT_PACKAGE=1", + "$(inherited)", + ); + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apptentive"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = NO; + }; + name = Debug; + }; + 6224E65ADC2B215945129EE3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_IDENTITY = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "SWIFT_PACKAGE=1", + "$(inherited)", + ); + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apptentive"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1147F6BD30D93F609A5E4B26 /* Build configuration list for PBXProject "mParticle-Apptentive" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AF3B9915C64C2C9637108134 /* Debug */, + E0A234E9C4720E66E8CB49DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E3AF07F3FA176B20687C11C3 /* Build configuration list for PBXNativeTarget "mParticle-Apptentive" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4BF48C6EA1F23FFD624C5BBB /* Debug */, + 6224E65ADC2B215945129EE3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 5B599BDE6D9BA5E80A7F2534 /* XCLocalSwiftPackageReference "../../.." */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../..; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 57F22F2DEE52FC447FA86FE6 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apptentive/apptentive-kit-ios"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 7.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + A5D465BFB43D853EC6AE2112 /* mParticle-Apple-SDK */ = { + isa = XCSwiftPackageProductDependency; + package = 5B599BDE6D9BA5E80A7F2534 /* XCLocalSwiftPackageReference "../../.." */; + productName = "mParticle-Apple-SDK"; + }; + 54ED7A907C34540D8FCB3A0C /* ApptentiveKit */ = { + isa = XCSwiftPackageProductDependency; + package = 57F22F2DEE52FC447FA86FE6 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */; + productName = ApptentiveKit; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 0D7F00B78C0C285BE5F9C50B /* Project object */; +} diff --git a/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/xcshareddata/xcschemes/mParticle-Apptentive.xcscheme b/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/xcshareddata/xcschemes/mParticle-Apptentive.xcscheme new file mode 100644 index 000000000..e5c50828a --- /dev/null +++ b/Kits/apptentive/apptentive-7/mParticle-Apptentive.xcodeproj/xcshareddata/xcschemes/mParticle-Apptentive.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Kits/matrix.json b/Kits/matrix.json index dd156345d..ee057e614 100644 --- a/Kits/matrix.json +++ b/Kits/matrix.json @@ -62,6 +62,20 @@ } ] }, + { + "name": "apptentive-7", + "local_path": "Kits/apptentive/apptentive-7", + "podspec": "Kits/apptentive/apptentive-7/mParticle-Apptentive-7.podspec", + "dest_repo": "mparticle-apple-integration-apptentive-7", + "mirror_force_push_main": true, + "schemes": [ + { + "scheme": "mParticle-Apptentive", + "module": "mParticle_Apptentive", + "destination": "iOS" + } + ] + }, { "name": "apptimize-3", "local_path": "Kits/apptimize/apptimize-3",