Skip to content

Commit

Permalink
feat: Dispatch operations to internal queue
Browse files Browse the repository at this point in the history
  • Loading branch information
crleona committed May 7, 2024
1 parent 0cd014a commit 1c996df
Show file tree
Hide file tree
Showing 20 changed files with 532 additions and 109 deletions.
5 changes: 5 additions & 0 deletions Amplitude-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
3E281B8C2B967F19009D913B /* Diagonostics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E281B8B2B967F19009D913B /* Diagonostics.swift */; };
3E281B8E2B96833D009D913B /* DiagnosticsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E281B8D2B96833D009D913B /* DiagnosticsTests.swift */; };
3E281B912B9BCC14009D913B /* DispatchQueueHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E281B902B9BCC14009D913B /* DispatchQueueHolder.swift */; };
4E05BB942BE41AEB009DE475 /* Amplitude+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E05BB932BE41AEB009DE475 /* Amplitude+Extensions.swift */; };
4E2B646B2BA127460010E6F8 /* UIKitScreenViewsPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E2B646A2BA127460010E6F8 /* UIKitScreenViewsPluginTests.swift */; };
4E3871622BB34DBC002890AB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B6DF481F2B5B45BE00B3E6AA /* PrivacyInfo.xcprivacy */; };
8EDEC02B99EE2092B567A61D /* ObjCIngestionMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDEC500EBDA8B813056E2DB /* ObjCIngestionMetadata.swift */; };
Expand Down Expand Up @@ -150,6 +151,7 @@
3E281B8B2B967F19009D913B /* Diagonostics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Diagonostics.swift; sourceTree = "<group>"; };
3E281B8D2B96833D009D913B /* DiagnosticsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiagnosticsTests.swift; sourceTree = "<group>"; };
3E281B902B9BCC14009D913B /* DispatchQueueHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchQueueHolder.swift; sourceTree = "<group>"; };
4E05BB932BE41AEB009DE475 /* Amplitude+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Amplitude+Extensions.swift"; sourceTree = "<group>"; };
4E2B646A2BA127460010E6F8 /* UIKitScreenViewsPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitScreenViewsPluginTests.swift; sourceTree = "<group>"; };
8EDEC0630C3B587334275D9B /* AmplitudeSessionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AmplitudeSessionTests.swift; sourceTree = "<group>"; };
8EDEC1160D95DC3F0E48DDF7 /* ObjCPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjCPlugin.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -466,6 +468,7 @@
8EDECBC5925DC68913C7CB89 /* Migration */,
BA1EC0F32A9F2FC700C2D547 /* DefaultTrackingOptionsTests.swift */,
BA1EC0F52A9F63FD00C2D547 /* AmplitudeIOSTests.swift */,
4E05BB932BE41AEB009DE475 /* Amplitude+Extensions.swift */,
);
name = Tests;
path = Tests/AmplitudeTests;
Expand Down Expand Up @@ -662,6 +665,7 @@
/* Begin PBXShellScriptBuildPhase section */
3E281B8F2B98EC92009D913B /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -713,6 +717,7 @@
OBJ_156 /* HttpClientTests.swift in Sources */,
D01043612B6C5A8500F8173C /* SandboxHelperTests.swift in Sources */,
OBJ_157 /* PersistentStorageResponseHandlerTests.swift in Sources */,
4E05BB942BE41AEB009DE475 /* Amplitude+Extensions.swift in Sources */,
OBJ_158 /* UrlExtensionTests.swift in Sources */,
8EDEC4EE0DE1C89889F451B5 /* QueueTimeTests.swift in Sources */,
BA1EC0F62A9F63FD00C2D547 /* AmplitudeIOSTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objectVersion = 63;
objects = {

/* Begin PBXBuildFile section */
4E890A202BAB82DF00B3F736 /* Amplitude_Swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E890A142BAB814A00B3F736 /* Amplitude_Swift.framework */; };
4E3ECB742BE5B96400FD5CC0 /* TestAmplitude.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E3ECB732BE5B96400FD5CC0 /* TestAmplitude.swift */; };
4E890A202BAB82DF00B3F736 /* AmplitudeSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E890A142BAB814A00B3F736 /* AmplitudeSwift.framework */; };
BA2E1DA42AC1EA220074E74F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BA2E1DA32AC1EA220074E74F /* AppDelegate.m */; };
BA2E1DA72AC1EA220074E74F /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BA2E1DA62AC1EA220074E74F /* SceneDelegate.m */; };
BA2E1DAA2AC1EA220074E74F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BA2E1DA92AC1EA220074E74F /* ViewController.m */; };
Expand Down Expand Up @@ -50,6 +51,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
4E3ECB732BE5B96400FD5CC0 /* TestAmplitude.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestAmplitude.swift; sourceTree = "<group>"; };
4E890A0C2BAB814A00B3F736 /* Amplitude-Swift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Amplitude-Swift.xcodeproj"; path = "../../Amplitude-Swift.xcodeproj"; sourceTree = "<group>"; };
BA2E1D9F2AC1EA220074E74F /* AmplitudeObjCExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AmplitudeObjCExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
BA2E1DA22AC1EA220074E74F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -72,7 +74,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4E890A202BAB82DF00B3F736 /* Amplitude_Swift.framework in Frameworks */,
4E890A202BAB82DF00B3F736 /* AmplitudeSwift.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -89,7 +91,7 @@
4E890A0D2BAB814A00B3F736 /* Products */ = {
isa = PBXGroup;
children = (
4E890A142BAB814A00B3F736 /* Amplitude_Swift.framework */,
4E890A142BAB814A00B3F736 /* AmplitudeSwift.framework */,
4E890A162BAB814A00B3F736 /* Amplitude_SwiftTests.xctest */,
);
name = Products;
Expand Down Expand Up @@ -137,6 +139,7 @@
isa = PBXGroup;
children = (
BA2E1DBE2AC1EA240074E74F /* AmplitudeObjCExampleTests.m */,
4E3ECB732BE5B96400FD5CC0 /* TestAmplitude.swift */,
);
path = AmplitudeObjCExampleTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -205,12 +208,12 @@
};
BA2E1DB92AC1EA230074E74F = {
CreatedOnToolsVersion = 14.2;
TestTargetID = BA2E1D9E2AC1EA220074E74F;
LastSwiftMigration = 1530;
};
};
};
buildConfigurationList = BA2E1D9A2AC1EA220074E74F /* Build configuration list for PBXProject "AmplitudeObjCExample" */;
compatibilityVersion = "Xcode 14.0";
compatibilityVersion = "Xcode 15.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand All @@ -237,10 +240,9 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
4E890A142BAB814A00B3F736 /* Amplitude_Swift.framework */ = {
4E890A142BAB814A00B3F736 /* AmplitudeSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
name = Amplitude_Swift.framework;
path = AmplitudeSwift.framework;
remoteRef = 4E890A132BAB814A00B3F736 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
Expand Down Expand Up @@ -292,6 +294,7 @@
buildActionMask = 2147483647;
files = (
BA2E1DBF2AC1EA240074E74F /* AmplitudeObjCExampleTests.m in Sources */,
4E3ECB742BE5B96400FD5CC0 /* TestAmplitude.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -495,7 +498,7 @@
BA2E1DD22AC1EA240074E74F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -504,15 +507,16 @@
PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AmplitudeObjCExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AmplitudeObjCExample.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AmplitudeObjCExample";
};
name = Debug;
};
BA2E1DD32AC1EA240074E74F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -521,8 +525,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AmplitudeObjCExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AmplitudeObjCExample.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AmplitudeObjCExample";
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA2E1D9E2AC1EA220074E74F"
BuildableName = "AmplitudeObjCExample.app"
BlueprintName = "AmplitudeObjCExample"
ReferencedContainer = "container:AmplitudeObjCExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA2E1DB92AC1EA230074E74F"
BuildableName = "AmplitudeObjCExampleTests.xctest"
BlueprintName = "AmplitudeObjCExampleTests"
ReferencedContainer = "container:AmplitudeObjCExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA2E1D9E2AC1EA220074E74F"
BuildableName = "AmplitudeObjCExample.app"
BlueprintName = "AmplitudeObjCExample"
ReferencedContainer = "container:AmplitudeObjCExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA2E1D9E2AC1EA220074E74F"
BuildableName = "AmplitudeObjCExample.app"
BlueprintName = "AmplitudeObjCExample"
ReferencedContainer = "container:AmplitudeObjCExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 1c996df

Please sign in to comment.