diff --git a/ExampleIntempt/ExampleIntempt.xcodeproj/project.pbxproj b/ExampleIntempt/ExampleIntempt.xcodeproj/project.pbxproj new file mode 100644 index 0000000..408768e --- /dev/null +++ b/ExampleIntempt/ExampleIntempt.xcodeproj/project.pbxproj @@ -0,0 +1,397 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + FA8696982C34648A008C4491 /* Intempt in Frameworks */ = {isa = PBXBuildFile; productRef = FA8696972C34648A008C4491 /* Intempt */; }; + FAC411CB2C132E4F00826A7E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC411CA2C132E4F00826A7E /* AppDelegate.swift */; }; + FAC411CD2C132E4F00826A7E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC411CC2C132E4F00826A7E /* SceneDelegate.swift */; }; + FAC411CF2C132E4F00826A7E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC411CE2C132E4F00826A7E /* ViewController.swift */; }; + FAC411D22C132E4F00826A7E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAC411D02C132E4F00826A7E /* Main.storyboard */; }; + FAC411D42C132E5000826A7E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FAC411D32C132E5000826A7E /* Assets.xcassets */; }; + FAC411D72C132E5000826A7E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAC411D52C132E5000826A7E /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + FAC411C72C132E4F00826A7E /* ExampleIntempt.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleIntempt.app; sourceTree = BUILT_PRODUCTS_DIR; }; + FAC411CA2C132E4F00826A7E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + FAC411CC2C132E4F00826A7E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + FAC411CE2C132E4F00826A7E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + FAC411D12C132E4F00826A7E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + FAC411D32C132E5000826A7E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + FAC411D62C132E5000826A7E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + FAC411D82C132E5100826A7E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + FAC411C42C132E4F00826A7E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FA8696982C34648A008C4491 /* Intempt in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + FAC411BE2C132E4F00826A7E = { + isa = PBXGroup; + children = ( + FAC411C92C132E4F00826A7E /* ExampleIntempt */, + FAC411C82C132E4F00826A7E /* Products */, + ); + sourceTree = ""; + }; + FAC411C82C132E4F00826A7E /* Products */ = { + isa = PBXGroup; + children = ( + FAC411C72C132E4F00826A7E /* ExampleIntempt.app */, + ); + name = Products; + sourceTree = ""; + }; + FAC411C92C132E4F00826A7E /* ExampleIntempt */ = { + isa = PBXGroup; + children = ( + FAC411CA2C132E4F00826A7E /* AppDelegate.swift */, + FAC411CC2C132E4F00826A7E /* SceneDelegate.swift */, + FAC411CE2C132E4F00826A7E /* ViewController.swift */, + FAC411D02C132E4F00826A7E /* Main.storyboard */, + FAC411D32C132E5000826A7E /* Assets.xcassets */, + FAC411D52C132E5000826A7E /* LaunchScreen.storyboard */, + FAC411D82C132E5100826A7E /* Info.plist */, + ); + path = ExampleIntempt; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + FAC411C62C132E4F00826A7E /* ExampleIntempt */ = { + isa = PBXNativeTarget; + buildConfigurationList = FAC411DB2C132E5100826A7E /* Build configuration list for PBXNativeTarget "ExampleIntempt" */; + buildPhases = ( + FAC411C32C132E4F00826A7E /* Sources */, + FAC411C42C132E4F00826A7E /* Frameworks */, + FAC411C52C132E4F00826A7E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ExampleIntempt; + packageProductDependencies = ( + FA8696972C34648A008C4491 /* Intempt */, + ); + productName = ExampleIntempt; + productReference = FAC411C72C132E4F00826A7E /* ExampleIntempt.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + FAC411BF2C132E4F00826A7E /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + TargetAttributes = { + FAC411C62C132E4F00826A7E = { + CreatedOnToolsVersion = 15.0.1; + }; + }; + }; + buildConfigurationList = FAC411C22C132E4F00826A7E /* Build configuration list for PBXProject "ExampleIntempt" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = FAC411BE2C132E4F00826A7E; + packageReferences = ( + FA8696962C34648A008C4491 /* XCRemoteSwiftPackageReference "intempt-intemptios" */, + ); + productRefGroup = FAC411C82C132E4F00826A7E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + FAC411C62C132E4F00826A7E /* ExampleIntempt */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + FAC411C52C132E4F00826A7E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FAC411D72C132E5000826A7E /* LaunchScreen.storyboard in Resources */, + FAC411D42C132E5000826A7E /* Assets.xcassets in Resources */, + FAC411D22C132E4F00826A7E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + FAC411C32C132E4F00826A7E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FAC411CF2C132E4F00826A7E /* ViewController.swift in Sources */, + FAC411CB2C132E4F00826A7E /* AppDelegate.swift in Sources */, + FAC411CD2C132E4F00826A7E /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + FAC411D02C132E4F00826A7E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + FAC411D12C132E4F00826A7E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + FAC411D52C132E5000826A7E /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + FAC411D62C132E5000826A7E /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + FAC411D92C132E5100826A7E /* 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 = 17.0; + 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; + }; + FAC411DA2C132E5100826A7E /* 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 = 17.0; + 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; + }; + FAC411DC2C132E5100826A7E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = TJFM7R7DTU; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ExampleIntempt/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"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.ExampleIntempt; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + FAC411DD2C132E5100826A7E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = TJFM7R7DTU; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ExampleIntempt/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"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.ExampleIntempt; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + FAC411C22C132E4F00826A7E /* Build configuration list for PBXProject "ExampleIntempt" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FAC411D92C132E5100826A7E /* Debug */, + FAC411DA2C132E5100826A7E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FAC411DB2C132E5100826A7E /* Build configuration list for PBXNativeTarget "ExampleIntempt" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FAC411DC2C132E5100826A7E /* Debug */, + FAC411DD2C132E5100826A7E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + FA8696962C34648A008C4491 /* XCRemoteSwiftPackageReference "intempt-intemptios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/intempt/intempt-intemptios"; + requirement = { + branch = master; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + FA8696972C34648A008C4491 /* Intempt */ = { + isa = XCSwiftPackageProductDependency; + package = FA8696962C34648A008C4491 /* XCRemoteSwiftPackageReference "intempt-intemptios" */; + productName = Intempt; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = FAC411BF2C132E4F00826A7E /* Project object */; +} diff --git a/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..9aa13df --- /dev/null +++ b/ExampleIntempt/ExampleIntempt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "intempt-intemptios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/intempt/intempt-intemptios", + "state" : { + "branch" : "master", + "revision" : "b4e605a22c55965a264c1dac49e3edba46c10ad9" + } + } + ], + "version" : 2 +} diff --git a/ExampleIntempt/ExampleIntempt/AppDelegate.swift b/ExampleIntempt/ExampleIntempt/AppDelegate.swift new file mode 100644 index 0000000..23dd388 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/AppDelegate.swift @@ -0,0 +1,44 @@ +// +// AppDelegate.swift +// ExampleIntempt +// +// Created by MacBook on 07/06/2024. +// + +import UIKit +import Intempt + +struct IntemptOptions { + + static let orgId = "intempt-internal-use-only" + static let projectId = "mobile-demo" + static let sourceId = "631618442509443072" + static let token = "f4be8ec19a2947419c0a2e0afc5e5c55.f3c39a98390a41a1b83fa5d39a1b39e4" +} + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + 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/ExampleIntempt/ExampleIntempt/Assets.xcassets/AccentColor.colorset/Contents.json b/ExampleIntempt/ExampleIntempt/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ExampleIntempt/ExampleIntempt/Assets.xcassets/AppIcon.appiconset/Contents.json b/ExampleIntempt/ExampleIntempt/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ExampleIntempt/ExampleIntempt/Assets.xcassets/Contents.json b/ExampleIntempt/ExampleIntempt/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ExampleIntempt/ExampleIntempt/Base.lproj/LaunchScreen.storyboard b/ExampleIntempt/ExampleIntempt/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExampleIntempt/ExampleIntempt/Base.lproj/Main.storyboard b/ExampleIntempt/ExampleIntempt/Base.lproj/Main.storyboard new file mode 100644 index 0000000..e9a29ac --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Base.lproj/Main.storyboard @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExampleIntempt/ExampleIntempt/Info.plist b/ExampleIntempt/ExampleIntempt/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/ExampleIntempt/ExampleIntempt/SceneDelegate.swift b/ExampleIntempt/ExampleIntempt/SceneDelegate.swift new file mode 100644 index 0000000..7060fb5 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/SceneDelegate.swift @@ -0,0 +1,69 @@ +// +// SceneDelegate.swift +// ExampleIntempt +// +// Created by MacBook on 07/06/2024. +// + +import UIKit +import Intempt + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + + let intemptConfig = IntemptConfig(queueEnabled: false, withItemsInQueue: 5, withTimeBuffer: 5, withInitialDelay: 0.3, withInputTextCaptureDisabled: false) + + Intempt.initialize(IntemptOptions.orgId, projectName: IntemptOptions.projectId, sourceId: IntemptOptions.sourceId, apiKey: IntemptOptions.token, intemptConfig: intemptConfig) { (status, result, error) in + if(status) { + if let dictResult = result as? [String: Any] { + print(dictResult) + } + } + else { + if let error = error { + print(error.localizedDescription) + } + } + } + Intempt.enableLogging() + } + + 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/ExampleIntempt/ExampleIntempt/ViewController.swift b/ExampleIntempt/ExampleIntempt/ViewController.swift new file mode 100644 index 0000000..a3ee665 --- /dev/null +++ b/ExampleIntempt/ExampleIntempt/ViewController.swift @@ -0,0 +1,67 @@ +// +// ViewController.swift +// ExampleIntempt +// +// Created by MacBook on 07/06/2024. +// + +import UIKit +import Intempt + +class ViewController: UIViewController { + + let email = "sampleappuser@xy.com" + + override func viewDidLoad() { + super.viewDidLoad() + + } + + @IBAction func setIdentity( sendder:AnyObject){ + + Intempt.identify(email) { (status, result, error) in + if(status) { + if let dictResult = result as? [String: Any] { + print(dictResult) + } + } + else { + if let error = error { + print(error.localizedDescription) + } + } + } + } + + @IBAction func consentApproved( sendder:AnyObject){ + + Intempt.consent(IntemptConsentAction.accept, consentsExpirationTime: "unlimited", category:"Offers", email: email, message: "Yes email me offers, styles and promotions") { status, result, error in + print(error ?? status) + } + } + + @IBAction func sendCustomeEvent( sender: AnyObject? ) { + + let objData:[String:Any] = [ + "flightId" : 1, + "bookingDate" : "2024-06-07", + "bookingId": 2, + "bookingStatus" : "booked" + ] + + Intempt.track("flight-booking", data: objData) { (status, result, error) in + if(status) { + if let dictResult = result as? [String: Any] { + print(dictResult) + } + } + else { + if let error = error { + print(error.localizedDescription) + } + } + } + + } +} + diff --git a/Intempt.framework/Headers/IntemptClient.h b/Intempt.framework/Headers/IntemptClient.h deleted file mode 100755 index e5937bc..0000000 --- a/Intempt.framework/Headers/IntemptClient.h +++ /dev/null @@ -1,171 +0,0 @@ -// -// IntemptClient.h -// intempt -// -// Created by Intempt on 18/03/20. -// Copyright © 2020 Intempt. All rights reserved. -// - -@import Foundation; -@import CoreLocation; -@import CoreBluetooth; - -#import - -typedef void(^CompletionHandler)(BOOL status, id result, NSError *error); - -@protocol intemptDelegate -/** - Called upon entering the region - @param beaconData CLBeacon -*/ --(void)didEnterRegion:(CLBeacon*)beaconData; - -/** - Called upon exiting the region - @param beaconData CLBeacon -*/ --(void)didExitRegion:(CLBeacon*)beaconData; - -@end - -@interface IntemptClient : NSObject - -@property (weak, nonatomic) id delegate; -@property (strong, nonatomic) CLLocation *currentLocation; - -/** An Intempt configuartion which can be configured by user. For more details please look into `IntemptConfig` class. - */ -@property(strong, nonatomic) IntemptConfig *config; - -/** - Retuns a fully initialzed `IntemptClient` object - @param organizationId Organization Id - @param trackerId Tracker Id - @param token Source token -*/ -+ (IntemptClient *)sharedClientWithOrganizationId:(NSString *)organizationId withTrackerId:(NSString *)trackerId withToken:(NSString *)token withConfig:(id)settings withCompletion:(CompletionHandler)handler; - -/** - Retuns a fully initialzed `IntemptClient` object -*/ -+ (IntemptClient *)sharedClient; - -/** - Call this to authorize geo location always (iOS 8 and above). You must also add NSLocationAlwaysUsageDescription string to Info.plist to - authorize geo location always (foreground and background), call this BEFORE doing anything else with ITClient. - @note From iOS 13 user can't grant location tracking 'always' from app. A user need to go to app settings to manually enable it. - */ -+ (void)authorizeGeoLocationAlways; - -/** - Call this to authorize geo location when in use (iOS 8 and above). You must also add NSLocationWhenInUsageDescription string to Info.plist to - authorize geo location when in use (foreground), call this BEFORE doing anything else with ITClient. - */ -+ (void)authorizeGeoLocationWhenInUse; - - -/** - Call this to disable debug logging. - */ -+ (void)disableLogging; - -/** - Call this to enable debug logging. By default it's disabled. - */ -+ (void)enableLogging; - -/** - Returns whether or not logging is currently enabled. - - @return true if logging is enabled, false if disabled. - */ -+ (Boolean)isLoggingEnabled; -/** - Call this if your code needs to use more than one Intempt project. By convention, if you - call this, you're responsible for releasing the returned instance once you're finished with it. - - Otherwise, just use [IntemptClient sharedClient]. - - @param organizationId Your Intempt Organization ID. - @param trackerId Your Intempt Tracker ID. - @param token Your Intempt Tracker security token. - @return An initialized instance of ITClient. - */ -- (id)initWithOrganizationId:(NSString *)organizationId withTrackerId:(NSString *)trackerId withToken:(NSString *)token withConfig:(id)settings withCompletion:(CompletionHandler)handler; - -/** - Call this if your code needs to use more than one Intempt project along with some extra properties & properties overrides. By convention, if you - call this, you're responsible for releasing the returned instance once you're finished with it. - @param organizationId Your Intempt Organization ID. - @param sourceId Your Intempt Tracker ID. - @param token Your Intempt Tracker security token. - @param propertiesOverrides A property Dictonary - @param propertiesOverridesBlock A completion block - @return An initialized instance of ITClient. - */ --(id)initWithOrganizationId:(NSString *)organizationId withTrackerId:(NSString *)sourceId withToken:(NSString *)token withConfig:(id)settings withPropertiesOverrides:(NSDictionary *)propertiesOverrides withPropertiesOverridesBlock:(NSDictionary *(^)(NSString *))propertiesOverridesBlock withCompletion:(CompletionHandler)handler; - -/** -Use this Instance method when you want to add a specific event -@param event A Dictionary -@param eventCollection A event collection name -@return If event is added it will return YES otherwise NO -*/ -- (BOOL)addEvent:(NSDictionary *)event toEventCollection:(NSString *)eventCollection withCompletion:(CompletionHandler)handler; - -/** -Use this Instance method when you want to set a unique identifier (email or phone no.) for your app. -@param identity An Identity i.e, email address or phone number -@param userProperties A dictionary of user properties (set accroding to your custom schema's parameters on intempt developer site) -*/ -- (void)identify:(NSString*)identity withProperties:(NSDictionary *)userProperties withCompletion:(CompletionHandler)handler; - -/** -Use this Instance method when you specific tracking information to server. Creating custom Schema is mandatory to use this method. Go to your project on https://app.intempt.com and click on `Visit Schema` to add custom Schema -@param collectionName Custom Schema name (Exclude the unique id) -@param userProperties An Array of user properties which should be the same parameters you added in your custom schema -*/ -- (void)track:(NSString*)collectionName withProperties:(NSArray *)userProperties withCompletion:(CompletionHandler)handler; - -/** -Use this Instance method to initilaze the beacon for the app. -@param orgId Your Intempt Organization ID. -@param trackerId Your Intempt Source ID. -@param token Your Intempt Security Token. -*/ -- (void)withOrgId:(NSString*)orgId andSourceId:(NSString*)trackerId andToken:(NSString*)token uuidString:(NSString*)uuid withCompletion:(CompletionHandler)handler; - - -/** -Use this Instance method when you want to set a unique identifier (email or phone no.) for your app. Its an alternative to default identify method and more likely you didn't enable tracking for the app. -@param identity An Identity i.e, email address or phone number -@param userProperties A dictionary of user properties (set accroding to your custom schema's parameters on intempt developer site) -*/ -- (void)identifyUsingBeaconWith:(NSString*)identity withProperties:(NSDictionary *)userProperties withCompletion:(CompletionHandler)handler; - -/** - Call this to initialize CLLocationManager if not initialized and start updating location -*/ -- (void)refreshCurrentLocation; - -/** -Get Intempt Visitor ID -@return visitior ID -*/ -- (NSString *)getVisitorId; - -/** - Get Intempt SDK Version - @return The current SDK version. - */ -+ (NSString *)sdkVersion; - -@property (nonatomic, copy) CompletionHandler completion; - -// defines the TBLog macro -#define INTEMPT_LOGGING_ENABLED [IntemptClient loggingEnabled] -#define TBLog(message, ...)if([IntemptClient isLoggingEnabled]) NSLog(message, ##__VA_ARGS__) - -@end - diff --git a/Intempt.framework/Headers/IntemptTracker.h b/Intempt.framework/Headers/IntemptTracker.h deleted file mode 100644 index 8f71bf8..0000000 --- a/Intempt.framework/Headers/IntemptTracker.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// IntemptTracker.h -// intempt -// -// Created by Intempt on 18/03/20. -// Copyright © 2020 Intempt. All rights reserved. -// - -#ifndef IntemptTracker_h -#define IntemptTracker_h -@import UIKit; - -typedef void(^CompletionHandler)(BOOL status, id result, NSError *error); - -@interface IntemptTracker : NSObject - -@property (nonatomic, copy) CompletionHandler completion; - -/** - Call this method from ScenseDelegate's `scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)` or AppDelegate's `application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?)` for your app to start tracker during launch. Alternatively you can call this method at any ViewController's `viewDidLoad` method. Wherever you call it will initilaze & track the whole app. - @param orgId Your Intempt Organization ID generated from intempt developer console - @param sourceId Your Intempt Source ID generated from intempt developer console - @param token Your Intempt Source Token generated from intempt developer console - @param settings A configuration object specifying settings like queueEnabled, timeBuffer, retryLimit, initialDelay, retryDelay, isInputTextCaptureEnabled. For more details please look into `IntemptConfig` class. - @note iOS 13 above should implement it on ScenseDelegate -*/ -+ (void)trackingWithOrgId:(NSString*)orgId withSourceId:(NSString*)sourceId withToken:(NSString*)token withConfig:(id)settings onCompletion:(CompletionHandler)handler; - -/** - Use this method when you want to set a unique identifier (email or phone no.) for your app. - @param identity An Identity i.e, email address or phone number - @param userProperties A dictionary of user properties (set accroding to your custom schema's parameters on intempt developer site) - @note In Swift you can pass Error object instead of NSError as error -*/ -+ (void)identify:(NSString*)identity withProperties:(NSDictionary*)userProperties onCompletion:(CompletionHandler)handler; - -/** - Use this method when you specific tracking information to server. Creating custom Schema is mandatory to use this method. Go to your project on https://app.intempt.com and click on `Visit Schema` to add custom Schema - @param collectionName Custom Schema name (Exclude the unique id) - @param userProperties An Array of user properties which should be the same parameters you added in your custom schema - @note In Swift you can pass Error object instead of NSError as error -*/ -+ (void)track:(NSString*)collectionName withProperties:(NSArray*)userProperties onCompletion:(CompletionHandler)handler; - -/** - Call this method from any ViewController's `viewDidLoad` method to initilaze the beacon for the app. - @param orgId Your Intempt Organization ID generated from intempt developer console - @param sourceId Your Intempt Source ID generated from intempt developer console - @param token Your Intempt Source Token generated from intempt developer console - @param uuid A beacon UUID -*/ -+ (void)beaconWithOrgId:(NSString*)orgId andSourceId:(NSString*)sourceId andToken:(NSString*)token andDeviceUUID:(NSString*)uuid onCompletion:(CompletionHandler)handler; - -/** - Use this method when you want to set a unique identifier (email or phone no.) for your app. Its an alternative to default identify method and more likely you didn't enable tracking for the app. - @param identity An Identity i.e, email address or phone number - @param userProperties A dictionary of user properties (set accroding to your custom schema's parameters on intempt developer site) - @note In Swift you can pass Error object instead of NSError as error -*/ -+ (void)identifyUsingBeaconWith:(NSString*)identity withProperties:(NSDictionary*)userProperties onCompletion:(CompletionHandler)handler; - -@end - -#endif diff --git a/Intempt.framework/Intempt b/Intempt.framework/Intempt deleted file mode 100755 index 14474d5..0000000 Binary files a/Intempt.framework/Intempt and /dev/null differ diff --git a/Intempt.xcframework/Info.plist b/Intempt.xcframework/Info.plist new file mode 100644 index 0000000..b12c907 --- /dev/null +++ b/Intempt.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + Intempt.framework/Intempt + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + Intempt.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + Intempt.framework/Intempt + LibraryIdentifier + ios-arm64 + LibraryPath + Intempt.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/Intempt.framework/Headers/Intempt.h b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/Intempt.h similarity index 94% rename from Intempt.framework/Headers/Intempt.h rename to Intempt.xcframework/ios-arm64/Intempt.framework/Headers/Intempt.h index 550b87e..f09870c 100644 --- a/Intempt.framework/Headers/Intempt.h +++ b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/Intempt.h @@ -16,5 +16,5 @@ FOUNDATION_EXPORT const unsigned char intemptVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #import -#import #import + diff --git a/Intempt.framework/Headers/IntemptConfig.h b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptConfig.h similarity index 94% rename from Intempt.framework/Headers/IntemptConfig.h rename to Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptConfig.h index 0575de2..f177ff0 100644 --- a/Intempt.framework/Headers/IntemptConfig.h +++ b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptConfig.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN */ //@property (nonatomic,assign, readonly) NSTimeInterval retryDelay; -/**If you want to disable capturing input texts like UItextField, UItextView. Secure entries are excluded for privacy. Set `NO` to disable. Default is `YES`. +/**If you want to disable capturing input texts like UItextField, UItextView. Secure entries are excluded for privacy. Set `YES` to disable. Default is `NO`. */ @property (nonatomic,assign, readonly) BOOL isInputTextCaptureDisabled; diff --git a/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptTracker.h b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptTracker.h new file mode 100644 index 0000000..fd1fcbc --- /dev/null +++ b/Intempt.xcframework/ios-arm64/Intempt.framework/Headers/IntemptTracker.h @@ -0,0 +1,251 @@ +// +// Intempt.h +// intempt +// +// Created by Intempt on 18/03/20. +// Copyright © 2020 Intempt. All rights reserved. +// + +#ifndef Intempt_h +#define Intempt_h +@import UIKit; + +typedef NS_ENUM(NSInteger, IntemptConsentAction) { + IntemptConsentActionAccept, + IntemptConsentActionReject +}; + +typedef void(^CompletionHandler)(BOOL status, id result, NSError *error); + +@interface Intempt : NSObject + +@property (nonatomic, copy) CompletionHandler completion; + +/** + Call this method from ScenseDelegate's `scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)` or AppDelegate's `application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?)` for your app to start tracker during launch. Alternatively you can call this method at any ViewController's `viewDidLoad` method. Wherever you call it will initilaze & track the whole app. + @param orgName Your Intempt Organization Name generated from intempt developer console + @param projectName Your Intempt Project Name generated from intempt developer console + @param sourceId Your Intempt Source ID generated from intempt developer console + @param apiKey Your Intempt apiKey generated from intempt developer console + @param intemptConfig A configuration object specifying settings like queueEnabled, timeBuffer, retryLimit, initialDelay, retryDelay, isInputTextCaptureEnabled. For more details please look into `IntemptConfig` class. + @note iOS 13 above should implement it on ScenseDelegate +*/ ++ (void)initialize:(NSString*)orgName projectName:(NSString*)projectName sourceId:(NSString*)sourceId apiKey:(NSString*)apiKey intemptConfig:(id)intemptConfig onCompletion:(CompletionHandler)handler; + +/** + Call this to authorize geo location always (iOS 8 and above). You must also add NSLocationAlwaysUsageDescription string to Info.plist to + authorize geo location always (foreground and background), call this BEFORE doing anything else with ITClient. + @note From iOS 13 user can't grant location tracking 'always' from app. A user need to go to app settings to manually enable it. + */ ++ (void)authorizeGeoLocationAlways; + +/** + Call this to authorize geo location when in use (iOS 8 and above). You must also add NSLocationWhenInUsageDescription string to Info.plist to + authorize geo location when in use (foreground), call this BEFORE doing anything else with ITClient. + */ ++ (void)authorizeGeoLocationWhenInUse; + +/** + Call this to disable tracking, By default tracking is enabled. NOTE: this settings is persistent, once disabled it will remain disabled even app is killed and relaucnhed, To renable tracking 'optIn' function should be called. + NOTE: IntemptSDK respect and follow Apple rules, so if Device->Settings->Privacy->Tracking is disabled, then intemptSDK will not track anything, its on Developer to ask the user to enable the tracking in appropriate way, e.g showing a nice screen by explaning why user should allow tracking. + */ ++ (void)optOut; + +/** + Call this to enable tracking. By default it's enabled. + */ ++ (void)optIn; + +/** + Call this to disable touch tracking, By default touch tracking is enabled. NOTE: this settings is persistent, once disabled it will remain disabled even app is killed and relaucnhed, To renable touch tracking 'enableTouchTracking' function should be called. + */ ++ (void)disableTouchTracking; + +/** + Call this to enable touch tracking. By default it's enabled. + */ ++ (void)enableTouchTracking; + +/** + Returns whether or not touch tracking is currently enabled. + + @return true if touch tracking is enabled, false if disabled. + */ ++ (Boolean)isTouchTrackingEnabled; + +/** + Returns whether or not tracking is currently enabled. + + @return true if tracking is enabled, false if disabled. + */ ++ (Boolean)isUserOptIn; + +/** + Call this to disable debug logging. + */ ++ (void)disableLogging; + +/** + Call this to enable debug logging. By default it's disabled. + */ ++ (void)enableLogging; + +/** + clear all cached data and generate new profileId, it also remove cached userId and sessionId + */ ++ (void)logout; + +/** + Returns whether or not logging is currently enabled. + + @return true if logging is enabled, false if disabled. + */ ++ (Boolean)isLoggingEnabled; + +/** +Get Intempt Visitor ID +@return visitior ID +*/ ++ (NSString *)getVisitorId; + +/** +Get SessionId +@return SessionId +*/ ++ (NSString *)getSessionId; + +/** +Get profileId +@return profileId +*/ ++ (NSString *)getProfileId; + +/** + Get Intempt SDK Version + @return The current SDK version. + */ ++ (NSString *)sdkVersion; + + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number + @param eventTitle custom title (Optional) + @param userAttributes A dictionary of user properties (Optional) +*/ ++ (void)identify:(NSString*)userId eventTitle:(NSString*)eventTitle userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number + @param eventTitle custom title (Optional) +*/ ++ (void)identify:(NSString*)userId eventTitle:(NSString*)eventTitle onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number +*/ ++ (void)identify:(NSString*)userId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param eventTitle custom title (Optional) + @param accountId accountId + @param userAttributes A dictionary of user properties (Optional) +*/ ++ (void)group:(NSString*)eventTitle accountId:(NSString*)accountId userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param eventTitle custom title (Optional) + @param accountId accountId +*/ ++ (void)group:(NSString*)eventTitle accountId:(NSString*)accountId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param accountId accountId +*/ ++ (void)group:(NSString*)accountId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you specific tracking information to server + @param eventTitle eventTitle + @param data An object of user properties which are required to be trcked (Optional) +*/ ++ (void)track:(NSString*)eventTitle data:(NSDictionary*)data onCompletion:(CompletionHandler)handler; + +/** + Use this method when you specific tracking information to server + @param eventTitle eventTitle + @param userId logged in user id, email/phone or any unique identity (Optional) + @param accountId logged in user id, email/phone or any unique identity (Optional) + @param data An object of user properties which are required to be trcked (Optional) + @param accountAttributes An object of account's properties (Optional) + @param userAttributes An object of attributes properties (Optional) +*/ ++ (void)record:(NSString*)eventTitle userId:(NSString*)userId accountId:(NSString*)accountId data:(NSDictionary*)data accountAttributes:(NSDictionary*)accountAttributes userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param userId current userId +@param anotherUserId A new userId +*/ ++ (void)alias:(NSString *)userId anotherUserId:(NSString *)anotherUserId withCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' + @param category category e.g news, marketing + @param email email of the user + @param consentsExpirationTime 'unlimited' or timestamp + @param message messsage +*/ ++ (void)consent:(IntemptConsentAction)action consentsExpirationTime:(NSString*)consentsExpirationTime category:(NSString*)category email:(NSString*)email message:(NSString*)message onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' + @param email email of the user + @param consentsExpirationTime 'unlimited' or timestamp + @param message messsage +*/ ++ (void)consents:(IntemptConsentAction)action consentsExpirationTime:(NSString*)consentsExpirationTime email:(NSString*)email message:(NSString*)message onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' +*/ ++ (void)consents:(IntemptConsentAction)action onCompletion:(CompletionHandler)handler; + + +/** +Use this Instance method when you want to add a specific event +@param names array of experiments name +*/ ++ (void)chooseExperimentsByNames:(NSArray*)names withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param groups array of experiments name +*/ ++ (void)chooseExperimentsByGroups:(NSArray*)groups withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param names array of experiences name +*/ ++ (void)choosePersonalizationsByNames:(NSArray*)names withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param groups array of experiences name +*/ ++ (void)choosePersonalizationsByGroups:(NSArray*)groups withCompletion:(CompletionHandler)handler; + + +@end + +#endif + diff --git a/Intempt.framework/Info.plist b/Intempt.xcframework/ios-arm64/Intempt.framework/Info.plist similarity index 54% rename from Intempt.framework/Info.plist rename to Intempt.xcframework/ios-arm64/Intempt.framework/Info.plist index 9fb6e32..c5a0c1b 100644 Binary files a/Intempt.framework/Info.plist and b/Intempt.xcframework/ios-arm64/Intempt.framework/Info.plist differ diff --git a/Intempt.xcframework/ios-arm64/Intempt.framework/Intempt b/Intempt.xcframework/ios-arm64/Intempt.framework/Intempt new file mode 100755 index 0000000..b9c2137 Binary files /dev/null and b/Intempt.xcframework/ios-arm64/Intempt.framework/Intempt differ diff --git a/Intempt.framework/Modules/module.modulemap b/Intempt.xcframework/ios-arm64/Intempt.framework/Modules/module.modulemap similarity index 100% rename from Intempt.framework/Modules/module.modulemap rename to Intempt.xcframework/ios-arm64/Intempt.framework/Modules/module.modulemap index e28bbee..6f75f30 100644 --- a/Intempt.framework/Modules/module.modulemap +++ b/Intempt.xcframework/ios-arm64/Intempt.framework/Modules/module.modulemap @@ -1,6 +1,6 @@ framework module Intempt { umbrella header "Intempt.h" - export * + module * { export * } } diff --git a/Intempt.xcframework/ios-arm64/Intempt.framework/PrivacyInfo.xcprivacy b/Intempt.xcframework/ios-arm64/Intempt.framework/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..d9a510d --- /dev/null +++ b/Intempt.xcframework/ios-arm64/Intempt.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,17 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1: Access info from same app, save and retrieve different ids & flags which needs by the for different features + + + + + diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/Intempt.h b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/Intempt.h new file mode 100644 index 0000000..f09870c --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/Intempt.h @@ -0,0 +1,20 @@ +// +// Intempt.h +// intempt +// +// Created by Intempt on 18/03/20. +// Copyright © 2020 Intempt. All rights reserved. +// + +#import + +//! Project version number for intempt. +FOUNDATION_EXPORT double intemptVersionNumber; + +//! Project version string for intempt. +FOUNDATION_EXPORT const unsigned char intemptVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import + diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptConfig.h b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptConfig.h new file mode 100644 index 0000000..f177ff0 --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptConfig.h @@ -0,0 +1,47 @@ +// +// IntemptConfig.h +// Intempt +// +// Created by Appsbee LLC on 20/02/21. +// Copyright © 2021 Intempt. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface IntemptConfig : NSObject + +/** If queue should be used to send events to server. This queue sends batched events at a time. Default is YES. + */ +@property (nonatomic,assign, readonly) BOOL queueEnabled; + +/** No of items in the queue. FYI, This feature will only work if `queueEnabled` is set to `YES`. Default is 5. Set `0` if queue is disabled. + */ +@property (nonatomic,assign) int itemsInQueue; + +/** Send events periodically. Measured in seconds. Default is 5. + */ +@property (nonatomic,assign) NSTimeInterval timeBuffer; + +/** How many times retry to send an event to server if fails initially. + */ +@property (nonatomic,assign, readonly) int retryLimit; + +/** Initial delay between consecutive calls. Measured in seconds. Default is 0.2. + */ +@property (nonatomic,assign, readonly) NSTimeInterval initialDelay; + +/** Each next retry will be delayed by (2^retries_count * 100) milliseconds. + */ +//@property (nonatomic,assign, readonly) NSTimeInterval retryDelay; + +/**If you want to disable capturing input texts like UItextField, UItextView. Secure entries are excluded for privacy. Set `YES` to disable. Default is `NO`. + */ +@property (nonatomic,assign, readonly) BOOL isInputTextCaptureDisabled; + +- (instancetype)initWithQueueEnabled:(BOOL) enabled withItemsInQueue:(int) items withTimeBuffer:(NSTimeInterval) bufferTime withInitialDelay:(NSTimeInterval) initialDelay withInputTextCaptureDisabled:(BOOL) status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptTracker.h b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptTracker.h new file mode 100644 index 0000000..fd1fcbc --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Headers/IntemptTracker.h @@ -0,0 +1,251 @@ +// +// Intempt.h +// intempt +// +// Created by Intempt on 18/03/20. +// Copyright © 2020 Intempt. All rights reserved. +// + +#ifndef Intempt_h +#define Intempt_h +@import UIKit; + +typedef NS_ENUM(NSInteger, IntemptConsentAction) { + IntemptConsentActionAccept, + IntemptConsentActionReject +}; + +typedef void(^CompletionHandler)(BOOL status, id result, NSError *error); + +@interface Intempt : NSObject + +@property (nonatomic, copy) CompletionHandler completion; + +/** + Call this method from ScenseDelegate's `scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)` or AppDelegate's `application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?)` for your app to start tracker during launch. Alternatively you can call this method at any ViewController's `viewDidLoad` method. Wherever you call it will initilaze & track the whole app. + @param orgName Your Intempt Organization Name generated from intempt developer console + @param projectName Your Intempt Project Name generated from intempt developer console + @param sourceId Your Intempt Source ID generated from intempt developer console + @param apiKey Your Intempt apiKey generated from intempt developer console + @param intemptConfig A configuration object specifying settings like queueEnabled, timeBuffer, retryLimit, initialDelay, retryDelay, isInputTextCaptureEnabled. For more details please look into `IntemptConfig` class. + @note iOS 13 above should implement it on ScenseDelegate +*/ ++ (void)initialize:(NSString*)orgName projectName:(NSString*)projectName sourceId:(NSString*)sourceId apiKey:(NSString*)apiKey intemptConfig:(id)intemptConfig onCompletion:(CompletionHandler)handler; + +/** + Call this to authorize geo location always (iOS 8 and above). You must also add NSLocationAlwaysUsageDescription string to Info.plist to + authorize geo location always (foreground and background), call this BEFORE doing anything else with ITClient. + @note From iOS 13 user can't grant location tracking 'always' from app. A user need to go to app settings to manually enable it. + */ ++ (void)authorizeGeoLocationAlways; + +/** + Call this to authorize geo location when in use (iOS 8 and above). You must also add NSLocationWhenInUsageDescription string to Info.plist to + authorize geo location when in use (foreground), call this BEFORE doing anything else with ITClient. + */ ++ (void)authorizeGeoLocationWhenInUse; + +/** + Call this to disable tracking, By default tracking is enabled. NOTE: this settings is persistent, once disabled it will remain disabled even app is killed and relaucnhed, To renable tracking 'optIn' function should be called. + NOTE: IntemptSDK respect and follow Apple rules, so if Device->Settings->Privacy->Tracking is disabled, then intemptSDK will not track anything, its on Developer to ask the user to enable the tracking in appropriate way, e.g showing a nice screen by explaning why user should allow tracking. + */ ++ (void)optOut; + +/** + Call this to enable tracking. By default it's enabled. + */ ++ (void)optIn; + +/** + Call this to disable touch tracking, By default touch tracking is enabled. NOTE: this settings is persistent, once disabled it will remain disabled even app is killed and relaucnhed, To renable touch tracking 'enableTouchTracking' function should be called. + */ ++ (void)disableTouchTracking; + +/** + Call this to enable touch tracking. By default it's enabled. + */ ++ (void)enableTouchTracking; + +/** + Returns whether or not touch tracking is currently enabled. + + @return true if touch tracking is enabled, false if disabled. + */ ++ (Boolean)isTouchTrackingEnabled; + +/** + Returns whether or not tracking is currently enabled. + + @return true if tracking is enabled, false if disabled. + */ ++ (Boolean)isUserOptIn; + +/** + Call this to disable debug logging. + */ ++ (void)disableLogging; + +/** + Call this to enable debug logging. By default it's disabled. + */ ++ (void)enableLogging; + +/** + clear all cached data and generate new profileId, it also remove cached userId and sessionId + */ ++ (void)logout; + +/** + Returns whether or not logging is currently enabled. + + @return true if logging is enabled, false if disabled. + */ ++ (Boolean)isLoggingEnabled; + +/** +Get Intempt Visitor ID +@return visitior ID +*/ ++ (NSString *)getVisitorId; + +/** +Get SessionId +@return SessionId +*/ ++ (NSString *)getSessionId; + +/** +Get profileId +@return profileId +*/ ++ (NSString *)getProfileId; + +/** + Get Intempt SDK Version + @return The current SDK version. + */ ++ (NSString *)sdkVersion; + + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number + @param eventTitle custom title (Optional) + @param userAttributes A dictionary of user properties (Optional) +*/ ++ (void)identify:(NSString*)userId eventTitle:(NSString*)eventTitle userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number + @param eventTitle custom title (Optional) +*/ ++ (void)identify:(NSString*)userId eventTitle:(NSString*)eventTitle onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param userId An Identity i.e, email address or phone number +*/ ++ (void)identify:(NSString*)userId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param eventTitle custom title (Optional) + @param accountId accountId + @param userAttributes A dictionary of user properties (Optional) +*/ ++ (void)group:(NSString*)eventTitle accountId:(NSString*)accountId userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param eventTitle custom title (Optional) + @param accountId accountId +*/ ++ (void)group:(NSString*)eventTitle accountId:(NSString*)accountId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier for group (email or phone no.) for your app. + @param accountId accountId +*/ ++ (void)group:(NSString*)accountId onCompletion:(CompletionHandler)handler; + +/** + Use this method when you specific tracking information to server + @param eventTitle eventTitle + @param data An object of user properties which are required to be trcked (Optional) +*/ ++ (void)track:(NSString*)eventTitle data:(NSDictionary*)data onCompletion:(CompletionHandler)handler; + +/** + Use this method when you specific tracking information to server + @param eventTitle eventTitle + @param userId logged in user id, email/phone or any unique identity (Optional) + @param accountId logged in user id, email/phone or any unique identity (Optional) + @param data An object of user properties which are required to be trcked (Optional) + @param accountAttributes An object of account's properties (Optional) + @param userAttributes An object of attributes properties (Optional) +*/ ++ (void)record:(NSString*)eventTitle userId:(NSString*)userId accountId:(NSString*)accountId data:(NSDictionary*)data accountAttributes:(NSDictionary*)accountAttributes userAttributes:(NSDictionary*)userAttributes onCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param userId current userId +@param anotherUserId A new userId +*/ ++ (void)alias:(NSString *)userId anotherUserId:(NSString *)anotherUserId withCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' + @param category category e.g news, marketing + @param email email of the user + @param consentsExpirationTime 'unlimited' or timestamp + @param message messsage +*/ ++ (void)consent:(IntemptConsentAction)action consentsExpirationTime:(NSString*)consentsExpirationTime category:(NSString*)category email:(NSString*)email message:(NSString*)message onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' + @param email email of the user + @param consentsExpirationTime 'unlimited' or timestamp + @param message messsage +*/ ++ (void)consents:(IntemptConsentAction)action consentsExpirationTime:(NSString*)consentsExpirationTime email:(NSString*)email message:(NSString*)message onCompletion:(CompletionHandler)handler; + +/** + Use this method when you want to set a unique identifier (email or phone no.) for your app. + @param action 'accept' or 'reject'' +*/ ++ (void)consents:(IntemptConsentAction)action onCompletion:(CompletionHandler)handler; + + +/** +Use this Instance method when you want to add a specific event +@param names array of experiments name +*/ ++ (void)chooseExperimentsByNames:(NSArray*)names withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param groups array of experiments name +*/ ++ (void)chooseExperimentsByGroups:(NSArray*)groups withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param names array of experiences name +*/ ++ (void)choosePersonalizationsByNames:(NSArray*)names withCompletion:(CompletionHandler)handler; + +/** +Use this Instance method when you want to add a specific event +@param groups array of experiences name +*/ ++ (void)choosePersonalizationsByGroups:(NSArray*)groups withCompletion:(CompletionHandler)handler; + + +@end + +#endif + diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Info.plist b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Info.plist new file mode 100644 index 0000000..83076c0 Binary files /dev/null and b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Info.plist differ diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Intempt b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Intempt new file mode 100755 index 0000000..84e28cd Binary files /dev/null and b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Intempt differ diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Modules/module.modulemap b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Modules/module.modulemap new file mode 100644 index 0000000..6f75f30 --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Intempt { + umbrella header "Intempt.h" + export * + + module * { export * } +} diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/PrivacyInfo.xcprivacy b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..d9a510d --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,17 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1: Access info from same app, save and retrieve different ids & flags which needs by the for different features + + + + + diff --git a/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/_CodeSignature/CodeResources b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..a1d6065 --- /dev/null +++ b/Intempt.xcframework/ios-arm64_x86_64-simulator/Intempt.framework/_CodeSignature/CodeResources @@ -0,0 +1,157 @@ + + + + + files + + Headers/Intempt.h + + ZTqlt+jgeM73Hyg2JariUwaGb2k= + + Headers/IntemptConfig.h + + CsU0YixytmX8Qg/dDS8mtiOshLY= + + Headers/IntemptTracker.h + + iRW+jG5Jq01kTt1oXMWwKAGtQdE= + + Info.plist + + jZpJBOWIw29FTskOudzalo10nA0= + + Modules/module.modulemap + + e+3r8xmd1xwD1BBt0n5kq6ztIpk= + + PrivacyInfo.xcprivacy + + KDfoBIL/m4+NQvFvBQp1Rucx3Bg= + + + files2 + + Headers/Intempt.h + + hash2 + + R+hIP1T9sguOvZwr1AzvZmDsEVXihUKGpkLDVNb+0IQ= + + + Headers/IntemptConfig.h + + hash2 + + eqphARhEVeJ3AK8/keIIAd7uI5vLmoclP+fr3+AGvpM= + + + Headers/IntemptTracker.h + + hash2 + + AM1qK1XjXAC6JW1onqvzYx5oRnB0Twd62cszbK7GyYI= + + + Modules/module.modulemap + + hash2 + + pLM+9WaNKiT/8uzRwTtpXS+aLCMgNJvW+XiTheFi/u8= + + + PrivacyInfo.xcprivacy + + hash2 + + SH8Jf4JOt/8u/xQDuZjFJmUrXVYntCx28e+5+bwvgDY= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..036a6aa --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Intempt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..3188cbd --- /dev/null +++ b/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Intempt", + platforms: [ + .iOS(.v13) + ], + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "Intempt", + targets: ["Intempt"]), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .binaryTarget( + name: "Intempt", + path: "Intempt.xcframework"), + .testTarget( + name: "IntemptTests", + dependencies: ["Intempt"]), + ] +) diff --git a/README.md b/README.md index 6724612..6949f79 100644 --- a/README.md +++ b/README.md @@ -1,329 +1,57 @@ -# Intempt SDK for iOS - -[Intempt](https://intempt.com/?utm_campaign=sdk&utm_medium=docs&utm_source=github) is an API-first platform for developers and marketers who are dissatisfied with high-maintenance personalizaton software. Our product is a personalization infrastructure through API and easy-to-use Console that provides a quicker way to build personalized applications. Unlike legacy personalization software we have: - -* An API-first SaaS platform that enables personliazation of both digital and physical human activity -* A management console that helps cut down maintenance and reporting overhead -* An infrastructure to scale up user activity in no time - -This is a library to facilitate automatic tracking of anonymous and logged in traffic on your Objective-C or Swift app. - -You can find the full API documentation on [dev.intempt.com](https://dev.intempt.com). - -## Contents - -* [1](https://github.com/intempt/intempt-intempt-ios-sdk#download) - Download [SDK](https://dev.intempt.com/#customization-for-web) -* [2](https://github.com/intempt/intempt-ios-sdk#requirements) - Check [requirements](https://dev.intempt.com/#customization-for-web) -* [3](https://github.com/intempt/intempt-ios-sdk#install) - Install [SDK](https://dev.intempt.com/#customization-for-web) -* [4](https://github.com/intempt/intempt-ios-sdk#swift) - Swift [guide](https://dev.intempt.com/#customization-for-web) -* [5](https://github.com/intempt/intempt-ios-sdk#objective-c) - Objective-C [guide](https://dev.intempt.com/#customization-for-web) -* [6](https://github.com/intempt/intempt-ios-sdk#identifying-visitors) - How to [identify](https://dev.intempt.com/#customization-for-web) a user -* [7](https://github.com/intempt/intempt-ios-sdk#custom-event) - How to record a [custom event](https://dev.intempt.com/#customization-for-web) -* [8](https://github.com/intempt/intempt-ios-sdk#tracking-revenue-with-trackcharge) - How to [track](https://dev.intempt.com/#customization-for-web) revenue -* [9](https://github.com/intempt/intempt-ios-sdk#events-collections-and-properties) - Custom [Events, Collections & Properties](https://dev.intempt.com/#events-collections-and-properties) -* [10](https://github.com/intempt/intempt-ios-sdk#ios-events) - Event [primer](https://dev.intempt.com/#customization-for-web) -* [11](https://github.com/intempt/intempt-ios-sdk#event-properties) - Properties [primer](https://dev.intempt.com/#properties) -* [12](https://github.com/intempt/intempt-ios-sdk#demo-ios-app) - iOS [demo app](https://dev.intempt.com/#properties) - -### Download - -Download the `Intempt.framework` available in this repo. - -#### Demo -You can test the functionality of this framework with the demo app located over [here](https://github.com/intempt/intempt-ios-demo). - -### Requirements - -- Minimum iOS 12.0+ -- Minimum Xcode 10.0+ - -### Installation - -1. Drag & drop the `Intempt.framework` into your iOS project, underneath your project's folder and **NOT** in the `Frameworks` folder (if exits). - -2. Select Project --> General --> Frameworks, Libraries, and Embedded Content and the newly installed `Intempt.framework` must set to `Embed & Sign`. If you didn't download it, please go and download it from [here](https://github.com/intempt/intempt-ios-sdk#download). - -3. Next go to the app's `Info.plist` file and add the following privacy keys. - -| Key | Value | -| ------ | ------ | -| Privacy - Location Always Usage Description | Location used to track where you are | -| Privacy - Location When In Use Usage Description | Location used to track where you are | -| Privacy - Location Always and When In Use Usage Description | Location used to track where you are | -| Privacy - Tracking Usage Description | Tracking permission is needed to for analytics | - -4. - You will need to [log in](https://app.intempt.com/) to Intempt App and create an iOS source. - -5. - Copy the code snippet generated and paste it just like shown in the following, whether you are using Swift or Objective-C. - - 6. - If you are using iOS 14 or later then it is recommended that you should initialze root viewcontroller programtically as described below. Otherwise tracking will not work. - -#### Swift: - -If you are using Xcode 11.3 or above go to `SceneDelegate.swift` file and paste the copied source snippet into the `scene` function: - -``` swift -import Intempt - -var window: UIWindow? - -func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { - - // Request to user for tracking permission - requestTrackingPermission() - guard let scene = (scene as? UIWindowScene) else { return } - window = UIWindow(windowScene: scene) - } - - 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. - - if let enabled = UserDefaults.standard.value(forKey: "TrackingEnabled") as? Bool, enabled == false { - if #available(iOS 14, *) { - if ATTrackingManager.trackingAuthorizationStatus == .authorized { - requestTrackingPermission() - } - } - } - } - - private func requestTrackingPermission() { - if #available(iOS 14, *) { - ATTrackingManager.requestTrackingAuthorization { status in - switch status { - case .authorized: - // Tracking authorization dialog was shown - // and we are authorized - print("Tracking authorized.") - - UserDefaults.standard.set(true, forKey: "TrackingEnabled") - // Now that we are authorized we can get the IDFA - - self.decideInitialViewController() - self.initializeIntemptTracking() - case .denied: - // Tracking authorization dialog was - // shown and permission is denied - print("Denied. Please turn on app tracking to enable app analytics.") - UserDefaults.standard.set(false, forKey: "TrackingEnabled") - case .notDetermined: - // Tracking authorization dialog has not been shown - print("Not determined.") - case .restricted: - print("Restricted. Please turn on app tracking to enable app analytics.") - UserDefaults.standard.set(false, forKey: "TrackingEnabled") - @unknown default: - print("Unknown.") - } - } - } - else { - decideInitialViewController() - initializeIntemptTracking() - } - } - - private func initializeIntemptTracking() { - //Initialize Intempt SDK - let intemptConfig = IntemptConfig(queueEnabled: true, withItemsInQueue: 0, withTimeBuffer: 7, withInitialDelay: 0.3, withInputTextCaptureDisabled: true) - IntemptTracker.tracking(withOrgId: "Your Organization ID", withSourceId: "Your Source ID", withToken: "Your Token", withConfig: intemptConfig) { (status, result, error) in - if(status) { - if let dictResult = result as? [String: Any] { - print(dictResult) - } - } - else { - if let error = error { - print(error.localizedDescription) - } - } - } - IntemptClient.enableLogging() - } - - func decideInitialViewController() { - let viewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ViewController") - let navigationController = UINavigationController(rootViewController: viewController) - navigationController.isNavigationBarHidden = true - window?.rootViewController = navigationController - window?.makeKeyAndVisible() - } -``` - -Else you will have the `ViewController.m` file and then paste the copied source snippet into the `viewDidLoad` function: - -``` swift -import Intempt - override func viewDidLoad() { - super.viewDidLoad() - IntemptTracker.tracking(withOrgId: "Your Organization ID", andSourceId: "Your Source ID", andToken: "Your Token") -} -``` - -### Get VisitorId From Framework - -``` swift -let visitorId = IntemptClient.shared()?.getVisitorId() -``` - -### Identifying Visitors -Provide email or phone number. - -``` swift -IntemptTracker.identify("test@example.com", withProperties: nil) { (status, result, error) in - if(status) { - //Do something - } -} -``` - -### Custom Event - -When using this you can create a custom event based on the needs of the project and that will help you keep track of event details with that custom method. - -```swift -let arrayData = [{ - "flightId" : "1", - "bookingDate" : "2020-05-26", - "bookingId": "2", - "bookingStatus" : "booked" - }] - -IntemptTracker.track("Online Hotel Booking", withProperties: arrHotelBooking as? [Any]) { (status, result, error) in - if(status) { - //Do something - } -} -``` - -### Tracking Revenue with `trackcharge` - -Notice the key `intempt.visit.trackcharge` in the sample code above. If you use this key in the event details, the value will be recorded as revenue in the Intempt app. This allows you to assess the revenue impact of campaigns. - -Collections do not need to be predefined in the Intempt app. As soon as the tracker logs an event with a new collection name, that collection of events will be available in the app. - -### Events, Collections, and Properties - -An event is a discrete interaction that occurs on your site. Events are organized by type into collections. Events have properties, key-value pairs that record relevant information about the event. - -For example, a user clicks on UIButton - -1. It belongs to the interactions collection. (The interaction type is "Action".) - -2. The properties including in this event like time of click, other attributes of related elements during the event action and the action event belongs to which View Controller etc all will be automatically tracked once this tracker code SDK is added in the existing application. - -### iOS Events - -Events as recorded by the tracker code are conceptually somewhat different than events as defined in the Intempt app. -On the iOS side, events will soon be renamed to actions. - -Event collections are organized in a tree structure. - -Profile -Launch -Scene -Identify -Interaction -Custom - -Because of this hierarchy, any event can be filtered or accessed based on the properties associated with something further up the tree. - -For example, if you wanted to find all button clicks associated with a particular visit, you can do that. - -Custom events logged manually using the Rest API appear with whatever collection name was assigned, under the custom collection. - -### Event Properties - -Events have properties, key-value pairs the record information about the event. - -Properties are grouped into two collections: - -fixed — Properties that are (relatively) stable, related to the profile,launch or the scene. This includes things like device name,osVersion,app name and geolocaiton etc. - -timeseries — Properties that are specific to a particular interaction. This includes element-specific details, time stamps, and anything recorded as part of custom events. - -When logging a custom event, you can pass in any existing property key names, as well as define your own. - - -### Demo iOS App - -1. Add the framework to the application and once it launches, it will show the a permission pop-up to allow sharing your location. You will have to click on "Allow While Using App". - -2. This enables the keys to track your location details. - -3. In the following demo application, after running it will display a Login Screen. After clicking the login button it loads up Intempt's IdentifyVisitor function. - -4. On every touch event the tracker will fetch event details. - -5. After clicking on the payment button, and successfully going on with a purchase, the purchase custom event will be triggered in the application. - -## Intempt Proximity - -Install an Intempt beacon At your preferable place.Add this SDK in your existing application. Thus it will help you to know about your entry and exit range. -This sdk supports any kind of beacon that allows you to change the UUID in the vendors Beacon Manager. The UUID is a unique broadcasting number which allows Intempt to know which types of beacons to look for. You can think of it like tuning to a radio station. - -Today, Intempt’s mobile SDK looks for ONE UUID by default. Use any of them with your existing beacons to enable them with Intempt. - -### Key Components - -Intempt Proximity SDK is built on top of two key components: - -- Entry - when you are enter a region. - -- Exit - when you are exit a region. - - -Go to app's Info.plist file and add the privacy keys. - - -| Key | Value | -| ------ | ------ | -| Privacy - Location Always Usage Description | Location used to track where you are | -| Privacy - Location When In Use Usage Description | Location used to track where you are | -| Privacy - Location Always and When In Use Usage Description | Location used to track where you are | -| Privacy - Bluetooth Always Usage Description | This app uses Bluetooth communication to detect nearby beacons | -| Privacy - Bluetooth Peripheral Usage Description | This app uses Bluetooth communication to detect nearby beacons | - - -#### Swift: - -``` swift -import Intempt - override func viewDidLoad() { - super.viewDidLoad() - IntemptTracker.beacon(withOrgId: "Your Organization ID", andSourceId: "Your Source ID", andToken: "Your Token", andDeviceUUID: "Beacon device UUID") { (success, result, error) in - if(success) { - //Do something - } - } - IntemptClient.shared()?.delegate = self - } -``` - -Next implement this methods: - -``` swift -/*Helps to detect the entry time , when application entered the monitoring region*/ -func didEnterRegion(_ beaconData: CLBeacon!) { -} - -/*Helps to detect the exit time , when application exits the monitoring region*/ -func didExitRegion(_ beaconData: CLBeacon!) { -} -``` - -#### Identifying Visitors (Optional) -Provide email or phone number. - -``` swift -IntemptTracker.identifyUsingBeacon("test@example.com", withProperties: nil) { (status, result, error) in - if(status) { - //Do something - } -} -``` -Use this method when you want to identify using beacon API separately. + + + + + + + + + + + + + + + + + + + + + + + + +![63886e0c9f008888f009f36b_Logo (4)](https://github.com/intempt/intempt-intemptios/assets/64703923/f046172b-f51c-4da0-84e4-5dd3eb4a4d83) + +# iOS SDK + +This iOS SDK lets you track events and serve personalizations/experiments on your app using Intempt APIs. + +SDK features: +- Autotrack app event data (interaction/launch/scene & location) +- Record custom events +- Identify users +- Track consents +- Display experiments +- Display experiences (personalization campaigns) +- Start/end sessions +- Adjust event batches + +# Installation +## Swift Package Manager +​ +Open your .xcodeproj, select the option "Add Package..." in the File menu, and paste the URL for the library you want to integrate +https://github.com/intempt/intempt-intemptios + +Intempt SP + + +# Documentation +Refer to the SDK documentation for full setup: +[iOS SDK](https://help.intempt.com/docs/ios-sdk) + +# About Intempt + +Intempt is a GrowthOS - a unified marketing workspace where you turn audiences into revenue with AI predictions, real-time analytics, segmentation, journey automation, web personalization, and A/B testing. +Check out more at [intempt.com](https://www.intempt.com) diff --git a/Sources/Intempt/Intempt.swift b/Sources/Intempt/Intempt.swift new file mode 100644 index 0000000..08b22b8 --- /dev/null +++ b/Sources/Intempt/Intempt.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/Tests/IntemptTests/IntemptTests.swift b/Tests/IntemptTests/IntemptTests.swift new file mode 100644 index 0000000..cd606e5 --- /dev/null +++ b/Tests/IntemptTests/IntemptTests.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import Intempt + +final class IntemptTests: XCTestCase { + func testExample() throws { + // XCTest Documentation + // https://developer.apple.com/documentation/xctest + + // Defining Test Cases and Test Methods + // https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods + } +}