diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a4ee275f8..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,51 +0,0 @@ -version: 2 - -jobs: - build_and_test: - macos: - xcode: "9.4.1" - steps: - - checkout - - run: xcrun simctl list - - run: - name: Install build dependencies - command: | - sudo gem install xcpretty - sudo gem install cocoapods -v $(var=$(tail -1 Podfile.lock); echo ${var##COCOAPODS:}) - - - run: - name: Fetch Cocoapods specs - command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - - - run: make dependencies - - run: make build-pretty - - run: make test-pretty - - run: make lint - - run: make carthage - - - store_test_results: - # relies on xcpretty --report junit - path: build/reports - - run: bash <(curl -s https://codecov.io/bash) - - # Save Pods to artifacts in case we need to dig up dependencies later - - run: zip -FSr Pods.zip ./Pods - - store_artifacts: - path: Pods.zip - -workflows: - version: 2 - build_and_test: - jobs: - - build_and_test - scheduled_e2e_test: - triggers: - - schedule: - cron: "30 * * * *" - filters: - branches: - only: - - master - - scheduled_e2e_testing - jobs: - - build_and_test diff --git a/.gitignore b/.gitignore index 53505db84..d56c3b6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,10 @@ DerivedData # Bundler .bundle +# Swift Package Manager +.build +.swiftpm + Carthage # CocoaPods typically recommends against ignoring the Pods directory @@ -32,3 +36,4 @@ Carthage # itself has no pod dependencies, only our tests do. Pods/ .clang-format +.idea diff --git a/Metarouter.xcodeproj/project.pbxproj b/Analytics.xcodeproj/project.pbxproj similarity index 93% rename from Metarouter.xcodeproj/project.pbxproj rename to Analytics.xcodeproj/project.pbxproj index bb0f153d2..4fb21012b 100644 --- a/Metarouter.xcodeproj/project.pbxproj +++ b/Analytics.xcodeproj/project.pbxproj @@ -19,7 +19,7 @@ A34CC6DD249AAEBB00C5E368 /* SEGState.m in Sources */ = {isa = PBXBuildFile; fileRef = A34CC6DB249AAEBA00C5E368 /* SEGState.m */; }; A34CC6DE249AAEBB00C5E368 /* SEGState.h in Headers */ = {isa = PBXBuildFile; fileRef = A34CC6DC249AAEBB00C5E368 /* SEGState.h */; settings = {ATTRIBUTES = (Private, ); }; }; A352176023AD5825005B07F6 /* SEGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A352175F23AD5825005B07F6 /* SEGMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A3B6E29925116B3A00609A13 /* Metarouter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADEB85B1DECD080005322DA /* Metarouter.framework */; }; + A3B6E29925116B3A00609A13 /* Analytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADEB85B1DECD080005322DA /* Analytics.framework */; }; A3BECDD024BCE1E3009E2BD3 /* ObjcUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = A3BECDCF24BCE1E3009E2BD3 /* ObjcUtils.m */; }; EA88A5981DED7608009FB66A /* SEGSerializableValue.h in Headers */ = {isa = PBXBuildFile; fileRef = EA88A5971DED7608009FB66A /* SEGSerializableValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; EA8F09741E24C5C600B8B93F /* MiddlewareTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8F09731E24C5C600B8B93F /* MiddlewareTests.swift */; }; @@ -27,7 +27,7 @@ EAA5427D1EB42B8C00945DA7 /* SEGReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = EAA5427B1EB42B8C00945DA7 /* SEGReachability.h */; settings = {ATTRIBUTES = (Public, ); }; }; EAA5427E1EB42B8C00945DA7 /* SEGReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = EAA5427C1EB42B8C00945DA7 /* SEGReachability.m */; }; EAA542801EB4382100945DA7 /* StoreKitTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5427F1EB4382100945DA7 /* StoreKitTrackerTests.swift */; }; - EADEB8601DECD080005322DA /* Metarouter.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB85E1DECD080005322DA /* Metarouter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EADEB8601DECD080005322DA /* Analytics.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB85E1DECD080005322DA /* Analytics.h */; settings = {ATTRIBUTES = (Public, ); }; }; EADEB8AE1DECD12B005322DA /* SEGAES256Crypto.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8781DECD12B005322DA /* SEGAES256Crypto.h */; settings = {ATTRIBUTES = (Private, ); }; }; EADEB8AF1DECD12B005322DA /* SEGAES256Crypto.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8791DECD12B005322DA /* SEGAES256Crypto.m */; }; EADEB8B01DECD12B005322DA /* SEGCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB87A1DECD12B005322DA /* SEGCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -93,7 +93,7 @@ containerPortal = EADEB8521DECD080005322DA /* Project object */; proxyType = 1; remoteGlobalIDString = EADEB85A1DECD080005322DA; - remoteInfo = Metarouter; + remoteInfo = Segment; }; /* End PBXContainerItemProxy section */ @@ -113,17 +113,17 @@ A352175F23AD5825005B07F6 /* SEGMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEGMacros.h; sourceTree = ""; }; A3BECDCE24BCE1E3009E2BD3 /* ObjcUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjcUtils.h; sourceTree = ""; }; A3BECDCF24BCE1E3009E2BD3 /* ObjcUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ObjcUtils.m; sourceTree = ""; }; - C31674B18CD818C64F8F3935 /* Pods_MetarouterTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MetarouterTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C31674B18CD818C64F8F3935 /* Pods_SegmentTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SegmentTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EA88A5971DED7608009FB66A /* SEGSerializableValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEGSerializableValue.h; sourceTree = ""; }; EA8F09731E24C5C600B8B93F /* MiddlewareTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MiddlewareTests.swift; sourceTree = ""; }; EAA542761EB4035400945DA7 /* TrackingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingTests.swift; sourceTree = ""; }; EAA5427B1EB42B8C00945DA7 /* SEGReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEGReachability.h; sourceTree = ""; }; EAA5427C1EB42B8C00945DA7 /* SEGReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEGReachability.m; sourceTree = ""; }; - EAA5427F1EB4382100945DA7 /* StoreKitTrackerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StoreKitTrackerTests.swift; path = MetarouterTests/StoreKitTrackerTests.swift; sourceTree = SOURCE_ROOT; }; - EADEB85B1DECD080005322DA /* Metarouter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Metarouter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EADEB85E1DECD080005322DA /* Metarouter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Metarouter.h; sourceTree = ""; }; + EAA5427F1EB4382100945DA7 /* StoreKitTrackerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StoreKitTrackerTests.swift; path = SegmentTests/StoreKitTrackerTests.swift; sourceTree = SOURCE_ROOT; }; + EADEB85B1DECD080005322DA /* Analytics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Analytics.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EADEB85E1DECD080005322DA /* Analytics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Analytics.h; sourceTree = ""; }; EADEB85F1DECD080005322DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EADEB86A1DECD0EF005322DA /* MetarouterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MetarouterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EADEB86A1DECD0EF005322DA /* AnalyticsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnalyticsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; EADEB8781DECD12B005322DA /* SEGAES256Crypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEGAES256Crypto.h; sourceTree = ""; }; EADEB8791DECD12B005322DA /* SEGAES256Crypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEGAES256Crypto.m; sourceTree = ""; }; EADEB87A1DECD12B005322DA /* SEGCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEGCrypto.h; sourceTree = ""; }; @@ -184,10 +184,10 @@ EADEB8EA1DECD335005322DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; EADEB8EC1DECD335005322DA /* AnalyticsTests-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AnalyticsTests-Bridging-Header.h"; sourceTree = ""; }; EADEB8FF1DED3711005322DA /* circle.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = circle.yml; sourceTree = ""; }; - EADEB9001DED3711005322DA /* MetarouterAnalytics.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = MetarouterAnalytics.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + EADEB9001DED3711005322DA /* Analytics.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Analytics.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; EADEB9011DED3711005322DA /* Podfile.lock */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile.lock; sourceTree = ""; }; F61EB4AE1F996DEF0038C8C0 /* AnalyticsUtilTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsUtilTests.swift; sourceTree = ""; }; - FCBCA487BBFE32EC6A04989F /* Pods_MetarouterTestsTVOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MetarouterTestsTVOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FCBCA487BBFE32EC6A04989F /* Pods_SegmentTestsTVOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SegmentTestsTVOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -202,7 +202,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A3B6E29925116B3A00609A13 /* Metarouter.framework in Frameworks */, + A3B6E29925116B3A00609A13 /* Analytics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -212,8 +212,8 @@ 245A982558D113AD25B2912E /* Frameworks */ = { isa = PBXGroup; children = ( - C31674B18CD818C64F8F3935 /* Pods_MetarouterTests.framework */, - FCBCA487BBFE32EC6A04989F /* Pods_MetarouterTestsTVOS.framework */, + C31674B18CD818C64F8F3935 /* Pods_SegmentTests.framework */, + FCBCA487BBFE32EC6A04989F /* Pods_SegmentTestsTVOS.framework */, ); name = Frameworks; sourceTree = ""; @@ -232,8 +232,8 @@ EADEB85C1DECD080005322DA /* Products */ = { isa = PBXGroup; children = ( - EADEB85B1DECD080005322DA /* Metarouter.framework */, - EADEB86A1DECD0EF005322DA /* MetarouterTests.xctest */, + EADEB85B1DECD080005322DA /* Analytics.framework */, + EADEB86A1DECD0EF005322DA /* AnalyticsTests.xctest */, ); name = Products; sourceTree = ""; @@ -246,7 +246,7 @@ EADEB88C1DECD12B005322DA /* Internal */, ); name = Analytics; - path = Metarouter; + path = Segment; sourceTree = ""; }; EADEB86B1DECD0EF005322DA /* AnalyticsTests */ = { @@ -273,14 +273,14 @@ ); indentWidth = 4; name = AnalyticsTests; - path = MetarouterTests; + path = SegmentTests; sourceTree = ""; tabWidth = 4; }; EADEB8751DECD12B005322DA /* Classes */ = { isa = PBXGroup; children = ( - EADEB85E1DECD080005322DA /* Metarouter.h */, + EADEB85E1DECD080005322DA /* Analytics.h */, EADEB87C1DECD12B005322DA /* SEGAliasPayload.h */, EADEB87D1DECD12B005322DA /* SEGAliasPayload.m */, EADEB8A91DECD12B005322DA /* SEGAnalytics.h */, @@ -367,7 +367,7 @@ isa = PBXGroup; children = ( EADEB8FF1DED3711005322DA /* circle.yml */, - EADEB9001DED3711005322DA /* MetarouterAnalytics.podspec */, + EADEB9001DED3711005322DA /* Analytics.podspec */, EADEB9011DED3711005322DA /* Podfile.lock */, ); name = "Supporting Files"; @@ -406,7 +406,7 @@ EADEB8D21DECD12B005322DA /* SEGUserDefaultsStorage.h in Headers */, EADEB8D01DECD12B005322DA /* SEGStoreKitTracker.h in Headers */, EADEB8D41DECD12B005322DA /* SEGUtils.h in Headers */, - EADEB8601DECD080005322DA /* Metarouter.h in Headers */, + EADEB8601DECD080005322DA /* Analytics.h in Headers */, EADEB8C31DECD12B005322DA /* SEGAnalyticsUtils.h in Headers */, EADEB8B91DECD12B005322DA /* SEGIntegrationsManager.h in Headers */, 630FC8EA2107F2A500A759C5 /* SEGScreenReporting.h in Headers */, @@ -420,9 +420,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - EADEB85A1DECD080005322DA /* Metarouter */ = { + EADEB85A1DECD080005322DA /* Analytics */ = { isa = PBXNativeTarget; - buildConfigurationList = EADEB8631DECD080005322DA /* Build configuration list for PBXNativeTarget "Metarouter" */; + buildConfigurationList = EADEB8631DECD080005322DA /* Build configuration list for PBXNativeTarget "Analytics" */; buildPhases = ( EADEB8561DECD080005322DA /* Sources */, EADEB8571DECD080005322DA /* Frameworks */, @@ -433,14 +433,14 @@ ); dependencies = ( ); - name = Metarouter; - productName = Metarouter; - productReference = EADEB85B1DECD080005322DA /* Metarouter.framework */; + name = Analytics; + productName = Segment; + productReference = EADEB85B1DECD080005322DA /* Analytics.framework */; productType = "com.apple.product-type.framework"; }; - EADEB8691DECD0EF005322DA /* MetarouterTests */ = { + EADEB8691DECD0EF005322DA /* AnalyticsTests */ = { isa = PBXNativeTarget; - buildConfigurationList = EADEB8741DECD0EF005322DA /* Build configuration list for PBXNativeTarget "MetarouterTests" */; + buildConfigurationList = EADEB8741DECD0EF005322DA /* Build configuration list for PBXNativeTarget "AnalyticsTests" */; buildPhases = ( EADEB8661DECD0EF005322DA /* Sources */, EADEB8671DECD0EF005322DA /* Frameworks */, @@ -451,9 +451,9 @@ dependencies = ( A3B6E29B25116B4100609A13 /* PBXTargetDependency */, ); - name = MetarouterTests; + name = AnalyticsTests; productName = AnalyticsTests; - productReference = EADEB86A1DECD0EF005322DA /* MetarouterTests.xctest */; + productReference = EADEB86A1DECD0EF005322DA /* AnalyticsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -464,7 +464,7 @@ attributes = { LastSwiftUpdateCheck = 0810; LastUpgradeCheck = 1220; - ORGANIZATIONNAME = Metarouter; + ORGANIZATIONNAME = Segment; TargetAttributes = { EADEB85A1DECD080005322DA = { CreatedOnToolsVersion = 8.1; @@ -477,7 +477,7 @@ }; }; }; - buildConfigurationList = EADEB8551DECD080005322DA /* Build configuration list for PBXProject "Metarouter" */; + buildConfigurationList = EADEB8551DECD080005322DA /* Build configuration list for PBXProject "Analytics" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; @@ -490,8 +490,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - EADEB85A1DECD080005322DA /* Metarouter */, - EADEB8691DECD0EF005322DA /* MetarouterTests */, + EADEB85A1DECD080005322DA /* Analytics */, + EADEB8691DECD0EF005322DA /* AnalyticsTests */, ); }; /* End PBXProject section */ @@ -576,7 +576,7 @@ /* Begin PBXTargetDependency section */ A3B6E29B25116B4100609A13 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = EADEB85A1DECD080005322DA /* Metarouter */; + target = EADEB85A1DECD080005322DA /* Analytics */; targetProxy = A3B6E29A25116B4100609A13 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -723,10 +723,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Metarouter/Info.plist; + INFOPLIST_FILE = Segment/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.segment.Analytics; + MARKETING_VERSION = 4.1.10; + PRODUCT_BUNDLE_IDENTIFIER = io.metarouter.Analytics; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; @@ -747,10 +748,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Metarouter/Info.plist; + INFOPLIST_FILE = Segment/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.segment.Analytics; + MARKETING_VERSION = 4.1.10; + PRODUCT_BUNDLE_IDENTIFIER = io.metarouter.Analytics; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; @@ -762,13 +764,13 @@ EADEB8721DECD0EF005322DA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = MetarouterTests/Info.plist; + INFOPLIST_FILE = SegmentTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.segment.AnalyticsTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OBJC_BRIDGING_HEADER = "MetarouterTests/AnalyticsTests-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "SegmentTests/AnalyticsTests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; @@ -778,12 +780,12 @@ EADEB8731DECD0EF005322DA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = MetarouterTests/Info.plist; + INFOPLIST_FILE = SegmentTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.segment.AnalyticsTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; - SWIFT_OBJC_BRIDGING_HEADER = "MetarouterTests/AnalyticsTests-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "SegmentTests/AnalyticsTests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,3"; @@ -793,7 +795,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - EADEB8551DECD080005322DA /* Build configuration list for PBXProject "Metarouter" */ = { + EADEB8551DECD080005322DA /* Build configuration list for PBXProject "Analytics" */ = { isa = XCConfigurationList; buildConfigurations = ( EADEB8611DECD080005322DA /* Debug */, @@ -802,7 +804,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EADEB8631DECD080005322DA /* Build configuration list for PBXNativeTarget "Metarouter" */ = { + EADEB8631DECD080005322DA /* Build configuration list for PBXNativeTarget "Analytics" */ = { isa = XCConfigurationList; buildConfigurations = ( EADEB8641DECD080005322DA /* Debug */, @@ -811,7 +813,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EADEB8741DECD0EF005322DA /* Build configuration list for PBXNativeTarget "MetarouterTests" */ = { + EADEB8741DECD0EF005322DA /* Build configuration list for PBXNativeTarget "AnalyticsTests" */ = { isa = XCConfigurationList; buildConfigurations = ( EADEB8721DECD0EF005322DA /* Debug */, diff --git a/Metarouter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Analytics.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 55% rename from Metarouter.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Analytics.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 9d2c4e112..b7e05283f 100644 --- a/Metarouter.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Analytics.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:/Users/ovidiu/Projects/tmp/analytics-ios/Analytics.xcodeproj"> diff --git a/Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Analytics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Analytics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Metarouter.xcodeproj/xcshareddata/xcschemes/Metarouter.xcscheme b/Analytics.xcodeproj/xcshareddata/xcschemes/Segment.xcscheme similarity index 77% rename from Metarouter.xcodeproj/xcshareddata/xcschemes/Metarouter.xcscheme rename to Analytics.xcodeproj/xcshareddata/xcschemes/Segment.xcscheme index c9d93894b..76071d64e 100644 --- a/Metarouter.xcodeproj/xcshareddata/xcschemes/Metarouter.xcscheme +++ b/Analytics.xcodeproj/xcshareddata/xcschemes/Segment.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "Analytics.framework" + BlueprintName = "Analytics" + ReferencedContainer = "container:Analytics.xcodeproj"> @@ -32,9 +32,9 @@ + BuildableName = "Analytics.framework" + BlueprintName = "Analytics" + ReferencedContainer = "container:Analytics.xcodeproj"> @@ -43,9 +43,9 @@ + BuildableName = "AnalyticsTests.xctest" + BlueprintName = "AnalyticsTests" + ReferencedContainer = "container:Analytics.xcodeproj"> @@ -64,9 +64,9 @@ + BuildableName = "Analytics.framework" + BlueprintName = "Analytics" + ReferencedContainer = "container:Analytics.xcodeproj"> @@ -80,9 +80,9 @@ + BuildableName = "Analytics.framework" + BlueprintName = "Analytics" + ReferencedContainer = "container:Analytics.xcodeproj"> diff --git a/Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTests.xcscheme b/Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTests.xcscheme similarity index 86% rename from Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTests.xcscheme rename to Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTests.xcscheme index 05291bcde..5b9e6b363 100644 --- a/Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTests.xcscheme +++ b/Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTests.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "AnalyticsTests.xctest" + BlueprintName = "AnalyticsTests" + ReferencedContainer = "container:Analytics.xcodeproj"> @@ -38,9 +38,9 @@ + BuildableName = "AnalyticsTests.xctest" + BlueprintName = "AnalyticsTests" + ReferencedContainer = "container:Analytics.xcodeproj"> diff --git a/Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTestsTVOS.xcscheme b/Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTestsTVOS.xcscheme similarity index 90% rename from Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTestsTVOS.xcscheme rename to Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTestsTVOS.xcscheme index 31fc6bcfd..19c5eed01 100644 --- a/Metarouter.xcodeproj/xcshareddata/xcschemes/MetarouterTestsTVOS.xcscheme +++ b/Analytics.xcodeproj/xcshareddata/xcschemes/SegmentTestsTVOS.xcscheme @@ -18,9 +18,9 @@ + BuildableName = "SegmentTestsTVOS.xctest" + BlueprintName = "SegmentTestsTVOS" + ReferencedContainer = "container:Analytics.xcodeproj"> diff --git a/CHANGELOG.md b/CHANGELOG.md index 67b366c5b..2aa27c5a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,22 @@ Change Log ========== -Version 4.1.5 *(2 July, 2021)* -* [Fix] Apply Metarouter branding +Version 4.2.0 *(22 December, 2021)* +----------------------------- +* [Fix] Removed unnecessary renames so syncing with upstream is simpler + +Version 4.1.9 *(2 November, 2021)* +----------------------------- +* [New] Updated codebase with upstream (4.1.6 version) + +Version 4.1.8 *(9 July, 2021)* +----------------------------- +* [New] Updated codebase with upstream + +Version 4.1.5 *(9 July, 2021)* +----------------------------- +* [Fix](https://github.com/segmentio/analytics-ios/pull/999) Add missing nullability identifier +* [Fix](https://github.com/segmentio/analytics-ios/pull/1002) Update Readme with SPM guide + Version 4.1.4 *(3 May, 2021)* ----------------------------- * [Fix](https://github.com/segmentio/analytics-ios/pull/994) Add missing import in Segment.h for Xcode 12.5 @@ -554,4 +569,4 @@ Version 3.0.3-alpha *(10-21-2015)* Version 3.0.2-alpha *(10-11-2015)* ---------------------------------- - * Fixes `pod lib lint` warnings. + * Fixes `pod lib lint` warnings. \ No newline at end of file diff --git a/Examples/CarthageExample/Cartfile b/Examples/CarthageExample/Cartfile index cc5687bcc..52a821ea7 100644 --- a/Examples/CarthageExample/Cartfile +++ b/Examples/CarthageExample/Cartfile @@ -1,3 +1,3 @@ -github "segmentio/analytics-ios" "4.1.6" +github "segmentio/analytics-ios" "4.1.10" # Use a local project when debugging # git "~/Code/segmentio/analytics-ios/" "master" diff --git a/Examples/MetarouterMac/SegmentMac.xcodeproj/project.pbxproj b/Examples/SegmentMac/SegmentMac.xcodeproj/project.pbxproj similarity index 100% rename from Examples/MetarouterMac/SegmentMac.xcodeproj/project.pbxproj rename to Examples/SegmentMac/SegmentMac.xcodeproj/project.pbxproj diff --git a/Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Metarouter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Metarouter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from Examples/MetarouterMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to Examples/SegmentMac/SegmentMac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Examples/MetarouterMac/SegmentMac/AppDelegate.swift b/Examples/SegmentMac/SegmentMac/AppDelegate.swift similarity index 100% rename from Examples/MetarouterMac/SegmentMac/AppDelegate.swift rename to Examples/SegmentMac/SegmentMac/AppDelegate.swift diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-1024.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-1024.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-1024.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-1024.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-128.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-128.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-128.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-128.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-16.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-16.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-16.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-16.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-256.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-256.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-256.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-256.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-257.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-257.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-257.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-257.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-32.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-32.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-32.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-32.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-33.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-33.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-33.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-33.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-512.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-512.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-512.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-512.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-513.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-513.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-513.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-513.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-64.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-64.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-64.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/AppIcon.appiconset/Segment_Logo-64.png diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/Contents.json b/Examples/SegmentMac/SegmentMac/Assets.xcassets/Contents.json similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/Contents.json rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/Contents.json diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Contents.json b/Examples/SegmentMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Contents.json similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Contents.json rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Contents.json diff --git a/Examples/MetarouterMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Segment_Log.png b/Examples/SegmentMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Segment_Log.png similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Segment_Log.png rename to Examples/SegmentMac/SegmentMac/Assets.xcassets/Segment_Log.imageset/Segment_Log.png diff --git a/Examples/MetarouterMac/SegmentMac/Base.lproj/Main.storyboard b/Examples/SegmentMac/SegmentMac/Base.lproj/Main.storyboard similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Base.lproj/Main.storyboard rename to Examples/SegmentMac/SegmentMac/Base.lproj/Main.storyboard diff --git a/Examples/MetarouterMac/SegmentMac/Info.plist b/Examples/SegmentMac/SegmentMac/Info.plist similarity index 100% rename from Examples/MetarouterMac/SegmentMac/Info.plist rename to Examples/SegmentMac/SegmentMac/Info.plist diff --git a/Examples/MetarouterMac/SegmentMac/SegmentMac.entitlements b/Examples/SegmentMac/SegmentMac/SegmentMac.entitlements similarity index 100% rename from Examples/MetarouterMac/SegmentMac/SegmentMac.entitlements rename to Examples/SegmentMac/SegmentMac/SegmentMac.entitlements diff --git a/Examples/MetarouterMac/SegmentMac/ViewController.swift b/Examples/SegmentMac/SegmentMac/ViewController.swift similarity index 100% rename from Examples/MetarouterMac/SegmentMac/ViewController.swift rename to Examples/SegmentMac/SegmentMac/ViewController.swift diff --git a/Makefile b/Makefile index 38cbe4174..d7fa81167 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -XC_ARGS := -project Segment.xcodeproj GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES +XC_ARGS := -project Analytics.xcodeproj GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES IOS_XCARGS := $(XC_ARGS) -destination "platform=iOS Simulator,name=iPhone 11" -sdk iphonesimulator TVOS_XCARGS := $(XC_ARGS) -destination "platform=tvOS Simulator,name=Apple TV" MACOS_XCARGS := $(XC_ARGS) -destination "platform=macOS" diff --git a/MetarouterAnalytics.podspec b/MetarouterAnalytics.podspec index ec7afa744..182214f9a 100644 --- a/MetarouterAnalytics.podspec +++ b/MetarouterAnalytics.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MetarouterAnalytics" s.module_name = "Metarouter" - s.version = "4.1.7" + s.version = "4.1.10" s.summary = "The hassle-free way to add analytics to your iOS app." s.description = <<-DESC @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.homepage = "http://metarouter.io/" s.license = { :type => 'MIT' } s.author = { "Astronomer" => "info@metarouter.io" } - s.source = { :git => "https://github.com/metarouter/analytics-ios.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/metarouterio/analytics-ios.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/metarouter' s.ios.deployment_target = '10.0' @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.13' s.source_files = [ - 'Metarouter/Classes/**/*.{h,m}', - 'Metarouter/Internal/**/*.{h,m}' + 'Segment/Classes/**/*.{h,m}', + 'Segment/Internal/**/*.{h,m}' ] -end +end \ No newline at end of file diff --git a/Package.swift b/Package.swift index 002f8e6ea..a27b844b8 100644 --- a/Package.swift +++ b/Package.swift @@ -24,8 +24,7 @@ let package = Package( .target( name: "Metarouter", dependencies: [], - path: "Metarouter/", - exclude: ["SwiftSources"], + path: "Segment/", sources: ["Classes", "Internal"], publicHeadersPath: "Classes", cSettings: [ @@ -34,4 +33,4 @@ let package = Package( ] ) ] -) +) \ No newline at end of file diff --git a/README.md b/README.md index 4b5f8d717..8c7999697 100644 --- a/README.md +++ b/README.md @@ -89,4 +89,4 @@ Refer to the Quickstart documentation at [https://docs.metarouter.io/docs/quick- ## Documentation -More detailed documentation is available at [https://docs.metarouter.io/docs/analyticsjs-for-ios](https://docs.metarouter.io/docs/analyticsjs-for-ios). +More detailed documentation is available at [https://docs.metarouter.io/docs/analyticsjs-for-ios](https://docs.metarouter.io/docs/analyticsjs-for-ios). \ No newline at end of file diff --git a/RELEASING.md b/RELEASING.md index fb9e95e95..6e728260b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,12 +1,12 @@ Releasing ========= - 1. Update the version in `SEGAnalytics.m`, `Analytics.podspec`, `Segment/Info.plist` and `Examples/CarthageExample/Cartfile` to the next release version. + 1. Update the version in `SEGAnalytics.m`, `MetarouterAnalytics.podspec` and `Examples/CarthageExample/Cartfile` to the next release version. 2. Update the `CHANGELOG.md` for the impending release. 3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version). 4. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version). 5. `git push && git push --tags`. - 6. `pod trunk push Analytics.podspec`. + 6. `pod trunk push MetarouterAnalytics.podspec`. 7. Next we'll create a dynamic framework for manual installation leveraging Carthage. * `cd Examples/CarthageExample`. * `make clean` to be safe then `make build`. diff --git a/Metarouter/Classes/Metarouter.h b/Segment/Classes/Analytics.h similarity index 100% rename from Metarouter/Classes/Metarouter.h rename to Segment/Classes/Analytics.h diff --git a/Metarouter/Classes/SEGAliasPayload.h b/Segment/Classes/SEGAliasPayload.h similarity index 100% rename from Metarouter/Classes/SEGAliasPayload.h rename to Segment/Classes/SEGAliasPayload.h diff --git a/Metarouter/Classes/SEGAliasPayload.m b/Segment/Classes/SEGAliasPayload.m similarity index 100% rename from Metarouter/Classes/SEGAliasPayload.m rename to Segment/Classes/SEGAliasPayload.m diff --git a/Metarouter/Classes/SEGAnalytics.h b/Segment/Classes/SEGAnalytics.h similarity index 100% rename from Metarouter/Classes/SEGAnalytics.h rename to Segment/Classes/SEGAnalytics.h diff --git a/Metarouter/Classes/SEGAnalytics.m b/Segment/Classes/SEGAnalytics.m similarity index 99% rename from Metarouter/Classes/SEGAnalytics.m rename to Segment/Classes/SEGAnalytics.m index 118abbe1a..9ccd84127 100644 --- a/Metarouter/Classes/SEGAnalytics.m +++ b/Segment/Classes/SEGAnalytics.m @@ -53,7 +53,7 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration // In swift this would not have been OK... But hey.. It's objc // TODO: Figure out if this is really the best way to do things here. self.integrationsManager = [[SEGIntegrationsManager alloc] initWithAnalytics:self]; - + self.runner = [[SEGMiddlewareRunner alloc] initWithMiddleware: [configuration.sourceMiddleware ?: @[] arrayByAddingObject:self.integrationsManager]]; @@ -110,7 +110,7 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration } } #endif - + [SEGState sharedInstance].configuration = configuration; [[SEGState sharedInstance].context updateStaticContext]; } @@ -229,7 +229,7 @@ - (void)_applicationWillEnterForeground @"version" : currentVersion ?: @"", @"build" : currentBuild ?: @"", }]; - + [[SEGState sharedInstance].context updateStaticContext]; } @@ -270,7 +270,7 @@ - (void)identify:(NSString *)userId traits:(NSDictionary *)traits - (void)identify:(NSString *)userId traits:(NSDictionary *)traits options:(NSDictionary *)options { NSCAssert2(userId.length > 0 || traits.count > 0, @"either userId (%@) or traits (%@) must be provided.", userId, traits); - + // this is done here to match functionality on android where these are inserted BEFORE being spread out amongst destinations. // it will be set globally later when it runs through SEGIntegrationManager.identify. NSString *anonId = [options objectForKey:@"anonymousId"]; @@ -297,7 +297,7 @@ - (void)identify:(NSString *)userId traits:(NSDictionary *)traits options:(NSDic // merge w/ existing traits and set them. [existingTraitsCopy addEntriesFromDictionary:traitsCopy]; [SEGState sharedInstance].userInfo.traits = existingTraitsCopy; - + [self run:SEGEventTypeIdentify payload: [[SEGIdentifyPayload alloc] initWithUserId:userId anonymousId:anonId @@ -483,7 +483,7 @@ - (void)openURL:(NSURL *)url options:(NSDictionary *)options if (!self.oneTimeConfiguration.trackDeepLinks) { return; } - + NSString *urlString = url.absoluteString; [SEGState sharedInstance].context.referrer = @{ @"url" : urlString, @@ -549,7 +549,7 @@ + (NSString *)version { // this has to match the actual version, NOT what's in info.plist // because Apple only accepts X.X.X as versions in the review process. - return @"4.1.4"; + return @"4.1.10"; } #pragma mark - Helpers @@ -559,7 +559,7 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload if (!self.enabled) { return; } - + if (getAdTrackingEnabled(self.oneTimeConfiguration)) { // if idfa has changed since last we looked, we need to rebuild // the static context to pick up the change. @@ -569,13 +569,13 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload [[SEGState sharedInstance].context updateStaticContext]; } } - + if (self.oneTimeConfiguration.experimental.nanosecondTimestamps) { payload.timestamp = iso8601NanoFormattedString([NSDate date]); } else { payload.timestamp = iso8601FormattedString([NSDate date]); } - + SEGContext *context = [[[SEGContext alloc] initWithAnalytics:self] modify:^(id _Nonnull ctx) { ctx.eventType = eventType; ctx.payload = payload; @@ -587,7 +587,7 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload ctx.payload.anonymousId = [SEGState sharedInstance].userInfo.anonymousId; } }]; - + // Could probably do more things with callback later, but we don't use it yet. [self.runner run:context callback:nil]; } diff --git a/Metarouter/Classes/SEGAnalyticsConfiguration.h b/Segment/Classes/SEGAnalyticsConfiguration.h similarity index 99% rename from Metarouter/Classes/SEGAnalyticsConfiguration.h rename to Segment/Classes/SEGAnalyticsConfiguration.h index 610722075..bec98c8e4 100644 --- a/Metarouter/Classes/SEGAnalyticsConfiguration.h +++ b/Segment/Classes/SEGAnalyticsConfiguration.h @@ -54,7 +54,7 @@ NS_SWIFT_NAME(AnalyticsConfiguration) /** * Creates and returns a configuration with default settings and the given write key. - * This will use the API host `https://e.metarouter.io/v1` as the default. + * This will use the API host `https://api.segment.io/v1` as the default. * * @param writeKey Your project's write key from segment.io. */ diff --git a/Metarouter/Classes/SEGAnalyticsConfiguration.m b/Segment/Classes/SEGAnalyticsConfiguration.m similarity index 100% rename from Metarouter/Classes/SEGAnalyticsConfiguration.m rename to Segment/Classes/SEGAnalyticsConfiguration.m diff --git a/Metarouter/Classes/SEGAnalyticsUtils.h b/Segment/Classes/SEGAnalyticsUtils.h similarity index 100% rename from Metarouter/Classes/SEGAnalyticsUtils.h rename to Segment/Classes/SEGAnalyticsUtils.h diff --git a/Metarouter/Classes/SEGAnalyticsUtils.m b/Segment/Classes/SEGAnalyticsUtils.m similarity index 100% rename from Metarouter/Classes/SEGAnalyticsUtils.m rename to Segment/Classes/SEGAnalyticsUtils.m diff --git a/Metarouter/Classes/SEGContext.h b/Segment/Classes/SEGContext.h similarity index 100% rename from Metarouter/Classes/SEGContext.h rename to Segment/Classes/SEGContext.h diff --git a/Metarouter/Classes/SEGContext.m b/Segment/Classes/SEGContext.m similarity index 100% rename from Metarouter/Classes/SEGContext.m rename to Segment/Classes/SEGContext.m diff --git a/Metarouter/Classes/SEGCrypto.h b/Segment/Classes/SEGCrypto.h similarity index 100% rename from Metarouter/Classes/SEGCrypto.h rename to Segment/Classes/SEGCrypto.h diff --git a/Metarouter/Classes/SEGGroupPayload.h b/Segment/Classes/SEGGroupPayload.h similarity index 100% rename from Metarouter/Classes/SEGGroupPayload.h rename to Segment/Classes/SEGGroupPayload.h diff --git a/Metarouter/Classes/SEGGroupPayload.m b/Segment/Classes/SEGGroupPayload.m similarity index 100% rename from Metarouter/Classes/SEGGroupPayload.m rename to Segment/Classes/SEGGroupPayload.m diff --git a/Metarouter/Classes/SEGHTTPClient.h b/Segment/Classes/SEGHTTPClient.h similarity index 99% rename from Metarouter/Classes/SEGHTTPClient.h rename to Segment/Classes/SEGHTTPClient.h index 6a2c825e9..c411d14ec 100644 --- a/Metarouter/Classes/SEGHTTPClient.h +++ b/Segment/Classes/SEGHTTPClient.h @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN extern NSString * const kSegmentAPIBaseHost; + NS_SWIFT_NAME(HTTPClient) @interface SEGHTTPClient : NSObject diff --git a/Metarouter/Classes/SEGHTTPClient.m b/Segment/Classes/SEGHTTPClient.m similarity index 96% rename from Metarouter/Classes/SEGHTTPClient.m rename to Segment/Classes/SEGHTTPClient.m index 9bbf41218..c34081b94 100644 --- a/Metarouter/Classes/SEGHTTPClient.m +++ b/Segment/Classes/SEGHTTPClient.m @@ -3,7 +3,7 @@ #import "SEGAnalyticsUtils.h" #import "SEGUtils.h" -#define CDN_BASE [NSURL URLWithString:@"https://cdn.metarouter.io/v1"] +#define SEGMENT_CDN_BASE [NSURL URLWithString:@"https://cdn.metarouter.io/v1"] static const NSUInteger kMaxBatchSize = 475000; // 475KB @@ -151,7 +151,7 @@ - (NSURLSessionDataTask *)settingsForWriteKey:(NSString *)writeKey completionHan { NSURLSession *session = self.genericSession; - NSURL *url = [CDN_BASE URLByAppendingPathComponent:[NSString stringWithFormat:@"/projects/%@/settings", writeKey]]; + NSURL *url = [SEGMENT_CDN_BASE URLByAppendingPathComponent:[NSString stringWithFormat:@"/projects/%@/settings", writeKey]]; NSMutableURLRequest *request = self.requestFactory(url); [request setHTTPMethod:@"GET"]; diff --git a/Metarouter/Classes/SEGIdentifyPayload.h b/Segment/Classes/SEGIdentifyPayload.h similarity index 100% rename from Metarouter/Classes/SEGIdentifyPayload.h rename to Segment/Classes/SEGIdentifyPayload.h diff --git a/Metarouter/Classes/SEGIdentifyPayload.m b/Segment/Classes/SEGIdentifyPayload.m similarity index 100% rename from Metarouter/Classes/SEGIdentifyPayload.m rename to Segment/Classes/SEGIdentifyPayload.m diff --git a/Metarouter/Classes/SEGIntegration.h b/Segment/Classes/SEGIntegration.h similarity index 100% rename from Metarouter/Classes/SEGIntegration.h rename to Segment/Classes/SEGIntegration.h diff --git a/Metarouter/Classes/SEGIntegrationFactory.h b/Segment/Classes/SEGIntegrationFactory.h similarity index 100% rename from Metarouter/Classes/SEGIntegrationFactory.h rename to Segment/Classes/SEGIntegrationFactory.h diff --git a/Metarouter/Classes/SEGMiddleware.h b/Segment/Classes/SEGMiddleware.h similarity index 100% rename from Metarouter/Classes/SEGMiddleware.h rename to Segment/Classes/SEGMiddleware.h diff --git a/Metarouter/Classes/SEGMiddleware.m b/Segment/Classes/SEGMiddleware.m similarity index 100% rename from Metarouter/Classes/SEGMiddleware.m rename to Segment/Classes/SEGMiddleware.m diff --git a/Metarouter/Classes/SEGPayload.h b/Segment/Classes/SEGPayload.h similarity index 100% rename from Metarouter/Classes/SEGPayload.h rename to Segment/Classes/SEGPayload.h diff --git a/Metarouter/Classes/SEGPayload.m b/Segment/Classes/SEGPayload.m similarity index 100% rename from Metarouter/Classes/SEGPayload.m rename to Segment/Classes/SEGPayload.m diff --git a/Metarouter/Classes/SEGReachability.h b/Segment/Classes/SEGReachability.h similarity index 100% rename from Metarouter/Classes/SEGReachability.h rename to Segment/Classes/SEGReachability.h diff --git a/Metarouter/Classes/SEGReachability.m b/Segment/Classes/SEGReachability.m similarity index 100% rename from Metarouter/Classes/SEGReachability.m rename to Segment/Classes/SEGReachability.m diff --git a/Metarouter/Classes/SEGScreenPayload.h b/Segment/Classes/SEGScreenPayload.h similarity index 100% rename from Metarouter/Classes/SEGScreenPayload.h rename to Segment/Classes/SEGScreenPayload.h diff --git a/Metarouter/Classes/SEGScreenPayload.m b/Segment/Classes/SEGScreenPayload.m similarity index 100% rename from Metarouter/Classes/SEGScreenPayload.m rename to Segment/Classes/SEGScreenPayload.m diff --git a/Metarouter/Classes/SEGScreenReporting.h b/Segment/Classes/SEGScreenReporting.h similarity index 100% rename from Metarouter/Classes/SEGScreenReporting.h rename to Segment/Classes/SEGScreenReporting.h diff --git a/Metarouter/Classes/SEGSegmentIntegration.h b/Segment/Classes/SEGSegmentIntegration.h similarity index 100% rename from Metarouter/Classes/SEGSegmentIntegration.h rename to Segment/Classes/SEGSegmentIntegration.h diff --git a/Metarouter/Classes/SEGSegmentIntegration.m b/Segment/Classes/SEGSegmentIntegration.m similarity index 100% rename from Metarouter/Classes/SEGSegmentIntegration.m rename to Segment/Classes/SEGSegmentIntegration.m diff --git a/Metarouter/Classes/SEGSegmentIntegrationFactory.h b/Segment/Classes/SEGSegmentIntegrationFactory.h similarity index 100% rename from Metarouter/Classes/SEGSegmentIntegrationFactory.h rename to Segment/Classes/SEGSegmentIntegrationFactory.h diff --git a/Metarouter/Classes/SEGSegmentIntegrationFactory.m b/Segment/Classes/SEGSegmentIntegrationFactory.m similarity index 100% rename from Metarouter/Classes/SEGSegmentIntegrationFactory.m rename to Segment/Classes/SEGSegmentIntegrationFactory.m diff --git a/Metarouter/Classes/SEGSerializableValue.h b/Segment/Classes/SEGSerializableValue.h similarity index 100% rename from Metarouter/Classes/SEGSerializableValue.h rename to Segment/Classes/SEGSerializableValue.h diff --git a/Metarouter/Classes/SEGStorage.h b/Segment/Classes/SEGStorage.h similarity index 100% rename from Metarouter/Classes/SEGStorage.h rename to Segment/Classes/SEGStorage.h diff --git a/Metarouter/Classes/SEGTrackPayload.h b/Segment/Classes/SEGTrackPayload.h similarity index 100% rename from Metarouter/Classes/SEGTrackPayload.h rename to Segment/Classes/SEGTrackPayload.h diff --git a/Metarouter/Classes/SEGTrackPayload.m b/Segment/Classes/SEGTrackPayload.m similarity index 100% rename from Metarouter/Classes/SEGTrackPayload.m rename to Segment/Classes/SEGTrackPayload.m diff --git a/Metarouter/Classes/SEGWebhookIntegration.h b/Segment/Classes/SEGWebhookIntegration.h similarity index 100% rename from Metarouter/Classes/SEGWebhookIntegration.h rename to Segment/Classes/SEGWebhookIntegration.h diff --git a/Metarouter/Classes/SEGWebhookIntegration.m b/Segment/Classes/SEGWebhookIntegration.m similarity index 100% rename from Metarouter/Classes/SEGWebhookIntegration.m rename to Segment/Classes/SEGWebhookIntegration.m diff --git a/Metarouter/Info.plist b/Segment/Info.plist similarity index 94% rename from Metarouter/Info.plist rename to Segment/Info.plist index 81fb42897..ec0cc7b0c 100644 --- a/Metarouter/Info.plist +++ b/Segment/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.1.6 + $(MARKETING_VERSION) CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Metarouter/Internal/NSData+SEGGZIP.h b/Segment/Internal/NSData+SEGGZIP.h similarity index 100% rename from Metarouter/Internal/NSData+SEGGZIP.h rename to Segment/Internal/NSData+SEGGZIP.h diff --git a/Metarouter/Internal/NSData+SEGGZIP.m b/Segment/Internal/NSData+SEGGZIP.m similarity index 100% rename from Metarouter/Internal/NSData+SEGGZIP.m rename to Segment/Internal/NSData+SEGGZIP.m diff --git a/Metarouter/Internal/NSViewController+SEGScreen.h b/Segment/Internal/NSViewController+SEGScreen.h similarity index 100% rename from Metarouter/Internal/NSViewController+SEGScreen.h rename to Segment/Internal/NSViewController+SEGScreen.h diff --git a/Metarouter/Internal/NSViewController+SEGScreen.m b/Segment/Internal/NSViewController+SEGScreen.m similarity index 100% rename from Metarouter/Internal/NSViewController+SEGScreen.m rename to Segment/Internal/NSViewController+SEGScreen.m diff --git a/Metarouter/Internal/SEGAES256Crypto.h b/Segment/Internal/SEGAES256Crypto.h similarity index 100% rename from Metarouter/Internal/SEGAES256Crypto.h rename to Segment/Internal/SEGAES256Crypto.h diff --git a/Metarouter/Internal/SEGAES256Crypto.m b/Segment/Internal/SEGAES256Crypto.m similarity index 100% rename from Metarouter/Internal/SEGAES256Crypto.m rename to Segment/Internal/SEGAES256Crypto.m diff --git a/Metarouter/Internal/SEGFileStorage.h b/Segment/Internal/SEGFileStorage.h similarity index 100% rename from Metarouter/Internal/SEGFileStorage.h rename to Segment/Internal/SEGFileStorage.h diff --git a/Metarouter/Internal/SEGFileStorage.m b/Segment/Internal/SEGFileStorage.m similarity index 100% rename from Metarouter/Internal/SEGFileStorage.m rename to Segment/Internal/SEGFileStorage.m diff --git a/Metarouter/Internal/SEGIntegrationsManager.h b/Segment/Internal/SEGIntegrationsManager.h similarity index 100% rename from Metarouter/Internal/SEGIntegrationsManager.h rename to Segment/Internal/SEGIntegrationsManager.h diff --git a/Metarouter/Internal/SEGIntegrationsManager.m b/Segment/Internal/SEGIntegrationsManager.m similarity index 99% rename from Metarouter/Internal/SEGIntegrationsManager.m rename to Segment/Internal/SEGIntegrationsManager.m index 9d45bbca3..ea550b630 100644 --- a/Metarouter/Internal/SEGIntegrationsManager.m +++ b/Segment/Internal/SEGIntegrationsManager.m @@ -156,7 +156,9 @@ - (NSString *)cachedAnonymousId - (void)onAppForeground:(NSNotification *)note { - [self refreshSettings]; + seg_dispatch_specific_async(_serialQueue, ^{ + [self refreshSettings]; + }); } - (void)handleAppStateNotification:(NSString *)notificationName @@ -520,7 +522,7 @@ - (void)refreshSettings + (BOOL)isIntegration:(NSString *)key enabledInOptions:(NSDictionary *)options { - // If the event is in the tracking plan, it should always be sent to e.metarouter.io. + // If the event is in the tracking plan, it should always be sent to api.segment.io. if ([kSEGSegmentDestinationName isEqualToString:key]) { return YES; } @@ -550,7 +552,7 @@ + (BOOL)isIntegration:(NSString *)key enabledInOptions:(NSDictionary *)options + (BOOL)isTrackEvent:(NSString *)event enabledForIntegration:(NSString *)key inPlan:(NSDictionary *)plan { - // Whether the event is enabled or disabled, it should always be sent to e.metarouter.io. + // Whether the event is enabled or disabled, it should always be sent to api.segment.io. if ([key isEqualToString:kSEGSegmentDestinationName]) { return YES; } diff --git a/Metarouter/Internal/SEGMacros.h b/Segment/Internal/SEGMacros.h similarity index 100% rename from Metarouter/Internal/SEGMacros.h rename to Segment/Internal/SEGMacros.h diff --git a/Metarouter/Internal/SEGState.h b/Segment/Internal/SEGState.h similarity index 100% rename from Metarouter/Internal/SEGState.h rename to Segment/Internal/SEGState.h diff --git a/Metarouter/Internal/SEGState.m b/Segment/Internal/SEGState.m similarity index 100% rename from Metarouter/Internal/SEGState.m rename to Segment/Internal/SEGState.m diff --git a/Metarouter/Internal/SEGStoreKitTracker.h b/Segment/Internal/SEGStoreKitTracker.h similarity index 100% rename from Metarouter/Internal/SEGStoreKitTracker.h rename to Segment/Internal/SEGStoreKitTracker.h diff --git a/Metarouter/Internal/SEGStoreKitTracker.m b/Segment/Internal/SEGStoreKitTracker.m similarity index 100% rename from Metarouter/Internal/SEGStoreKitTracker.m rename to Segment/Internal/SEGStoreKitTracker.m diff --git a/Metarouter/Internal/SEGUserDefaultsStorage.h b/Segment/Internal/SEGUserDefaultsStorage.h similarity index 100% rename from Metarouter/Internal/SEGUserDefaultsStorage.h rename to Segment/Internal/SEGUserDefaultsStorage.h diff --git a/Metarouter/Internal/SEGUserDefaultsStorage.m b/Segment/Internal/SEGUserDefaultsStorage.m similarity index 100% rename from Metarouter/Internal/SEGUserDefaultsStorage.m rename to Segment/Internal/SEGUserDefaultsStorage.m diff --git a/Metarouter/Internal/SEGUtils.h b/Segment/Internal/SEGUtils.h similarity index 100% rename from Metarouter/Internal/SEGUtils.h rename to Segment/Internal/SEGUtils.h diff --git a/Metarouter/Internal/SEGUtils.m b/Segment/Internal/SEGUtils.m similarity index 100% rename from Metarouter/Internal/SEGUtils.m rename to Segment/Internal/SEGUtils.m diff --git a/Metarouter/Internal/UIViewController+SEGScreen.h b/Segment/Internal/UIViewController+SEGScreen.h similarity index 100% rename from Metarouter/Internal/UIViewController+SEGScreen.h rename to Segment/Internal/UIViewController+SEGScreen.h diff --git a/Metarouter/Internal/UIViewController+SEGScreen.m b/Segment/Internal/UIViewController+SEGScreen.m similarity index 100% rename from Metarouter/Internal/UIViewController+SEGScreen.m rename to Segment/Internal/UIViewController+SEGScreen.m diff --git a/MetarouterTests/AnalyticsTests-Bridging-Header.h b/SegmentTests/AnalyticsTests-Bridging-Header.h similarity index 100% rename from MetarouterTests/AnalyticsTests-Bridging-Header.h rename to SegmentTests/AnalyticsTests-Bridging-Header.h diff --git a/MetarouterTests/AnalyticsTests.swift b/SegmentTests/AnalyticsTests.swift similarity index 99% rename from MetarouterTests/AnalyticsTests.swift rename to SegmentTests/AnalyticsTests.swift index 34893142f..af5dd2f8d 100644 --- a/MetarouterTests/AnalyticsTests.swift +++ b/SegmentTests/AnalyticsTests.swift @@ -66,7 +66,7 @@ class AnalyticsTests: XCTestCase { XCTAssertEqual(config.maxQueueSize, 1000) XCTAssertEqual(config.writeKey, "QUI5ydwIGeFFTa1IvCBUhxL9PyW5B0jE") // not needed as segment settings API can provide different host values now. - //XCTAssertEqual(config.apiHost?.absoluteString, "https://e.metarouter.io/v1") + //XCTAssertEqual(config.apiHost?.absoluteString, "https://api.segment.io/v1") XCTAssertEqual(config.shouldUseLocationServices, false) XCTAssertEqual(config.enableAdvertisingTracking, true) XCTAssertEqual(config.shouldUseBluetooth, false) diff --git a/MetarouterTests/AnalyticsUtilTests.swift b/SegmentTests/AnalyticsUtilTests.swift similarity index 100% rename from MetarouterTests/AnalyticsUtilTests.swift rename to SegmentTests/AnalyticsUtilTests.swift diff --git a/MetarouterTests/AutoScreenReportingTest.swift b/SegmentTests/AutoScreenReportingTest.swift similarity index 100% rename from MetarouterTests/AutoScreenReportingTest.swift rename to SegmentTests/AutoScreenReportingTest.swift diff --git a/MetarouterTests/ContextTest.swift b/SegmentTests/ContextTest.swift similarity index 100% rename from MetarouterTests/ContextTest.swift rename to SegmentTests/ContextTest.swift diff --git a/MetarouterTests/CryptoTest.swift b/SegmentTests/CryptoTest.swift similarity index 100% rename from MetarouterTests/CryptoTest.swift rename to SegmentTests/CryptoTest.swift diff --git a/MetarouterTests/EndToEndTests.swift b/SegmentTests/EndToEndTests.swift similarity index 100% rename from MetarouterTests/EndToEndTests.swift rename to SegmentTests/EndToEndTests.swift diff --git a/MetarouterTests/FileStorageTest.swift b/SegmentTests/FileStorageTest.swift similarity index 100% rename from MetarouterTests/FileStorageTest.swift rename to SegmentTests/FileStorageTest.swift diff --git a/MetarouterTests/HTTPClientTest.swift b/SegmentTests/HTTPClientTest.swift similarity index 94% rename from MetarouterTests/HTTPClientTest.swift rename to SegmentTests/HTTPClientTest.swift index 2cb331094..a763e6e88 100644 --- a/MetarouterTests/HTTPClientTest.swift +++ b/SegmentTests/HTTPClientTest.swift @@ -39,7 +39,7 @@ class HTTPClientTest: XCTestCase { func testDefaultRequestFactor() { let factory = HTTPClient.defaultRequestFactory() - let url = URL(string: "https://e.metarouter.io/v1/batch") + let url = URL(string: "https://api.segment.io/v1/batch") let request = factory(url!) XCTAssertEqual(request.url, url, "URLs should be the same") } @@ -128,7 +128,7 @@ class HTTPClientTest: XCTestCase { } func testUploadNoRetry2xx() { - _ = stubRequest("POST", "https://e.metarouter.io/v1/batch" as NSString) + _ = stubRequest("POST", "https://api.segment.io/v1/batch" as NSString) .withHeader("User-Agent", "analytics-ios/" + Analytics.version())! .withJsonGzippedBody(batch as AnyObject) .withWriteKey("bar") @@ -142,7 +142,7 @@ class HTTPClientTest: XCTestCase { } func testUploadRetry3xx() { - _ = stubRequest("POST", "https://e.metarouter.io/v1/batch" as NSString) + _ = stubRequest("POST", "https://api.segment.io/v1/batch" as NSString) .withHeader("User-Agent", "analytics-ios/" + Analytics.version())! .withJsonGzippedBody(batch as AnyObject) .withWriteKey("bar") @@ -156,7 +156,7 @@ class HTTPClientTest: XCTestCase { } func testUploadNoRetry4xx() { - _ = stubRequest("POST", "https://e.metarouter.io/v1/batch" as NSString) + _ = stubRequest("POST", "https://api.segment.io/v1/batch" as NSString) .withHeader("User-Agent", "analytics-ios/" + Analytics.version())! .withJsonGzippedBody(batch as AnyObject) .withWriteKey("bar") @@ -170,7 +170,7 @@ class HTTPClientTest: XCTestCase { } func testRetryFor429() { - _ = stubRequest("POST", "https://e.metarouter.io/v1/batch" as NSString) + _ = stubRequest("POST", "https://api.segment.io/v1/batch" as NSString) .withHeader("User-Agent", "analytics-ios/" + Analytics.version())! .withJsonGzippedBody(batch as AnyObject) .withWriteKey("bar") @@ -184,7 +184,7 @@ class HTTPClientTest: XCTestCase { } func testRetryFor5xx() { - _ = stubRequest("POST", "https://e.metarouter.io/v1/batch" as NSString) + _ = stubRequest("POST", "https://api.segment.io/v1/batch" as NSString) .withHeader("User-Agent", "analytics-ios/" + Analytics.version())! .withJsonGzippedBody(batch as AnyObject) .withWriteKey("bar") diff --git a/MetarouterTests/Info.plist b/SegmentTests/Info.plist similarity index 100% rename from MetarouterTests/Info.plist rename to SegmentTests/Info.plist diff --git a/MetarouterTests/IntegrationsManagerTest.swift b/SegmentTests/IntegrationsManagerTest.swift similarity index 100% rename from MetarouterTests/IntegrationsManagerTest.swift rename to SegmentTests/IntegrationsManagerTest.swift diff --git a/MetarouterTests/MiddlewareTests.swift b/SegmentTests/MiddlewareTests.swift similarity index 100% rename from MetarouterTests/MiddlewareTests.swift rename to SegmentTests/MiddlewareTests.swift diff --git a/MetarouterTests/SerializationTests.m b/SegmentTests/SerializationTests.m similarity index 100% rename from MetarouterTests/SerializationTests.m rename to SegmentTests/SerializationTests.m diff --git a/MetarouterTests/StoreKitTrackerTests.swift b/SegmentTests/StoreKitTrackerTests.swift similarity index 100% rename from MetarouterTests/StoreKitTrackerTests.swift rename to SegmentTests/StoreKitTrackerTests.swift diff --git a/MetarouterTests/TrackingTests.swift b/SegmentTests/TrackingTests.swift similarity index 100% rename from MetarouterTests/TrackingTests.swift rename to SegmentTests/TrackingTests.swift diff --git a/MetarouterTests/UIViewController+SegScreenTest.h b/SegmentTests/UIViewController+SegScreenTest.h similarity index 100% rename from MetarouterTests/UIViewController+SegScreenTest.h rename to SegmentTests/UIViewController+SegScreenTest.h diff --git a/MetarouterTests/UserDefaultsStorageTest.swift b/SegmentTests/UserDefaultsStorageTest.swift similarity index 100% rename from MetarouterTests/UserDefaultsStorageTest.swift rename to SegmentTests/UserDefaultsStorageTest.swift diff --git a/MetarouterTests/Utils/NSData+SEGGUNZIPP.h b/SegmentTests/Utils/NSData+SEGGUNZIPP.h similarity index 100% rename from MetarouterTests/Utils/NSData+SEGGUNZIPP.h rename to SegmentTests/Utils/NSData+SEGGUNZIPP.h diff --git a/MetarouterTests/Utils/NSData+SEGGUNZIPP.m b/SegmentTests/Utils/NSData+SEGGUNZIPP.m similarity index 100% rename from MetarouterTests/Utils/NSData+SEGGUNZIPP.m rename to SegmentTests/Utils/NSData+SEGGUNZIPP.m diff --git a/MetarouterTests/Utils/ObjcUtils.h b/SegmentTests/Utils/ObjcUtils.h similarity index 100% rename from MetarouterTests/Utils/ObjcUtils.h rename to SegmentTests/Utils/ObjcUtils.h diff --git a/MetarouterTests/Utils/ObjcUtils.m b/SegmentTests/Utils/ObjcUtils.m similarity index 100% rename from MetarouterTests/Utils/ObjcUtils.m rename to SegmentTests/Utils/ObjcUtils.m diff --git a/MetarouterTests/Utils/TestUtils.swift b/SegmentTests/Utils/TestUtils.swift similarity index 100% rename from MetarouterTests/Utils/TestUtils.swift rename to SegmentTests/Utils/TestUtils.swift diff --git a/dm-integrations.txt b/dm-integrations.txt new file mode 100644 index 000000000..8cb2fb24e --- /dev/null +++ b/dm-integrations.txt @@ -0,0 +1,29 @@ +Segment Owned +------------- +analytics-ios-integration-firebase +analytics-ios-integration-amplitude +analytics-ios-integration-mixpanel +analytics-ios-integration-google-analytics +analytics-ios-integration-localytics +analytics-ios-integration-adjust +analytics-ios-integration-comscore +analytics-ios-integration-facebook-app-events +analytics-ios-integration-flurry +analytics-ios-integration-optimizely +analytics-ios-integration-intercom +analytics-ios-integration-taplytics +analytics-ios-integration-optimizely-x +analytics-ios-integration-adobe-analytics +analytics-ios-integration-nielsen-dcr +analytics-ios-integration-crittercism +analytics-ios-integration-bugsnag +analytics-ios-integration-countly +analytics-ios-integration-quantcast +analytics-ios-integration-nielsen-dtvr + +Partner Owned +------------- +analytics-ios-integration-tapstream +clevertap-segment-ios +segment-appsflyer-ios +appboy-segment-ios