Skip to content

Commit dff57f5

Browse files
committed
update with amplitude-core release
1 parent 1c63fca commit dff57f5

18 files changed

Lines changed: 364 additions & 214 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,39 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- runs-on: macos-14
19+
- runs-on: macos-15
2020
platform: iOS
21-
xcode: 16.1
21+
xcode: 16.4
2222
device: "iPhone 16"
2323
test-destination-os: latest
2424

25-
- runs-on: macos-14
25+
- runs-on: macos-15
2626
platform: iOS
27-
xcode: 16.1
28-
test-destination-os: 17.2
29-
device: "iPhone 15"
27+
xcode: 16.4
28+
test-destination-os: 18.5
29+
device: "iPhone 16"
3030

31-
- runs-on: macos-14
31+
- runs-on: macos-15
3232
platform: macOS
33-
xcode: 16.1
33+
xcode: 16.4
3434
test-destination-os: latest
3535

36-
- runs-on: macos-14
36+
- runs-on: macos-15
3737
platform: tvOS
38-
xcode: 16.1
38+
xcode: 16.4
3939
test-destination-os: latest
40-
device: "Apple TV 4K (3rd generation)"
40+
device: "Apple TV"
4141

42-
- runs-on: macos-14
42+
- runs-on: macos-15
4343
platform: watchOS
44-
xcode: 16.1
44+
xcode: 16.4
4545
test-destination-os: latest
46-
device: "Apple Watch Series 10 (46mm)"
46+
device: "Apple Watch Series 10 (42mm)"
4747

48-
- runs-on: macos-14
48+
- runs-on: macos-15
4949
platform: visionOS
50-
xcode: 16.1
51-
test-destination-os: latest
50+
xcode: 16.4
51+
test-destination-os: 2.5
5252
device: "Apple Vision Pro"
5353
steps:
5454
- name: Checkout
@@ -100,17 +100,17 @@ jobs:
100100
;;
101101
esac
102102
objc-example-test:
103-
runs-on: macos-14
103+
runs-on: macos-15
104104
steps:
105105
- name: Checkout
106-
uses: actions/checkout@v3
107-
- name: Set Xcode 15
106+
uses: actions/checkout@v4
107+
- name: Set Xcode 16
108108
run: |
109-
sudo xcode-select -switch /Applications/Xcode_16.1.app
109+
sudo xcode-select -switch /Applications/Xcode_16.4.app
110110
- name: Objective-C Example Tests (iOS)
111111
working-directory: Examples/AmplitudeObjCExample
112112
run: |
113113
xcodebuild test \
114114
-scheme AmplitudeObjCExample \
115115
-sdk iphonesimulator \
116-
-destination 'platform=iOS Simulator,name=iPhone 16'
116+
-destination 'platform=iOS Simulator,OS=18.5,name=iPhone 16'

Amplitude-Swift.xcodeproj/project.pbxproj

Lines changed: 272 additions & 147 deletions
Large diffs are not rendered by default.

Amplitude-Swift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Amplitude-Swift.xcodeproj/xcshareddata/xcschemes/Amplitude-Swift-Package-DisableUIKit.xcscheme

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
buildForAnalyzing = "YES">
1616
<BuildableReference
1717
BuildableIdentifier = "primary"
18-
BlueprintIdentifier = "amplitude-swift::Amplitude-Swift"
19-
BuildableName = "AmplitudeSwift.framework"
20-
BlueprintName = "Amplitude-Swift"
18+
BlueprintIdentifier = "EAED99F62EE7B47E00A5FC08"
19+
BuildableName = "AmplitudeSwiftNoUIKit.framework"
20+
BlueprintName = "Amplitude-Swift-NoUIKit"
2121
ReferencedContainer = "container:Amplitude-Swift.xcodeproj">
2222
</BuildableReference>
2323
</BuildActionEntry>
2424
</BuildActionEntries>
2525
</BuildAction>
2626
<TestAction
27-
buildConfiguration = "DebugDisableUIKiit"
27+
buildConfiguration = "Debug"
2828
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2929
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
3030
shouldUseLaunchSchemeArgsEnv = "YES"
3131
shouldAutocreateTestPlan = "YES">
3232
</TestAction>
3333
<LaunchAction
34-
buildConfiguration = "DebugDisableUIKiit"
34+
buildConfiguration = "Debug"
3535
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3636
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
3737
launchStyle = "0"
@@ -42,26 +42,17 @@
4242
allowLocationSimulation = "YES">
4343
</LaunchAction>
4444
<ProfileAction
45-
buildConfiguration = "ReleaseDisableUIKit"
45+
buildConfiguration = "Release"
4646
shouldUseLaunchSchemeArgsEnv = "YES"
4747
savedToolIdentifier = ""
4848
useCustomWorkingDirectory = "NO"
4949
debugDocumentVersioning = "YES">
50-
<MacroExpansion>
51-
<BuildableReference
52-
BuildableIdentifier = "primary"
53-
BlueprintIdentifier = "amplitude-swift::Amplitude-Swift"
54-
BuildableName = "AmplitudeSwift.framework"
55-
BlueprintName = "Amplitude-Swift"
56-
ReferencedContainer = "container:Amplitude-Swift.xcodeproj">
57-
</BuildableReference>
58-
</MacroExpansion>
5950
</ProfileAction>
6051
<AnalyzeAction
61-
buildConfiguration = "DebugDisableUIKiit">
52+
buildConfiguration = "Debug">
6253
</AnalyzeAction>
6354
<ArchiveAction
64-
buildConfiguration = "ReleaseDisableUIKit"
55+
buildConfiguration = "Release"
6556
revealArchiveInOrganizer = "YES">
6657
</ArchiveAction>
6758
</Scheme>

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
],
2121
dependencies: [
2222
.package(url: "https://github.com/amplitude/analytics-connector-ios.git", from: "1.3.0"),
23-
.package(url: "https://github.com/amplitude/AmplitudeCore-Swift.git", from: "1.2.4"),
23+
.package(url: "https://github.com/amplitude/AmplitudeCore-Swift.git", from: "1.3.1"),
2424
],
2525
targets: [
2626
.target(

Package@swift-5.9.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let package = Package(
2121
],
2222
dependencies: [
2323
.package(url: "https://github.com/amplitude/analytics-connector-ios.git", from: "1.3.0"),
24-
.package(url: "https://github.com/amplitude/AmplitudeCore-Swift.git", from: "1.2.4"),
24+
.package(url: "https://github.com/amplitude/AmplitudeCore-Swift.git", from: "1.3.1"),
2525
],
2626
targets: [
2727
.target(

Sources/Amplitude/Amplitude.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
@_spi(Internal)
2-
@_exported import AmplitudeCore
1+
#if AMPLITUDE_DISABLE_UIKIT
2+
@_spi(Internal) @_exported import AmplitudeCoreNoUIKit
3+
#else
4+
@_spi(Internal) @_exported import AmplitudeCore
5+
#endif
6+
37
import Foundation
48

59
public class Amplitude {
@@ -128,7 +132,11 @@ public class Amplitude {
128132
trackingQueue.suspend()
129133
self.configuration = configuration
130134

135+
#if AMPLITUDE_DISABLE_UIKIT
136+
let serverZone: AmplitudeCoreNoUIKit.ServerZone
137+
#else
131138
let serverZone: AmplitudeCore.ServerZone
139+
#endif
132140
switch configuration.serverZone {
133141
case .US:
134142
serverZone = .US

Sources/Amplitude/Configuration.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77

88
import Foundation
99

10-
@_spi(Internal)
11-
import AmplitudeCore
10+
#if AMPLITUDE_DISABLE_UIKIT
11+
@_spi(Internal) import AmplitudeCoreNoUIKit
12+
#else
13+
@_spi(Internal) import AmplitudeCore
14+
#endif
1215

1316
public class Configuration {
1417

Sources/Amplitude/Events/BaseEvent.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Created by Marvin Liu on 11/3/22.
66
//
77

8+
#if AMPLITUDE_DISABLE_UIKIT
9+
import AmplitudeCoreNoUIKit
10+
#else
811
import AmplitudeCore
12+
#endif
913
import Foundation
1014

1115
open class BaseEvent: EventOptions, AnalyticsEvent, Codable {

Sources/Amplitude/Identity.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Created by Chris Leonavicius on 3/28/25.
66
//
77

8+
#if AMPLITUDE_DISABLE_UIKIT
9+
import AmplitudeCoreNoUIKit
10+
#else
811
import AmplitudeCore
12+
#endif
913

1014
public struct Identity: AnalyticsIdentity {
1115
public var userId: String?

0 commit comments

Comments
 (0)