├── .circleci └── config.yml ├── .gitignore ├── CHANGELOG.md ├── Cartfile ├── Cartfile.resolved ├── CarthageExample ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── SceneDelegate.h ├── SceneDelegate.m ├── ViewController.h ├── ViewController.m └── main.m ├── Example ├── .gitignore ├── Podfile ├── Podfile.lock ├── Segment-Amplitude.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Segment-Amplitude_Example.xcscheme ├── Segment-Amplitude.xcworkspace │ └── contents.xcworkspacedata ├── Segment-Amplitude │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Main.storyboard │ ├── SEGAppDelegate.h │ ├── SEGAppDelegate.m │ ├── SEGViewController.h │ ├── SEGViewController.m │ ├── Segment-Amplitude-Info.plist │ ├── Segment-Amplitude-Prefix.pch │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m └── Tests │ ├── TestSetupBlock.m │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── Makefile ├── Package.swift ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── SEGAmplitudeIntegration.h │ ├── SEGAmplitudeIntegration.m │ ├── SEGAmplitudeIntegrationFactory.h │ └── SEGAmplitudeIntegrationFactory.m ├── README.md ├── RELEASING.md ├── Segment-Amplitude.podspec ├── Segment-Amplitude.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── Segment-Amplitude.xcscheme ├── Segment-Amplitude ├── Info.plist └── Segment_Amplitude.h └── _Pods.xcodeproj /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build-and-test: 4 | macos: 5 | xcode: "11.5.0" 6 | steps: 7 | - checkout 8 | - run: xcrun simctl list 9 | - run: 10 | name: Install dependencies 11 | command: | 12 | sudo gem install xcpretty 13 | sudo gem install cocoapods 14 | sudo gem install cocoapods-repo-update 15 | make install 16 | - run: 17 | name: Run tests 18 | command: | 19 | make build 20 | make test 21 | make lint 22 | 23 | workflows: 24 | version: 2 25 | run: 26 | jobs: 27 | - build-and-test: 28 | filters: 29 | tags: 30 | only: /[0-9]+(\.[0-9]+)*(-.+)?/ 31 | - publish: 32 | context: iOS 33 | requires: 34 | - build-and-test 35 | filters: 36 | branches: 37 | ignore: /.*/ 38 | tags: 39 | only: /[0-9]+(\.[0-9]+)*(-.+)?/ 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | Archive.zip 27 | # We recommend against adding the Pods directory to your .gitignore. However 28 | # you should judge for yourself, the pros and cons are mentioned at: 29 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 30 | # 31 | # Note: if you ignore the Pods directory, make sure to uncomment 32 | # `pod install` in .travis.yml 33 | # 34 | Pods/ 35 | .clang-format 36 | 37 | 38 | #intellij 39 | .idea 40 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | Version 3.4.0 *(16th, February, 2022)* 5 | ------------------------------------- 6 | * Add SPM Support (thanks Marcio!) 7 | 8 | Version 3.3.2 *(15th July, 2021) 9 | ------------------------------------- 10 | * Bump the Amplitude SDK version to 8.3.0+ 11 | * Bump deployment target to iOS 11 12 | 13 | Version 3.3.1 *(4th May, 2021) 14 | ------------------------------------- 15 | * Bump the Amplitude SDK version to 8.0+ 16 | 17 | Version 3.3.0 *(15th April, 2021) 18 | ------------------------------------- 19 | * Fix issue while reading values from SEGGroupPayload in group() call. 20 | 21 | * Fix [Amplitude setGroup:groupName:] call in SEGAmplitudeIntegration. 22 | 23 | * Fix issue when reset is called. Reinitialize identify otherwise old traits will continue through new identify calls. 24 | 25 | * Check if imports exist without segment framework. 26 | 27 | * Add tvOS deployment target to podspec. 28 | 29 | * Remove unnecessary platform specifier from Podspec. 30 | 31 | Version 3.2.4 *(2nd February, 2021) 32 | ------------------------------------- 33 | * Fix issue compiling staticly where headers cannot be located. 34 | 35 | Version 3.2.3 *(29th October, 2020) 36 | ------------------------------------- 37 | * Fix a bug with import headers support new namespacing introduced in v4.x 38 | 39 | Version 3.2.2 *(14th October, 2020) 40 | ------------------------------------- 41 | * Update SEGAnalytics imports to support new namespacing introduced in v4.x 42 | 43 | Version 3.2.1 *(23rd September, 2020) 44 | ------------------------------------- 45 | * Fixed compile issue w/ 7.0.1 build of Amplitude-iOS 46 | * Added mechanism to allow idfa and location services to be configured in Amplitude-iOS. 47 | 48 | Version 3.2.0 *(15th July, 2020)* 49 | --------------------------------- 50 | * Updated Carthage to use Analytics 4.0.x. 51 | * Moved Carthage files to proper location. 52 | 53 | Version 3.1.0 *(14th July, 2020)* 54 | --------------------------------- 55 | * Removed version pinning for Amplitude. 56 | * Moved to Amplitude pod, away from Amplitude-iOS pod. 57 | 58 | Version 3.0.1 *(21st February, 2020)* 59 | ----------------------------- 60 | * Added Carthage support 61 | 62 | Version 3.0.0 *(19th November, 2019)* 63 | ----------------------------- 64 | * Update Amplitude to 4.8+ 65 | * Update Analytics to 3.7+ 66 | * Update OCHamrest to 7.1.2 67 | * Update OCMockito to 5.1.2 68 | 69 | Version 2.0.1-beta *(24th September, 2018)* 70 | ----------------------------- 71 | *(Supports analytics-ios 3.6+ and Amplitude 4.0+)* 72 | 73 | * [Chore](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/61): Move release process to CircleCI. 74 | 75 | Version 2.0.0 *(1st November, 2017)* 76 | ----------------------------- 77 | *(Supports analytics-ios 3.6+ and Amplitude 4.0+)* 78 | 79 | * [Improvement](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/43): Supports new Segment settings `groupTypeTrait` (group type) and `groupTypeValue` (group value) , which allows you to set which keys the Segment integration will look for to determine what to set for the group type and group values in Amplitude. 80 | * [Improvement](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/54): Introduces new setting `trackAllPagesV2`, which sends a "Loaded Screen" event and the screen name as a property to Amplitude. Moving forward, this is the preferred method of tracking screen events in Amplitude. 81 | * [Fix](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/35): If `price` is not present on an Ecommerce event, fallsback to first setting `revenue`, then `total`, for the value of the reserved Amplitude property `price`. 82 | * [Fix](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/44): Sets `userId` to nil on `reset`. 83 | * [New](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/45): Supports Amplitude's add functionality via `traitsToIncrement` setting, configured via Segment's UI. The setting accepts an array of traits (of type NSString) to check in `identify.traits`. If the trait is present, it will increment the trait given the value passed in. 84 | * [New](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/49): Supports Location Listening via Segment's UI setting `enableLocationListening`. Defaults to disabled. 85 | * [New](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/50): Enabling `useAdvertisingIdForDeviceId` setting in Segment UI allows users to use `advertisingIdentifier` instead of `identifierForVendor` as the Device ID. 86 | * [New](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/51): Supports Amplitude's `setOnce` method on `identify`. Values configured in Segment's UI to be set only once will set the value of a user trait only once on `identify`. Subsequent setOnce operations on that user property will be ignored. 87 | * [New](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/52): Supports `outOfSession` passed in as true if the integration specific option is passed in: `integrations.amplitude.outOfSession`. 88 | 89 | 90 | Version 1.5.0 *(20th October, 2017)* 91 | ----------------------------- 92 | *(Supports analytics-ios 3.6+ and Amplitude 4.0+)* 93 | 94 | * [Adds](https://github.com/segment-integrations/analytics-ios-integration-amplitude/commit/d86cc3ed8e14ad0156f7247e4cb2e4e68a316269): Fallback to `total` if `revenue` is not present on E-Commerce events. 95 | * [Adds](https://github.com/segment-integrations/analytics-ios-integration-amplitude/commit/25d8659a5a3475bb6c4f852f2f5111f627c297d3): Check for `snake_case` properties, which is the expected casing for analytics-ios. 96 | * [Refactor](https://github.com/segment-integrations/analytics-ios-integration-amplitude/commit/b26c83eaaddfec900403f4b195f877e134611861) and [cleanup](https://github.com/segment-integrations/analytics-ios-integration-amplitude/commit/b282af19c09cb4b002d49e7a0ecc2813ce960f35): revenue logic. 97 | * [Adds tests](https://github.com/segment-integrations/analytics-ios-integration-amplitude/commit/455841ba95038446a33071b6210ede210db0ec07). 98 | 99 | Version 1.4.4 *(9th October, 2017)* 100 | ----------------------------- 101 | *(Supports analytics-ios 3.6+ and Amplitude 4.0+)* 102 | 103 | * [Updates](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/24/files): Amplitude dependency and removes [deprecated methods](https://github.com/amplitude/Amplitude-iOS/releases) in preparation for iOS 11. 104 | 105 | 106 | Version 1.4.3 *(25th May, 2017)* 107 | ----------------------------- 108 | *(Supports analytics-ios 3.6+ and Amplitude 3.8+)* 109 | 110 | * [Adds](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/22) support for Amplitude's groups capability via `identify` and `track` 111 | 112 | Version 1.4.2 *(27th April, 2017)* 113 | ----------------------------- 114 | *(Supports analytics-ios 3.2+ and Amplitude 3.8+)* 115 | 116 | * [Adds](https://github.com/segment-integrations/analytics-ios-integration-amplitude/pull/21): `reset` mapping to Amplitude's `regenerateDeviceId`. 117 | 118 | Version 1.4.1 *(8th August, 2016)* 119 | ----------------------------- 120 | *(Supports analytics-ios 3.2+ and Amplitude 3.8+)* 121 | 122 | * Fix a bug where revenue would be tracked with the `useLogRevenueV2` option. 123 | 124 | Version 1.4.0 *(21st July, 2016)* 125 | ----------------------------- 126 | *(Supports analytics-ios 3.2+ and Amplitude 3.8+)* 127 | 128 | * Update Amplitude dependency to 3.8. 129 | * Add support for `useLogRevenueV2` option. 130 | 131 | Version 1.3.0 *(1st June, 2016)* 132 | ----------------------------- 133 | *(Supports analytics-ios 3.0.7+ and Amplitude 3.6.+)* 134 | 135 | * Segment-Amplitude now includes support for iOS 7.0+ (previously 8.0+ only). 136 | 137 | Version 1.2.0 *(6th April, 2016)* 138 | ---------------------------- 139 | *(Supports analytics-ios 3.0.7+ and Amplitude 3.6.+)* 140 | 141 | * Update Analytics dependency. 142 | * Update Amplitude dependency. 143 | 144 | Version 1.1.0 *(25th January, 2016)* 145 | ---------------------------- 146 | *(Supports analytics-ios 3.0.6+ and Amplitude 3.5.+)* 147 | 148 | * Fix signature of identify method. 149 | * Update Analytics dependency. 150 | 151 | Version 1.1.0 *(22nd January, 2016)* 152 | ---------------------------- 153 | *(Supports analytics-ios 3.0.+ and Amplitude 3.5.+)* 154 | 155 | Updates Amplitude dependency. 156 | 157 | Version 1.0.0 *(24th November, 2015)* 158 | ---------------------------- 159 | *(Supports analytics-ios 3.0.+ and Amplitude 3.2.+)* 160 | 161 | Initial stable release. 162 | 163 | Version 1.0.0-alpha *(18th November, 2015)* 164 | ---------------------------- 165 | *(Supports analytics-ios 3.0.+ and Amplitude 3.2.+)* 166 | 167 | Initial release. 168 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "amplitude/Amplitude-iOS" ~> 7.0.1 2 | github "segmentio/analytics-ios" 3 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "amplitude/Amplitude-iOS" "v7.3.0" 2 | github "segmentio/analytics-ios" "4.1.5" 3 | -------------------------------------------------------------------------------- /CarthageExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CarthageExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | //#import 11 | 12 | #if defined(__has_include) && __has_include() 13 | @import Analytics; 14 | #else 15 | @import Segment; 16 | #endif 17 | @import Amplitude; 18 | @import Segment_Amplitude; 19 | 20 | @interface AppDelegate () 21 | 22 | @end 23 | 24 | @implementation AppDelegate 25 | 26 | 27 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 28 | // Override point for customization after application launch. 29 | 30 | NSString *const SEGMENT_WRITE_KEY = @" ... "; 31 | SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY]; 32 | 33 | //id test = [SEGAmplitudeIntegrationFactory instance]; 34 | [config use:[SEGAmplitudeIntegrationFactory instance]]; 35 | 36 | [SEGAnalytics setupWithConfiguration:config]; 37 | 38 | return YES; 39 | } 40 | 41 | 42 | #pragma mark - UISceneSession lifecycle 43 | 44 | 45 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { 46 | // Called when a new scene session is being created. 47 | // Use this method to select a configuration to create the new scene with. 48 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; 49 | } 50 | 51 | 52 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { 53 | // Called when the user discards a scene session. 54 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 55 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 56 | } 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /CarthageExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CarthageExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /CarthageExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /CarthageExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /CarthageExample/SceneDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.h 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SceneDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow * window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /CarthageExample/SceneDelegate.m: -------------------------------------------------------------------------------- 1 | #import "SceneDelegate.h" 2 | 3 | @interface SceneDelegate () 4 | 5 | @end 6 | 7 | @implementation SceneDelegate 8 | 9 | 10 | - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { 11 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 12 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 13 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 14 | } 15 | 16 | 17 | - (void)sceneDidDisconnect:(UIScene *)scene { 18 | // Called as the scene is being released by the system. 19 | // This occurs shortly after the scene enters the background, or when its session is discarded. 20 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 21 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 22 | } 23 | 24 | 25 | - (void)sceneDidBecomeActive:(UIScene *)scene { 26 | // Called when the scene has moved from an inactive state to an active state. 27 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 28 | } 29 | 30 | 31 | - (void)sceneWillResignActive:(UIScene *)scene { 32 | // Called when the scene will move from an active state to an inactive state. 33 | // This may occur due to temporary interruptions (ex. an incoming phone call). 34 | } 35 | 36 | 37 | - (void)sceneWillEnterForeground:(UIScene *)scene { 38 | // Called as the scene transitions from the background to the foreground. 39 | // Use this method to undo the changes made on entering the background. 40 | } 41 | 42 | 43 | - (void)sceneDidEnterBackground:(UIScene *)scene { 44 | // Called as the scene transitions from the foreground to the background. 45 | // Use this method to save data, release shared resources, and store enough scene-specific state information 46 | // to restore the scene back to its current state. 47 | } 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /CarthageExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CarthageExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /CarthageExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CarthageExample 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | NSString * appDelegateClassName; 14 | @autoreleasepool { 15 | // Setup code that might create autoreleased objects goes here. 16 | appDelegateClassName = NSStringFromClass([AppDelegate class]); 17 | } 18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 19 | } 20 | -------------------------------------------------------------------------------- /Example/.gitignore: -------------------------------------------------------------------------------- 1 | xcshareddata 2 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '10.0' 3 | 4 | # Do not use_frameworks due to iOS 7 support 5 | use_frameworks! 6 | 7 | target 'Segment-Amplitude_Example' do 8 | pod 'Segment-Amplitude', :path => "../" 9 | # Used for testing against latest version of Core SDK 10 | # pod "Analytics", :path => "../../analytics-ios" 11 | 12 | target 'Segment-Amplitude_Tests' do 13 | inherit! :search_paths 14 | 15 | # Do not include Segment-Amplitude here due to using static lib 16 | pod 'Specta' 17 | pod 'Expecta' 18 | pod 'OCMockito' 19 | 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Amplitude (8.3.0) 3 | - Analytics (4.1.5) 4 | - Expecta (1.0.6) 5 | - OCHamcrest (8.0.0) 6 | - OCMockito (6.0.0): 7 | - OCHamcrest (~> 8.0) 8 | - Segment-Amplitude (3.3.1): 9 | - Amplitude (~> 8.3) 10 | - Analytics 11 | - Specta (1.0.7) 12 | 13 | DEPENDENCIES: 14 | - Expecta 15 | - OCMockito 16 | - Segment-Amplitude (from `../`) 17 | - Specta 18 | 19 | SPEC REPOS: 20 | https://github.com/CocoaPods/Specs.git: 21 | - Amplitude 22 | - Analytics 23 | - Expecta 24 | - OCHamcrest 25 | - OCMockito 26 | - Specta 27 | 28 | EXTERNAL SOURCES: 29 | Segment-Amplitude: 30 | :path: "../" 31 | 32 | SPEC CHECKSUMS: 33 | Amplitude: 5627b4574e36d789a75c1656ba39b3278edf1ade 34 | Analytics: 7bdc735c456434b4eaa2eacdcf122bb03d51ede7 35 | Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 36 | OCHamcrest: a613690381f1dac7637c18962c10dbe8feca4bb5 37 | OCMockito: 780f04370226f81a9d972c97d1203864ef609f5b 38 | Segment-Amplitude: 2b450c8352dc9bf074567d6ef3f7ef23c0719a7b 39 | Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 40 | 41 | PODFILE CHECKSUM: 166e86977ca5ed7a88d476e1f295a6953c3274c0 42 | 43 | COCOAPODS: 1.10.1 44 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5DD9D190A140B9FF699AE24F /* Pods_Segment_Amplitude_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B290FE7A444CD483934D2691 /* Pods_Segment_Amplitude_Tests.framework */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* SEGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* SEGAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* SEGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* SEGViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 25 | A3585CD2251BCF0A00F46088 /* TestSetupBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = A3585CD1251BCF0A00F46088 /* TestSetupBlock.m */; }; 26 | C225DD0CCD2032095955CD17 /* Pods_Segment_Amplitude_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9FBFDE748D8E5B0C4E066B3 /* Pods_Segment_Amplitude_Example.framework */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 6003F582195388D10070C39A /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 6003F589195388D20070C39A; 35 | remoteInfo = "Segment-Amplitude"; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1FBED30B81F430475204A632 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 41 | 48BACC3E864A3EDAEE807F99 /* Pods-Segment-Amplitude_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Segment-Amplitude_Example.debug.xcconfig"; path = "Target Support Files/Pods-Segment-Amplitude_Example/Pods-Segment-Amplitude_Example.debug.xcconfig"; sourceTree = ""; }; 42 | 4DAE2502ABD796EA6170123D /* Pods-Segment-Amplitude_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Segment-Amplitude_Tests.debug.xcconfig"; path = "Target Support Files/Pods-Segment-Amplitude_Tests/Pods-Segment-Amplitude_Tests.debug.xcconfig"; sourceTree = ""; }; 43 | 6003F58A195388D20070C39A /* Segment-Amplitude_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Segment-Amplitude_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 45 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 46 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 47 | 6003F595195388D20070C39A /* Segment-Amplitude-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Segment-Amplitude-Info.plist"; sourceTree = ""; }; 48 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 49 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 6003F59B195388D20070C39A /* Segment-Amplitude-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Segment-Amplitude-Prefix.pch"; sourceTree = ""; }; 51 | 6003F59C195388D20070C39A /* SEGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEGAppDelegate.h; sourceTree = ""; }; 52 | 6003F59D195388D20070C39A /* SEGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SEGAppDelegate.m; sourceTree = ""; }; 53 | 6003F5A5195388D20070C39A /* SEGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEGViewController.h; sourceTree = ""; }; 54 | 6003F5A6195388D20070C39A /* SEGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SEGViewController.m; sourceTree = ""; }; 55 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | 6003F5AE195388D20070C39A /* Segment-Amplitude_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Segment-Amplitude_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 58 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 59 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 61 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 62 | 6956713238C7736D25A5F3A8 /* Pods-Segment-Amplitude_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Segment-Amplitude_Tests.release.xcconfig"; path = "Target Support Files/Pods-Segment-Amplitude_Tests/Pods-Segment-Amplitude_Tests.release.xcconfig"; sourceTree = ""; }; 63 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 64 | 9EEA123C7A20DF690C5D6E46 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 65 | A3585CD1251BCF0A00F46088 /* TestSetupBlock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestSetupBlock.m; sourceTree = ""; }; 66 | A9FBFDE748D8E5B0C4E066B3 /* Pods_Segment_Amplitude_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Segment_Amplitude_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | B290FE7A444CD483934D2691 /* Pods_Segment_Amplitude_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Segment_Amplitude_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | C486B345483570BE35A88FBF /* Pods-Segment-Amplitude_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Segment-Amplitude_Example.release.xcconfig"; path = "Target Support Files/Pods-Segment-Amplitude_Example/Pods-Segment-Amplitude_Example.release.xcconfig"; sourceTree = ""; }; 69 | F26E1DEACA3B4F2A695BCDD1 /* Segment-Amplitude.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Segment-Amplitude.podspec"; path = "../Segment-Amplitude.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 6003F587195388D20070C39A /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 80 | C225DD0CCD2032095955CD17 /* Pods_Segment_Amplitude_Example.framework in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 6003F5AB195388D20070C39A /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 90 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 91 | 5DD9D190A140B9FF699AE24F /* Pods_Segment_Amplitude_Tests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 6003F581195388D10070C39A = { 99 | isa = PBXGroup; 100 | children = ( 101 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 102 | 6003F593195388D20070C39A /* Example for Segment-Amplitude */, 103 | 6003F5B5195388D20070C39A /* Tests */, 104 | 6003F58C195388D20070C39A /* Frameworks */, 105 | 6003F58B195388D20070C39A /* Products */, 106 | 734DE3219F2D81B49272FCC7 /* Pods */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 6003F58B195388D20070C39A /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 6003F58A195388D20070C39A /* Segment-Amplitude_Example.app */, 114 | 6003F5AE195388D20070C39A /* Segment-Amplitude_Tests.xctest */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 6003F58C195388D20070C39A /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6003F58D195388D20070C39A /* Foundation.framework */, 123 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 124 | 6003F591195388D20070C39A /* UIKit.framework */, 125 | 6003F5AF195388D20070C39A /* XCTest.framework */, 126 | B290FE7A444CD483934D2691 /* Pods_Segment_Amplitude_Tests.framework */, 127 | A9FBFDE748D8E5B0C4E066B3 /* Pods_Segment_Amplitude_Example.framework */, 128 | ); 129 | name = Frameworks; 130 | sourceTree = ""; 131 | }; 132 | 6003F593195388D20070C39A /* Example for Segment-Amplitude */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 6003F59C195388D20070C39A /* SEGAppDelegate.h */, 136 | 6003F59D195388D20070C39A /* SEGAppDelegate.m */, 137 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 138 | 6003F5A5195388D20070C39A /* SEGViewController.h */, 139 | 6003F5A6195388D20070C39A /* SEGViewController.m */, 140 | 6003F5A8195388D20070C39A /* Images.xcassets */, 141 | 6003F594195388D20070C39A /* Supporting Files */, 142 | ); 143 | name = "Example for Segment-Amplitude"; 144 | path = "Segment-Amplitude"; 145 | sourceTree = ""; 146 | }; 147 | 6003F594195388D20070C39A /* Supporting Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 6003F595195388D20070C39A /* Segment-Amplitude-Info.plist */, 151 | 6003F596195388D20070C39A /* InfoPlist.strings */, 152 | 6003F599195388D20070C39A /* main.m */, 153 | 6003F59B195388D20070C39A /* Segment-Amplitude-Prefix.pch */, 154 | ); 155 | name = "Supporting Files"; 156 | sourceTree = ""; 157 | }; 158 | 6003F5B5195388D20070C39A /* Tests */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 6003F5BB195388D20070C39A /* Tests.m */, 162 | A3585CD1251BCF0A00F46088 /* TestSetupBlock.m */, 163 | 6003F5B6195388D20070C39A /* Supporting Files */, 164 | ); 165 | path = Tests; 166 | sourceTree = ""; 167 | }; 168 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 172 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 173 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | F26E1DEACA3B4F2A695BCDD1 /* Segment-Amplitude.podspec */, 182 | 9EEA123C7A20DF690C5D6E46 /* README.md */, 183 | 1FBED30B81F430475204A632 /* LICENSE */, 184 | ); 185 | name = "Podspec Metadata"; 186 | sourceTree = ""; 187 | }; 188 | 734DE3219F2D81B49272FCC7 /* Pods */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 48BACC3E864A3EDAEE807F99 /* Pods-Segment-Amplitude_Example.debug.xcconfig */, 192 | C486B345483570BE35A88FBF /* Pods-Segment-Amplitude_Example.release.xcconfig */, 193 | 4DAE2502ABD796EA6170123D /* Pods-Segment-Amplitude_Tests.debug.xcconfig */, 194 | 6956713238C7736D25A5F3A8 /* Pods-Segment-Amplitude_Tests.release.xcconfig */, 195 | ); 196 | path = Pods; 197 | sourceTree = ""; 198 | }; 199 | /* End PBXGroup section */ 200 | 201 | /* Begin PBXNativeTarget section */ 202 | 6003F589195388D20070C39A /* Segment-Amplitude_Example */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Segment-Amplitude_Example" */; 205 | buildPhases = ( 206 | CEE3D83854B9B27917F1FA22 /* [CP] Check Pods Manifest.lock */, 207 | 6003F586195388D20070C39A /* Sources */, 208 | 6003F587195388D20070C39A /* Frameworks */, 209 | 6003F588195388D20070C39A /* Resources */, 210 | B3327AD6A29C551631312678 /* [CP] Embed Pods Frameworks */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | ); 216 | name = "Segment-Amplitude_Example"; 217 | productName = "Segment-Amplitude"; 218 | productReference = 6003F58A195388D20070C39A /* Segment-Amplitude_Example.app */; 219 | productType = "com.apple.product-type.application"; 220 | }; 221 | 6003F5AD195388D20070C39A /* Segment-Amplitude_Tests */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Segment-Amplitude_Tests" */; 224 | buildPhases = ( 225 | 9C1145DCF6367A8D33A118B7 /* [CP] Check Pods Manifest.lock */, 226 | 6003F5AA195388D20070C39A /* Sources */, 227 | 6003F5AB195388D20070C39A /* Frameworks */, 228 | 6003F5AC195388D20070C39A /* Resources */, 229 | 2EFE5EBD6D50D74357B2201B /* [CP] Embed Pods Frameworks */, 230 | ); 231 | buildRules = ( 232 | ); 233 | dependencies = ( 234 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 235 | ); 236 | name = "Segment-Amplitude_Tests"; 237 | productName = "Segment-AmplitudeTests"; 238 | productReference = 6003F5AE195388D20070C39A /* Segment-Amplitude_Tests.xctest */; 239 | productType = "com.apple.product-type.bundle.unit-test"; 240 | }; 241 | /* End PBXNativeTarget section */ 242 | 243 | /* Begin PBXProject section */ 244 | 6003F582195388D10070C39A /* Project object */ = { 245 | isa = PBXProject; 246 | attributes = { 247 | CLASSPREFIX = SEG; 248 | LastUpgradeCheck = 0510; 249 | ORGANIZATIONNAME = "Prateek Srivastava"; 250 | TargetAttributes = { 251 | 6003F589195388D20070C39A = { 252 | DevelopmentTeam = ENLA8E7Z4L; 253 | }; 254 | 6003F5AD195388D20070C39A = { 255 | TestTargetID = 6003F589195388D20070C39A; 256 | }; 257 | }; 258 | }; 259 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "Segment-Amplitude" */; 260 | compatibilityVersion = "Xcode 3.2"; 261 | developmentRegion = English; 262 | hasScannedForEncodings = 0; 263 | knownRegions = ( 264 | English, 265 | en, 266 | Base, 267 | ); 268 | mainGroup = 6003F581195388D10070C39A; 269 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 270 | projectDirPath = ""; 271 | projectRoot = ""; 272 | targets = ( 273 | 6003F589195388D20070C39A /* Segment-Amplitude_Example */, 274 | 6003F5AD195388D20070C39A /* Segment-Amplitude_Tests */, 275 | ); 276 | }; 277 | /* End PBXProject section */ 278 | 279 | /* Begin PBXResourcesBuildPhase section */ 280 | 6003F588195388D20070C39A /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 285 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 286 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 6003F5AC195388D20070C39A /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXResourcesBuildPhase section */ 299 | 300 | /* Begin PBXShellScriptBuildPhase section */ 301 | 2EFE5EBD6D50D74357B2201B /* [CP] Embed Pods Frameworks */ = { 302 | isa = PBXShellScriptBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | ); 306 | inputPaths = ( 307 | "${PODS_ROOT}/Target Support Files/Pods-Segment-Amplitude_Tests/Pods-Segment-Amplitude_Tests-frameworks.sh", 308 | "${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework", 309 | "${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework", 310 | "${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework", 311 | "${BUILT_PRODUCTS_DIR}/Specta/Specta.framework", 312 | ); 313 | name = "[CP] Embed Pods Frameworks"; 314 | outputPaths = ( 315 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework", 316 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCHamcrest.framework", 317 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMockito.framework", 318 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework", 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | shellPath = /bin/sh; 322 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Segment-Amplitude_Tests/Pods-Segment-Amplitude_Tests-frameworks.sh\"\n"; 323 | showEnvVarsInLog = 0; 324 | }; 325 | 9C1145DCF6367A8D33A118B7 /* [CP] Check Pods Manifest.lock */ = { 326 | isa = PBXShellScriptBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | ); 330 | inputFileListPaths = ( 331 | ); 332 | inputPaths = ( 333 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 334 | "${PODS_ROOT}/Manifest.lock", 335 | ); 336 | name = "[CP] Check Pods Manifest.lock"; 337 | outputFileListPaths = ( 338 | ); 339 | outputPaths = ( 340 | "$(DERIVED_FILE_DIR)/Pods-Segment-Amplitude_Tests-checkManifestLockResult.txt", 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | 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"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | B3327AD6A29C551631312678 /* [CP] Embed Pods Frameworks */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputPaths = ( 353 | "${PODS_ROOT}/Target Support Files/Pods-Segment-Amplitude_Example/Pods-Segment-Amplitude_Example-frameworks.sh", 354 | "${BUILT_PRODUCTS_DIR}/Amplitude/Amplitude.framework", 355 | "${BUILT_PRODUCTS_DIR}/Analytics/Segment.framework", 356 | ); 357 | name = "[CP] Embed Pods Frameworks"; 358 | outputPaths = ( 359 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Amplitude.framework", 360 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Segment.framework", 361 | ); 362 | runOnlyForDeploymentPostprocessing = 0; 363 | shellPath = /bin/sh; 364 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Segment-Amplitude_Example/Pods-Segment-Amplitude_Example-frameworks.sh\"\n"; 365 | showEnvVarsInLog = 0; 366 | }; 367 | CEE3D83854B9B27917F1FA22 /* [CP] Check Pods Manifest.lock */ = { 368 | isa = PBXShellScriptBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | ); 372 | inputFileListPaths = ( 373 | ); 374 | inputPaths = ( 375 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 376 | "${PODS_ROOT}/Manifest.lock", 377 | ); 378 | name = "[CP] Check Pods Manifest.lock"; 379 | outputFileListPaths = ( 380 | ); 381 | outputPaths = ( 382 | "$(DERIVED_FILE_DIR)/Pods-Segment-Amplitude_Example-checkManifestLockResult.txt", 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | shellPath = /bin/sh; 386 | 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"; 387 | showEnvVarsInLog = 0; 388 | }; 389 | /* End PBXShellScriptBuildPhase section */ 390 | 391 | /* Begin PBXSourcesBuildPhase section */ 392 | 6003F586195388D20070C39A /* Sources */ = { 393 | isa = PBXSourcesBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | 6003F59E195388D20070C39A /* SEGAppDelegate.m in Sources */, 397 | 6003F5A7195388D20070C39A /* SEGViewController.m in Sources */, 398 | 6003F59A195388D20070C39A /* main.m in Sources */, 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | 6003F5AA195388D20070C39A /* Sources */ = { 403 | isa = PBXSourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 407 | A3585CD2251BCF0A00F46088 /* TestSetupBlock.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXSourcesBuildPhase section */ 412 | 413 | /* Begin PBXTargetDependency section */ 414 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 415 | isa = PBXTargetDependency; 416 | target = 6003F589195388D20070C39A /* Segment-Amplitude_Example */; 417 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 418 | }; 419 | /* End PBXTargetDependency section */ 420 | 421 | /* Begin PBXVariantGroup section */ 422 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 423 | isa = PBXVariantGroup; 424 | children = ( 425 | 6003F597195388D20070C39A /* en */, 426 | ); 427 | name = InfoPlist.strings; 428 | sourceTree = ""; 429 | }; 430 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 431 | isa = PBXVariantGroup; 432 | children = ( 433 | 6003F5B9195388D20070C39A /* en */, 434 | ); 435 | name = InfoPlist.strings; 436 | sourceTree = ""; 437 | }; 438 | /* End PBXVariantGroup section */ 439 | 440 | /* Begin XCBuildConfiguration section */ 441 | 6003F5BD195388D20070C39A /* Debug */ = { 442 | isa = XCBuildConfiguration; 443 | buildSettings = { 444 | ALWAYS_SEARCH_USER_PATHS = NO; 445 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 446 | CLANG_CXX_LIBRARY = "libc++"; 447 | CLANG_ENABLE_MODULES = YES; 448 | CLANG_ENABLE_OBJC_ARC = YES; 449 | CLANG_WARN_BOOL_CONVERSION = YES; 450 | CLANG_WARN_CONSTANT_CONVERSION = YES; 451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INT_CONVERSION = YES; 455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 458 | COPY_PHASE_STRIP = NO; 459 | GCC_C_LANGUAGE_STANDARD = gnu99; 460 | GCC_DYNAMIC_NO_PIC = NO; 461 | GCC_OPTIMIZATION_LEVEL = 0; 462 | GCC_PREPROCESSOR_DEFINITIONS = ( 463 | "DEBUG=1", 464 | "$(inherited)", 465 | ); 466 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 467 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 468 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 469 | GCC_WARN_UNDECLARED_SELECTOR = YES; 470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 471 | GCC_WARN_UNUSED_FUNCTION = YES; 472 | GCC_WARN_UNUSED_VARIABLE = YES; 473 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 474 | ONLY_ACTIVE_ARCH = YES; 475 | SDKROOT = iphoneos; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | }; 478 | name = Debug; 479 | }; 480 | 6003F5BE195388D20070C39A /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ALWAYS_SEARCH_USER_PATHS = NO; 484 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 485 | CLANG_CXX_LIBRARY = "libc++"; 486 | CLANG_ENABLE_MODULES = YES; 487 | CLANG_ENABLE_OBJC_ARC = YES; 488 | CLANG_WARN_BOOL_CONVERSION = YES; 489 | CLANG_WARN_CONSTANT_CONVERSION = YES; 490 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 491 | CLANG_WARN_EMPTY_BODY = YES; 492 | CLANG_WARN_ENUM_CONVERSION = YES; 493 | CLANG_WARN_INT_CONVERSION = YES; 494 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 495 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 496 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 497 | COPY_PHASE_STRIP = YES; 498 | ENABLE_NS_ASSERTIONS = NO; 499 | GCC_C_LANGUAGE_STANDARD = gnu99; 500 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 501 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 502 | GCC_WARN_UNDECLARED_SELECTOR = YES; 503 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 504 | GCC_WARN_UNUSED_FUNCTION = YES; 505 | GCC_WARN_UNUSED_VARIABLE = YES; 506 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 507 | SDKROOT = iphoneos; 508 | TARGETED_DEVICE_FAMILY = "1,2"; 509 | VALIDATE_PRODUCT = YES; 510 | }; 511 | name = Release; 512 | }; 513 | 6003F5C0195388D20070C39A /* Debug */ = { 514 | isa = XCBuildConfiguration; 515 | baseConfigurationReference = 48BACC3E864A3EDAEE807F99 /* Pods-Segment-Amplitude_Example.debug.xcconfig */; 516 | buildSettings = { 517 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 518 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 519 | DEVELOPMENT_TEAM = ENLA8E7Z4L; 520 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 521 | GCC_PREFIX_HEADER = "Segment-Amplitude/Segment-Amplitude-Prefix.pch"; 522 | INFOPLIST_FILE = "Segment-Amplitude/Segment-Amplitude-Info.plist"; 523 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 524 | MODULE_NAME = ExampleApp; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | WRAPPER_EXTENSION = app; 527 | }; 528 | name = Debug; 529 | }; 530 | 6003F5C1195388D20070C39A /* Release */ = { 531 | isa = XCBuildConfiguration; 532 | baseConfigurationReference = C486B345483570BE35A88FBF /* Pods-Segment-Amplitude_Example.release.xcconfig */; 533 | buildSettings = { 534 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 535 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 536 | DEVELOPMENT_TEAM = ENLA8E7Z4L; 537 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 538 | GCC_PREFIX_HEADER = "Segment-Amplitude/Segment-Amplitude-Prefix.pch"; 539 | INFOPLIST_FILE = "Segment-Amplitude/Segment-Amplitude-Info.plist"; 540 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 541 | MODULE_NAME = ExampleApp; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | WRAPPER_EXTENSION = app; 544 | }; 545 | name = Release; 546 | }; 547 | 6003F5C3195388D20070C39A /* Debug */ = { 548 | isa = XCBuildConfiguration; 549 | baseConfigurationReference = 4DAE2502ABD796EA6170123D /* Pods-Segment-Amplitude_Tests.debug.xcconfig */; 550 | buildSettings = { 551 | BUNDLE_LOADER = "$(TEST_HOST)"; 552 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 553 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 554 | GCC_PREPROCESSOR_DEFINITIONS = ( 555 | "DEBUG=1", 556 | "$(inherited)", 557 | ); 558 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 559 | PRODUCT_NAME = "$(TARGET_NAME)"; 560 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Segment-Amplitude_Example.app/Segment-Amplitude_Example"; 561 | WRAPPER_EXTENSION = xctest; 562 | }; 563 | name = Debug; 564 | }; 565 | 6003F5C4195388D20070C39A /* Release */ = { 566 | isa = XCBuildConfiguration; 567 | baseConfigurationReference = 6956713238C7736D25A5F3A8 /* Pods-Segment-Amplitude_Tests.release.xcconfig */; 568 | buildSettings = { 569 | BUNDLE_LOADER = "$(TEST_HOST)"; 570 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 571 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 572 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 573 | PRODUCT_NAME = "$(TARGET_NAME)"; 574 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Segment-Amplitude_Example.app/Segment-Amplitude_Example"; 575 | WRAPPER_EXTENSION = xctest; 576 | }; 577 | name = Release; 578 | }; 579 | /* End XCBuildConfiguration section */ 580 | 581 | /* Begin XCConfigurationList section */ 582 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "Segment-Amplitude" */ = { 583 | isa = XCConfigurationList; 584 | buildConfigurations = ( 585 | 6003F5BD195388D20070C39A /* Debug */, 586 | 6003F5BE195388D20070C39A /* Release */, 587 | ); 588 | defaultConfigurationIsVisible = 0; 589 | defaultConfigurationName = Release; 590 | }; 591 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Segment-Amplitude_Example" */ = { 592 | isa = XCConfigurationList; 593 | buildConfigurations = ( 594 | 6003F5C0195388D20070C39A /* Debug */, 595 | 6003F5C1195388D20070C39A /* Release */, 596 | ); 597 | defaultConfigurationIsVisible = 0; 598 | defaultConfigurationName = Release; 599 | }; 600 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Segment-Amplitude_Tests" */ = { 601 | isa = XCConfigurationList; 602 | buildConfigurations = ( 603 | 6003F5C3195388D20070C39A /* Debug */, 604 | 6003F5C4195388D20070C39A /* Release */, 605 | ); 606 | defaultConfigurationIsVisible = 0; 607 | defaultConfigurationName = Release; 608 | }; 609 | /* End XCConfigurationList section */ 610 | }; 611 | rootObject = 6003F582195388D10070C39A /* Project object */; 612 | } 613 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude.xcodeproj/xcshareddata/xcschemes/Segment-Amplitude_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 52 | 53 | 54 | 55 | 57 | 63 | 64 | 65 | 66 | 67 | 77 | 79 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/SEGAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEGAppDelegate.h 3 | // Segment-Amplitude 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | 12 | @interface SEGAppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/SEGAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEGAppDelegate.m 3 | // Segment-Amplitude 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | #import "SEGAppDelegate.h" 10 | 11 | 12 | @implementation SEGAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | // Override point for customization after application launch. 17 | return YES; 18 | } 19 | 20 | - (void)applicationWillResignActive:(UIApplication *)application 21 | { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 | } 25 | 26 | - (void)applicationDidEnterBackground:(UIApplication *)application 27 | { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | - (void)applicationWillEnterForeground:(UIApplication *)application 33 | { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application 38 | { 39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 40 | } 41 | 42 | - (void)applicationWillTerminate:(UIApplication *)application 43 | { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/SEGViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SEGViewController.h 3 | // Segment-Amplitude 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | 12 | @interface SEGViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/SEGViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SEGViewController.m 3 | // Segment-Amplitude 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | #import "SEGViewController.h" 10 | 11 | 12 | @interface SEGViewController () 13 | 14 | @end 15 | 16 | 17 | @implementation SEGViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | } 24 | 25 | - (void)didReceiveMemoryWarning 26 | { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/Segment-Amplitude-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/Segment-Amplitude-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Segment-Amplitude/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Segment-Amplitude 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "SEGAppDelegate.h" 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | @autoreleasepool 15 | { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SEGAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Tests/TestSetupBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestSetupBlock.m 3 | // Segment-Amplitude_Tests 4 | // 5 | // Created by Brandon Sneed on 9/23/20. 6 | // Copyright © 2020 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "SEGAmplitudeIntegrationFactory.h" 12 | 13 | @interface TestSetupBlock : XCTestCase 14 | 15 | @end 16 | 17 | @implementation TestSetupBlock 18 | 19 | - (void)setUp { 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | } 26 | 27 | - (void)testSetupBlockCalled { 28 | __block Amplitude *amp = nil; 29 | 30 | SEGAmplitudeIntegrationFactory *factory = [SEGAmplitudeIntegrationFactory instanceWithSetupBlock:^(Amplitude *amplitude) { 31 | amp = amplitude; 32 | amplitude.adSupportBlock = ^NSString * _Nonnull{ 33 | return @"1234"; 34 | }; 35 | amplitude.locationInfoBlock = ^NSDictionary * _Nullable{ 36 | return @{ 37 | @"lat" : @37.7, 38 | @"lng" : @122.4 39 | }; 40 | }; 41 | }]; 42 | 43 | SEGAnalytics *analytics = [[SEGAnalytics alloc] init]; 44 | SEGAmplitudeIntegration *integration = [factory createWithSettings:@{} forAnalytics:analytics]; 45 | 46 | XCTAssertTrue(amp != nil); 47 | XCTAssertTrue(amp.adSupportBlock != nil); 48 | XCTAssertTrue(amp.locationInfoBlock != nil); 49 | 50 | NSString *idfa = amp.adSupportBlock(); 51 | NSDictionary *location = amp.locationInfoBlock(); 52 | 53 | XCTAssertTrue([idfa isEqualToString:@"1234"]); 54 | XCTAssertTrue([[location objectForKey:@"lat"] isEqual:@37.7]); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | #import 6 | #import 7 | #import 8 | #import 9 | #import 10 | #import 11 | #endif 12 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // Segment-AmplitudeTests.m 3 | // Segment-AmplitudeTests 4 | // 5 | // Created by Prateek Srivastava on 11/10/2015. 6 | // Copyright (c) 2015 Prateek Srivastava. All rights reserved. 7 | // 8 | 9 | // https://github.com/Specta/Specta 10 | 11 | SpecBegin(InitialSpecs); 12 | 13 | 14 | describe(@"SEGAmplitudeIntegrationFactory", ^{ 15 | it(@"factory creates integration with basic settings", ^{ 16 | SEGAmplitudeIntegration *integration = [[SEGAmplitudeIntegrationFactory instance] createWithSettings:@{ 17 | @"apiKey" : @"1234" 18 | } forAnalytics:nil]; 19 | expect(integration.settings).to.equal(@{ @"apiKey" : @"1234" }); 20 | 21 | }); 22 | 23 | it(@"factory creates integration with trackSessionEvents", ^{ 24 | SEGAmplitudeIntegration *integration = [[SEGAmplitudeIntegrationFactory instance] createWithSettings:@{ 25 | @"apiKey" : @"1234", 26 | @"trackSessionEvents" : @true 27 | } forAnalytics:nil]; 28 | expect(integration.settings).to.equal(@{ @"apiKey" : @"1234", 29 | @"trackSessionEvents" : @true }); 30 | }); 31 | }); 32 | 33 | describe(@"SEGAmplitudeIntegration", ^{ 34 | 35 | __block Amplitude *amplitude; 36 | __block SEGAmplitudeIntegration *integration; 37 | __block AMPRevenue *amprevenue; 38 | __block AMPIdentify *identify; 39 | 40 | beforeEach(^{ 41 | amplitude = mock([Amplitude class]); 42 | amprevenue = mock([AMPRevenue class]); 43 | identify = mock([AMPIdentify class]); 44 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{} andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 45 | }); 46 | 47 | describe(@"Identify", ^{ 48 | 49 | it(@"identify without traits", ^{ 50 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"traitsToIncrement" : [NSNull null], 51 | @"traitsToSetOnce" : [NSNull null] } 52 | andAmplitude:amplitude 53 | andAmpRevenue:amprevenue 54 | andAmpIdentify:identify 55 | setupBlock:nil]; 56 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"1111" anonymousId:nil traits:@{} context:@{} integrations:@{}]; 57 | 58 | [integration identify:payload]; 59 | [verify(amplitude) setUserId:@"1111"]; 60 | }); 61 | 62 | it(@"identify with traits", ^{ 63 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"traitsToIncrement" : @[], 64 | @"traitsToSetOnce" : @[] } 65 | andAmplitude:amplitude 66 | andAmpRevenue:amprevenue 67 | andAmpIdentify:identify 68 | setupBlock:nil]; 69 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"7891" anonymousId:nil traits:@{ 70 | @"name" : @"George Costanza", 71 | @"gender" : @"male", 72 | @"quality" : @"unstable", 73 | @"age" : @47 74 | } context:@{} 75 | integrations:@{}]; 76 | [integration identify:payload]; 77 | [verify(amplitude) setUserProperties:payload.traits]; 78 | }); 79 | 80 | it(@"identify with groups", ^{ 81 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"7891" anonymousId:nil traits:@{ 82 | @"name" : @"Elaine Marie Benes", 83 | @"gender" : @"female", 84 | @"quality" : @"assertiveness", 85 | @"age" : @36 86 | } context:@{} integrations:@{ @"Amplitude" : @{ 87 | @"groups" : @{ 88 | @"jobs" : @[ @"Pendant Publishing" ] 89 | } 90 | } }]; 91 | [integration identify:payload]; 92 | [verify(amplitude) setGroup:@"jobs" groupName:@[ @"Pendant Publishing" ]]; 93 | }); 94 | 95 | it(@"increments identify trait", ^{ 96 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"traitsToIncrement" : @[ @"karma", @"store_credit" ] } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 97 | 98 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"3290842" anonymousId:nil traits:@{ @"karma" : @0.23, 99 | @"store_credit" : @20, 100 | @"gender" : @"female" } 101 | context:@{} 102 | integrations:@{}]; 103 | 104 | [integration identify:payload]; 105 | [verify(amplitude) identify:[identify add:@"karma" value:@0.23]]; 106 | [verify(amplitude) identify:[identify add:@"store_credit" value:@20]]; 107 | [verify(amplitude) identify:[identify set:@"gender" value:@"female"]]; 108 | }); 109 | 110 | it(@"sets identify trait once", ^{ 111 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"traitsToSetOnce" : @[ @"sign_up_date" ] } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 112 | 113 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"3290842" anonymousId:nil traits:@{ @"sign_up_date" : @"2015-08-24", 114 | @"city" : @"los angeles" } 115 | context:@{} 116 | integrations:@{}]; 117 | 118 | [integration identify:payload]; 119 | [verify(amplitude) identify:[identify setOnce:@"sign_up_date" value:@"2015-08-24"]]; 120 | [verify(amplitude) identify:[identify set:@"city" value:@"los angeles"]]; 121 | }); 122 | 123 | it(@"sets identify trait once and increments trait", ^{ 124 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"traitsToSetOnce" : @[ @"birthdate" ], 125 | @"traitsToIncrement" : @[ @"age" ] } 126 | andAmplitude:amplitude 127 | andAmpRevenue:amprevenue 128 | andAmpIdentify:identify 129 | setupBlock:nil]; 130 | 131 | SEGIdentifyPayload *payload = [[SEGIdentifyPayload alloc] initWithUserId:@"3290842" anonymousId:nil traits:@{ @"address" : @{ 132 | @"street" : @"California st", 133 | @"city" : @"San Francisco" 134 | }, 135 | @"birthdate" : @"1989-07-10", 136 | @"name" : @"ladan", 137 | @"age" : @28 } 138 | context:@{} 139 | integrations:@{}]; 140 | 141 | [integration identify:payload]; 142 | [verify(amplitude) identify:[identify setOnce:@"birthdate" value:@"1989-07-10"]]; 143 | [verify(amplitude) identify:[identify add:@"age" value:@28]]; 144 | [verify(amplitude) identify:[identify set:@"name" value:@"ladan"]]; 145 | [verify(amplitude) identify:[identify set:@"address" value:@{ 146 | @"street" : @"California st", 147 | @"city" : @"San Francisco" 148 | }]]; 149 | }); 150 | 151 | }); 152 | 153 | describe(@"Screen", ^{ 154 | it(@"does not call screen if trackAllPages = false", ^{ 155 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"trackAllPages" : @false } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 156 | 157 | SEGScreenPayload *payload = [[SEGScreenPayload alloc] initWithName:@"Shirts" properties:@{} context:@{} integrations:@{}]; 158 | [integration screen:payload]; 159 | [verifyCount(amplitude, never()) logEvent:@"Viewed Shirts Screen" withEventProperties:@{}]; 160 | }); 161 | 162 | it(@"trackAllPages", ^{ 163 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"trackAllPages" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 164 | 165 | SEGScreenPayload *payload = [[SEGScreenPayload alloc] initWithName:@"Shirts" properties:@{} context:@{} integrations:@{}]; 166 | [integration screen:payload]; 167 | [verify(amplitude) logEvent:@"Viewed Shirts Screen" withEventProperties:@{} withGroups:nil outOfSession:false]; 168 | }); 169 | 170 | it(@"trackAllPagesV2", ^{ 171 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"trackAllPagesV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 172 | 173 | SEGScreenPayload *payload = [[SEGScreenPayload alloc] initWithName:@"Shirts" properties:@{ @"url" : @"seinfeld.wikia.com/wiki/The_Puffy_Shirt", 174 | @"Feed Type" : @"private" } 175 | context:@{} 176 | integrations:@{}]; 177 | [integration screen:payload]; 178 | [verify(amplitude) logEvent:@"Loaded a Screen" withEventProperties:@{ @"name" : @"Shirts", 179 | @"url" : @"seinfeld.wikia.com/wiki/The_Puffy_Shirt", 180 | @"Feed Type" : @"private" } withGroups:nil outOfSession:false]; 181 | }); 182 | 183 | }); 184 | 185 | describe(@"Group", ^{ 186 | it(@"sets groupId", ^{ 187 | SEGGroupPayload *payload = [[SEGGroupPayload alloc] initWithGroupId:@"322" traits:@{} context:@{} integrations:@{}]; 188 | [integration group:payload]; 189 | [verify(amplitude) setGroup:@"322" groupName:@"[Segment] Group"]; 190 | }); 191 | 192 | it(@"settings.groupTypeValue and settings.groupTypeTrait", ^{ 193 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"groupTypeValue" : @"company", 194 | @"groupTypeTrait" : @"industry" } 195 | andAmplitude:amplitude 196 | andAmpRevenue:amprevenue 197 | andAmpIdentify:identify 198 | setupBlock:nil]; 199 | SEGGroupPayload *payload = [[SEGGroupPayload alloc] initWithGroupId:@"32423084" traits:@{ 200 | @"company" : @"Segment", 201 | @"industry" : @"Technology" 202 | } 203 | context:@{} 204 | integrations:@{}]; 205 | [integration group:payload]; 206 | [verify(amplitude) setGroup:@"Segment" groupName:@"Technology"]; 207 | }); 208 | 209 | it(@"sets group name with traits.name", ^{ 210 | SEGGroupPayload *payload = [[SEGGroupPayload alloc] initWithGroupId:@"12342" traits:@{ @"name" : @"Segment" } context:@{} integrations:@{}]; 211 | [integration group:payload]; 212 | [verify(amplitude) setGroup:@"12342" groupName:@"Segment"]; 213 | }); 214 | }); 215 | 216 | describe(@"Flush", ^{ 217 | it(@"calls uploadEvents", ^{ 218 | [integration flush]; 219 | [verify(amplitude) uploadEvents]; 220 | }); 221 | }); 222 | 223 | describe(@"Reset", ^{ 224 | it(@"calls regenerateDeviceId", ^{ 225 | [integration reset]; 226 | [verify(amplitude) setUserId:nil]; 227 | [verify(amplitude) regenerateDeviceId]; 228 | }); 229 | }); 230 | 231 | describe(@"Track", ^{ 232 | it(@"tracks a basic event without props", ^{ 233 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Email Sent" properties:@{} context:@{} integrations:@{}]; 234 | 235 | [integration track:payload]; 236 | [verify(amplitude) logEvent:@"Email Sent" withEventProperties:@{} withGroups:nil outOfSession:false]; 237 | }); 238 | 239 | it(@"tracks a basic event with props", ^{ 240 | NSDictionary *props = @{ 241 | @"Color" : @"White", 242 | @"Type" : @"like the pirates used to wear" 243 | }; 244 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Viewed Puffy Shirt" 245 | properties:props 246 | context:@{} 247 | integrations:@{}]; 248 | 249 | [integration track:payload]; 250 | [verify(amplitude) logEvent:@"Viewed Puffy Shirt" withEventProperties:props withGroups:nil outOfSession:false]; 251 | 252 | }); 253 | 254 | it(@"tracks a basic event with groups", ^{ 255 | NSDictionary *props = @{ 256 | @"url" : @"seinfeld.wikia.com/wiki/The_Puffy_Shirt" 257 | }; 258 | 259 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Sent Product Link" properties:props context:@{} integrations:@{ @"Amplitude" : @{@"groups" : @{@"jobs" : @[ @"Pendant Publishing" ]}} }]; 260 | [integration track:payload]; 261 | [verify(amplitude) logEvent:@"Sent Product Link" withEventProperties:props withGroups:@{ @"jobs" : @[ @"Pendant Publishing" ] } outOfSession:false]; 262 | }); 263 | 264 | it(@"doesn't track group if not NSDictionary", ^{ 265 | NSDictionary *props = @{ 266 | @"url" : @"seinfeld.wikia.com/wiki/The_Puffy_Shirt" 267 | }; 268 | 269 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Sent Product Link" properties:props context:@{} integrations:@{ @"Amplitude" : @{@"groups" : @"jobs"} }]; 270 | [integration track:payload]; 271 | [verify(amplitude) logEvent:@"Sent Product Link" withEventProperties:props withGroups:nil outOfSession:false]; 272 | }); 273 | 274 | it(@"tracks an event with groups and outOfSession", ^{ 275 | NSDictionary *props = @{ 276 | @"order_number" : @34294 277 | }; 278 | 279 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Order Delivered" properties:props context:@{} integrations:@{ @"Amplitude" : @{@"groups" : @{@"Buroughs" : @[ @"Brooklyn", @"Manhattan" ]}, @"outOfSession" : @YES} }]; 280 | [integration track:payload]; 281 | [verify(amplitude) logEvent:@"Order Delivered" withEventProperties:props withGroups:@{ @"Buroughs" : @[ @"Brooklyn", @"Manhattan" ] } outOfSession:true]; 282 | }); 283 | 284 | it(@"tracks an event with groups and outOfSession", ^{ 285 | NSDictionary *props = @{ 286 | @"reminder" : @"drink water" 287 | }; 288 | 289 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Reminder Sent" properties:props context:@{} integrations:@{ @"Amplitude" : @{@"outOfSession" : @YES} }]; 290 | [integration track:payload]; 291 | [verify(amplitude) logEvent:@"Reminder Sent" withEventProperties:props withGroups:nil outOfSession:true]; 292 | }); 293 | 294 | 295 | it(@"tracks Order Completed with revenue if both total and revenue are present", ^{ 296 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"useLogRevenueV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 297 | 298 | NSDictionary *props = @{ 299 | @"checkout_id" : @"9bcf000000000000", 300 | @"order_id" : @"50314b8e", 301 | @"affiliation" : @"App Store", 302 | @"total" : @30.45, 303 | @"shipping" : @5.05, 304 | @"tax" : @1.20, 305 | @"currency" : @"USD", 306 | @"category" : @"Games", 307 | @"revenue" : @8, 308 | @"products" : @{ 309 | @"product_id" : @"2013294", 310 | @"category" : @"Games", 311 | @"name" : @"Monopoly: 3rd Edition", 312 | @"brand" : @"Hasbros", 313 | @"price" : @"21.99", 314 | @"quantity" : @"1" 315 | } 316 | }; 317 | 318 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Order Completed" properties:props context:@{} 319 | integrations:@{}]; 320 | 321 | [integration track:payload]; 322 | [[verify(amprevenue) setPrice:@8] setQuantity:1]; 323 | [verify(amprevenue) setEventProperties:props]; 324 | [verify(amplitude) logRevenueV2:amprevenue]; 325 | }); 326 | 327 | it(@"tracks Order Completed with total if revenue is not present", ^{ 328 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"useLogRevenueV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 329 | 330 | NSDictionary *props = @{ 331 | @"checkout_id" : @"9bcf000000000000", 332 | @"order_id" : @"50314b8e", 333 | @"affiliation" : @"App Store", 334 | @"total" : @30.45, 335 | @"shipping" : @5.05, 336 | @"tax" : @1.20, 337 | @"currency" : @"USD", 338 | @"category" : @"Games", 339 | @"products" : @{ 340 | @"product_id" : @"2013294", 341 | @"category" : @"Games", 342 | @"name" : @"Monopoly: 3rd Edition", 343 | @"brand" : @"Hasbros", 344 | @"price" : @"21.99", 345 | @"quantity" : @"1" 346 | } 347 | }; 348 | 349 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Order Completed" properties:props 350 | context:@{} 351 | integrations:@{}]; 352 | 353 | [integration track:payload]; 354 | [[verify(amprevenue) setPrice:@30.45] setQuantity:1]; 355 | [verify(amprevenue) setEventProperties:props]; 356 | [verify(amplitude) logRevenueV2:amprevenue]; 357 | }); 358 | 359 | it(@"tracks Order Completed with revenue of type String", ^{ 360 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"useLogRevenueV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 361 | 362 | NSDictionary *props = @{ 363 | @"checkout_id" : @"9bcf000000000000", 364 | @"order_id" : @"50314b8e", 365 | @"affiliation" : @"App Store", 366 | @"total" : @30.45, 367 | @"shipping" : @5.05, 368 | @"tax" : @1.20, 369 | @"currency" : @"USD", 370 | @"category" : @"Games", 371 | @"revenue" : @"8", 372 | @"products" : @{ 373 | @"product_id" : @"2013294", 374 | @"category" : @"Games", 375 | @"name" : @"Monopoly: 3rd Edition", 376 | @"brand" : @"Hasbros", 377 | @"price" : @"21.99", 378 | @"quantity" : @"1" 379 | } 380 | }; 381 | 382 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Order Completed" properties:props context:@{} 383 | integrations:@{}]; 384 | 385 | [integration track:payload]; 386 | [[verify(amprevenue) setPrice:@8] setQuantity:1]; 387 | [verify(amprevenue) setEventProperties:props]; 388 | [verify(amplitude) logRevenueV2:amprevenue]; 389 | }); 390 | 391 | // NOTE: This is against our spec. We do not have a v1/v2 ECommerce event that sends both revenue and price/quantity as a tope level property 392 | it(@"tracks with top level price and quantity", ^{ 393 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"useLogRevenueV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 394 | 395 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Viewed Product" properties:@{ 396 | @"revenue" : @20.99, 397 | @"id" : @"507f1f77bcf86cd799439011", 398 | @"sku" : @"G-32", 399 | @"name" : @"Monopoly: 3rd Edition", 400 | @"price" : @18.9, 401 | @"category" : @"Games", 402 | @"quantity" : @"1" 403 | } 404 | context:@{} 405 | integrations:@{}]; 406 | 407 | [integration track:payload]; 408 | [[verify(amprevenue) setPrice:@18.9] setQuantity:1]; 409 | [verify(amplitude) logRevenueV2:amprevenue]; 410 | }); 411 | 412 | it(@"tracks Amplitude ecommerce fields", ^{ 413 | integration = [[SEGAmplitudeIntegration alloc] initWithSettings:@{ @"useLogRevenueV2" : @true } andAmplitude:amplitude andAmpRevenue:amprevenue andAmpIdentify:identify setupBlock:nil]; 414 | 415 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Viewed Product" properties:@{ 416 | @"revenue" : @20.00, 417 | @"product_id" : @"507f1f77bcf86cd799439011", 418 | @"receipt" : @"172038", 419 | @"revenue_type" : @"Sales", 420 | @"price" : @18.9, 421 | @"category" : @"Games" 422 | } 423 | context:@{} 424 | integrations:@{}]; 425 | 426 | [integration track:payload]; 427 | [[verify(amprevenue) setPrice:@18.9] setQuantity:1]; 428 | [verify(amprevenue) setProductIdentifier:@"507f1f77bcf86cd799439011"]; 429 | [verify(amprevenue) setReceipt:@"172038"]; 430 | [verify(amprevenue) setRevenueType:@"Sales"]; 431 | [verify(amplitude) logRevenueV2:amprevenue]; 432 | }); 433 | 434 | it(@"fallsback to logRevenue v1", ^{ 435 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Viewed Product" properties:@{ 436 | @"revenue" : @20.00, 437 | @"product_id" : @"507f1f77bcf86cd799439011", 438 | @"receipt" : @"172038", 439 | @"revenue_type" : @"Sales", 440 | @"price" : @18.9, 441 | @"category" : @"Games", 442 | @"quantity" : @4 443 | } 444 | context:@{} 445 | integrations:@{}]; 446 | 447 | [integration track:payload]; 448 | [verify(amplitude) logRevenue:@"507f1f77bcf86cd799439011" 449 | quantity:4 450 | price:@20.00 451 | receipt:@"172038"]; 452 | 453 | }); 454 | 455 | it(@"fallsback to logRevenue v1 with default values", ^{ 456 | SEGTrackPayload *payload = [[SEGTrackPayload alloc] initWithEvent:@"Viewed Product" properties:@{ 457 | @"revenue" : @20.00 458 | } 459 | context:@{} 460 | integrations:@{}]; 461 | 462 | [integration track:payload]; 463 | [verify(amplitude) logRevenue:nil 464 | quantity:1 465 | price:@20.00 466 | receipt:nil]; 467 | 468 | }); 469 | 470 | }); 471 | 472 | }); 473 | 474 | SpecEnd 475 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Segment.io, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SDK ?= "iphonesimulator" 2 | DESTINATION ?= "platform=iOS Simulator,name=iPhone 11" 3 | PROJECT := Segment-Amplitude 4 | XC_ARGS := -scheme $(PROJECT)_Example -workspace Example/$(PROJECT).xcworkspace -sdk $(SDK) -destination $(DESTINATION) ONLY_ACTIVE_ARCH=NO 5 | 6 | install: Example/Podfile $(PROJECT).podspec 7 | pod update --project-directory=Example 8 | 9 | lint: 10 | pod lib lint --allow-warnings 11 | 12 | clean: 13 | set -o pipefail && xcodebuild $(XC_ARGS) clean | xcpretty 14 | 15 | build: 16 | set -o pipefail && xcodebuild $(XC_ARGS) | xcpretty 17 | 18 | test: 19 | set -o pipefail && xcodebuild test $(XC_ARGS) | xcpretty --report junit 20 | 21 | .PHONY: install clean build test 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Segment_Amplitude", 7 | platforms: [ 8 | .iOS(.v10), 9 | .tvOS(.v9), 10 | .macOS(.v10_10) 11 | ], 12 | products: [ 13 | .library(name: "Segment_Amplitude", targets: ["Segment_Amplitude"]), 14 | ], 15 | dependencies: [ 16 | .package(name: "Amplitude", url: "https://github.com/amplitude/Amplitude-iOS", .upToNextMinor(from: "8.3.1")), 17 | .package(name: "Segment", url: "https://github.com/segmentio/analytics-ios", .upToNextMinor(from: "4.1.4")) 18 | ], 19 | targets: [ 20 | .target( 21 | name: "Segment_Amplitude", 22 | dependencies: ["Amplitude", "Segment"], 23 | path: "Pod", 24 | publicHeadersPath: "Classes"), 25 | ] 26 | ) 27 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segment-integrations/analytics-ios-integration-amplitude/107a08433e65fc52030a2eb683cadbdd51df4eef/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segment-integrations/analytics-ios-integration-amplitude/107a08433e65fc52030a2eb683cadbdd51df4eef/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/SEGAmplitudeIntegration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if defined(__has_include) && __has_include() 4 | #import 5 | #elif defined(__has_include) && __has_include() 6 | #import 7 | #elif defined(__has_include) && __has_include() 8 | #import 9 | #else 10 | #import "SEGAnalytics.h" 11 | #endif 12 | 13 | #if defined(__has_include) && __has_include() 14 | #import 15 | #elif defined(__has_include) && __has_include() 16 | #import 17 | #elif defined(__has_include) && __has_include() 18 | #import 19 | #else 20 | #import "Amplitude.h" 21 | #endif 22 | 23 | typedef void(^SEGAmplitudeSetupBlock)(Amplitude *amplitude); 24 | 25 | @interface SEGAmplitudeIntegration : NSObject 26 | 27 | @property (nonatomic, strong) NSDictionary *settings; 28 | @property (strong) Amplitude *amplitude; 29 | @property (strong) AMPRevenue *amprevenue; 30 | @property AMPIdentify *identify; 31 | @property NSSet *traitsToIncrement; 32 | @property NSSet *traitsToSetOnce; 33 | 34 | - (id)initWithSettings:(NSDictionary *)settings setupBlock:(SEGAmplitudeSetupBlock)setupBlock; 35 | - (id)initWithSettings:(NSDictionary *)settings andAmplitude:(Amplitude *)amplitude andAmpRevenue:(AMPRevenue *)amprevenue andAmpIdentify:(AMPIdentify *)identify setupBlock:(SEGAmplitudeSetupBlock)setupBlock; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Pod/Classes/SEGAmplitudeIntegration.m: -------------------------------------------------------------------------------- 1 | #import "SEGAmplitudeIntegration.h" 2 | #if defined(__has_include) && __has_include() 3 | #import 4 | #elif defined(__has_include) && __has_include() 5 | #import 6 | #import 7 | #elif defined(__has_include) && __has_include() 8 | #import 9 | #import 10 | #else 11 | #import "SEGAnalyticsUtils.h" 12 | #import "SEGAnalytics.h" 13 | #endif 14 | 15 | 16 | @implementation SEGAmplitudeIntegration 17 | 18 | - (id)initWithSettings:(NSDictionary *)settings setupBlock:(SEGAmplitudeSetupBlock)setupBlock 19 | { 20 | return [self initWithSettings:settings andAmplitude:[Amplitude instance] andAmpRevenue:[AMPRevenue revenue] andAmpIdentify:[AMPIdentify identify] setupBlock:setupBlock]; 21 | } 22 | 23 | - (id)initWithSettings:(NSDictionary *)settings andAmplitude:(Amplitude *)amplitude andAmpRevenue:(AMPRevenue *)amprevenue andAmpIdentify:(AMPIdentify *)identify setupBlock:(SEGAmplitudeSetupBlock)setupBlock 24 | { 25 | if (self = [super init]) { 26 | self.settings = settings; 27 | self.amplitude = amplitude; 28 | self.amprevenue = amprevenue; 29 | self.identify = identify; 30 | if (self.settings[@"traitsToIncrement"] != (id)[NSNull null]) { 31 | self.traitsToIncrement = [NSSet setWithArray:self.settings[@"traitsToIncrement"]]; 32 | } 33 | 34 | if (self.settings[@"traitsToSetOnce"] != (id)[NSNull null]) { 35 | self.traitsToSetOnce = [NSSet setWithArray:self.settings[@"traitsToSetOnce"]]; 36 | } 37 | 38 | // NOTE: As of Amplitude-iOS 7.0.1, this is no longer available. A callback is used instead. 39 | 40 | // Amplitude states that if you want location tracking disabled on startup of the app, 41 | // Call before initializing the apiKey 42 | /*if ([(NSNumber *)self.settings[@"enableLocationListening"] boolValue]) { 43 | [self.amplitude enableLocationListening]; 44 | SEGLog(@"[Ampltidue enableLocationListening]"); 45 | } else { 46 | [self.amplitude disableLocationListening]; 47 | SEGLog(@"[Ampltidue disableLocationListening]"); 48 | }*/ 49 | 50 | NSString *apiKey = self.settings[@"apiKey"]; 51 | [self.amplitude initializeApiKey:apiKey]; 52 | SEGLog(@"[Amplitude initializeApiKey:%@]", apiKey); 53 | 54 | if ([(NSNumber *)self.settings[@"trackSessionEvents"] boolValue]) { 55 | self.amplitude.trackingSessionEvents = true; 56 | SEGLog(@"[Amplitude.trackingSessionEvents = true]"); 57 | } 58 | 59 | if ([(NSNumber *)self.settings[@"useAdvertisingIdForDeviceId"] boolValue]) { 60 | [self.amplitude useAdvertisingIdForDeviceId]; 61 | } 62 | 63 | if (setupBlock != nil) { 64 | setupBlock(self.amplitude); 65 | } 66 | } 67 | return self; 68 | } 69 | 70 | + (NSNumber *)extractRevenueOrTotal:(NSDictionary *)dictionary withRevenueKey:(NSString *)revenueKey andTotalKey:(NSString *)totalKey 71 | { 72 | id revenueOrTotal = nil; 73 | 74 | for (NSString *key in dictionary.allKeys) { 75 | // This may not be optimal, but we want to ensure that revenue is set if both total and revenue are present 76 | if ([key caseInsensitiveCompare:revenueKey] == NSOrderedSame) { 77 | revenueOrTotal = dictionary[key]; 78 | break; 79 | } 80 | 81 | if ([key caseInsensitiveCompare:totalKey] == NSOrderedSame) { 82 | revenueOrTotal = dictionary[key]; 83 | // We want revenue to be used in cases where both total and revenue are present, 84 | // so we want to continue checking for revenue even if revenueOrTotal is set to the total value 85 | } 86 | } 87 | 88 | if (revenueOrTotal) { 89 | if ([revenueOrTotal isKindOfClass:[NSString class]]) { 90 | // Format the revenue. 91 | NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; 92 | [formatter setNumberStyle:NSNumberFormatterDecimalStyle]; 93 | return [formatter numberFromString:revenueOrTotal]; 94 | } else if ([revenueOrTotal isKindOfClass:[NSNumber class]]) { 95 | return revenueOrTotal; 96 | } 97 | } 98 | return nil; 99 | } 100 | 101 | - (void)identify:(SEGIdentifyPayload *)payload 102 | { 103 | [self.amplitude setUserId:payload.userId]; 104 | SEGLog(@"[Amplitude setUserId:%@]", payload.userId); 105 | 106 | if ([self.traitsToIncrement count] > 0 || [self.traitsToSetOnce count] > 0) { 107 | [self incrementOrSetTraits:payload.traits]; 108 | } else { 109 | [self.amplitude setUserProperties:payload.traits]; 110 | SEGLog(@"[Amplitude setUserProperties:%@]", payload.traits); 111 | } 112 | 113 | 114 | NSDictionary *options = payload.integrations[@"Amplitude"]; 115 | NSDictionary *groups = [options isKindOfClass:[NSDictionary class]] ? options[@"groups"] : nil; 116 | if (groups && [groups isKindOfClass:[NSDictionary class]]) { 117 | [groups enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL *_Nonnull stop) { 118 | [self.amplitude setGroup:[NSString stringWithFormat:@"%@", key] groupName:obj]; 119 | SEGLog(@"[Amplitude setGroup:%@ groupName:%@];", [NSString stringWithFormat:@"%@", key], obj); 120 | }]; 121 | } 122 | } 123 | 124 | - (void)realTrack:(NSString *)event properties:(NSDictionary *)properties integrations:(NSDictionary *)integrations 125 | { 126 | __block NSDictionary *groups; 127 | __block bool outOfSession = false; 128 | 129 | NSDictionary *options = integrations[@"Amplitude"]; 130 | if ([options isKindOfClass:[NSDictionary class]]) { 131 | groups = [options[@"groups"] isKindOfClass:[NSDictionary class]] ? options[@"groups"] : nil; 132 | outOfSession = [options[@"outOfSession"] boolValue]; 133 | } 134 | 135 | [self.amplitude logEvent:event withEventProperties:properties withGroups:groups outOfSession:outOfSession]; 136 | SEGLog(@"[Amplitude logEvent:%@ withEventProperties:%@ withGroups:%@ outOfSession:true];", event, properties, groups); 137 | 138 | // Track revenue. If revenue is not present fallback on total 139 | NSNumber *revenueOrTotal = [SEGAmplitudeIntegration extractRevenueOrTotal:properties withRevenueKey:@"revenue" andTotalKey:@"total"]; 140 | if (revenueOrTotal) { 141 | [self trackLogRevenueV2:properties andRevenueOrTotal:revenueOrTotal]; 142 | } 143 | } 144 | 145 | - (void)trackLogRevenueV2:(NSDictionary *)properties andRevenueOrTotal:(NSNumber *)revenueOrTotal 146 | { 147 | NSNumber *price = properties[@"price"] ?: revenueOrTotal; 148 | NSNumber *quantity = properties[@"quantity"] ?: [NSNumber numberWithInt:1]; 149 | [[self.amprevenue setPrice:price] setQuantity:[quantity integerValue]]; 150 | SEGLog(@"[[AMPRevenue revenue] setPrice:%@] setQuantity: %d];", price, [quantity integerValue]); 151 | 152 | NSString *productId = properties[@"productId"] ?: properties[@"product_id"]; 153 | if (productId && ![productId isEqualToString:@""]) { 154 | [self.amprevenue setProductIdentifier:productId]; 155 | SEGLog(@"[[AMPRevenue revenue] setProductIdentifier:%@];", productId); 156 | } 157 | 158 | // Amplitude throws a warning that receipt is meant to be of type NSData. Previously, Segment checked for only type NSString. For backwards capability, removed the check 159 | id receipt = properties[@"receipt"]; 160 | if (receipt) { 161 | [self.amprevenue setReceipt:receipt]; 162 | SEGLog(@"[[AMPRevenue revenue] setReceipt:%@];", receipt); 163 | } 164 | 165 | NSString *revenueType = properties[@"revenueType"] ?: properties[@"revenue_type"]; 166 | if (revenueType && ![revenueType isEqualToString:@""]) { 167 | [self.amprevenue setRevenueType:revenueType]; 168 | SEGLog(@"[AMPRevenue revenue] setRevenueType:%@];", revenueType); 169 | } 170 | 171 | [self.amprevenue setEventProperties:properties]; 172 | SEGLog(@"[AMPRevenue revenue] setEventProperties:%@];", properties); 173 | 174 | [self.amplitude logRevenueV2:self.amprevenue]; 175 | SEGLog(@"[Amplitude logRevenueV2:%@];", self.amprevenue); 176 | } 177 | 178 | - (void)track:(SEGTrackPayload *)payload 179 | { 180 | [self realTrack:payload.event properties:payload.properties integrations:payload.integrations]; 181 | } 182 | 183 | - (void)screen:(SEGScreenPayload *)payload 184 | { 185 | if ([(NSNumber *)[self.settings objectForKey:@"trackAllPagesV2"] boolValue]) { 186 | NSMutableDictionary *payloadProps = [NSMutableDictionary dictionaryWithDictionary:payload.properties]; 187 | [payloadProps setValue:payload.name forKey:@"name"]; 188 | [self realTrack:@"Loaded a Screen" properties:payloadProps integrations:payload.integrations]; 189 | return; 190 | } 191 | 192 | // Deprecated. 193 | if ([(NSNumber *)self.settings[@"trackAllPages"] boolValue]) { 194 | NSString *event = [[NSString alloc] initWithFormat:@"Viewed %@ Screen", payload.name]; 195 | [self realTrack:event properties:payload.properties integrations:payload.integrations]; 196 | } 197 | } 198 | 199 | - (void)group:(SEGGroupPayload *)payload 200 | { 201 | NSString *groupTypeTrait = self.settings[@"groupTypeTrait"]; 202 | NSString *groupTypeValue = self.settings[@"groupValueTrait"]; 203 | NSString *groupName = payload.traits[groupTypeTrait]; 204 | NSString *groupValue = payload.traits[groupTypeValue]; 205 | 206 | if (!groupName || !groupValue) { 207 | groupName = payload.traits[@"name"] ?: @"[Segment] Group"; 208 | groupValue = payload.groupId; 209 | } 210 | 211 | [self.amplitude setGroup:groupName groupName:groupValue]; 212 | SEGLog(@"[Amplitude setGroup:%@ groupName:%@]", groupValue, groupName); 213 | } 214 | 215 | - (void)flush 216 | { 217 | [self.amplitude uploadEvents]; 218 | SEGLog(@"[Amplitude uploadEvents]"); 219 | } 220 | 221 | - (void)reset 222 | { 223 | [self.amplitude setUserId:nil]; 224 | SEGLog(@"[Amplitude setUserId:nil"); 225 | 226 | [self.amplitude regenerateDeviceId]; 227 | SEGLog(@"[Amplitude regnerateDeviceId];"); 228 | 229 | self.identify = [AMPIdentify identify]; 230 | SEGLog(@"[Amplitude reset identify];"); 231 | } 232 | 233 | #pragma utils 234 | 235 | - (void)incrementOrSetTraits:(NSDictionary *)traits 236 | { 237 | for (NSString *trait in traits) { 238 | id value = [traits valueForKey:trait]; 239 | if ([self.traitsToIncrement member:trait]) { 240 | [self.amplitude identify:[self.identify add:trait value:value]]; 241 | SEGLog(@"[Amplitude add:%@ value:%@]", trait, value); 242 | } else if ([self.traitsToSetOnce member:trait]) { 243 | [self.amplitude identify:[self.identify setOnce:trait value:value]]; 244 | } else { 245 | [self.amplitude identify:[self.identify set:trait value:value]]; 246 | SEGLog(@"[Amplitude set:%@ value:%@]", trait, value); 247 | } 248 | } 249 | } 250 | 251 | @end 252 | -------------------------------------------------------------------------------- /Pod/Classes/SEGAmplitudeIntegrationFactory.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if defined(__has_include) && __has_include() 4 | #import 5 | #elif defined(__has_include) && __has_include() 6 | #import 7 | #elif defined(__has_include) && __has_include() 8 | #import 9 | #else 10 | #import "SEGAnalytics.h" 11 | #endif 12 | #import "SEGAmplitudeIntegration.h" 13 | 14 | 15 | @interface SEGAmplitudeIntegrationFactory : NSObject 16 | 17 | + (instancetype)instance; 18 | 19 | /** 20 | This method can be used to set Amplitude's adSupportBlock and locationInfoBlock. 21 | 22 | Example: 23 | 24 | SEGAmplitudeIntegrationFactory *factory = [SEGAmplitudeIntegrationFactory instanceWithSetupBlock:^{ 25 | amplitude.adSupportBlock = ^{ 26 | return [[ASIdentifierManager sharedManager] advertisingIdentifier]; 27 | }; 28 | amplitude.locationInfoBlock = ^{ 29 | return @{ 30 | @"lat" : @37.7, 31 | @"lng" : @122.4 32 | }; 33 | }; 34 | }]; 35 | ... 36 | [analyticsConfiguration use:factory]; 37 | 38 | */ 39 | + (instancetype)instanceWithSetupBlock:(SEGAmplitudeSetupBlock)setupBlock; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Pod/Classes/SEGAmplitudeIntegrationFactory.m: -------------------------------------------------------------------------------- 1 | #import "SEGAmplitudeIntegrationFactory.h" 2 | #import "SEGAmplitudeIntegration.h" 3 | 4 | 5 | @implementation SEGAmplitudeIntegrationFactory { 6 | __strong SEGAmplitudeSetupBlock setupBlock; 7 | } 8 | 9 | + (instancetype)instance 10 | { 11 | static dispatch_once_t once; 12 | static SEGAmplitudeIntegrationFactory *sharedInstance; 13 | dispatch_once(&once, ^{ 14 | sharedInstance = [[self alloc] init]; 15 | }); 16 | return sharedInstance; 17 | } 18 | 19 | + (instancetype)instanceWithSetupBlock:(SEGAmplitudeSetupBlock)setupBlock 20 | { 21 | SEGAmplitudeIntegrationFactory *factory = [SEGAmplitudeIntegrationFactory instance]; 22 | factory->setupBlock = setupBlock; 23 | return factory; 24 | } 25 | 26 | - (id)init 27 | { 28 | self = [super init]; 29 | self->setupBlock = nil; 30 | return self; 31 | } 32 | 33 | - (id)createWithSettings:(NSDictionary *)settings forAnalytics:(SEGAnalytics *)analytics 34 | { 35 | return [[SEGAmplitudeIntegration alloc] initWithSettings:settings setupBlock:setupBlock]; 36 | } 37 | 38 | - (NSString *)key 39 | { 40 | return @"Amplitude"; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Analytics 2 | 3 | [![CircleCI](https://circleci.com/gh/segment-integrations/analytics-ios-integration-amplitude.svg?style=svg)](https://circleci.com/gh/segment-integrations/analytics-ios-integration-amplitude) 4 | [![Version](https://img.shields.io/cocoapods/v/Segment-Amplitude.svg?style=flat)](http://cocoapods.org/pods/Segment-Amplitude) 5 | [![License](https://img.shields.io/cocoapods/l/Segment-Amplitude.svg?style=flat)](http://cocoapods.org/pods/Segment-Amplitude) 6 | 7 | Amplitude integration for analytics-ios. 8 | 9 | ## Installation 10 | 11 | To install the Segment-Amplitude integration, simply add this line to your [CocoaPods](http://cocoapods.org) `Podfile`: 12 | 13 | ```ruby 14 | pod "Segment-Amplitude" 15 | ``` 16 | 17 | ## Usage 18 | 19 | After adding the dependency, you must register the integration with our SDK. To do this, import the Amplitude integration in your `AppDelegate`: 20 | 21 | ``` 22 | #import 23 | ``` 24 | 25 | And add the following lines if IDFA and/or Location Services are *NOT* needed: 26 | 27 | ``` 28 | NSString *const SEGMENT_WRITE_KEY = @" ... "; 29 | SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY]; 30 | 31 | [config use:[SEGAmplitudeIntegrationFactory instance]]; 32 | 33 | [SEGAnalytics setupWithConfiguration:config]; 34 | 35 | ``` 36 | If IDFA or Location Services *ARE* needed: 37 | 38 | ``` 39 | NSString *const SEGMENT_WRITE_KEY = @" ... "; 40 | SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY]; 41 | 42 | SEGAmplitudeIntegrationFactory *factory = [SEGAmplitudeIntegrationFactory instanceWithSetupBlock:^{ 43 | amplitude.adSupportBlock = ^{ 44 | return [[ASIdentifierManager sharedManager] advertisingIdentifier]; 45 | }; 46 | amplitude.locationInfoBlock = ^{ 47 | return @{ 48 | @"lat" : @37.7, 49 | @"lng" : @122.4 50 | }; 51 | }; 52 | }]; 53 | [config use:factory]; 54 | 55 | [SEGAnalytics setupWithConfiguration:config]; 56 | 57 | ``` 58 | 59 | 60 | 61 | ## License 62 | 63 | ``` 64 | WWWWWW||WWWWWW 65 | W W W||W W W 66 | || 67 | ( OO )__________ 68 | / | \ 69 | /o o| MIT \ 70 | \___/||_||__||_|| * 71 | || || || || 72 | _||_|| _||_|| 73 | (__|__|(__|__| 74 | 75 | The MIT License (MIT) 76 | 77 | Copyright (c) 2019 Segment, Inc. 78 | 79 | Permission is hereby granted, free of charge, to any person obtaining a copy 80 | of this software and associated documentation files (the "Software"), to deal 81 | in the Software without restriction, including without limitation the rights 82 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 83 | copies of the Software, and to permit persons to whom the Software is 84 | furnished to do so, subject to the following conditions: 85 | 86 | The above copyright notice and this permission notice shall be included in all 87 | copies or substantial portions of the Software. 88 | 89 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 90 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 91 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 92 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 93 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 94 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 95 | SOFTWARE. 96 | ``` 97 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | Releasing 2 | ========= 3 | 4 | 1. Ensure you are on the `master` branch with your latest changes pulled down. 5 | 2. Update the version in `Segment-Amplitude.podspec`. 6 | 3. Update the `CHANGELOG.md` for the impending release. 7 | 4. `carthage update --platform ios && carthage build --platform ios --no-skip-current --use-frameworks` 8 | Note: May need to use this method to get there: https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md 9 | 10 | 5. In Finder, go into `Carthage/Build/` and compress Segment_Amplitude.xcframework. 11 | This will create `Segment_Amplitude.xcframework.zip`, which you'll need later. 12 | 6. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) 13 | 7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) 14 | 8. `git push && git push --tags` 15 | 9. `pod trunk push Segment-Amplitude.podspec --allow-warnings` 16 | 10. Go to github and add proper release notes on the tag, as well as attach the 17 | `Archive.zip` created in the earlier step. 18 | -------------------------------------------------------------------------------- /Segment-Amplitude.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Segment-Amplitude" 3 | s.version = "3.4.0" 4 | s.summary = "Amplitude Integration for Segment's analytics-ios library." 5 | 6 | s.description = <<-DESC 7 | Analytics for iOS provides a single API that lets you 8 | integrate with over 100s of tools. 9 | 10 | This is the Amplitude integration for the iOS library. 11 | DESC 12 | 13 | s.homepage = "http://segment.com/" 14 | s.license = { :type => 'MIT' } 15 | s.author = { "Segment" => "friends@segment.com" } 16 | s.source = { :git => "https://github.com/segment-integrations/analytics-ios-integration-amplitude.git", :tag => s.version.to_s } 17 | s.social_media_url = 'https://twitter.com/segment' 18 | 19 | s.ios.deployment_target = '11.0' 20 | s.tvos.deployment_target = '9.0' 21 | 22 | s.requires_arc = true 23 | 24 | s.static_framework = true 25 | 26 | s.source_files = 'Pod/Classes/**/*' 27 | 28 | s.dependency 'Analytics' 29 | s.dependency 'Amplitude', '~> 8.3' 30 | end 31 | -------------------------------------------------------------------------------- /Segment-Amplitude.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A38344262400A4100007ECCD /* SEGAmplitudeIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = A38344222400A4100007ECCD /* SEGAmplitudeIntegration.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; }; 11 | A38344272400A4100007ECCD /* SEGAmplitudeIntegrationFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A38344232400A4100007ECCD /* SEGAmplitudeIntegrationFactory.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; }; 12 | A38344282400A4100007ECCD /* SEGAmplitudeIntegrationFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A38344242400A4100007ECCD /* SEGAmplitudeIntegrationFactory.m */; }; 13 | A38344292400A4100007ECCD /* SEGAmplitudeIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = A38344252400A4100007ECCD /* SEGAmplitudeIntegration.m */; }; 14 | A383442F2400AE310007ECCD /* Amplitude.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A383442E2400AE310007ECCD /* Amplitude.framework */; platformFilter = ios; }; 15 | A38344382400AFF60007ECCD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A38344372400AFF60007ECCD /* AppDelegate.m */; }; 16 | A383443B2400AFF60007ECCD /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A383443A2400AFF60007ECCD /* SceneDelegate.m */; }; 17 | A383443E2400AFF60007ECCD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A383443D2400AFF60007ECCD /* ViewController.m */; }; 18 | A38344412400AFF60007ECCD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A383443F2400AFF60007ECCD /* Main.storyboard */; }; 19 | A38344432400AFF80007ECCD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A38344422400AFF80007ECCD /* Assets.xcassets */; }; 20 | A38344462400AFF80007ECCD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A38344442400AFF80007ECCD /* LaunchScreen.storyboard */; }; 21 | A38344492400AFF80007ECCD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A38344482400AFF80007ECCD /* main.m */; }; 22 | A383444D2400B0110007ECCD /* Segment_Amplitude.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A38344172400A3CB0007ECCD /* Segment_Amplitude.framework */; }; 23 | A383444E2400B03A0007ECCD /* Amplitude.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A383442E2400AE310007ECCD /* Amplitude.framework */; }; 24 | A38344512400B2CD0007ECCD /* Segment_Amplitude.h in Headers */ = {isa = PBXBuildFile; fileRef = A383441A2400A3CB0007ECCD /* Segment_Amplitude.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | A38344542400B67B0007ECCD /* Amplitude.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A38344532400B67B0007ECCD /* Amplitude.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 26 | EA0E73CE254B761A00349B58 /* Segment.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA0E73CB254B75DF00349B58 /* Segment.framework */; platformFilter = ios; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | A38344572400B7C80007ECCD /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = A383440E2400A3CB0007ECCD /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = A38344162400A3CB0007ECCD; 35 | remoteInfo = "Segment-Amplitude"; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXCopyFilesBuildPhase section */ 40 | A38344522400B64F0007ECCD /* CopyFiles */ = { 41 | isa = PBXCopyFilesBuildPhase; 42 | buildActionMask = 12; 43 | dstPath = ""; 44 | dstSubfolderSpec = 10; 45 | files = ( 46 | A38344542400B67B0007ECCD /* Amplitude.framework in CopyFiles */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXCopyFilesBuildPhase section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | A38344172400A3CB0007ECCD /* Segment_Amplitude.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Segment_Amplitude.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | A383441A2400A3CB0007ECCD /* Segment_Amplitude.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Segment_Amplitude.h; sourceTree = ""; }; 55 | A383441B2400A3CB0007ECCD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | A38344222400A4100007ECCD /* SEGAmplitudeIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SEGAmplitudeIntegration.h; path = ../Pod/Classes/SEGAmplitudeIntegration.h; sourceTree = ""; }; 57 | A38344232400A4100007ECCD /* SEGAmplitudeIntegrationFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SEGAmplitudeIntegrationFactory.h; path = ../Pod/Classes/SEGAmplitudeIntegrationFactory.h; sourceTree = ""; }; 58 | A38344242400A4100007ECCD /* SEGAmplitudeIntegrationFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SEGAmplitudeIntegrationFactory.m; path = ../Pod/Classes/SEGAmplitudeIntegrationFactory.m; sourceTree = ""; }; 59 | A38344252400A4100007ECCD /* SEGAmplitudeIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SEGAmplitudeIntegration.m; path = ../Pod/Classes/SEGAmplitudeIntegration.m; sourceTree = ""; }; 60 | A383442C2400AE2E0007ECCD /* Analytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Analytics.framework; path = Carthage/Build/iOS/Analytics.framework; sourceTree = ""; }; 61 | A383442E2400AE310007ECCD /* Amplitude.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Amplitude.framework; path = Carthage/Build/iOS/Amplitude.framework; sourceTree = ""; }; 62 | A38344342400AFF60007ECCD /* CarthageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarthageExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | A38344362400AFF60007ECCD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 64 | A38344372400AFF60007ECCD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 65 | A38344392400AFF60007ECCD /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; 66 | A383443A2400AFF60007ECCD /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; 67 | A383443C2400AFF60007ECCD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 68 | A383443D2400AFF60007ECCD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 69 | A38344402400AFF60007ECCD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 70 | A38344422400AFF80007ECCD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 71 | A38344452400AFF80007ECCD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 72 | A38344472400AFF80007ECCD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | A38344482400AFF80007ECCD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 74 | A38344532400B67B0007ECCD /* Amplitude.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Amplitude.framework; path = Carthage/Build/iOS/Amplitude.framework; sourceTree = ""; }; 75 | EA0E73CB254B75DF00349B58 /* Segment.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Segment.framework; path = Carthage/Build/iOS/Segment.framework; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | A38344142400A3CB0007ECCD /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | EA0E73CE254B761A00349B58 /* Segment.framework in Frameworks */, 84 | A383442F2400AE310007ECCD /* Amplitude.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | A38344312400AFF60007ECCD /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | A383444D2400B0110007ECCD /* Segment_Amplitude.framework in Frameworks */, 93 | A383444E2400B03A0007ECCD /* Amplitude.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | /* End PBXFrameworksBuildPhase section */ 98 | 99 | /* Begin PBXGroup section */ 100 | A383440D2400A3CB0007ECCD = { 101 | isa = PBXGroup; 102 | children = ( 103 | A38344532400B67B0007ECCD /* Amplitude.framework */, 104 | A38344192400A3CB0007ECCD /* Segment-Amplitude */, 105 | A38344352400AFF60007ECCD /* CarthageExample */, 106 | A38344182400A3CB0007ECCD /* Products */, 107 | A383442B2400AE2E0007ECCD /* Frameworks */, 108 | ); 109 | sourceTree = ""; 110 | }; 111 | A38344182400A3CB0007ECCD /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | A38344172400A3CB0007ECCD /* Segment_Amplitude.framework */, 115 | A38344342400AFF60007ECCD /* CarthageExample.app */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | A38344192400A3CB0007ECCD /* Segment-Amplitude */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | A383441B2400A3CB0007ECCD /* Info.plist */, 124 | A383441A2400A3CB0007ECCD /* Segment_Amplitude.h */, 125 | A38344222400A4100007ECCD /* SEGAmplitudeIntegration.h */, 126 | A38344252400A4100007ECCD /* SEGAmplitudeIntegration.m */, 127 | A38344232400A4100007ECCD /* SEGAmplitudeIntegrationFactory.h */, 128 | A38344242400A4100007ECCD /* SEGAmplitudeIntegrationFactory.m */, 129 | ); 130 | path = "Segment-Amplitude"; 131 | sourceTree = ""; 132 | }; 133 | A383442B2400AE2E0007ECCD /* Frameworks */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | EA0E73CB254B75DF00349B58 /* Segment.framework */, 137 | A383442E2400AE310007ECCD /* Amplitude.framework */, 138 | A383442C2400AE2E0007ECCD /* Analytics.framework */, 139 | ); 140 | name = Frameworks; 141 | sourceTree = ""; 142 | }; 143 | A38344352400AFF60007ECCD /* CarthageExample */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | A38344362400AFF60007ECCD /* AppDelegate.h */, 147 | A38344372400AFF60007ECCD /* AppDelegate.m */, 148 | A38344392400AFF60007ECCD /* SceneDelegate.h */, 149 | A383443A2400AFF60007ECCD /* SceneDelegate.m */, 150 | A383443C2400AFF60007ECCD /* ViewController.h */, 151 | A383443D2400AFF60007ECCD /* ViewController.m */, 152 | A383443F2400AFF60007ECCD /* Main.storyboard */, 153 | A38344422400AFF80007ECCD /* Assets.xcassets */, 154 | A38344442400AFF80007ECCD /* LaunchScreen.storyboard */, 155 | A38344472400AFF80007ECCD /* Info.plist */, 156 | A38344482400AFF80007ECCD /* main.m */, 157 | ); 158 | path = CarthageExample; 159 | sourceTree = ""; 160 | }; 161 | /* End PBXGroup section */ 162 | 163 | /* Begin PBXHeadersBuildPhase section */ 164 | A38344122400A3CB0007ECCD /* Headers */ = { 165 | isa = PBXHeadersBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | A38344272400A4100007ECCD /* SEGAmplitudeIntegrationFactory.h in Headers */, 169 | A38344262400A4100007ECCD /* SEGAmplitudeIntegration.h in Headers */, 170 | A38344512400B2CD0007ECCD /* Segment_Amplitude.h in Headers */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXHeadersBuildPhase section */ 175 | 176 | /* Begin PBXNativeTarget section */ 177 | A38344162400A3CB0007ECCD /* Segment-Amplitude */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = A383441F2400A3CB0007ECCD /* Build configuration list for PBXNativeTarget "Segment-Amplitude" */; 180 | buildPhases = ( 181 | A38344122400A3CB0007ECCD /* Headers */, 182 | A38344132400A3CB0007ECCD /* Sources */, 183 | A38344142400A3CB0007ECCD /* Frameworks */, 184 | A38344152400A3CB0007ECCD /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | ); 190 | name = "Segment-Amplitude"; 191 | productName = "Segment-Amplitude"; 192 | productReference = A38344172400A3CB0007ECCD /* Segment_Amplitude.framework */; 193 | productType = "com.apple.product-type.framework"; 194 | }; 195 | A38344332400AFF60007ECCD /* CarthageExample */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = A383444A2400AFF80007ECCD /* Build configuration list for PBXNativeTarget "CarthageExample" */; 198 | buildPhases = ( 199 | A38344302400AFF60007ECCD /* Sources */, 200 | A38344312400AFF60007ECCD /* Frameworks */, 201 | A38344322400AFF60007ECCD /* Resources */, 202 | A38344502400B0660007ECCD /* ShellScript */, 203 | A38344522400B64F0007ECCD /* CopyFiles */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | A38344582400B7C80007ECCD /* PBXTargetDependency */, 209 | ); 210 | name = CarthageExample; 211 | productName = CarthageExample; 212 | productReference = A38344342400AFF60007ECCD /* CarthageExample.app */; 213 | productType = "com.apple.product-type.application"; 214 | }; 215 | /* End PBXNativeTarget section */ 216 | 217 | /* Begin PBXProject section */ 218 | A383440E2400A3CB0007ECCD /* Project object */ = { 219 | isa = PBXProject; 220 | attributes = { 221 | LastUpgradeCheck = 1130; 222 | ORGANIZATIONNAME = "Brandon Sneed"; 223 | TargetAttributes = { 224 | A38344162400A3CB0007ECCD = { 225 | CreatedOnToolsVersion = 11.3.1; 226 | }; 227 | A38344332400AFF60007ECCD = { 228 | CreatedOnToolsVersion = 11.3.1; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = A38344112400A3CB0007ECCD /* Build configuration list for PBXProject "Segment-Amplitude" */; 233 | compatibilityVersion = "Xcode 9.3"; 234 | developmentRegion = en; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | Base, 239 | ); 240 | mainGroup = A383440D2400A3CB0007ECCD; 241 | productRefGroup = A38344182400A3CB0007ECCD /* Products */; 242 | projectDirPath = ""; 243 | projectRoot = ""; 244 | targets = ( 245 | A38344162400A3CB0007ECCD /* Segment-Amplitude */, 246 | A38344332400AFF60007ECCD /* CarthageExample */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXResourcesBuildPhase section */ 252 | A38344152400A3CB0007ECCD /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | A38344322400AFF60007ECCD /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | A38344462400AFF80007ECCD /* LaunchScreen.storyboard in Resources */, 264 | A38344432400AFF80007ECCD /* Assets.xcassets in Resources */, 265 | A38344412400AFF60007ECCD /* Main.storyboard in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXResourcesBuildPhase section */ 270 | 271 | /* Begin PBXShellScriptBuildPhase section */ 272 | A38344502400B0660007ECCD /* ShellScript */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 8; 275 | files = ( 276 | ); 277 | inputFileListPaths = ( 278 | ); 279 | inputPaths = ( 280 | "$(SRCROOT)/Carthage/Build/iOS/Analytics.framework", 281 | "$(SRCROOT)/Carthage/Build/iOS/Amplitude.framework", 282 | ); 283 | outputFileListPaths = ( 284 | ); 285 | outputPaths = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 1; 288 | shellPath = "/usr/local/bin/carthage copy-frameworks"; 289 | shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n"; 290 | }; 291 | /* End PBXShellScriptBuildPhase section */ 292 | 293 | /* Begin PBXSourcesBuildPhase section */ 294 | A38344132400A3CB0007ECCD /* Sources */ = { 295 | isa = PBXSourcesBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | A38344292400A4100007ECCD /* SEGAmplitudeIntegration.m in Sources */, 299 | A38344282400A4100007ECCD /* SEGAmplitudeIntegrationFactory.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | A38344302400AFF60007ECCD /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | A383443E2400AFF60007ECCD /* ViewController.m in Sources */, 308 | A38344382400AFF60007ECCD /* AppDelegate.m in Sources */, 309 | A38344492400AFF80007ECCD /* main.m in Sources */, 310 | A383443B2400AFF60007ECCD /* SceneDelegate.m in Sources */, 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | /* End PBXSourcesBuildPhase section */ 315 | 316 | /* Begin PBXTargetDependency section */ 317 | A38344582400B7C80007ECCD /* PBXTargetDependency */ = { 318 | isa = PBXTargetDependency; 319 | target = A38344162400A3CB0007ECCD /* Segment-Amplitude */; 320 | targetProxy = A38344572400B7C80007ECCD /* PBXContainerItemProxy */; 321 | }; 322 | /* End PBXTargetDependency section */ 323 | 324 | /* Begin PBXVariantGroup section */ 325 | A383443F2400AFF60007ECCD /* Main.storyboard */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | A38344402400AFF60007ECCD /* Base */, 329 | ); 330 | name = Main.storyboard; 331 | sourceTree = ""; 332 | }; 333 | A38344442400AFF80007ECCD /* LaunchScreen.storyboard */ = { 334 | isa = PBXVariantGroup; 335 | children = ( 336 | A38344452400AFF80007ECCD /* Base */, 337 | ); 338 | name = LaunchScreen.storyboard; 339 | sourceTree = ""; 340 | }; 341 | /* End PBXVariantGroup section */ 342 | 343 | /* Begin XCBuildConfiguration section */ 344 | A383441D2400A3CB0007ECCD /* Debug */ = { 345 | isa = XCBuildConfiguration; 346 | buildSettings = { 347 | ALWAYS_SEARCH_USER_PATHS = NO; 348 | CLANG_ANALYZER_NONNULL = YES; 349 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 350 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 351 | CLANG_CXX_LIBRARY = "libc++"; 352 | CLANG_ENABLE_MODULES = YES; 353 | CLANG_ENABLE_OBJC_ARC = YES; 354 | CLANG_ENABLE_OBJC_WEAK = YES; 355 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 356 | CLANG_WARN_BOOL_CONVERSION = YES; 357 | CLANG_WARN_COMMA = YES; 358 | CLANG_WARN_CONSTANT_CONVERSION = YES; 359 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 362 | CLANG_WARN_EMPTY_BODY = YES; 363 | CLANG_WARN_ENUM_CONVERSION = YES; 364 | CLANG_WARN_INFINITE_RECURSION = YES; 365 | CLANG_WARN_INT_CONVERSION = YES; 366 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 367 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 368 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 371 | CLANG_WARN_STRICT_PROTOTYPES = YES; 372 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 373 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | COPY_PHASE_STRIP = NO; 377 | CURRENT_PROJECT_VERSION = 1; 378 | DEBUG_INFORMATION_FORMAT = dwarf; 379 | ENABLE_STRICT_OBJC_MSGSEND = YES; 380 | ENABLE_TESTABILITY = YES; 381 | GCC_C_LANGUAGE_STANDARD = gnu11; 382 | GCC_DYNAMIC_NO_PIC = NO; 383 | GCC_NO_COMMON_BLOCKS = YES; 384 | GCC_OPTIMIZATION_LEVEL = 0; 385 | GCC_PREPROCESSOR_DEFINITIONS = ( 386 | "DEBUG=1", 387 | "$(inherited)", 388 | ); 389 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 390 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 391 | GCC_WARN_UNDECLARED_SELECTOR = YES; 392 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 393 | GCC_WARN_UNUSED_FUNCTION = YES; 394 | GCC_WARN_UNUSED_VARIABLE = YES; 395 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 396 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 397 | MTL_FAST_MATH = YES; 398 | ONLY_ACTIVE_ARCH = YES; 399 | SDKROOT = iphoneos; 400 | VERSIONING_SYSTEM = "apple-generic"; 401 | VERSION_INFO_PREFIX = ""; 402 | }; 403 | name = Debug; 404 | }; 405 | A383441E2400A3CB0007ECCD /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_ANALYZER_NONNULL = YES; 410 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 412 | CLANG_CXX_LIBRARY = "libc++"; 413 | CLANG_ENABLE_MODULES = YES; 414 | CLANG_ENABLE_OBJC_ARC = YES; 415 | CLANG_ENABLE_OBJC_WEAK = YES; 416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 417 | CLANG_WARN_BOOL_CONVERSION = YES; 418 | CLANG_WARN_COMMA = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 423 | CLANG_WARN_EMPTY_BODY = YES; 424 | CLANG_WARN_ENUM_CONVERSION = YES; 425 | CLANG_WARN_INFINITE_RECURSION = YES; 426 | CLANG_WARN_INT_CONVERSION = YES; 427 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 429 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 431 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 432 | CLANG_WARN_STRICT_PROTOTYPES = YES; 433 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 434 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 435 | CLANG_WARN_UNREACHABLE_CODE = YES; 436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 437 | COPY_PHASE_STRIP = NO; 438 | CURRENT_PROJECT_VERSION = 1; 439 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 440 | ENABLE_NS_ASSERTIONS = NO; 441 | ENABLE_STRICT_OBJC_MSGSEND = YES; 442 | GCC_C_LANGUAGE_STANDARD = gnu11; 443 | GCC_NO_COMMON_BLOCKS = YES; 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 451 | MTL_ENABLE_DEBUG_INFO = NO; 452 | MTL_FAST_MATH = YES; 453 | SDKROOT = iphoneos; 454 | VALIDATE_PRODUCT = YES; 455 | VERSIONING_SYSTEM = "apple-generic"; 456 | VERSION_INFO_PREFIX = ""; 457 | }; 458 | name = Release; 459 | }; 460 | A38344202400A3CB0007ECCD /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | CODE_SIGN_STYLE = Automatic; 464 | DEFINES_MODULE = YES; 465 | DYLIB_COMPATIBILITY_VERSION = 1; 466 | DYLIB_CURRENT_VERSION = 1; 467 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 468 | FRAMEWORK_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Carthage/Build/iOS/**", 471 | "$(PROJECT_DIR)/Carthage/Build/iOS", 472 | ); 473 | INFOPLIST_FILE = "Segment-Amplitude/Info.plist"; 474 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 475 | LD_RUNPATH_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "@executable_path/Frameworks", 478 | "@loader_path/Frameworks", 479 | ); 480 | PRODUCT_BUNDLE_IDENTIFIER = "com.segment.Segment-Amplitude"; 481 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 482 | SKIP_INSTALL = YES; 483 | TARGETED_DEVICE_FAMILY = "1,2"; 484 | }; 485 | name = Debug; 486 | }; 487 | A38344212400A3CB0007ECCD /* Release */ = { 488 | isa = XCBuildConfiguration; 489 | buildSettings = { 490 | CODE_SIGN_STYLE = Automatic; 491 | DEFINES_MODULE = YES; 492 | DYLIB_COMPATIBILITY_VERSION = 1; 493 | DYLIB_CURRENT_VERSION = 1; 494 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 495 | FRAMEWORK_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "$(PROJECT_DIR)/Carthage/Build/iOS/**", 498 | "$(PROJECT_DIR)/Carthage/Build/iOS", 499 | ); 500 | INFOPLIST_FILE = "Segment-Amplitude/Info.plist"; 501 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 502 | LD_RUNPATH_SEARCH_PATHS = ( 503 | "$(inherited)", 504 | "@executable_path/Frameworks", 505 | "@loader_path/Frameworks", 506 | ); 507 | PRODUCT_BUNDLE_IDENTIFIER = "com.segment.Segment-Amplitude"; 508 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 509 | SKIP_INSTALL = YES; 510 | TARGETED_DEVICE_FAMILY = "1,2"; 511 | }; 512 | name = Release; 513 | }; 514 | A383444B2400AFF80007ECCD /* Debug */ = { 515 | isa = XCBuildConfiguration; 516 | buildSettings = { 517 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 518 | CODE_SIGN_STYLE = Automatic; 519 | FRAMEWORK_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Carthage/Build/iOS", 522 | ); 523 | INFOPLIST_FILE = CarthageExample/Info.plist; 524 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 525 | LD_RUNPATH_SEARCH_PATHS = ( 526 | "$(inherited)", 527 | "@executable_path/Frameworks", 528 | ); 529 | PRODUCT_BUNDLE_IDENTIFIER = com.segment.CarthageExample; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | TARGETED_DEVICE_FAMILY = "1,2"; 532 | }; 533 | name = Debug; 534 | }; 535 | A383444C2400AFF80007ECCD /* Release */ = { 536 | isa = XCBuildConfiguration; 537 | buildSettings = { 538 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 539 | CODE_SIGN_STYLE = Automatic; 540 | FRAMEWORK_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "$(PROJECT_DIR)/Carthage/Build/iOS", 543 | ); 544 | INFOPLIST_FILE = CarthageExample/Info.plist; 545 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 546 | LD_RUNPATH_SEARCH_PATHS = ( 547 | "$(inherited)", 548 | "@executable_path/Frameworks", 549 | ); 550 | PRODUCT_BUNDLE_IDENTIFIER = com.segment.CarthageExample; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | TARGETED_DEVICE_FAMILY = "1,2"; 553 | }; 554 | name = Release; 555 | }; 556 | /* End XCBuildConfiguration section */ 557 | 558 | /* Begin XCConfigurationList section */ 559 | A38344112400A3CB0007ECCD /* Build configuration list for PBXProject "Segment-Amplitude" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | A383441D2400A3CB0007ECCD /* Debug */, 563 | A383441E2400A3CB0007ECCD /* Release */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | A383441F2400A3CB0007ECCD /* Build configuration list for PBXNativeTarget "Segment-Amplitude" */ = { 569 | isa = XCConfigurationList; 570 | buildConfigurations = ( 571 | A38344202400A3CB0007ECCD /* Debug */, 572 | A38344212400A3CB0007ECCD /* Release */, 573 | ); 574 | defaultConfigurationIsVisible = 0; 575 | defaultConfigurationName = Release; 576 | }; 577 | A383444A2400AFF80007ECCD /* Build configuration list for PBXNativeTarget "CarthageExample" */ = { 578 | isa = XCConfigurationList; 579 | buildConfigurations = ( 580 | A383444B2400AFF80007ECCD /* Debug */, 581 | A383444C2400AFF80007ECCD /* Release */, 582 | ); 583 | defaultConfigurationIsVisible = 0; 584 | defaultConfigurationName = Release; 585 | }; 586 | /* End XCConfigurationList section */ 587 | }; 588 | rootObject = A383440E2400A3CB0007ECCD /* Project object */; 589 | } 590 | -------------------------------------------------------------------------------- /Segment-Amplitude.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Segment-Amplitude.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Segment-Amplitude.xcodeproj/xcshareddata/xcschemes/Segment-Amplitude.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Segment-Amplitude/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Segment-Amplitude/Segment_Amplitude.h: -------------------------------------------------------------------------------- 1 | // 2 | // Segment_Amplitude.h 3 | // Segment-Amplitude 4 | // 5 | // Created by Brandon Sneed on 2/21/20. 6 | // Copyright © 2020 Brandon Sneed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Segment_Amplitude. 12 | FOUNDATION_EXPORT double Segment_AmplitudeVersionNumber; 13 | 14 | //! Project version string for Segment_Amplitude. 15 | FOUNDATION_EXPORT const unsigned char Segment_AmplitudeVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | 22 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------