From d420d735aa0111c75c9b5b0073b17a10b016fe09 Mon Sep 17 00:00:00 2001 From: Tung Vu <53031642+tung-vu-td@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:06:45 +0700 Subject: [PATCH] Prefixes headers with TD (#136) * Prefixes headers with TD * Test iOS 18.2 beta --- .circleci/config.yml | 12 ++++++++--- Podfile.lock | 2 +- TreasureData.xcodeproj/project.pbxproj | 20 +++++++++---------- TreasureData/TreasureData.m | 6 +++--- ...SString+Helpers.h => NSString+TDHelpers.h} | 2 +- .../{Constants.h => TDConstants.h} | 2 +- TreasureDataInternal/TDIAPObserver.m | 2 +- .../{Session.h => TDSession.h} | 2 +- .../{Session.m => TDSession.m} | 4 ++-- TreasureDataInternal/TDUtils.m | 2 +- TreasureDataTests/SessionTests.m | 2 +- TreasureDataTests/TreasureDataTests.m | 2 +- 12 files changed, 32 insertions(+), 26 deletions(-) rename TreasureDataInternal/{NSString+Helpers.h => NSString+TDHelpers.h} (98%) rename TreasureDataInternal/{Constants.h => TDConstants.h} (98%) rename TreasureDataInternal/{Session.h => TDSession.h} (95%) rename TreasureDataInternal/{Session.m => TDSession.m} (96%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bd9cc1b..9011e7f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,7 @@ version: 2.1 +orbs: + macos: circleci/macos@2 commands: auxiliary_setup: @@ -83,6 +85,10 @@ commands: - auxiliary_setup # - install_cocoapods - install_pods + - macos/preboot-simulator: + version: "<>" + platform: "iOS" + device: "<>" - run_tests: os: <> simulator: <> @@ -108,11 +114,11 @@ commands: jobs: test_ios18: macos: - xcode: "16.1.0" - resource_class: macos.m1.medium.gen1 + xcode: "16.2.0" + resource_class: m2pro.medium steps: - run_tests_flow: - os: "18.1" + os: "18.2" simulator: "iPhone 16" test_ios17: diff --git a/Podfile.lock b/Podfile.lock index 24dfef73..4fd84218 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -19,4 +19,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: c7c56130903936173a7ecee314611a525c115504 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.1 diff --git a/TreasureData.xcodeproj/project.pbxproj b/TreasureData.xcodeproj/project.pbxproj index aadfa5fc..19449aba 100644 --- a/TreasureData.xcodeproj/project.pbxproj +++ b/TreasureData.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ 6B7380AC192A09160097D56E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6B7380AA192A09160097D56E /* InfoPlist.strings */; }; 6B7380AE192A09160097D56E /* TreasureDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B7380AD192A09160097D56E /* TreasureDataTests.m */; }; 6B758E4E1C00C59A00D597F8 /* TDClient.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BF8C9321A3E9B76005B1804 /* TDClient.h */; }; - 6BB5A9D41D1A86EF0006A534 /* Session.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BB5A9D31D1A86EE0006A534 /* Session.m */; }; + 6BB5A9D41D1A86EF0006A534 /* TDSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BB5A9D31D1A86EE0006A534 /* TDSession.m */; }; 6BB5A9D61D1BBFE60006A534 /* SessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BB5A9D51D1BBFE60006A534 /* SessionTests.m */; }; 6BF8C92D1A3E971D005B1804 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BF8C92C1A3E971D005B1804 /* CoreLocation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 6BF8C92F1A3E972C005B1804 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BF8C92E1A3E972C005B1804 /* Security.framework */; }; @@ -75,7 +75,7 @@ 1950C4C633D1BEA93C441EFC /* TDIAPObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDIAPObserver.h; sourceTree = ""; }; 1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDIAPObserver.m; sourceTree = ""; }; 19CFD6BDE2E7D4AC4F0869FF /* Pods-TreasureDataTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureDataTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureDataTests/Pods-TreasureDataTests.release.xcconfig"; sourceTree = ""; }; - 201053E9204858F8009C7EFA /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; + 201053E9204858F8009C7EFA /* TDConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TDConstants.h; sourceTree = ""; }; 2053A39B2047F37F0089A959 /* TDUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDUtils.m; sourceTree = ""; }; 2053A39D2047F38B0089A959 /* TDUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDUtils.h; sourceTree = ""; }; 27C46146494E527DCE7A92A1 /* Pods-TreasureData-TreasureDataTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureData-TreasureDataTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureData-TreasureDataTests/Pods-TreasureData-TreasureDataTests.debug.xcconfig"; sourceTree = ""; }; @@ -95,8 +95,8 @@ 6B7380A9192A09160097D56E /* TreasureDataTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TreasureDataTests-Info.plist"; sourceTree = ""; }; 6B7380AB192A09160097D56E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 6B7380AD192A09160097D56E /* TreasureDataTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TreasureDataTests.m; sourceTree = ""; }; - 6BB5A9D21D1A86CD0006A534 /* Session.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Session.h; sourceTree = ""; }; - 6BB5A9D31D1A86EE0006A534 /* Session.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Session.m; sourceTree = ""; }; + 6BB5A9D21D1A86CD0006A534 /* TDSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDSession.h; sourceTree = ""; }; + 6BB5A9D31D1A86EE0006A534 /* TDSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDSession.m; sourceTree = ""; }; 6BB5A9D51D1BBFE60006A534 /* SessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionTests.m; sourceTree = ""; }; 6BF8C92C1A3E971D005B1804 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 6BF8C92E1A3E972C005B1804 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; @@ -111,7 +111,7 @@ D4602B9A0FADB71F2C158763 /* Pods-Common-TreasureDataTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Common-TreasureDataTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Common-TreasureDataTests/Pods-Common-TreasureDataTests.release.xcconfig"; sourceTree = ""; }; DC74A9280B244A4C25A4F155 /* Pods-TreasureData.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreasureData.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreasureData/Pods-TreasureData.release.xcconfig"; sourceTree = ""; }; DF259EBC22A5034A00697319 /* TDRequestOptionsKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDRequestOptionsKey.h; sourceTree = ""; }; - DF259EBD22A5138800697319 /* NSString+Helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Helpers.h"; sourceTree = ""; }; + DF259EBD22A5138800697319 /* NSString+TDHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+TDHelpers.h"; sourceTree = ""; }; DF9D4DC5230FBC4200682E41 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; E52CB7F121FDD6D300062EBA /* TreasureDataTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TreasureDataTests-Bridging-Header.h"; sourceTree = ""; }; E52CB7F421FDD78A00062EBA /* TDAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TDAPI.swift; sourceTree = ""; }; @@ -165,13 +165,13 @@ 4F99812D269844A000471FD4 /* TreasureDataInternal */ = { isa = PBXGroup; children = ( - DF259EBD22A5138800697319 /* NSString+Helpers.h */, + DF259EBD22A5138800697319 /* NSString+TDHelpers.h */, E5701BA5225755C5000FB17F /* TDClientInternal.h */, 2053A39D2047F38B0089A959 /* TDUtils.h */, 2053A39B2047F37F0089A959 /* TDUtils.m */, - 201053E9204858F8009C7EFA /* Constants.h */, - 6BB5A9D21D1A86CD0006A534 /* Session.h */, - 6BB5A9D31D1A86EE0006A534 /* Session.m */, + 201053E9204858F8009C7EFA /* TDConstants.h */, + 6BB5A9D21D1A86CD0006A534 /* TDSession.h */, + 6BB5A9D31D1A86EE0006A534 /* TDSession.m */, 1950C4C633D1BEA93C441EFC /* TDIAPObserver.h */, 1950CA957CA6115F3C3DD018 /* TDIAPObserver.m */, ); @@ -479,7 +479,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6BB5A9D41D1A86EF0006A534 /* Session.m in Sources */, + 6BB5A9D41D1A86EF0006A534 /* TDSession.m in Sources */, 6BF8C9341A3E9B76005B1804 /* TDClient.m in Sources */, 2053A39C2047F37F0089A959 /* TDUtils.m in Sources */, 6B738099192A09160097D56E /* TreasureData.m in Sources */, diff --git a/TreasureData/TreasureData.m b/TreasureData/TreasureData.m index c60160af..012f76e3 100644 --- a/TreasureData/TreasureData.m +++ b/TreasureData/TreasureData.m @@ -9,12 +9,12 @@ #import #import "TreasureData.h" #import "TDClient.h" -#import "Session.h" +#import "TDSession.h" #import "TDUtils.h" -#import "Constants.h" +#import "TDConstants.h" #import "TDIAPObserver.h" #import "TDClientInternal.h" -#import "NSString+Helpers.h" +#import "NSString+TDHelpers.h" #import static bool isTraceLoggingEnabled = false; diff --git a/TreasureDataInternal/NSString+Helpers.h b/TreasureDataInternal/NSString+TDHelpers.h similarity index 98% rename from TreasureDataInternal/NSString+Helpers.h rename to TreasureDataInternal/NSString+TDHelpers.h index 687f31f0..2b4c2717 100644 --- a/TreasureDataInternal/NSString+Helpers.h +++ b/TreasureDataInternal/NSString+TDHelpers.h @@ -1,5 +1,5 @@ // -// NSString+Helpers.h +// NSString+TDHelpers.h // TreasureData // // Created by Tung Vu on 6/3/19. diff --git a/TreasureDataInternal/Constants.h b/TreasureDataInternal/TDConstants.h similarity index 98% rename from TreasureDataInternal/Constants.h rename to TreasureDataInternal/TDConstants.h index 964c74a2..d748b17d 100644 --- a/TreasureDataInternal/Constants.h +++ b/TreasureDataInternal/TDConstants.h @@ -1,5 +1,5 @@ // -// Constants.h +// TDConstants.h // TreasureData // // Created by Huy Le on 3/1/18. diff --git a/TreasureDataInternal/TDIAPObserver.m b/TreasureDataInternal/TDIAPObserver.m index b94894d6..82700c23 100644 --- a/TreasureDataInternal/TDIAPObserver.m +++ b/TreasureDataInternal/TDIAPObserver.m @@ -11,7 +11,7 @@ #import "TDIAPObserver.h" #import "TreasureData.h" -#import "Constants.h" +#import "TDConstants.h" #import "TDUtils.h" diff --git a/TreasureDataInternal/Session.h b/TreasureDataInternal/TDSession.h similarity index 95% rename from TreasureDataInternal/Session.h rename to TreasureDataInternal/TDSession.h index 0fbdcc5b..f5ef2b6f 100644 --- a/TreasureDataInternal/Session.h +++ b/TreasureDataInternal/TDSession.h @@ -1,5 +1,5 @@ // -// Session.h +// TDSession.h // TreasureData // // Created by Mitsunori Komatsu on 6/22/16. diff --git a/TreasureDataInternal/Session.m b/TreasureDataInternal/TDSession.m similarity index 96% rename from TreasureDataInternal/Session.m rename to TreasureDataInternal/TDSession.m index 021b3b79..1a9a53b3 100644 --- a/TreasureDataInternal/Session.m +++ b/TreasureDataInternal/TDSession.m @@ -1,5 +1,5 @@ // -// Session.m +// TDSession.m // TreasureData // // Created by Mitsunori Komatsu on 6/22/16. @@ -7,7 +7,7 @@ // #import -#import "Session.h" +#import "TDSession.h" static int DEFAULT_SESSION_PENDING_MILLIS = 10 * 1000; diff --git a/TreasureDataInternal/TDUtils.m b/TreasureDataInternal/TDUtils.m index ff6127c1..57b7ac06 100644 --- a/TreasureDataInternal/TDUtils.m +++ b/TreasureDataInternal/TDUtils.m @@ -7,7 +7,7 @@ // #import "TDUtils.h" -#import "Constants.h" +#import "TDConstants.h" @import KeenClientTD; @implementation TDUtils diff --git a/TreasureDataTests/SessionTests.m b/TreasureDataTests/SessionTests.m index 0a6131c3..379fd1bf 100644 --- a/TreasureDataTests/SessionTests.m +++ b/TreasureDataTests/SessionTests.m @@ -7,7 +7,7 @@ // #import -#import "Session.h" +#import "TDSession.h" @interface SessionTests : XCTestCase diff --git a/TreasureDataTests/TreasureDataTests.m b/TreasureDataTests/TreasureDataTests.m index ce43a6f0..de75211f 100644 --- a/TreasureDataTests/TreasureDataTests.m +++ b/TreasureDataTests/TreasureDataTests.m @@ -10,7 +10,7 @@ #import "TreasureData.h" #import "TDClient.h" #import "TDClientInternal.h" -#import "Constants.h" +#import "TDConstants.h" #import "TDUtils.h" #import "TDIAPObserver.h"