diff --git a/.github/workflows/deploy-cocoapods-manual.yml b/.github/workflows/deploy-cocoapods-manual.yml new file mode 100644 index 0000000..4f2906d --- /dev/null +++ b/.github/workflows/deploy-cocoapods-manual.yml @@ -0,0 +1,22 @@ +name: Manually deploy to Cocoapods + +on: + workflow_dispatch + +jobs: + deploy-cocoapods-manual: + name: Manually deploy to Cocoapods + runs-on: macOS-latest + if: startsWith(github.ref, 'refs/heads/master') + steps: + - name: Checkout source branch + uses: actions/checkout@v4 + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Publish to CocoaPod + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: | + pod trunk push --allow-warnings diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d77de70 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## 1.0.0 (2024-08-27) + + +### Features + +* update the intercom sdk to v17.2.1 + diff --git a/CODEOWNERS b/CODEOWNERS index 6164334..dfe4743 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ -* @itsdebs -* @pallabmaiti +* @rudderlabs/sdk-ios + diff --git a/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.pbxproj b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ba44a21 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.pbxproj @@ -0,0 +1,444 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 795560778E3A8FCBCA6B28B5 /* Pods_SampleAppObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB61FD96E40C023BCB0D2C6A /* Pods_SampleAppObjC.framework */; }; + EDB7218427DB4F70000EE8C4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB7218327DB4F70000EE8C4 /* AppDelegate.m */; }; + EDB7218727DB4F70000EE8C4 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB7218627DB4F70000EE8C4 /* SceneDelegate.m */; }; + EDB7218A27DB4F70000EE8C4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB7218927DB4F70000EE8C4 /* ViewController.m */; }; + EDB7218D27DB4F70000EE8C4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EDB7218B27DB4F70000EE8C4 /* Main.storyboard */; }; + EDB7218F27DB4F71000EE8C4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EDB7218E27DB4F71000EE8C4 /* Assets.xcassets */; }; + EDB7219227DB4F71000EE8C4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EDB7219027DB4F71000EE8C4 /* LaunchScreen.storyboard */; }; + EDB7219527DB4F71000EE8C4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB7219427DB4F71000EE8C4 /* main.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 718A0DAA37AEFA761559823D /* Pods-SampleAppObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleAppObjC.debug.xcconfig"; path = "Target Support Files/Pods-SampleAppObjC/Pods-SampleAppObjC.debug.xcconfig"; sourceTree = ""; }; + BB61FD96E40C023BCB0D2C6A /* Pods_SampleAppObjC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SampleAppObjC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CCDD25B700A16147F546933A /* Pods-SampleAppObjC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleAppObjC.release.xcconfig"; path = "Target Support Files/Pods-SampleAppObjC/Pods-SampleAppObjC.release.xcconfig"; sourceTree = ""; }; + EDB7217F27DB4F70000EE8C4 /* SampleAppObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleAppObjC.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EDB7218227DB4F70000EE8C4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + EDB7218327DB4F70000EE8C4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + EDB7218527DB4F70000EE8C4 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + EDB7218627DB4F70000EE8C4 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + EDB7218827DB4F70000EE8C4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + EDB7218927DB4F70000EE8C4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + EDB7218C27DB4F70000EE8C4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + EDB7218E27DB4F71000EE8C4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EDB7219127DB4F71000EE8C4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + EDB7219327DB4F71000EE8C4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EDB7219427DB4F71000EE8C4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + EDB7217C27DB4F70000EE8C4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 795560778E3A8FCBCA6B28B5 /* Pods_SampleAppObjC.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0D20BE4D11E3C23E263C3379 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BB61FD96E40C023BCB0D2C6A /* Pods_SampleAppObjC.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 90C1F211C6C8F02C0FA6A287 /* Pods */ = { + isa = PBXGroup; + children = ( + 718A0DAA37AEFA761559823D /* Pods-SampleAppObjC.debug.xcconfig */, + CCDD25B700A16147F546933A /* Pods-SampleAppObjC.release.xcconfig */, + ); + name = Pods; + path = ../../Pods; + sourceTree = ""; + }; + EDB7217627DB4F70000EE8C4 = { + isa = PBXGroup; + children = ( + EDB7218127DB4F70000EE8C4 /* SampleAppObjC */, + EDB7218027DB4F70000EE8C4 /* Products */, + 90C1F211C6C8F02C0FA6A287 /* Pods */, + 0D20BE4D11E3C23E263C3379 /* Frameworks */, + ); + sourceTree = ""; + }; + EDB7218027DB4F70000EE8C4 /* Products */ = { + isa = PBXGroup; + children = ( + EDB7217F27DB4F70000EE8C4 /* SampleAppObjC.app */, + ); + name = Products; + sourceTree = ""; + }; + EDB7218127DB4F70000EE8C4 /* SampleAppObjC */ = { + isa = PBXGroup; + children = ( + EDB7218227DB4F70000EE8C4 /* AppDelegate.h */, + EDB7218327DB4F70000EE8C4 /* AppDelegate.m */, + EDB7218527DB4F70000EE8C4 /* SceneDelegate.h */, + EDB7218627DB4F70000EE8C4 /* SceneDelegate.m */, + EDB7218827DB4F70000EE8C4 /* ViewController.h */, + EDB7218927DB4F70000EE8C4 /* ViewController.m */, + EDB7218B27DB4F70000EE8C4 /* Main.storyboard */, + EDB7218E27DB4F71000EE8C4 /* Assets.xcassets */, + EDB7219027DB4F71000EE8C4 /* LaunchScreen.storyboard */, + EDB7219327DB4F71000EE8C4 /* Info.plist */, + EDB7219427DB4F71000EE8C4 /* main.m */, + ); + path = SampleAppObjC; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + EDB7217E27DB4F70000EE8C4 /* SampleAppObjC */ = { + isa = PBXNativeTarget; + buildConfigurationList = EDB7219827DB4F71000EE8C4 /* Build configuration list for PBXNativeTarget "SampleAppObjC" */; + buildPhases = ( + 569B1A532F820915336F6674 /* [CP] Check Pods Manifest.lock */, + EDB7217B27DB4F70000EE8C4 /* Sources */, + EDB7217C27DB4F70000EE8C4 /* Frameworks */, + EDB7217D27DB4F70000EE8C4 /* Resources */, + 23A84C157CE7850459A5B232 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SampleAppObjC; + productName = SampleAppObjC; + productReference = EDB7217F27DB4F70000EE8C4 /* SampleAppObjC.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EDB7217727DB4F70000EE8C4 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1320; + ORGANIZATIONNAME = RudderStack; + TargetAttributes = { + EDB7217E27DB4F70000EE8C4 = { + CreatedOnToolsVersion = 13.2.1; + }; + }; + }; + buildConfigurationList = EDB7217A27DB4F70000EE8C4 /* Build configuration list for PBXProject "SampleAppObjC" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EDB7217627DB4F70000EE8C4; + productRefGroup = EDB7218027DB4F70000EE8C4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EDB7217E27DB4F70000EE8C4 /* SampleAppObjC */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EDB7217D27DB4F70000EE8C4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EDB7219227DB4F71000EE8C4 /* LaunchScreen.storyboard in Resources */, + EDB7218F27DB4F71000EE8C4 /* Assets.xcassets in Resources */, + EDB7218D27DB4F70000EE8C4 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 23A84C157CE7850459A5B232 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleAppObjC/Pods-SampleAppObjC-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleAppObjC/Pods-SampleAppObjC-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SampleAppObjC/Pods-SampleAppObjC-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 569B1A532F820915336F6674 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SampleAppObjC-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EDB7217B27DB4F70000EE8C4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EDB7218A27DB4F70000EE8C4 /* ViewController.m in Sources */, + EDB7218427DB4F70000EE8C4 /* AppDelegate.m in Sources */, + EDB7219527DB4F71000EE8C4 /* main.m in Sources */, + EDB7218727DB4F70000EE8C4 /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + EDB7218B27DB4F70000EE8C4 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EDB7218C27DB4F70000EE8C4 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + EDB7219027DB4F71000EE8C4 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EDB7219127DB4F71000EE8C4 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + EDB7219627DB4F71000EE8C4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + EDB7219727DB4F71000EE8C4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EDB7219927DB4F71000EE8C4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 718A0DAA37AEFA761559823D /* Pods-SampleAppObjC.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = UCL2K3J73M; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SampleAppObjC/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.integration.test.ios; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EDB7219A27DB4F71000EE8C4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CCDD25B700A16147F546933A /* Pods-SampleAppObjC.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = UCL2K3J73M; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SampleAppObjC/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.integration.test.ios; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EDB7217A27DB4F70000EE8C4 /* Build configuration list for PBXProject "SampleAppObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EDB7219627DB4F71000EE8C4 /* Debug */, + EDB7219727DB4F71000EE8C4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EDB7219827DB4F71000EE8C4 /* Build configuration list for PBXNativeTarget "SampleAppObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EDB7219927DB4F71000EE8C4 /* Debug */, + EDB7219A27DB4F71000EE8C4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = EDB7217727DB4F70000EE8C4 /* Project object */; +} diff --git a/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/xcshareddata/xcschemes/SampleAppObjC.xcscheme b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/xcshareddata/xcschemes/SampleAppObjC.xcscheme new file mode 100644 index 0000000..56eed97 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC.xcodeproj/xcshareddata/xcschemes/SampleAppObjC.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.h b/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.h new file mode 100644 index 0000000..72e6608 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.h @@ -0,0 +1,14 @@ +// +// AppDelegate.h +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#import + +@interface AppDelegate : UIResponder + + +@end + diff --git a/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.m b/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.m new file mode 100644 index 0000000..2ce6465 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/AppDelegate.m @@ -0,0 +1,57 @@ +// +// AppDelegate.m +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#import "AppDelegate.h" + +@import Rudder; +@import RudderIntercom; + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + RSConfig *config = [[RSConfig alloc] initWithWriteKey:@""]; + [config dataPlaneURL:@""]; + [config loglevel:RSLogLevelDebug]; + [config trackLifecycleEvents:YES]; + [config recordScreenViews:YES]; + [[RSClient sharedInstance] configureWith:config]; + [[RSClient sharedInstance] addDestination:[[RudderIntercomDestination alloc] init]]; + [[RSClient sharedInstance] track:@"Track 1"]; + [[RSClient sharedInstance] identify:@"test_user_id"]; + [[RSClient sharedInstance] track:@"daily_rewards_claim"]; + [[RSClient sharedInstance] track:@"level_up"]; + [[RSClient sharedInstance] track:@"revenue"]; + + + 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/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/Contents.json b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/LaunchScreen.storyboard b/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/Main.storyboard b/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/Main.storyboard new file mode 100644 index 0000000..808a21c --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC/Info.plist b/Examples/SampleAppObjC/SampleAppObjC/Info.plist new file mode 100644 index 0000000..27913ad --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/Info.plist @@ -0,0 +1,30 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.h b/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.h new file mode 100644 index 0000000..d22bd27 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.h @@ -0,0 +1,15 @@ +// +// SceneDelegate.h +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.m b/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.m new file mode 100644 index 0000000..487279e --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/SceneDelegate.m @@ -0,0 +1,57 @@ +// +// SceneDelegate.m +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#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/Examples/SampleAppObjC/SampleAppObjC/ViewController.h b/Examples/SampleAppObjC/SampleAppObjC/ViewController.h new file mode 100644 index 0000000..839bc15 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/ViewController.h @@ -0,0 +1,14 @@ +// +// ViewController.h +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/Examples/SampleAppObjC/SampleAppObjC/ViewController.m b/Examples/SampleAppObjC/SampleAppObjC/ViewController.m new file mode 100644 index 0000000..77d1645 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/ViewController.m @@ -0,0 +1,22 @@ +// +// ViewController.m +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + + +@end diff --git a/Examples/SampleAppObjC/SampleAppObjC/main.m b/Examples/SampleAppObjC/SampleAppObjC/main.m new file mode 100644 index 0000000..a688240 --- /dev/null +++ b/Examples/SampleAppObjC/SampleAppObjC/main.m @@ -0,0 +1,18 @@ +// +// main.m +// SampleAppObjC +// +// Created by Pallab Maiti on 11/03/22. +// + +#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/Examples/SampleAppSwift/.gitignore b/Examples/SampleAppSwift/.gitignore new file mode 100644 index 0000000..84417fb --- /dev/null +++ b/Examples/SampleAppSwift/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +Podfile.lock +/Pods +ExampleSwift.xcworkspace \ No newline at end of file diff --git a/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.pbxproj b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.pbxproj new file mode 100644 index 0000000..62500ab --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.pbxproj @@ -0,0 +1,424 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 06EABC8624665E470043D720 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06EABC8524665E470043D720 /* AppDelegate.swift */; }; + 06EABC8824665E470043D720 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06EABC8724665E470043D720 /* SceneDelegate.swift */; }; + 06EABC8A24665E470043D720 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06EABC8924665E470043D720 /* ViewController.swift */; }; + 06EABC8D24665E470043D720 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 06EABC8B24665E470043D720 /* Main.storyboard */; }; + 06EABC8F24665E480043D720 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 06EABC8E24665E480043D720 /* Assets.xcassets */; }; + 06EABC9224665E480043D720 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 06EABC9024665E480043D720 /* LaunchScreen.storyboard */; }; + A6E1458EB27CC7C899E3B625 /* Pods_SampleAppSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28C3D390F544487B3D0D25B /* Pods_SampleAppSwift.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 06EABC8224665E470043D720 /* SampleAppSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleAppSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 06EABC8524665E470043D720 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 06EABC8724665E470043D720 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 06EABC8924665E470043D720 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 06EABC8C24665E470043D720 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 06EABC8E24665E480043D720 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 06EABC9124665E480043D720 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 06EABC9324665E480043D720 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A80F07C523063EC35856541 /* Pods-RudderSampleAppSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderSampleAppSwift.debug.xcconfig"; path = "Target Support Files/Pods-RudderSampleAppSwift/Pods-RudderSampleAppSwift.debug.xcconfig"; sourceTree = ""; }; + 236B7D3A09137DB00470A261 /* Pods-SampleAppSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleAppSwift.debug.xcconfig"; path = "Target Support Files/Pods-SampleAppSwift/Pods-SampleAppSwift.debug.xcconfig"; sourceTree = ""; }; + B28C3D390F544487B3D0D25B /* Pods_SampleAppSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SampleAppSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D150D4E65D8E33B6545DAAB5 /* Pods-RudderSampleAppSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderSampleAppSwift.release.xcconfig"; path = "Target Support Files/Pods-RudderSampleAppSwift/Pods-RudderSampleAppSwift.release.xcconfig"; sourceTree = ""; }; + F8AFA8807BBE9556C48E8F8C /* Pods-SampleAppSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleAppSwift.release.xcconfig"; path = "Target Support Files/Pods-SampleAppSwift/Pods-SampleAppSwift.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 06EABC7F24665E470043D720 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A6E1458EB27CC7C899E3B625 /* Pods_SampleAppSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 06EABC7924665E470043D720 = { + isa = PBXGroup; + children = ( + 06EABC8424665E470043D720 /* SampleAppSwift */, + 06EABC8324665E470043D720 /* Products */, + 1B9B916AEF8AED38FD53D837 /* Pods */, + 5BCFA8EE73AF6931DBCB65B4 /* Frameworks */, + ); + sourceTree = ""; + }; + 06EABC8324665E470043D720 /* Products */ = { + isa = PBXGroup; + children = ( + 06EABC8224665E470043D720 /* SampleAppSwift.app */, + ); + name = Products; + sourceTree = ""; + }; + 06EABC8424665E470043D720 /* SampleAppSwift */ = { + isa = PBXGroup; + children = ( + 06EABC8524665E470043D720 /* AppDelegate.swift */, + 06EABC8724665E470043D720 /* SceneDelegate.swift */, + 06EABC8924665E470043D720 /* ViewController.swift */, + 06EABC8B24665E470043D720 /* Main.storyboard */, + 06EABC8E24665E480043D720 /* Assets.xcassets */, + 06EABC9024665E480043D720 /* LaunchScreen.storyboard */, + 06EABC9324665E480043D720 /* Info.plist */, + ); + path = SampleAppSwift; + sourceTree = ""; + }; + 1B9B916AEF8AED38FD53D837 /* Pods */ = { + isa = PBXGroup; + children = ( + 1A80F07C523063EC35856541 /* Pods-RudderSampleAppSwift.debug.xcconfig */, + D150D4E65D8E33B6545DAAB5 /* Pods-RudderSampleAppSwift.release.xcconfig */, + 236B7D3A09137DB00470A261 /* Pods-SampleAppSwift.debug.xcconfig */, + F8AFA8807BBE9556C48E8F8C /* Pods-SampleAppSwift.release.xcconfig */, + ); + name = Pods; + path = ../../Pods; + sourceTree = ""; + }; + 5BCFA8EE73AF6931DBCB65B4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + B28C3D390F544487B3D0D25B /* Pods_SampleAppSwift.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 06EABC8124665E470043D720 /* SampleAppSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 06EABC9624665E480043D720 /* Build configuration list for PBXNativeTarget "SampleAppSwift" */; + buildPhases = ( + 2E8C52107B590E2E771A11FB /* [CP] Check Pods Manifest.lock */, + 06EABC7E24665E470043D720 /* Sources */, + 06EABC7F24665E470043D720 /* Frameworks */, + 06EABC8024665E470043D720 /* Resources */, + A8CC967E9675A0E0EF3E78EA /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SampleAppSwift; + productName = ExampleSwift; + productReference = 06EABC8224665E470043D720 /* SampleAppSwift.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 06EABC7A24665E470043D720 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1130; + LastUpgradeCheck = 1250; + ORGANIZATIONNAME = RudderStack; + TargetAttributes = { + 06EABC8124665E470043D720 = { + CreatedOnToolsVersion = 11.3.1; + }; + }; + }; + buildConfigurationList = 06EABC7D24665E470043D720 /* Build configuration list for PBXProject "SampleAppSwift" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 06EABC7924665E470043D720; + productRefGroup = 06EABC8324665E470043D720 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 06EABC8124665E470043D720 /* SampleAppSwift */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 06EABC8024665E470043D720 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 06EABC9224665E480043D720 /* LaunchScreen.storyboard in Resources */, + 06EABC8F24665E480043D720 /* Assets.xcassets in Resources */, + 06EABC8D24665E470043D720 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 2E8C52107B590E2E771A11FB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SampleAppSwift-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + A8CC967E9675A0E0EF3E78EA /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleAppSwift/Pods-SampleAppSwift-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SampleAppSwift/Pods-SampleAppSwift-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SampleAppSwift/Pods-SampleAppSwift-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 06EABC7E24665E470043D720 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 06EABC8A24665E470043D720 /* ViewController.swift in Sources */, + 06EABC8624665E470043D720 /* AppDelegate.swift in Sources */, + 06EABC8824665E470043D720 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 06EABC8B24665E470043D720 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 06EABC8C24665E470043D720 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 06EABC9024665E480043D720 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 06EABC9124665E480043D720 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 06EABC9424665E480043D720 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 06EABC9524665E480043D720 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 06EABC9724665E480043D720 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 236B7D3A09137DB00470A261 /* Pods-SampleAppSwift.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = UCL2K3J73M; + INFOPLIST_FILE = "$(SRCROOT)/SampleAppSwift/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.integration.test.ios.swift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 06EABC9824665E480043D720 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F8AFA8807BBE9556C48E8F8C /* Pods-SampleAppSwift.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = UCL2K3J73M; + INFOPLIST_FILE = "$(SRCROOT)/SampleAppSwift/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.integration.test.ios.swift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 06EABC7D24665E470043D720 /* Build configuration list for PBXProject "SampleAppSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 06EABC9424665E480043D720 /* Debug */, + 06EABC9524665E480043D720 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 06EABC9624665E480043D720 /* Build configuration list for PBXNativeTarget "SampleAppSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 06EABC9724665E480043D720 /* Debug */, + 06EABC9824665E480043D720 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 06EABC7A24665E470043D720 /* Project object */; +} diff --git a/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0e08a60 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/xcshareddata/xcschemes/SampleAppSwift.xcscheme b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/xcshareddata/xcschemes/SampleAppSwift.xcscheme new file mode 100644 index 0000000..5d27e8a --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift.xcodeproj/xcshareddata/xcschemes/SampleAppSwift.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift/AppDelegate.swift b/Examples/SampleAppSwift/SampleAppSwift/AppDelegate.swift new file mode 100644 index 0000000..f28c034 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/AppDelegate.swift @@ -0,0 +1,61 @@ +// +// AppDelegate.swift +// ExampleSwift +// +// Created by Arnab Pal on 09/05/20. +// Copyright © 2020 RudderStack. All rights reserved. +// + +import UIKit +import Rudder +import RudderIntercom + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var client: RSClient? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + let config: RSConfig = RSConfig(writeKey: "") + .dataPlaneURL("") + .loglevel(.debug) + .trackLifecycleEvents(true) + .recordScreenViews(true) + + RSClient.sharedInstance().configure(with: config) + RSClient.sharedInstance().addDestination(RudderIntercomDestination()) + RSClient.sharedInstance().track("Track 1") + RSClient.sharedInstance().track("test_user_id_2") + RSClient.sharedInstance().track("daily_rewards_claim") + RSClient.sharedInstance().track("level_up") + RSClient.sharedInstance().track("revenue") + + + 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. + } +} + +extension UIApplicationDelegate { + var client: RSClient? { + if let appDelegate = self as? AppDelegate { + return appDelegate.client + } + return nil + } +} diff --git a/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/Contents.json b/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/LaunchScreen.storyboard b/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/Main.storyboard b/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift/Info.plist b/Examples/SampleAppSwift/SampleAppSwift/Info.plist new file mode 100644 index 0000000..7f10f4b --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/Info.plist @@ -0,0 +1,67 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/Examples/SampleAppSwift/SampleAppSwift/SceneDelegate.swift b/Examples/SampleAppSwift/SampleAppSwift/SceneDelegate.swift new file mode 100644 index 0000000..49cae58 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// ExampleSwift +// +// Created by Arnab Pal on 09/05/20. +// Copyright © 2020 RudderStack. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily 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/Examples/SampleAppSwift/SampleAppSwift/ViewController.swift b/Examples/SampleAppSwift/SampleAppSwift/ViewController.swift new file mode 100644 index 0000000..67c96a1 --- /dev/null +++ b/Examples/SampleAppSwift/SampleAppSwift/ViewController.swift @@ -0,0 +1,54 @@ +// +// ViewController.swift +// ExampleSwift +// +// Created by Arnab Pal on 09/05/20. +// Copyright © 2020 RudderStack. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + /*let rudder: RSClient? = RSClient.sharedInstance() + + rudder?.screen("Story", properties: [ + "name": "nil" + ]) + + rudder?.identify("test_user_id") + + rudder?.identify("test_user_id", traits: [ + "key_1": "value_1", + "key_2": "value_2", + "int_key": 3, + "float_key": 4.56, + "bool_key": true, + "null_key": NSNull(), + "date_key": Date(), + "url_key": URL(fileURLWithPath: "https://rudderstack.com") + ]) + + rudder?.identify("test_user_id", traits: [ + "email": "test@gmail.com" + ]) + + rudder?.track("track_with_props", properties: [ + "key_1": "value_1", + "key_2": "value_2", + "int_key": 3, + "float_key": 4.56, + "bool_key": true, + "null_key": NSNull(), + "date_key": Date(), + "url_key": URL(fileURLWithPath: "https://rudderstack.com") + ])*/ + } + + +} + diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..eb9dc71 --- /dev/null +++ b/Podfile @@ -0,0 +1,27 @@ +source 'https://github.com/CocoaPods/Specs.git' +workspace 'RudderIntercom.xcworkspace' +use_frameworks! +inhibit_all_warnings! +platform :ios, '15.0' + +def shared_pods + pod 'Rudder', '~> 2.0.0' +end + +target 'RudderIntercom' do + project 'RudderIntercom.xcodeproj' + shared_pods + +end + +target 'SampleAppObjC' do + project 'Examples/SampleAppObjC/SampleAppObjC.xcodeproj' + shared_pods + pod 'RudderIntercom', :path => '.' +end + +target 'SampleAppSwift' do + project 'Examples/SampleAppSwift/SampleAppSwift.xcodeproj' + shared_pods + pod 'RudderIntercom', :path => '.' +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..4679d20 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,28 @@ +PODS: + - Intercom (17.2.1) + - Rudder (2.0.1) + - RudderIntercom (1.0.0): + - Intercom (= 17.2.1) + - Rudder (~> 2.0.0) + +DEPENDENCIES: + - Rudder (~> 2.0.0) + - RudderIntercom (from `.`) + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - Intercom + - Rudder + +EXTERNAL SOURCES: + RudderIntercom: + :path: "." + +SPEC CHECKSUMS: + Intercom: 3e9e26c8e2d0655e8f7527c395e570bb7733d5fa + Rudder: 463af33116984b97f2a19d344e9ad491f164e43e + RudderIntercom: c8b236b78d37422430284f078b824f5bc3768727 + +PODFILE CHECKSUM: be822288d1e6c4e8f08395d884307a433cb1c4df + +COCOAPODS: 1.15.2 diff --git a/RudderIntercom.podspec b/RudderIntercom.podspec new file mode 100644 index 0000000..31d28b5 --- /dev/null +++ b/RudderIntercom.podspec @@ -0,0 +1,23 @@ +Pod::Spec.new do |s| + s.name = 'RudderIntercom' + s.version = '1.0.0' + s.summary = 'Privacy and Security focused Segment-alternative. Intercom Native SDK integration support.' + + s.description = <<-DESC +Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly. + DESC + + s.homepage = 'https://github.com/rudderlabs/rudder-integration-intercom-swift' + s.license = { :type => "Apache", :file => "LICENSE.md" } + s.author = { 'RudderStack' => 'arnab@rudderlabs.com' } + s.source = { :git => 'https://github.com/rudderlabs/rudder-integration-intercom-swift.git', :tag => 'v#{s.version}' } + + s.ios.deployment_target = '15.0' + + s.source_files = 'Sources/**/*{h,m,swift}' + s.module_name = 'RudderIntercom' + s.swift_version = '5.3' + + s.dependency 'Rudder', '~> 2.0.0' + s.dependency 'Intercom', '17.2.1' +end diff --git a/RudderIntercom.xcodeproj/project.pbxproj b/RudderIntercom.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6880460 --- /dev/null +++ b/RudderIntercom.xcodeproj/project.pbxproj @@ -0,0 +1,428 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + E2492D25C44522314FCFB4F3 /* Pods_RudderIntercom.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CE17C2CCA82F2A8D2B93AE9 /* Pods_RudderIntercom.framework */; }; + ED2A28F82770570400646788 /* RudderIntercom.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2A28F72770570400646788 /* RudderIntercom.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EDF68FE727D1FD620005AAC6 /* RSIntercomDestination.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDF68FE627D1FD620005AAC6 /* RSIntercomDestination.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 32A1046DB51DF5B025129AD0 /* Pods-RudderIntercom.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderIntercom.debug.xcconfig"; path = "Target Support Files/Pods-RudderIntercom/Pods-RudderIntercom.debug.xcconfig"; sourceTree = ""; }; + 9CE17C2CCA82F2A8D2B93AE9 /* Pods_RudderIntercom.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderIntercom.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AA7D5A93759CD6674ACCB0EF /* Pods-RudderIntercom.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderIntercom.release.xcconfig"; path = "Target Support Files/Pods-RudderIntercom/Pods-RudderIntercom.release.xcconfig"; sourceTree = ""; }; + ED2A28EB2770560400646788 /* RudderIntercom.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RudderIntercom.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ED2A28F72770570400646788 /* RudderIntercom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RudderIntercom.h; sourceTree = ""; }; + ED2A28FA2770591E00646788 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + ED2A28FC2770591E00646788 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + ED2A28FD2770591E00646788 /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + EDC132B127D9DBF400AFD833 /* RudderIntercom.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = RudderIntercom.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + EDF68FE627D1FD620005AAC6 /* RSIntercomDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSIntercomDestination.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + ED2A28E82770560400646788 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E2492D25C44522314FCFB4F3 /* Pods_RudderIntercom.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 208F25C796D8593BF8DAB48E /* Pods */ = { + isa = PBXGroup; + children = ( + 32A1046DB51DF5B025129AD0 /* Pods-RudderIntercom.debug.xcconfig */, + AA7D5A93759CD6674ACCB0EF /* Pods-RudderIntercom.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 88FB8BC975709A71833A4B7B /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9CE17C2CCA82F2A8D2B93AE9 /* Pods_RudderIntercom.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + ED2A28E12770560400646788 = { + isa = PBXGroup; + children = ( + ED2A28FA2770591E00646788 /* LICENSE */, + ED2A28FD2770591E00646788 /* Podfile */, + ED2A28FC2770591E00646788 /* README.md */, + EDC132B127D9DBF400AFD833 /* RudderIntercom.podspec */, + ED2A28F52770570400646788 /* Sources */, + ED2A28EC2770560400646788 /* Products */, + 208F25C796D8593BF8DAB48E /* Pods */, + 88FB8BC975709A71833A4B7B /* Frameworks */, + ); + sourceTree = ""; + }; + ED2A28EC2770560400646788 /* Products */ = { + isa = PBXGroup; + children = ( + ED2A28EB2770560400646788 /* RudderIntercom.framework */, + ); + name = Products; + sourceTree = ""; + }; + ED2A28F52770570400646788 /* Sources */ = { + isa = PBXGroup; + children = ( + ED2A28F9277058FA00646788 /* Classes */, + ED2A28F62770570400646788 /* SDKInfo */, + ); + path = Sources; + sourceTree = ""; + }; + ED2A28F62770570400646788 /* SDKInfo */ = { + isa = PBXGroup; + children = ( + ED2A28F72770570400646788 /* RudderIntercom.h */, + ); + path = SDKInfo; + sourceTree = ""; + }; + ED2A28F9277058FA00646788 /* Classes */ = { + isa = PBXGroup; + children = ( + EDF68FE627D1FD620005AAC6 /* RSIntercomDestination.swift */, + ); + path = Classes; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + ED2A28E62770560400646788 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ED2A28F82770570400646788 /* RudderIntercom.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + ED2A28EA2770560400646788 /* RudderIntercom */ = { + isa = PBXNativeTarget; + buildConfigurationList = ED2A28F22770560400646788 /* Build configuration list for PBXNativeTarget "RudderIntercom" */; + buildPhases = ( + 2ACFBEF9DEFA31860245F4CE /* [CP] Check Pods Manifest.lock */, + ED2A28E62770560400646788 /* Headers */, + ED2A28E72770560400646788 /* Sources */, + ED2A28E82770560400646788 /* Frameworks */, + ED2A28E92770560400646788 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RudderIntercom; + productName = RudderFirebase; + productReference = ED2A28EB2770560400646788 /* RudderIntercom.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + ED2A28E22770560400646788 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1320; + TargetAttributes = { + ED2A28EA2770560400646788 = { + CreatedOnToolsVersion = 13.2.1; + LastSwiftMigration = 1320; + }; + }; + }; + buildConfigurationList = ED2A28E52770560400646788 /* Build configuration list for PBXProject "RudderIntercom" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = ED2A28E12770560400646788; + productRefGroup = ED2A28EC2770560400646788 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + ED2A28EA2770560400646788 /* RudderIntercom */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + ED2A28E92770560400646788 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 2ACFBEF9DEFA31860245F4CE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RudderIntercom-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + ED2A28E72770560400646788 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EDF68FE727D1FD620005AAC6 /* RSIntercomDestination.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + ED2A28F02770560400646788 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + ED2A28F12770560400646788 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + ED2A28F32770560400646788 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 32A1046DB51DF5B025129AD0 /* Pods-RudderIntercom.debug.xcconfig */; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = GTGKNDBD23; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.RudderIntercom; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + ED2A28F42770560400646788 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA7D5A93759CD6674ACCB0EF /* Pods-RudderIntercom.release.xcconfig */; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = GTGKNDBD23; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.RudderIntercom; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + ED2A28E52770560400646788 /* Build configuration list for PBXProject "RudderIntercom" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + ED2A28F02770560400646788 /* Debug */, + ED2A28F12770560400646788 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + ED2A28F22770560400646788 /* Build configuration list for PBXNativeTarget "RudderIntercom" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + ED2A28F32770560400646788 /* Debug */, + ED2A28F42770560400646788 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = ED2A28E22770560400646788 /* Project object */; +} diff --git a/RudderIntercom.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RudderIntercom.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5d15e81 --- /dev/null +++ b/RudderIntercom.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RudderIntercom.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RudderIntercom.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RudderIntercom.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RudderIntercom.xcodeproj/xcshareddata/xcschemes/RudderIntercom-iOS.xcscheme b/RudderIntercom.xcodeproj/xcshareddata/xcschemes/RudderIntercom-iOS.xcscheme new file mode 100644 index 0000000..8b4c4b0 --- /dev/null +++ b/RudderIntercom.xcodeproj/xcshareddata/xcschemes/RudderIntercom-iOS.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RudderIntercom.xcworkspace/contents.xcworkspacedata b/RudderIntercom.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..7fa14ef --- /dev/null +++ b/RudderIntercom.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/RudderIntercom.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RudderIntercom.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RudderIntercom.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/Classes/RSIntercomDestination.swift b/Sources/Classes/RSIntercomDestination.swift new file mode 100644 index 0000000..255e2bf --- /dev/null +++ b/Sources/Classes/RSIntercomDestination.swift @@ -0,0 +1,122 @@ +// +// RSAdjustDestination.swift +// RudderIntercom +// +// Created by Pallab Maiti on 27/03/22. +// + +import Foundation +import Rudder +import Intercom + +class RSIntercomDestination: RSDestinationPlugin { + let type = PluginType.destination + let key = "Intercom" + var client: RSClient? + var controller = RSController() + + func update(serverConfig: RSServerConfig, type: UpdateType) { + guard type == .initial else { return } + if let destination = serverConfig.getDestination(by: key), let config = destination.config?.dictionaryValue { + if let mobileApiKey = config["mobileApiKeyIOS"] as? String, let appId = config["appId"] as? String { + Intercom.setApiKey(mobileApiKey, forAppId: appId) + + if let traits = client?.context?["traits"] as? [String: Any]{ + let userAttributes = ICMUserAttributes() + userAttributes.userId = traits["userId"] as? String + if let userId = userAttributes.userId { + + Intercom.loginUser(with: userAttributes) + } + + } else { + + Intercom.loginUnidentifiedUser() + } + } + } + } + + func identify(message: IdentifyMessage) -> IdentifyMessage? { + let userAttributes = ICMUserAttributes() + userAttributes.userId = message.userId + if let userId = userAttributes.userId { + + Intercom.loginUser(with: userAttributes) + } else { + + Intercom.loginUnidentifiedUser() + } + + if let traits = message.traits { + let userAttributes = ICMUserAttributes() + var customAttributes = [String: Any]() + for (key, value) in traits { + switch key { + case "company": + if let companyTraits = value as? [String: String] { + let company = ICMCompany() + var customAttributes = [String: Any]() + for (key, value) in companyTraits { + switch key { + case "name": + company.name = value + case "id": + company.companyId = value + default: + customAttributes[key] = value + } + } + company.customAttributes = customAttributes + } + case "name": + userAttributes.name = value as? String + case "email": + userAttributes.email = value as? String + case "phone": + userAttributes.phone = value as? String + default: + customAttributes[key] = value + } + } + userAttributes.customAttributes = customAttributes + Intercom.updateUser(with: userAttributes) + } + return message + } + + func track(message: TrackMessage) -> TrackMessage? { + if let properties = message.properties { + Intercom.logEvent(withName: message.event, metaData: properties) + } else { + Intercom.logEvent(withName: message.event) + } + return message + } + + func screen(message: ScreenMessage) -> ScreenMessage? { + client?.log(message: "MessageType is not supported", logLevel: .warning) + return message + } + + func group(message: GroupMessage) -> GroupMessage? { + client?.log(message: "MessageType is not supported", logLevel: .warning) + return message + } + + func alias(message: AliasMessage) -> AliasMessage? { + client?.log(message: "MessageType is not supported", logLevel: .warning) + return message + } +} + +// MARK: - Support methods + +@objc +public class RudderIntercomDestination: RudderDestination { + + public override init() { + super.init() + plugin = RSIntercomDestination() + } +} diff --git a/Sources/SDKInfo/RudderIntercom.h b/Sources/SDKInfo/RudderIntercom.h new file mode 100644 index 0000000..800febe --- /dev/null +++ b/Sources/SDKInfo/RudderIntercom.h @@ -0,0 +1,18 @@ +// +// RudderIntercom.h +// RudderIntercom +// +// Created by Pallab Maiti on 27/03/22. +// + +#import + +//! Project version number for RudderIntercom. +FOUNDATION_EXPORT double RudderIntercomVersionNumber; + +//! Project version string for RudderIntercom. +FOUNDATION_EXPORT const unsigned char RudderIntercomVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +